Change "reloc_howto_type" typedef to be "const", since all uses of it are (or
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 Wed Jan 11 21:31:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
2
3 * reloc.c (reloc_howto_type): Make typedef include `const'.
4 * aout-ns32k.c, aoutx.h, bout.c, cf-m68klynx.c, coff-i386.c,
5 coff-i960.c, coff-m68k.c, cofflink.c, cpu-ns32k.c, ecoff.c,
6 elf32-hppa.c, elf32-i386.c, elf32-mips.c, elf32-sparc.c,
7 elfcode.h, libbfd-in.h, linker.c, mipsbsd.c, nlm32-ppc.c, oasys.c,
8 reloc.c, som.c: Don't use `const' in combination with
9 `reloc_howto_type'.
10 start-sanitize-arc
11 * elf32-arc.c: Ditto.
12 end-sanitize-arc
13 * bfd-in2.h, libbfd.h: Regenerated.
14
15 Wed Jan 11 14:36:41 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
16
17 * sunos.c (sunos_add_one_symbol): Don't core dump if a multiple
18 definition of an absolute symbol is encountered.
19
20 * linker.c (_bfd_generic_link_add_one_symbol): Ignore
21 redefinitions of an absolute symbol to the same value.
22
23 Mon Jan 9 15:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
24
25 * elfcode.h (elf_link_add_object_symbols): It's reasonable for no
26 flags to be set, so don't insist otherwise.
27
28 Fri Jan 6 16:39:40 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
29
30 * elfcode.h (elf_slurp_symbol_table): Don't set BSF_GLOBAL for an
31 undefined or common symbol.
32 (elf_link_add_object_symbols): Likewise.
33
34 Wed Jan 4 14:14:05 1995 Jeff Law (law@snake.cs.utah.edu)
35
36 * som.c (bfd_section_from_som_symbol): Only return sections which
37 correspond to subspaces.
38
39 * som.c (som_begin_writing): Don't forget to bump the
40 total_subspaces when writing the unloadable subspaces.
41
42 Wed Dec 28 20:54:47 1994 Jeff Law (law@snake.cs.utah.edu)
43
44 * som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identify
45 bss-like sections.
46 (som_get_section_contents): Likewise.
47 (som_set_section_contents): Likewise.
48
49 Tue Dec 27 14:03:47 1994 Jeff Law (law@snake.cs.utah.edu)
50
51 * som.c (setup_sections): Turn off SEC_HAS_CONTENTS for bss-like
52 sections.
53
54 Tue Dec 20 15:30:12 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
55
56 * coffgen.c (bfd_debug_section): Deleted.
57 (coff_section_from_bfd_index): Return absolute section for debug
58 symbol.
59 (coff_write_symbol): Set BSF_DEBUGGING for C_FILE symbols. If
60 BSF_DEBUGGING is set, set section to N_DEBUG.
61 (coff_bfd_make_debug_symbol): Use absolute section.
62
63 * elfcode.h (assign_file_positions_except_relocs): In assertion,
64 force all values to the same type.
65
66 Tue Dec 20 11:11:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
67
68 * coff-h8300.c (howto_table): All relocs get a special function.
69 (special): Never do anything when linking -r.
70
71 Tue Dec 20 13:58:01 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
72
73 * i386linux.c (linux_add_one_symbol): Don't do anything Linux
74 specific if this is not a Linux hash table. From Eric Youngdale
75 <eric@aib.com>.
76
77 Patches from kkojima@mix.or.jp (Kazumoto Kojima):
78 * mipsbsd.c (mips_howto_table_ext): Change sizes of memory relocs
79 apply to from two bytes to four bytes.
80 * MY(reloc_howto_type_lookup): Handle BFD_RELOC_CTOR.
81
82 * elf32-i386.c (elf_i386_relocate_section): Correct and expand the
83 list of cases for which relocation need not be computed.
84 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
85
86 start-sanitize-arc
87 Tue Dec 20 09:01:01 1994 Doug Evans <dje@canuck.cygnus.com>
88
89 * elf32-arc.c (elf_arc_howto_table, R_ARC_B22_PCREL): Value is
90 right-shifted 2 bits. Fix dst_mask.
91 end-sanitize-arc
92
93 Mon Dec 19 23:09:16 1994 Jeff Law (law@snake.cs.utah.edu)
94
95 * elf32-hppa.c (elf32_hppa_read_symext_info): Delete do_locals and
96 do_globals arguments, always read symbol extension information for
97 globals and locals. All callers changed.
98 (elf32_hppa_size_stubs): Rework to only read symbol extension
99 information once for each input bfd. 10% improvement in linker
100 performance.
101
102 Fri Dec 16 12:28:46 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
103
104 * elfcode.h (elf_section_from_bfd_section): Check
105 bfd_is_abs_section, etc., only after checking for the section in
106 the BFD and after calling the backend routine.
107
108 Wed Dec 14 20:21:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
109
110 * elfcode.h (elf_map_symbols): Only use section symbols whose
111 value is the start of the section, checking output_offset when
112 using output_section. When creating a new symbol, set the value
113 to 0, since BFD symbol values are section relative.
114
115 Tue Dec 13 13:31:06 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
116
117 * cpu-z8k.c (arch_info_struct): Make z8002 the default
118 architecture.
119
120 Fri Dec 9 12:43:05 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
121
122 * elfcode.h (elf_bfd_link_add_symbols): If the first object in the
123 archive is not an ELF object, pass the archive to the add_symbols
124 entry point appropriate for the first object. From Eric Youngdale
125 <eric@aib.com>.
126 * aoutx.h (NAME(aout,link_add_symbols)): Similar change if the
127 first object is not an a.out object.
128
129 * elf32-i386.c (elf_i386_relocate_section): Don't compute
130 relocation in cases where we won't use it.
131 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
132
133 Thu Dec 8 14:19:41 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
134
135 * pc532-mach.c (NAME): Define to use ns32kaout prefix.
136 * ns32knetbsd.c (NAME): Ditto.
137 (ns32kaout_32_get_section_contents): Define to standard aout-32
138 version.
139
140 Fri Dec 2 13:56:49 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
141
142 * coff-mips.c (mips_read_relocs): New static function, broken out
143 of mips_relax_section.
144 (mips_relax_section): Call mips_read_relocs.
145 (bfd_mips_ecoff_create_embedded_relocs): New function.
146 * bfd-in.h (bfd_mnips_ecoff_create_embedded_relocs): Declare.
147 * bfd-in2.h: Rebuild.
148
149 Wed Nov 30 14:12:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
150
151 * coff-sh.c: Use _bfd_dummy_target instead of no_archive.
152
153 start-sanitize-arc
154 Tue Nov 29 17:14:21 1994 Doug Evans <dje@canuck.cygnus.com>
155
156 * archures.c: Initial support for the ARC.
157 * reloc.c, targets.c, config.bfd, configure.in, elfcode.h: Likewise.
158 * bfd-in2.h: Regenerated.
159 * libbfd.h: Likewise.
160 * config/arc-elf.mt: New file.
161 end-sanitize-arc
162
163 Tue Nov 29 14:00:19 1994 J.T. Conklin <jtc@.rtl.cygnus.com>
164
165 * config.bfd (i[345]86-*-freebsd*): Use i386-bsd as bfd_name.
166 * configure.host (i[345]86-*-freebsd*): Use i386bsd as my_host.
167
168 Mon Nov 28 15:36:04 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
169
170 * config/m68k-nbsd.mt (DEFAULT_VECTOR): set to m68knetbsd_vec.
171 * Makefile.in: Rebuilt dependancies.
172 (CFILES): Added m68knetbsd.c.
173 (HFILES): Added netbsd.h.
174
175 Wed Nov 23 19:21:41 1994 Steve Chamberlain (sac@jonny.cygnus.com)
176
177 * coff-sh.c (shlcoff_vec): New target vector.
178 (no_archive): New function.
179 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle
180 little endian SH.
181 * configure.in: Handle shl.
182 * targets.c (bfd_target_vector): Add shlcoff_vec.
183 * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
184
185 Wed Nov 23 10:50:13 1994 Jeff Law (law@snake.cs.utah.edu)
186
187 * elfcode.h (write_relocs): Do not subtract the section's vma from
188 the reloc's offset when writing .o's. Instead add the section's
189 vma to the reloc's offset when writing an executable or shared
190 library.
191
192 Tue Nov 22 23:34:37 1994 Jeff Law (law@snake.cs.utah.edu)
193
194 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Do not add
195 input_section->vma to the relocation's offset.
196
197 Mon Nov 21 12:37:25 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
198
199 * srec.c (srec_get_reloc_upper_bound): Define.
200 (srec_canonicalize_reloc): Define.
201 (srec_bfd_reloc_type_lookup): Define.
202 (srec_vec, symbolsrec_vec): Use BFD_JUMP_TABLE_RELOCS (srec).
203
204 Sat Nov 19 03:10:51 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
205
206 * configure.host (i[345]86-*-solaris*): Use solaris2 to
207 enable extraction of procfs info from core file for GDB.
208
209 Thu Nov 17 17:37:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
210
211 * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL.
212 * bfd-in2.h, libbfd.h: Rebuilt.
213
214 Thu Nov 17 13:12:08 1994 Jeff Law (law@snake.cs.utah.edu)
215
216 * bfd/elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the
217 vma from the output_section containing $global$ when computing
218 global_vlaue.
219
220 Thu Nov 17 14:29:13 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
221
222 * archive.c (_bfd_write_archive_contents): Round up the archive
223 header size of the extended name table to an even number.
224
225 Wed Nov 16 16:08:06 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
226
227 * coff-sh.c: Deleted some code that was commented out or inside
228 "#if 0".
229 (COFF_LONG_FILENAMES): Define.
230
231 * cpu-sh.c (arch_info_struct): Convert name to lowercase, for
232 consistency with other architectures.
233
234 Sat Nov 12 23:50:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
235
236 * elfcode.h (elf_export_symbol): Also export symbols which are
237 referenced by a regular file.
238
239 Fri Nov 11 14:29:31 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
240
241 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add
242 export_dynamic argument, and handle it.
243 (elf_export_symbol): New function.
244 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
245 (bfd_elf64_size_dynamic_sections): Update declaration.
246 * bfd-in2.h: Rebuild.
247
248 Fri Nov 11 10:35:33 1994 Jeff Law (law@snake.cs.utah.edu)
249
250 * hpux-core.c (hpux_core_struct): Delete handles for the
251 data, reg and stack sections. They're never used. Delete
252 accessor macros.
253 (make_bfd_asection): Use bfd_make_section_anyway since debugging
254 cores from dynamic executables may have several sections with the
255 same logical name.
256 (hpux_core_core_file_p): Don't save handles to data, reg and
257 stack sections. Handle CORE_TEXT, CORE_MMF and CORE_SHM.
258
259 Tue Nov 8 13:03:30 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
260
261 * bout.c (callj_callback): Add new argument shrinking. Change all
262 callers. Handle relocs against section symbols correctly. If not
263 shrinking, don't subtract out dstidx; the subtraction is already
264 in the object file.
265
266 Sun Nov 6 12:52:00 1994 Jeff Law (law@snake.cs.utah.edu)
267
268 * som.h: Conditionally include <shl.h> and <dl.h>.
269
270 Thu Nov 3 18:19:13 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
271
272 * Makefile.in (ALL_MACHINES): Include m68knetbsd.o.
273
274 * config/i386linux.mh (EXTRALIBS): Include -lm.
275
276 Patches from DJ Delorie:
277 * coff-go32.c: Replacement file, uses coff-i386.c with minor
278 changes.
279 * coff-i386.c (TARGET_UNDERSCORE): allow other files to override
280 underscore also
281 * makefile.dos: del ctor.o, add cofflink.o and elf32.o
282
283 * aoutx.h (adjust_o_magic): If user set data section vma, use it
284 to determine the default bss vma. Patch from Takada Hiroaki,
285 hiro@is.s.u-tokyo.ac.jp.
286 (machine_type, case bfd_arch_vax): Set *unknown to false. Patch
287 from John David Anglin <dave@hiauly1.hia.nrc.ca>.
288
289 * configure.in (tb): Rename ns32knetbsd_vec to pc532netbsd_vec,
290 since that's what it's called.
291
292 Wed Nov 2 15:24:51 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
293
294 * archive.c (normalize): Change to take a BFD as an argument.
295 Change VMS version to use bfd_alloc rather than malloc, so that we
296 don't lose the memory forever.
297 (_bfd_construct_extended_name_table): Check the name of an archive
298 entry which is not being extended, and correct it if it is wrong.
299 This is necessary in case the archive was constructed by another
300 program which put an entry in the extended name table which we
301 don't plan to put in ourselves. From jjc@jclark.com (James
302 Clark).
303 (bfd_dont_truncate_arname): Check return value of normalize.
304
305 Mon Oct 31 14:19:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
306
307 * elf32-hppa.c (ELF32_PARISC_SX_SIZE): Define.
308 (ELF32_PARISC_SX_GET, ELF32_PARISC_SX_PUT): Define.
309 (symextn_entry): Don't define.
310 (symext_chain_size): Change type to bfd_size_type.
311 (symextn_contents): Change type to bfd_byte *.
312 (elf32_hppa_backend_begin_write_processing): Use
313 ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).
314 (elf32_hppa_size_symext): Likewise. Also, change type of sizep to
315 bfd_size_type *.
316 (elf_hppa_tc_make_sections): Cast symextn_contents assignment to
317 bfd_byte *. Use ELF32_PARISC_SX_PUT instead of direct assignment.
318 (elf32_hppa_backend_symbol_table_processing): Use
319 ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS). Use
320 ELF32_PARISC_SX_GET insetad of direct assignment.
321 (elf32_hppa_read_symext_info): Change type of contents, and its
322 assignment cast, to bfd_byte *. Use ELF32_PARISC_SX_SIZE instead
323 of sizeof (symextn_entry). Use symext_entryS instead of
324 symextn_entry. Use ELF32_PARISC_SX_GET instead of direct
325 assignment.
326
327 * archive.c (bfd_dont_truncate_arname): Add the ar padding
328 character, if there is room for it, even if the name is the
329 maximum length.
330
331 * elfcode.h (assign_file_positions_except_relocs): Sort the ELF
332 headers by section address when assigning file positions.
333 (elf_sort_hdrs): New static function.
334
335 Sun Oct 30 18:56:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
336
337 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Create DT_INIT
338 and DT_FINI dynamic entries based on the existence of _init and
339 _fini symbols, not on the .init and .fini sections. This is
340 compatible with some SVR4 linkers.
341 (elf_bfd_final_link): Corresponding change.
342
343 Sat Oct 29 12:18:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
344
345 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't move a
346 symbol with a PLT entry into the .plt section if it is defined in
347 a regular file.
348 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
349
350 * linker.c (_bfd_generic_link_add_archive_symbols): It's not an
351 error if an empty archive has no symbol table.
352 * ecoff.c (ecoff_link_add_archive_symbols): Likewise.
353 * elfcode.h (elf_link_add_archive_symbols): Likewise.
354
355 Fri Oct 28 10:08:41 1994 J.T. Conklin (jtc@rtl.cygnus.com)
356
357 NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
358 * config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
359 * configure.in (m68knetbsd_vec): Added.
360 * targets.c (bfd_m68knetbsd_vec): Added.
361 * hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
362 * Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
363
364 miscellaneous cleanup required by all netbsd targets, based on work
365 by Andrew Cagney <cagney@highland.com.au>:
366 * netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
367 N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed. Generic a.out
368 definitions work.
369 * i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
370 (MY(write_object_contents)): Use NetBSD's magic numbers
371
372 Thu Oct 27 16:59:52 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
373
374 * libelf.h (struct bfd_elf_section_data): Add field dynindx.
375 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Don't finalize
376 the .dynsym, .dynstr or .hash sections until after the backend
377 size_dynamic_sections routine, so that it can add dynamic symbols
378 if it wants to.
379 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't define the
380 symbol to be in the .plt section when generating a shared library
381 if it is a defined symbol.
382 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
383 (elf32_sparc_size_dynamic_sections): When generating a shared
384 library, allocate space for a dynamic symbol for each output
385 section, storing the index in the dynindx field of the ELF section
386 data. Adjust the other dynindx fields to account for this.
387 (elf32_sparc_adjust_dynindx): New static function.
388 (elf32_sparc_relocate_section): When copying a reloc into a shared
389 library, use the original addend as appropriate. Convert an
390 R_SPARC_32 reloc into an R_SPARC_RELATIVE reloc. Use the dynamic
391 symbol index of the output section, not the normal symbol index.
392 (elf32_sparc_finish_dynamic_sections): Don't die if a section does
393 not exist when setting the value of the dynamic tags. Write out
394 a dynamic symbol for each output section.
395
396 Wed Oct 26 01:15:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
397
398 * aoutx.h (aout_link_input_section): Don't bother to read or write
399 the relocs if there aren't any.
400
401 Tue Oct 25 11:44:38 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
402
403 * Makefile.in (ALL_MACHINES): Add tekhex.o.
404 * targets.c (bfd_target_vector): If SELECT_VECS is not defined,
405 include tekhex_vec.
406 * tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
407 (getvalue, getsym, out): Likewise.
408 (find_chunk): Remove unused variable s.
409 (first_phase): Remove unused variable s.
410 (pass_over): Remove unused variable address.
411 (tekhex_object_p): Remove unused variable section.
412 (move_section_contents): Change return type from boolean to void.
413 (tekhex_write_object_contents): Remove unused variables tdata and
414 list.
415
416 * linker.c (enum link_action): Add CIND.
417 (link_action): Change COMMON_ROW\indr from MDEF to CREF. Change
418 INDR_ROW\common from MDEF to CIND.
419 (_bfd_generic_link_add_one_symbol): In CREF case, handle an
420 existing symbol which is indirect rather than defined. Add new
421 CIND case.
422
423 Mon Oct 24 15:33:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
424
425 Change S-record backend to use multiple sections to handle gaps in
426 file.
427 * srec.c (srec_data_list_struct): Move field next from last place
428 to first. Change type of data to bfd_byte *.
429 (struct srec_symbol): Define.
430 (tdata_type): Remove done_symbol_read, count, strings, symbol_idx,
431 string_size, string_idx. Change type of symbols to struct
432 srec_symbol *. Add symtail and csymbols.
433 (low, high): Remove.
434 (size_symbols, fillup_symbols, size_srec, fillup): Remove.
435 (white, skipwhite, pass_over, object_p): Remove.
436 (srec_mkobject): Call srec_init. Adjust tdata initialization for
437 field changes.
438 (srec_get_byte, srec_bad_byte): New static functions.
439 (srec_new_symbol, srec_scan): New static functions.
440 (srec_object_p): Change type of b to bfd_byte. Explicitly set
441 wrong_format error. Call srec_mkobject and srec_scan instead of
442 object_p.
443 (symbolsrec_object_p): Likewise. Also, change b to be only two
444 bytes.
445 (srec_read_section): New static function.
446 (srec_get_section_contents): Call srec_read_section rather than
447 pass_over. Handle zero length section correctly.
448 (set_set_arch_mach): Change from function to macro.
449 (srec_set_section_contents): Change data to bfd_byte *.
450 (srec_write_record): Change data, end and src to bfd_byte *.
451 (srec_write_header): Change buffer and dst to bfd_byte *.
452 (srec_write_section): Change location to bfd_byte *.
453 (srec_write_terminator): Change buffer to bfd_byte *.
454 (srec_get_symtab_upper_bound): Don't call
455 srec_get_section_contents.
456 (srec_get_symtab): Rewrite.
457
458 * ecoff.c (ecoff_set_symbol_info): Set udata.i to 0, not NULL.
459
460 Fri Oct 21 16:43:13 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
461
462 * libaout.h (machine_type): added M_68K_NETBSD and M_SPARC_NETBSD.
463 * i386netbsd.c, ns32knetbsd.c, sparcnetbsd.c: removed RCS Id's.
464 changed how PAGE_SIZE and SEGMENT_SIZE are defined so they are
465 consistant with each other.
466 * netbsd.h (N_HEADER_IN_TEXT, TEXT_START_ADDR): NetBSD fits its
467 header into the start of its text segment.
468
469 Fri Oct 21 17:13:07 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
470
471 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case for
472 _construct_extended_name_table.
473 (bfd_target): Add _bfd_construct_extended_name_table.
474 * archive.c (_bfd_archive_bsd_construct_extended_name_table): New
475 function.
476 (_bfd_archive_coff_construct_extended_name_table): New function.
477 (_bfd_construct_extended_name_table): Renamed by adding a leading
478 underscore, and made externally visible. Added trailing_slash
479 argument, and used it instead of elf_style. Changed type of
480 tablen to bfd_size_type *.
481 (_bfd_write_archive_contents): Use BFD_SEND to call
482 construct_extended_name_table. Use the returned name.
483 * libbfd-in.h (_bfd_construct_extended_name_table): Declare.
484 (_bfd_noarchive_construct_extended_name_table): Define.
485 (_bfd_archive_bsd_construct_extended_name_table): Declare.
486 (_bfd_archive_coff_construct_extended_name_table): Declare.
487 * bfd-in2.h: Rebuild.
488 * libbfd.h: Rebuild.
489 * som.c (som_construct_extended_name_table): New static function.
490 * aout-target.h (MY_construct_extended_name_table): Define.
491 * coff-rs6000.c (rs6000coff_construct_extended_name_table):
492 Define.
493 * ieee.c (ieee_construct_extended_name_table): Define.
494 * libecoff.h (_bfd_ecoff_construct_extended_name_table): Define.
495 * oasys.c (oasys_construct_extended_name_table): Define.
496
497 Fix the ELF linker to not require an interpreter if no dynamic
498 objects were seen, even when linking PIC code.
499 * libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
500 (struct elf_link_hash_table): Add field dynamic_sections_created.
501 * elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
502 doesn't already exist.
503 (elf_link_add_object_symbols): Create dynamic sections based on
504 dynamic_sections_created field, not dynobj field. Don't bother to
505 set dynobj.
506 (elf_link_create_dynamic_sections): If dynamic sections were
507 already created, don't do anything. If dynobj is already set, use
508 it; otherwise, set it to the bfd argument. Don't initialize
509 dynsymcount. Only create dynstr if it does not exist. Set
510 dynamic_sections_created to true.
511 (NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
512 if no dynamic objects were seen.
513 (elf_adjust_dynamic_symbol): If a symbol has the
514 ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
515 (elf_bfd_final_link): Change most decisions based on dynobj to
516 check dynamic_sections_created instead.
517 (elf_link_output_extsym): Only handle dynamic symbols if a dynamic
518 object was seen.
519 * elf.c (_bfd_elf_link_hash_table_init): Initialize new field
520 dynamic_sections_created. Set dynsymcount to 1, not 0.
521 * elf32-i386.c (elf_i386_create_dynamic_sections): Call
522 elf_i386_create_got_section rather than creating the .got and
523 .got.plt sections.
524 (elf_i386_create_got_section): New static function.
525 (elf_i386_check_relocs): Just call elf_i386_create_got_section if
526 a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
527 Only create the .rel.got section, and only make space for a reloc,
528 for a global symbol or when generating a shared object. For a
529 R_386_PLT32 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
530 (elf_i386_adjust_dynamic_symbol): Rework initial assertion to
531 permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols. Create a
532 procedure linkage table entry for such symbols. But, if no
533 dynamic objects were seen, never create a PLT entry.
534 (elf_i386_size_dynamic_sections): If no dynamic objects were seen,
535 skip most of this function, and force the size of the .rel.got
536 section to zero.
537 (elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
538 symbol when no dynamic object was seen, initialize the contents of
539 the .got section. For a R_386_GOT32 against a local symbol, only
540 create a R_386_RELATIVE reloc when generating a shared object.
541 Treat a R_386_PLT32 reloc against a symbol for which we did not
542 create a PLT entry as a R_386_PC32 reloc.
543 (elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
544 entries and the PLT if we saw a dynamic object.
545 * elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
546 setting rightshift to 10. Fix R_SPARC_WPLT20 by setting
547 rightshift to 2, size to 2, bitsize to 30, and dst_mask to
548 0x3fffffff.
549 (elf32_sparc_create_dynamic_sections): Don't set the size of the
550 .plt section. Call elf32_sparc_create_got_section rather than
551 creating the .got section.
552 (elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
553 a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
554 Only create the .rela.got section, and only make space for a
555 reloc, for a global symbol or when generating a shared object.
556 Set the alignment of the .rela.got section to 2. For a
557 R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
558 (elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
559 permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols. Create a
560 procedure linkage table for such symbols. But, if no dynamic
561 objects were seen, never create a PLT entry. Initialize the size
562 of the .plt section.
563 (elf32_sparc_size_dynamic_sections): If no dynamic objects were
564 seen, skip most of this function, and force the size of the
565 .rela.got section to zero. Strip empty reloc sections, and strip
566 an empty .plt section.
567 (elf32_sparc_relocate_section): For a GOT reloc against a global
568 symbol when no dynamic object was seen, initialize the contents of
569 the .got section. For a GOT reloc against a local symbol, only
570 create a R_SPARC_RELATIVE reloc when generating a shared object.
571 Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
572 create a PLT entry as a R_SPARC_WDISP30 reloc.
573 (elf32_sparc_finish_dynamic_sections): Only fiddle with the
574 dynamic entries and the PLT if we saw a dynamic object.
575
576 Thu Oct 20 13:28:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
577
578 * elfcode.h (elf_map_symbols): Don't worry about section symbols
579 in a section not owned by any BFD.
580 (elf_section_from_bfd_section): Separate out loop which calls
581 backend routine. Check bfd_section and call the backend routine
582 even for a section not owned by any BFD.
583 * elf32-mips.c (mips_elf_section_from_bfd_section): Handle
584 .acommon section.
585
586 Wed Oct 19 13:28:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
587
588 * coffgen.c (coff_print_symbol): Make names for section number and
589 storage class slightly more verbose. It's not clear how many
590 characters I can justify using up, but before this change they
591 both were abbreviated "sc" which is (IMHO) clearly unacceptable.
592
593 Wed Oct 19 01:26:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
594
595 * binary.c (binary_set_section_contents): Set the base file
596 position from the lowest section VMA, not the start address.
597
598 * aoutx.h (NAME(aout,slurp_symbol_table)): Don't return an error
599 if there are no symbols.
600 * coffgen.c (coff_get_normalized_symtab): Likewise.
601 * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
602
603 Tue Oct 18 12:56:43 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
604
605 * aout-target.h (MY_bfd_copy_private_section_data): Only copy
606 subformat to another bfd_target_aout_flavour file.
607
608 * binary.c: New file for raw binary output format.
609 * Makefile.in (BFD_LIBS): Add binary.o.
610 (CFILES): Add binary.c.
611 * targets.c (binary_vec): Declare.
612 (bfd_target_vector): Include binary_vec.
613
614 * srec.c (tdata_type): Add field tail.
615 (srec_mkobject): Initialize tail.
616 (srec_set_section_contents): Sort S record list by address.
617
618 Mon Oct 17 11:38:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
619
620 * elfcode.h (elf_map_symbols): Sort the symbols into a new array,
621 rather than messing with Elf_Sym_Extra. Store the symbol index in
622 the udata.i field.
623 (swap_out_syms): Use outbound_syms as a pointer rather than as an
624 array. Don't worry about elf_sym_num.
625 * libelf.h (struct elf_sym_extra): Don't define.
626 (Elf_Sym_Extra): Don't define.
627 (struct elf_obj_tdata): Remove sym_extra field.
628 (elf_sym_extra): Don't define.
629 * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Use
630 udata.i rather than elf_sym_extra array.
631
632 * syms.c (asymbol): Change udata field into a union.
633 * bfd-in2.h: Rebuild.
634 * aoutx.h (NAME(aout,translate_symbol_table)): Use udata.p rather
635 than just udata.
636 * bout.c (perform_slip): Likewise.
637 * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
638 * ieee.c (ieee_slurp_external_symbols): Likewise.
639 * linker.c (generic_link_add_symbol_list): Likewise.
640 (default_indirect_link_order): Likewise.
641 * oasys.c (oasys_slurp_symbol_table): Likewise.
642 * reloc16.c (bfd_perform_slip): Likewise.
643 * srec.c (fillup_symbols): Likewise.
644 * coffcode.h (get_index): Use udata.i rather than just udata.
645 (coff_slurp_symbol_table): Likewise.
646 * coffgen.c (set_index): Likewise.
647 * ecoff.c (ecoff_set_symbol_info): Likewise.
648 * elfcode.h (elf_symbol_from_bfd_symbol): Likewise.
649 * libecoff.h (ecoff_get_sym_index, ecoff_set_sym_index): Likewise.
650 * som.c (compare_syms): Likewise.
651 (som_prep_for_fixups): Likewise.
652 (som_write_fixups): Likewise.
653
654 Use a hash table when writing out ELF symbol names.
655 * elfcode.h (elf_stringtab_init): New static function.
656 (bfd_new_strtab, bfd_add_to_strtab, bfd_add_2_to_strtab): Remove.
657 Change all callers to use elf_stringtab_init or
658 _bfd_stringtab_add, and get stringtab lengths using
659 _bfd_stringtab_size.
660 (elf_fake_sections): Change ignored argument to pointer to
661 boolean, and set the boolean to true if an error occurs. If an
662 error has already occurred, don't do anything.
663 (assign_section_numbers): Just set sh_size, not contents.
664 (elf_compute_section_file_positions): Pass the address of a
665 boolean to elf_fake_sections. Pass the address of a
666 bfd_strtab_hash to swap_out_syms. Write out the .strtab section.
667 (prep_headers): Change shstrtab to bfd_strtab_hash.
668 (swap_out_syms): Take a pointer to a bfd_strtab_hash as an
669 argument. Set it to the symbol names.
670 (NAME(bfd_elf,write_object_contents)): Write out the section
671 header names using _bfd_stringtab_emit.
672 (elf_debug_section): Remove first argument; get the section name
673 via the bfd_section pointer. Change caller.
674 (elf_bfd_final_link): Write out the symbol names using
675 _bfd_stringtab_emit. Likewise for the .dynstr section contents.
676 Free the symbol names at the end of the function.
677 (elf_link_input_bfd): Remove the last argument, output_names,
678 from relocate_section. Save the old symbol contents before
679 calling elf_link_output_sym, and restore them afterward.
680 * libelf.h (struct elf_link_hash_table): Change dynstr field to
681 struct bfd_strtab_hash.
682 (struct elf_backend_data): Remove last argument, output_names,
683 from elf_backend_relocate_section field.
684 (struct strtab): Don't define.
685 (struct elf_obj_tdata): Change strtab_ptr field to struct
686 bfd_strtab_hash.
687 * elf32-hppa.c (elf32_hppa_relocate_section): Remove last
688 argument, output_names.
689 * elf32-i386.c (elf_i386_relocate_section): Likewise.
690 * elf32-mips.c (mips_elf_relocate_section): Likewise.
691 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
692
693 * libbfd-in.h (DEFAULT_STRING_SPACE_SIZE): Don't define.
694 (bfd_add_to_string_table): Don't declare.
695 * libbfd.h: Rebuild.
696 * libbfd.c (bfd_add_to_string_table): Remove.
697
698 * elfcode.h (elf_swap_shdr_in): Use bfd_section, not rawdata.
699 Clear contents field.
700 (bfd_section_from_shdr): In SHT_STRTAB case, check bfd_section,
701 not rawdata. Don't set rawdata if e_shstrndx. Use bfd_section
702 rather than rawdata in commented out code. In SHT_REL[A] case,
703 don't bother to check elf_section_data of section returned by
704 section_from_elf_index.
705 (elf_fake_sections): Set bfd_section, not rawdata. Don't set
706 size.
707 (elf_map_symbols): Don't set elf_num_section_syms. Don't create
708 section symbols that already exist.
709 (assign_file_position_for_section): Use bfd_section, not rawdata.
710 (section_from_elf_index): Just check bfd_section field.
711 (elf_section_from_bfd_section): Likewise.
712 (elf_debug_section): Don't print rawdata, contents, or size.
713 (elf_link_add_object_symbols): Don't error out if
714 section_from_elf_index returns NULL.
715 (elf_bfd_final_link): Check return value from
716 section_from_elf_index against NULL, not bfd_is_abs_section.
717 (elf_link_input_bfd): Don't check section_from_elf_index return
718 value.
719 * libelf.h (struct elf_obj_tdata): Remove num_section_syms field.
720 (elf_num_section_syms): Don't define.
721 * elf.c (elf_get_str_section): Store section contents in contents
722 field rather than rawdata field.
723 (elf_string_from_elf_section): Likewise.
724 (_bfd_elf_make_section_from_shdr): Store BFD section pointer in
725 bfd_section field rather than rawdata field.
726 * elf32-hppa.c (elf32_hppa_read_symext_info): Use bfd_section
727 rather than rawdata.
728 (elf32_hppa_size_stubs): Likewise.
729 (elf32_hppa_backend_symbol_table_processing): Don't set
730 symextn_hdr->size; just use sh_size.
731 * elf32-mips.c (mips_elf_final_write_processing): Use bfd_section
732 rathern than rawdata.
733 (mips_elf_section_from_shdr): Likewise.
734 (mips_elf_section_processing): Likewise.
735 (mips_elf_section_from_bfd_section): Remove rawdata check.
736
737 * srec.c (pass_over): Set the start address for S7, S8 or S9.
738
739 Fri Oct 14 19:15:46 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
740
741 * VERSION: Updated to 2.5.
742
743 Fri Oct 14 11:07:50 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
744
745 * bfd.c (bfd_scan_vma): Cast end to be non const before passing it
746 to strtoul.
747
748 Thu Oct 13 14:40:41 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
749
750 * bfd.c (bfd_scan_vma): Pass end argument on to strtoul.
751
752 Wed Oct 12 16:46:43 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
753
754 * opncls.c (bfd_realloc): Deleted, since it's broken and fixing it
755 would make it slow. Besides, it isn't used much.
756 * elfcode.h (elf_map_symbols): Always allocate new storage for the
757 symbol table.
758
759 Wed Oct 12 11:54:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
760
761 * ecoff.c (ecoff_set_symbol_info): Mark local stProc, stLabel or
762 stabs symbols as BSF_DEBUGGING.
763
764 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Make
765 str1 and str2 const pointers.
766
767 * Makefile.in (INSTALL): Use top level install.sh script.
768 * config/README (INSTALL): Remove.
769 * config/delta88.mh (INSTALL): Remove.
770 * config/i386v4.mh (INSTALL): Remove.
771 * config/irix4.mh (INSTALL): Remove.
772 * config/irix5.mh (INSTALL): Remove.
773 * config/ncrt3000.mh (INSTALL): Remove.
774
775 Tue Oct 11 13:57:56 1994 Eric Youngdale (eric@andante.aib.com)
776
777 * elf32-i386.c (elf_i386_check_relocs): Make sure that a symbol
778 with a global offset table entry or a procedure linkage table
779 entry is added to the dynamic symbol table.
780 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
781 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): If a symbol has
782 already gotten a procedure linkage table entry, change the
783 definition to the PLT entry.
784 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
785
786 Tue Oct 11 17:12:00 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
787
788 * lynx-core.c (lynx_core_file_p): SPARC Lynx appears to start
789 dumping the .data section in a core file at a page boundary.
790
791 Mon Oct 10 16:24:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
792
793 * cofflink.c (_bfd_coff_final_link): Cast argument to bfd_h_put_32
794 to correct type.
795 (coff_read_string_table): Cast argument to bfd_h_get_32 to correct
796 type.
797 * elfcode.h (elf_link_output_extsym): Cast argument to
798 bfd_elf_hash to correct type.
799
800 * elf32-sparc.c (elf_sparc_howto_table): The PC10, PC22, and
801 WPLT30 relocations are PC-relative.
802
803 Thu Oct 6 12:57:26 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
804
805 * aoutx.h (adjust_o_magic): Correctly initialize vma if the vma of
806 the text section was user-defined.
807
808 Wed Oct 5 14:42:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
809
810 * archive.c (bfd_construct_extended_name_table): SVR4 uses slash
811 newline at the end of the file name, not just newline.
812
813 Tue Oct 4 11:23:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
814
815 * ecoff.c (_bfd_ecoff_new_section_hook): Default section alignment
816 power to 4, rather than using align_power_min.
817
818 * coffcode.h (coff_new_section_hook): Don't use align_power_min;
819 use COFF_DEFAULT_SECTION_ALIGNMENT_POWER instead. Force the .stab
820 and .stabstr sections to be aligned to no more than 2. Remove
821 COFF_SPARC special cases.
822 * coff-a29k.c: Define COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
823 * coff-apollo.c, coff-go32.c, coff-h8300.c: Likewise.
824 * coff-h8500.c, coff-i386.c, coff-i960.c, coff-m68k.c: Likewise.
825 * coff-m88k.c, coff-rs6000.c, coff-sh.c, coff-sparc.c: Likewise.
826 * coff-we32k.c, coff-z8k.c: Likewise.
827
828 * configure.in: Use ${config_shell} when running config.bfd.
829
830 * cofflink.c (coff_link_input_bfd): Don't try to convert a long
831 filename if the offset field is zero.
832
833 * elfcode.h (swap_out_syms): If the alignment of a common symbol
834 was not set, use a sensible default rather than zero.
835
836 Mon Oct 3 16:04:29 1994 H.J. Lu (hjl@nynexst.com)
837
838 * opncls.c (bfd_close): Honor umask when setting execution bits.
839 (bfd_close_all_done): Likewise.
840
841 Mon Oct 3 04:41:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
842
843 * rs6000-core.c (rs6000coff_core_p): Set SEC_HAS_CONTENTS flag
844 for .stack and .ldinfo sections. Cast coredata.c_tab to a
845 file_ptr to avoid warnings from gcc.
846
847 Fri Sep 30 13:11:38 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
848
849 * elfcode.h (elf_bfd_final_link): Remove assertion when a non
850 SEC_IN_MEMORY section is found in dynobj. This can happen when
851 linking PIC compiled code.
852
853 Thu Sep 29 15:21:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
854
855 * reloc.c (bfd_install_relocation): Change type of "data" to
856 bfd_byte *, to go along with yesterday's change.
857
858 * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol
859 in elfcode.h. (case bfd_print_symbol_all): Print symbol's size
860 field, except for common symbols; print their alignment.
861 * elfcode.h (elf_print_symbol): Deleted.
862 * libelf.h (bfd_elf_print_symbol): Declare.
863 (bfd_elf{32,64}_print_symbol): Replace declarations with macros.
864
865 * syms.c (bfd_print_symbol_vandf): Show BSF_LOCAL and BSF_GLOBAL
866 in one column. Use the column freed up to show BSF_FUNCTION and
867 BSF_FILE.
868
869 Thu Sep 29 12:29:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
870
871 * syms.c (stt): Add .rdata and .rodata.
872
873 Wed Sep 28 13:35:05 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
874
875 * reloc.c (bfd_install_relocation): Cast data_start to bfd_byte *
876 before trying to add values to it.
877
878 Tue Sep 27 16:47:58 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
879
880 * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Cast
881 return value from elf_sym_extra.
882 (elf32_hppa_build_stubs): Cast return value from bfd_zalloc.
883 (elf32_hppa_size_stubs): Cast return value from malloc.
884
885 * gen-aout.c (main): Declare and initialize "arch".
886
887 * cofflink.c (coff_link_add_symbols): Cast return value of
888 bfd_hash_allocate.
889
890 * riscix.c (riscix_callback): Use PARAMS macro in prototype.
891
892 * reloc.c (bfd_install_relocation): New function, mostly copied
893 from bfd_perform_relocation, adjusted for the assembler's needs.
894 * bfd-in2.h: Regenerated.
895
896 Mon Sep 26 11:00:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
897
898 * elfcode.h (assign_file_positions_except_relocs): Align the
899 section VMA and the file position even if D_PAGED is not set.
900
901 * bfd-in.h (bfd_seek): Change declaration to not mark fp const.
902 * bfd-in2.h: Rebuild.
903 * libbfd.c (bfd_seek): Don't mark parameters const, to avoid
904 conflicts with declaration.
905
906 Fri Sep 23 15:15:31 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
907
908 * elfcode.h (map_program_segments): Don't abort if we allocated
909 too much space for the program header, only if we allocated too
910 little.
911 (assign_file_positions_except_relocs): Similar change.
912
913 Tue Sep 20 13:17:07 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
914
915 * libaout.h: Fix comment.
916 * ns32knbsd.h: Changed M_NS32K_NETBSD to M_532_NETBSD to match
917 libaout.h.
918
919 Tue Sep 20 15:23:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
920
921 * Makefile.in: Rebuilt dependencies.
922 (BFD32_BACKENDS): Add sparcnetbsd.o.
923 (CFILES): Add ns32knetbsd.c and sparcnetbsd.c.
924 * targets.c: ns32knetbsd_vec was renamed to pc532netbsd_vec.
925
926 * coff-sh.c (rtype2howto): Remove; unused.
927 (coff_sh_relocate_section): Remove unused local variable rstat.
928 (reloc_processing): Comment out; unused.
929
930 Fri Sep 16 12:12:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
931
932 * aoutx.h (aout_link_write_other_symbol): If h->indx is -2, then
933 always write it out even if it would normally be stripped.
934 (aout_link_input_section_std): If we find a reloc against a
935 stripped global symbol, force it to be written out rather than
936 merely calling unattached_reloc.
937 (aout_link_input_section_ext): Likewise.
938 (aout_link_reloc_link_order): Likewise.
939
940 Wed Sep 14 15:37:19 1994 Jeff Law (law@snake.cs.utah.edu)
941
942 * som.h (struct somdata): New field sorted_syms.
943 (obj_som_sorted_syms): Accessor macro.
944 * som.c (som_object_setup): Initialize sorted_syms to NULL.
945 (som_prep_for_fixups): Sort a copy of the BFD's symbol table;
946 store the sorted symbol table in sorted_syms.
947 (som_write_fixups): Initalize tmp_reloc to NULL to make GCC happy.
948 (som_begin_writing): Similarly for exec_header. Pass the sorted
949 symbol table to som_write_symbol_strings.
950 (som_build_and_write_symbol_table): Use the sorted symbols rather
951 than the canonical symbol table.
952
953 * som.h (som_symbol_type): Add "stringtab_offset" field.
954 * som.c (som_write_symbol_strings): Use "stringtab_offset"
955 rather than destroying the "name" field in the BFD symbol.
956 (som_build_and_write_symbol_table): Likewise.
957
958 Wed Sep 14 15:06:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
959
960 * aoutx.h (aout_link_write_symbols): Rename skip_indirect to
961 skip_next. If we find an N_WARNING symbol which has already been
962 written out, set skip_next.
963
964 * libecoff.h (struct ecoff_tdata): Add field find_buffer.
965 * ecoff.c: Include aout/stab_gnu.h.
966 (ecoff_find_nearest_line): Handle stabs debugging information.
967
968 * elfcode.h (elf_link_output_extsym): Keep a symbol marked as weak
969 even if it is referenced by another object.
970
971 Tue Sep 13 17:57:00 1994 Jeff Law (law@snake.cs.utah.edu)
972
973 * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both
974 'T' and 'U' to grab all the unwind information.
975 (som_set_reloc_info): Make 'U' unwind bits persist across
976 multiple SOM relocations. Set the addend field of an R_ENTRY
977 relocation to the value in 'T'; set the addend field on an
978 R_EXIT relocation to the value in 'U'.
979
980 * som.h (som_symbol_type): Delete unwind field.
981
982 * som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
983 unwind information from the addend field of the R_ENTRY, get the
984 other 32bits from the addend field of the R_EXIT.
985 (bfd_som_attach_unwind_info): Delete function and all references.
986
987 * som.h (som_symbol_type): Delete unused a.out-related fields.
988
989 * som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
990 instead of &bfd_abs_section.
991
992 * som.c (som_object_setup): Handle exec_entry and exec_flags being
993 switched in executables created by the OSF1 linker.
994 (som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL
995 fixups. Support R_ALT_ENTRY (handle just like R_EXIT).
996
997 Tue Sep 13 16:04:07 1994 Steve Chamberlain (sac@jonny.cygnus.com)
998
999 * cofflink.c (coff_link_input_bfd): syment_base is unsigned
1000 so can't compare -ve numbers with it.
1001
1002 Mon Sep 12 20:31:17 1994 Steve Chamberlain (sac@jonny.cygnus.com)
1003
1004 * configure.in (shcoff_vec): Use cofflink.o now.
1005 * coff-sh.c: Rewritten to use new fast coff backend.
1006
1007 Tue Sep 13 16:23:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1008
1009 * aoutx.h (NAME(aout,final_link)): Don't assume that all the input
1010 files are a.out.
1011
1012 Tue Sep 13 11:09:39 1994 J.T. Conklin (jtc@rtl.cygnus.com)
1013
1014 * configure.host (sparc-*-netbsd): use sparcnbsd.
1015 (ns32k-*-netbsd): use ns32knbsd.
1016
1017 * hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
1018 host support.
1019
1020 * sparcnetbsd.c: New file, adds support for NetBSD/sparc.
1021 * config/sparc-nbsd.mt: Likewise.
1022
1023 * netbsd.h: New file, definitions common to all netbsd ports.
1024 * i386netbsd.c: Use it.
1025 * ns32knetbsd.c: Use it.
1026
1027 * Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
1028 config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
1029 file/variable naming conventions.
1030 * i386netbsd.c: New file, renamed from netbsd386.c.
1031 * ns32knetbsd.c: New file, renamed from netbsd532.c.
1032
1033 Mon Sep 12 21:56:20 1994 Jeff Law (law@snake.cs.utah.edu)
1034
1035 * som.c (som_reloc_skip): Correct off-by-one error for 4-byte
1036 R_NO_RELOCATION fixups.
1037 (bfd_section_from_som_symbol): Return the absolute section if the
1038 symbol isn't contained in any section in the output file.
1039 (som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are
1040 not function symbols (they are magic code labels which *can* be the
1041 targets of cross space branches). $START$ is not a section symbol.
1042
1043 Mon Sep 12 11:43:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1044
1045 * coff-alpha.c (ecoffalpha_little_vec): Add SEC_CODE and SEC_DATA
1046 to section_flags.
1047 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
1048
1049 * elfcode.h (swap_out_syms): Set the type of an undefined symbol
1050 to STT_FUNC if the BSF_FUNCTION flag is set.
1051
1052 * cofflink.c (coff_link_input_bfd): If r_symndx is -1, don't
1053 change it.
1054 (_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an
1055 absolute reloc. Don't dump core using r_symndx as an array index.
1056 * cf-m68klynx.c (coff_bfd_link_add_symbols): Define.
1057 (lynx_link_add_symbols): New static function (copy of function in
1058 coff-i386.c).
1059 (coff_m68k_lynxrtype_to_howto): sym argument may be NULL.
1060 * coff-i386.c (coff_i386_rtype_to_howto): Likewise.
1061 * coff-a29k.c (coff_a29k_relocate_section): Handle an r_symndx
1062 value of -1, meaning an absolute reloc.
1063
1064 * ctor.c: Remove; obsolete.
1065 * Makefile.in: Rebuild dependencies.
1066 (BFD_LIBS): Remove ctor.o.
1067 (CFILES): Remove ctor.c.
1068 * libbfd.h: Rebuild.
1069
1070 Mon Sep 12 01:58:47 1994 Jeff Law (law@snake.cs.utah.edu)
1071
1072 * elf32-hppa.c (elf32_hppa_relocate_section): If there was a link
1073 error of some sort (for example, undefined symbols), then do not
1074 apply any relocs, just notify the user of the errors.
1075 (elf32_hppa_backend_begin_write_processing): Do not build a symbol
1076 extension section for an executable (it's useless).
1077 (elf32_hppa_link_output_symbol_hook): Do nothing if there was a
1078 link error of some sort (for example, undefined symbols).
1079 (elf32_hppa_read_symext_info): Kludge. Turn off SEC_HAS_CONTENTS
1080 for all the input symbol extension sections to keep the generic
1081 BFD code happy. Temporarily turn it on to read the contents of
1082 the symbol extension section.
1083
1084 Sun Sep 11 21:58:59 1994 Jeff Law (law@snake.cs.utah.edu)
1085
1086 * config/hppaosf.mh (RANLIB): Do not set.
1087 * config/hppabsd.mh (RANLIB): Likewise.
1088
1089 Sun Sep 11 22:50:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1090
1091 * cf-i386lynx.c: Remove #if 0 code.
1092 (i386_lynxos_coff_object_p): Remove unused function.
1093 (coff_bfd_link_add_symbols): Define.
1094 (lynx_link_add_symbols): New static function.
1095 * coffcode.h (coff_bfd_link_hash_table_create): If
1096 coff_relocate_section is defined, only define this if not already
1097 defined.
1098 (coff_bfd_link_add_symbols, coff_bfd_final_link): Likewise.
1099
1100 * linker.c (_bfd_generic_final_link): Handle
1101 bfd_indirect_link_order explicitly, rather than via
1102 _bfd_default_link_order.
1103 (set_symbol_from_hash): New static function, broken out of
1104 _bfd_generic_link_write_global_symbol.
1105 (_bfd_generic_link_write_global_symbol): Symbol setting code moved
1106 to set_symbol_from_hash; call it.
1107 (default_indirect_link_order): Add generic_linker argument.
1108 Change all callers. If false, set the generic symbols based on
1109 the hash table entries.
1110
1111 Fri Sep 9 11:51:49 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1112
1113 * coffgen.c (coff_get_symtab): Reindented. Removed commented out
1114 call to bfd_constructor_entry.
1115
1116 Convert m68k COFF to use new COFF backend linker.
1117 * coff-m68k.c (coff_relocate_section): Define.
1118 * cf-m68klynx.c (coff_rtype_to_howto): Define.
1119 (coff_m68k_lynx_rtype_to_howto): New static function.
1120 * configure.in (m68kcoff_vec): Build cofflink.o.
1121 (m68kcoffun_vec, m68klynx_coff_vec): Likewise.
1122
1123 Thu Sep 8 16:20:38 1994 Steve Chamberlain (sac@jonny.cygnus.com)
1124
1125 * coff-h8300.c (h8300_reloc16_extra_cases, case RELBYTE): Flag
1126 overflows correctly.
1127
1128 Wed Sep 7 19:01:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1129
1130 * libelf.h (struct elf_backend_data): Change second argument of
1131 elf_backend_final_write_processing hook to boolean.
1132 (struct elf_obj_tdata): Add linker field.
1133 * elfcode.h (NAME(bfd_elf,write_object_contents)): Pass value of
1134 tdata linker field to final_write_processing, rather than NULL.
1135 (elf_bfd_final_link): Don't call final_write_processing hook. Set
1136 tdata linker field to true.
1137 * elf32-mips.c (mips_elf_final_write_processing): Change type of
1138 second argument to boolean.
1139 * elf32-hppa.c (elf32_hppa_backend_final_write_processing):
1140 Likewise.
1141
1142 * coff-go32.c (RTYPE2HOWTO): Fully parenthesize arguments.
1143 * coff-i960.c (RTYPE2HOWTO): Likewise.
1144 * coff-m88k.c (RTYPE2HOWTO): Likewise.
1145 * coff-we32k.c (RTYPE2HOWTO): Likewise.
1146
1147 Make i386 COFF use new COFF backend linker.
1148 * coff-i386.c (RTYPE2HOWTO): Fully parenthesize arguments.
1149 (coff_relocate_section): Define.
1150 (coff_i386_rtype_to_howto): New function.
1151 * configure.in (i386coff_vec): Use cofflink.o.
1152 (i386lynx_coff_vec): Likewise.
1153
1154 * coffcode.h (bfd_coff_backend_data): Add new field
1155 _bfd_coff_rtype_to_howto.
1156 (bfd_coff_rtype_to_howto): Define.
1157 (coff_rtype_to_howto): Define to use RTYPE2HOWTO, if not already
1158 defined.
1159 (bfd_coff_std_swap_table): Initialize new field.
1160 * cofflink.c (_bfd_coff_final_link): Allocate section_count + 1
1161 section_info structures, since the target_index is 1 based.
1162 (coff_link_input_bfd): Set *secpp to bfd_com_section_ptr for a
1163 common symbol. Adjust rel_hash by the output reloc count.
1164 (_bfd_coff_generic_relocate_section): New function.
1165 * libcoff-in.h (_bfd_coff_generic_relocate_section): Declare.
1166 * libcoff.h: Rebuild.
1167 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1168 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1169
1170 Tue Sep 6 23:28:52 1994 Jeff Law (law@snake.cs.utah.edu)
1171
1172 * som.c (som_bfd_derive_misc_symbol_info): Treat undefined code
1173 symbols and undefined symbols which no type in the same manner
1174 if the associated BFD symbol has BSF_FUNCTION set. For a defined
1175 symbol which no type, select a SOM type based on the flags of the
1176 section containing the symbol.
1177 (som_slurp_symbol_type): Set BSF_FUNCTION for undefined ST_STUB
1178 or ST_CODE symbols (importing a non-function code symbol is
1179 meaningless in SOM).
1180 (som_set_reloc_info): Don't set "offset" to the section's vma; it
1181 should always start at zero.
1182
1183 Tue Sep 6 14:51:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1184
1185 Add new style linker support to COFF backend. a29k only for now.
1186 * cofflink.c: New file.
1187 * libcoff-in.h: Include bfdlink.h.
1188 (obj_coff_external_syms, obj_coff_strings): Define accessor macro.
1189 (obj_coff_sym_hashes): Define accessor macro.
1190 (struct coff_tdata): Add fields external_syms, strings, and
1191 sym_hashes.
1192 (struct coff_link_hash_entry): Define.
1193 (struct coff_link_hash_table): Define.
1194 (coff_link_hash_lookup, coff_link_hash_traverse): Define.
1195 (coff_hash_table): Define.
1196 (_bfd_coff_link_hash_table_create): Declare.
1197 (_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare.
1198 * coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz,
1199 _bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global,
1200 _bfd_coff_compute_section_file_positions,
1201 _bfd_coff_relocate_section.
1202 (bfd_coff_relsz, bfd_coff_swap_reloc_in): Define.
1203 (bfd_coff_sym_is_global): Define.
1204 (bfd_coff_compute_section_file_positions): Define.
1205 (bfd_coff_relocate_section): Define.
1206 (coff_mkobject_hook): Initialize obj_raw_syment_count and
1207 obj_conv_table_size.
1208 (coff_compute_section_file_positions): Set target_index of all
1209 sections. Set output_has_begun field.
1210 (coff_write_object_contents): Don't set target_index; now done by
1211 coff_compute_section_file_positions. Remove obsolete handling of
1212 scn_base and data_base. Don't bother to check that target_index
1213 is positive, since it always is. Remove use of pad, which is
1214 always zero. Check obj_raw_syment_count, not bfd_get_symcount,
1215 for the number of symbols, but only write them out if
1216 bfd_get_symcount is non-zero. Don't check obj_raw_syment_count
1217 until after coff_write_symbols is called.
1218 (coff_slurp_symbol_table): Use obj_raw_syment_count, not
1219 bfd_get_symcount for the number of symbols. Don't set
1220 obj_conv_table_size.
1221 (coff_sym_is_global): New static function or macro.
1222 (coff_slurp_reloc_table): Call coff_swap_reloc_in, not
1223 bfd_swap_reloc_in.
1224 (coff_bfd_link_hash_table_create): If coff_relocate_section is
1225 defined, define as _bfd_coff_link_hash_table_create.
1226 (coff_bfd_link_add_symbols): Similar change.
1227 (coff_bfd_final_link): Similar change.
1228 (coff_relocate_section): Define as NULL if not defined.
1229 (bfd_coff_std_swap_table): Initialize new fields.
1230 * coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count
1231 and obj_conv_table_size here.
1232 (coff_count_linenumbers): Reindent. If bfd_get_symcount is zero,
1233 add up the line numbers from the sections.
1234 (coff_write_symbols): Set obj_raw_syment_count, not
1235 bfd_get_symcount.
1236 (coff_pointerize_aux): Don't pointerize a nonpositive x_endndx
1237 field.
1238 (coff_get_normalized_symtab): Use obj_raw_syment_count, not
1239 bfd_get_symcount.
1240 (coff_print_symbol): If auxp->fix_end, print x_endndx value.
1241 * coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in.
1242 Reindent. Change argument type to PTR.
1243 * coff-a29k.c (coff_a29k_relocate_section): New static function.
1244 (coff_relocate_section): Define.
1245 * configure.in (a29kcoff_big_vec): Compile cofflink.o.
1246 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields.
1247 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1248 * libcoff.h: Rebuilt.
1249 * Makefile.in: Rebuilt dependencies.
1250 (BFD32_BACKENDS): Add cofflink.o.
1251 (CFILES): Add cofflink.c.
1252
1253 Tue Sep 6 14:00:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1254
1255 * coffgen.c (coff_print_symbol, case bfd_symbol_print_all): Check
1256 for section symbol, and print its aux fields with appropriate
1257 labels.
1258
1259 * Makefile.in (ALL_MACHINES): Added cpu-arm.o.
1260
1261 Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
1262
1263 * aoutx.h (NAME(aout,machine_type)): Recognize the ARM processor.
1264 * archures.c, config.bfd, configure.host, libaout.h, reloc.c,
1265 targets.c: Add support for the ARM.
1266 * cpu-arm.c, riscix.c, config/riscix.mh, config/riscix.mt: New files.
1267
1268 * aoutx.h (add_to_stringtable): Check that str isn't a NULL pointer.
1269
1270 Fri Sep 2 14:10:30 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1271
1272 * reloc.c (enum bfd_reloc_code_real): Rewrote definition to use
1273 new "chew" commands for simultaneous definition of enumerator and
1274 enumerator name table.
1275 (bfd_get_reloc_code_name): New function, for retrieving a symbolic
1276 name associated with an enumerator.
1277 * libbfd.h, bfd-in2.h: Regenerated.
1278
1279 Tue Aug 30 21:24:54 1994 Jeff Law (law@snake.cs.utah.edu)
1280
1281 * som.c (som_write_fixups, case R_ENTRY): Handle case where no
1282 unwind descriptor information is available.
1283
1284 Tue Aug 30 11:43:30 1994 Eric Youngdale (ericy@cais.cais.com)
1285
1286 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname
1287 argument, and use it to set DT_SONAME dynamic entry.
1288 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
1289 (bfd_elf64_size_dynamic_sections): Update prototype.
1290 * bfd-in2.h: Rebuilt.
1291
1292 Fri Aug 26 15:47:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1293
1294 * coffgen.c (coff_real_object_p): Set obj_raw_syment_count.
1295 (coff_get_normalized_symtab): Verify obj_raw_syment_count, rather
1296 than setting it.
1297
1298 Thu Aug 25 10:44:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1299
1300 * archive.c (bsd_write_armap): Remove host dependencies.
1301
1302 * aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
1303 before adding BYTES_IN_WORD.
1304
1305 * coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
1306 not merely the first.
1307
1308 * coffgen.c (coff_write_alien_symbol): If we are not using the
1309 symbol, clear the name so that it is not put in the string table.
1310 From Antti.Miettinen@ntc.nokia.com.
1311
1312 Wed Aug 24 11:49:19 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1313
1314 * coffgen.c (coff_print_symbol): Cast pointer different to long
1315 and use %ld to print it.
1316 * osf-core.c (osf_core_core_file_p): Remove unused variable
1317 dseccnt.
1318 * ecoffswap.h (ecoff_swap_ext_out): If ECOFF_64, clear remaining
1319 bytes in bits2.
1320
1321 * configure.host, config.bfd: Change i[34]86 to i[345]86.
1322 * coffgen.c (coff_real_object_p): Set obj_conv_table_size here,
1323 rather than waiting until coff_slurp_symbol_table.
1324 (coff_write_alien_symbol): Just ignore BSF_DEBUGGING symbols.
1325 From Antti.Miettinen@ntc.nokia.com.
1326
1327 * section.c (bfd_make_section_anyway): Fix failure check of
1328 bfd_make_empty_symbol. From Antti.Miettinen@ntc.nokia.com.
1329
1330 * aoutx.h (translate_to_native_sym_flags): Use the output_section
1331 (and output_offset) if there is one.
1332
1333 * aoutx.h (aout_link_check_archive_element): Discard the symbols
1334 if the archive element was not needed.
1335
1336 * aoutx.h (aout_get_external_symbols): Ensure that a zero string
1337 index yields an empty string.
1338 (aout_link_write_symbols): If info->keep_memory is false, use name
1339 from original hash table entry, not from entry in *sym_hash.
1340
1341 * aoutx.h (struct aout_final_link_info): Add fields contents,
1342 relocs, symbol_map and output_syms.
1343 (NAME(aout,final_link)): Work out the largest section size, reloc
1344 size, and number of symbols. Use them to preallocate buffers that
1345 are large enough for all cases.
1346 (aout_link_input_bfd): Use preallocated symbol_map.
1347 (aout_link_write_symbols): Remove symbol_map argument; use
1348 preallocated symbol_map instead. Change all callers. Use
1349 preallocated output_syms.
1350 (aout_link_input_section): Remove symbol_map argument. Change all
1351 callers. Use preallocated contents and relocs.
1352 (aout_link_input_section_std): Remove symbol_map argument; use
1353 preallocated symbol_map instead. Change all callers.
1354 (aout_link_input_section_ext): Likewise.
1355
1356 Tue Aug 23 10:51:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1357
1358 * archive.c (_bfd_write_archive_contents): Don't update the
1359 symbol map timestamp if there is no symbol map. From
1360 schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
1361
1362 Mon Aug 22 12:26:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1363
1364 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add _update_armap_timestamp.
1365 (bfd_target): Add field _bfd_update_armap_timestamp.
1366 * bfd.c (bfd_update_armap_timestamp): Define.
1367 * bfd-in2.h: Rebuilt.
1368 * libbfd-in.h (_bfd_noarchive_update_armap_timestamp): Define.
1369 (_bfd_archive_bsd_update_armap_timestamp): Declare.
1370 (_bfd_archive_coff_update_armap_timestamp): Define.
1371 * libbfd.h: Rebuilt.
1372 * archive.c (_bfd_write_archive_contents): Call
1373 bfd_update_armap_timestamp instead of checking for a BSD archive
1374 and calling bsd_update_armap_timestamp.
1375 (_bfd_archive_bsd_update_armap_timestamp): Rename from
1376 _bsd_update_armap_timestamp. Don't assume that armap_datepos is
1377 already set.
1378 * aout-target.h (MY_update_armap_timestamp): Define if not already
1379 defined.
1380 * coff-rs6000.c (rs6000coff_update_armap_timestamp): Define.
1381 * ieee.c (ieee_update_armap_timestamp): Define.
1382 * libecoff.h (_bfd_ecoff_update_armap_timestamp): Define.
1383 * oasys.c (oasys_update_armap_timestamp): Define.
1384 * som.c (som_update_armap_timestamp): Define.
1385
1386 * hash.c: Copy string hash functions from aoutx.h.
1387 * aoutx.h: String hash functions moved to hash.c. Retain
1388 simplified versions of add_to_stringtab and emit_stringtab.
1389 Change all callers to use new function and structure names.
1390 * libbfd-in.h (_bfd_stringtab_init, _bfd_stringtab_free): Declare.
1391 (_bfd_stringtab_size, _bfd_stringtab_add): Declare.
1392 (_bfd_stringtab_emit): Declare.
1393 * libbfd.h: Rebuilt.
1394
1395 Mon Aug 22 10:49:37 1994 Eric Youngdale (ericy@cais.cais.com)
1396
1397 * i386linux.c (linux_add_one_symbol): Create a fixup for any
1398 defined absolute symbol, not just GOT or PLT symbols.
1399 (linux_tally_symbols): Correct handling of references to defined
1400 symbols.
1401
1402 Thu Aug 18 16:29:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1403
1404 Get ld -x -r to handle a.out set symbols correctly.
1405 * aoutx.h (adjust_o_magic): If the .bss VMA was set outside of
1406 BFD, pad the .data section up to the VMA of the .bss section.
1407 (aout_link_add_symbols): If a set symbol does not get modified,
1408 treat it as a local symbol.
1409 (aout_link_write_symbols): Set the value of set symbols
1410 correctly. Don't discard set symbols even if discarding local
1411 symbols.
1412 (aout_link_write_other_symbol): Don't abort on bfd_link_hash_new,
1413 since it can now happen for set symbols.
1414
1415 * elfcode.h (elf_fake_sections): Just check for ".rela" and
1416 ".rel", not ".rela." and ".rel."; make this work by checking
1417 use_rela_p.
1418 * elf32-i386.c (elf_i386_check_relocs): Just check for ".rel", not
1419 ".rel."
1420 (elf_i386_size_dynamic_sections): Likewise.
1421 (elf_i386_relocate_section): Likewise.
1422 * elf32-sparc.c (elf32_sparc_check_relocs): Just check for
1423 ".rela", not ".rela."
1424 (elf32_sparc_size_dynamic_sections): Likewise.
1425 (elf32_sparc_relocate_section): Likewise.
1426
1427 Wed Aug 17 16:54:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1428
1429 * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
1430 PASS to the old value + 1.
1431
1432 * coffgen.c (coff_get_normalized_symtab): If a C_FILE symbol has
1433 no aux entries, use the symbol name as the file name.
1434 (coff_find_nearest_line): Look for the right C_FILE symbol, rather
1435 than always using the first one. If there is a debugging symbol
1436 after a function symbol, skip it. Add the section VMA to the line
1437 offset, since it was subtracted out in coff_slurp_line_table.
1438
1439 Tue Aug 16 16:53:00 1994 Jeff Law (law@snake.cs.utah.edu)
1440
1441 * som.c (som_prep_headers): If writing some form of an executable,
1442 allocate and attach an exec header to the BFD private data.
1443 (som_begin_writing): Don't fill fields of the exec header based
1444 on BFD private data here (like the exec flags). Do not write
1445 the exec header here.
1446 (som_write_headers): Instead do it here.
1447 * som.h (struct somdata): New field "exec_hdr" for the executable
1448 file header.
1449 (obj_som_exec_hdr): New accessor macro.
1450
1451 Tue Aug 16 00:12:31 1994 Eric Youngdale (ericy@cais.cais.com)
1452
1453 * i386linux.c (linux_link_create_dynamic_sections): Create section
1454 named .linux-dynamic, not .dynamic.
1455 (linux_add_one_symbol): Use .linux-dynamic, not .dynamic.
1456 (bfd_linux_size_dynamic_sections): Likewise.
1457 (linux_finish_dynamic_link): Likewise.
1458
1459 Mon Aug 15 12:16:56 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1460
1461 * coffgen.c (STRING_SIZE_SIZE): Define.
1462 (coff_fix_symbol_name): Use STRING_SIZE_SIZE, not 4.
1463 (coff_write_symbols, build_string_table): Likewise.
1464 (coff_get_normalized_symtab): Likewise.
1465
1466 * libcoff-in.h (obj_symbol_slew): Don't define.
1467 (struct coff_tdata): Remove unused fields index_slew, raw_linenos,
1468 and flags.
1469 * libcoff.h: Rebuilt.
1470 * coffcode.h (coff_mkobject): Don't initialize raw_linenos.
1471 (coff_mkobject_hook): Don't initialize flags.
1472
1473 * aout-target.h (MY_zmagic_contiguous): Define as 0 if not already
1474 defined.
1475 (MY(backend_data)): Use MY_zmagic_contiguous, not hardcoded 0.
1476 * i386linux.c (MY_zmagic_contiguous): Define.
1477
1478 * elfcode.h (bfd_section_from_shdr): If a SHT_SYMTAB section in a
1479 shared object has SHF_ALLOC set, create a BFD section for it.
1480 (elf_section_from_bfd_section): There may be a BFD section for a
1481 SHT_SYMTAB section.
1482
1483 * coffcode.h (styp_to_sec_flags): Add name argument. If no flags
1484 are recognized, chose section flags based on the name.
1485 (bfd_coff_backend_data): _bfd_styp_to_sec_flags_hook field: Add
1486 name argument.
1487 (bfd_coff_styp_to_sec_flags_hook): Add name argument.
1488 (coff_compute_section_file_positions): Don't adjust the section
1489 position by COFF_PAGE_SIZE unless SEC_ALLOC is set.
1490 * libcoff.h: Rebuilt.
1491 * coffgen.c (make_a_section_from_file): Pass section name to
1492 bfd_coff_styp_to_sec_flags_hook.
1493 * ecoff.c (_bfd_ecoff_styp_to_sec_flags): Add unused name
1494 argument.
1495 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Add name argument to
1496 prototype.
1497
1498 Fri Aug 12 11:22:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1499
1500 * elfcode.h (section_from_elf_index): Correct check for invalid
1501 section index.
1502
1503 * elfcode.h (elf_link_add_object_symbols): If there is no symbol
1504 table, try using the dynamic symbol table. From Eric Youngdale
1505 <ericy@cais.cais.com>.
1506
1507 * configure.host (sparc-*-solaris2*): Use solaris2, not sysv4.
1508 The linker depends upon configuring for solaris2.
1509 * hosts/solaris2.h: New file; include hosts/sysv4.h.
1510 * config/solaris2.mh: New file; copy of config/sysv4.mh.
1511
1512 Wed Aug 10 13:09:38 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1513
1514 * aoutx.h (adjust_z_magic): Make sure data section is padded to
1515 page boundary when the VMA is set by the calling program. From
1516 Eric Youngdale <ericy@cais.cais.com>.
1517
1518 Mon Aug 8 17:18:49 1994 Stan Shebs (shebs@andros.cygnus.com)
1519
1520 Update to ns32k support, from Ian Dall (dall@hfrd.dsto.gov.au).
1521 * aout-ns32k.c: Add declarations that were in aout-ns32k.h, change
1522 declarations to traditional form.
1523 (MY_reloc_howto, MY_put_reloc): Change from macro to function.
1524 (ns32k_relocate_contents): New function.
1525 * aout-ns32k.h: Remove.
1526 * cpu-ns32k.c: Add declarations that were in aout-ns32k.h, change
1527 declarations to traditional form.
1528 (ns32k_final_link_relocate): Call ns32k_relocate_contents.
1529 * netbsd532.c: Reformat to standards, add copyright notice.
1530 (ARCH): Don't define.
1531 (aout-ns32k.h): Don't include.
1532 * pc532-mach.c: Ditto.
1533
1534 Mon Aug 8 17:55:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1535
1536 * coff-i960.c (coff_i960_relocate): Don't try to convert relocs
1537 against common symbols.
1538
1539 Sat Aug 6 22:27:30 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1540
1541 * irix-core.c (irix_core_core_file_p): Ignore sections that
1542 are not contained in the core file.
1543
1544 Thu Aug 4 11:32:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1545
1546 * coff-m68k.c (m68k_reloc_type_lookup): New function.
1547 (coff_bfd_reloc_type_lookup): Define.
1548 * cf-m68klynx.c (_bfd_m68kcoff_reloc_type_lookup): Define.
1549
1550 * elfcode.h (elf_bfd_final_link): Force the vma of sections which
1551 do not have SEC_ALLOC set to be 0. This is needed to handle
1552 relocs against debugging sections.
1553
1554 Wed Aug 3 16:45:41 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1555
1556 * coff-i960.c (coff_i960_relocate): Rewrote to change relocs
1557 against locally defined symbols into relocs against section
1558 symbols, for VxWorks 5.1.
1559
1560 Wed Aug 3 10:34:37 1994 Eric Youngdale (ericy@cais.cais.com)
1561
1562 * i386linux.c (linux_add_one_symbol): Only handle
1563 SHARABLE_CONFLICTS specially if BSF_CONSTRUCTOR is set. Set hashp
1564 for a GOT or PLT symbol. Set jump field of fixup for a PLT symbol.
1565 (linux_tally_symbols): Check section of real symbol. When looking
1566 for a builtin fixup, check builtin and jump flags. Create no more
1567 than one fixup, and always create one if the real symbol is in the
1568 absolute section. Only strip absolute symbols.
1569
1570 Wed Aug 3 05:08:24 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
1571
1572 * coffcode.h (coff_write_object_contents): set internal_a.magic to
1573 LYNXCOFFMAGIC whenever 68k, SPARC or i386 LynxOS
1574 (yes, they have the same magic number!)
1575
1576 Tue Aug 2 10:43:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1577
1578 * hp300hpux.c (BMAGIC): Define as HPUX_DOT_O_MAGIC, to make test
1579 in aoutx.h work correctly.
1580
1581 * coff-i960.c (coff_i960_relocate): New function.
1582 (howto_rellong, howto_iprmed): Use it as special_function.
1583
1584 * libbfd-in.h: Move declarations of bfd_read, bfd_write, bfd_seek,
1585 bfd_tell, bfd_flush, and bfd_stat from here...
1586 * bfd-in.h: ...to here, to make them visible to programs which
1587 know more about the object file format than BFD does.
1588 * libbfd.h, bfd-in2.h: Rebuilt.
1589
1590 Mon Aug 1 17:55:53 1994 Fred Fish (fnf@cygnus.com)
1591
1592 * ptrace-core.c (ptrace_unix_core_file_p): Convert zalloc usage
1593 to bfd_zalloc.
1594
1595 Mon Aug 1 12:04:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1596
1597 * elf64-sparc.c (ELF_MAXPAGESIZE): Define.
1598
1599 ELF linker patches from Eric Youngdale <ericy@cais.cais.com>.
1600 * elfcode.h (elf_link_create_dynamic_sections): Set type of
1601 _DYNAMIC to STT_OBJECT.
1602 (NAME(bfd_elf,record_link_assignment)): Always create hash table
1603 entry. Set type to STT_OBJECT.
1604 (elf_link_output_extsym): Don't set type of weak defined symbol to
1605 STB_WEAK if symbol was referenced.
1606 (map_program_segments): Check DYNAMIC as well as EXEC_P.
1607 (assign_file_positions_except_relocs): Likewise.
1608 * elf32-i386.c (elf_i386_create_dynamic_sections): Set type of
1609 _GLOBAL_OFFSET_TABLE to STT_OBJECT.
1610 (elf_i386_check_relocs): Ignore local PLT32 relocs.
1611 (elf_i386_relocate_section): Treat local PLT32 relocs as PC32.
1612
1613 * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbol
1614 handling again.
1615
1616 * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocs
1617 if there aren't any.
1618
1619 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
1620 * hosts/solaris2.h: Remove.
1621 * config/solaris2.mh: Remove.
1622
1623 Sun Jul 31 14:27:04 1994 Jeff Law (law@snake.cs.utah.edu)
1624
1625 * elf32-hppa.c, elf32-hppa.h: Update comment reflecting which
1626 HPPA ELF spec the code implements.
1627
1628 Tue Jul 26 17:38:01 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1629
1630 * cpu-i960.c (MAX_ARCH): New macro.
1631 (compatible): Use it in computing array bounds. Put comma after
1632 last entry in array, for regularity.
1633 (arch_info_struct): Adjust spacing for easier reading.
1634
1635 * coff-i960.c (howto_rellong, howto_iprmed, howto_optcall): Use
1636 HOWTO macro.
1637
1638 start-sanitize-i960xl
1639 * cpu-i960.c (XL): Define as bfd_mach_i960_xl.
1640 (scan_960_mach): Recognize xl machine.
1641 (MAX_ARCH): Define to be XL.
1642 (compatible): Add XL row to array.
1643 (arch_info_struct): Add XL entry.
1644
1645 * archures.c (bfd_mach_i960_xl): New macro.
1646 * bfd-in2.h: Regenerated.
1647
1648 * coffcode.h (coff_set_arch_mach_hook): For F_I960XL, set machine
1649 to bfd_mach_i960_xl.
1650 (coff_set_flags): For bfd_mach_i960_xl, set F_I960XL.
1651 end-sanitize-i960xl
1652
1653 Tue Jul 26 11:04:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1654
1655 * elfcode.h (elf_adjust_dynamic_symbol): When handling a weak
1656 symbol, correct check to see whether the equivalent normal symbol
1657 was referenced.
1658
1659 Add support for creating shared libraries under i386 ELF and SPARC
1660 ELF. Based on patches by Eric Youngdale <ericy@cais.cais.com>.
1661 * libelf.h (struct elf_link_hash_entry): Remove copy_offset field.
1662 Add got_offset and plt_offset fields.
1663 (ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define.
1664 (ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define.
1665 (ELF_LINK_HASH_NEEDS_COPY): Define.
1666 (struct elf_backend_data): Add check_relocs field.
1667 (struct bfd_elf_section_data): Change relocs from PTR to
1668 Elf_Internal_Rela *.
1669 (struct elf_obj_tdata): Add local_got_offsets field.
1670 (elf_local_got_offsets): Define accessor macro.
1671 (bfd_elf32_link_create_dynamic_sections): Declare.
1672 (bfd_elf32_link_record_dynamic_symbol): Declare.
1673 (bfd_elf64_link_create_dynamic_sections): Declare.
1674 (bfd_elf64_link_record_dynamic_symbol): Declare.
1675 * elfcode.h (elf_slurp_reloc_table): Don't use the section data
1676 relocs field.
1677 (elf_link_record_dynamic_symbol): Make globally visible. Use
1678 macro to rename to NAME(bfd_elf,link_record_dynamic_symbol).
1679 (elf_link_add_object_symbols): If creating a shared library, put
1680 make all local symbols dynamic. Don't bother with the
1681 DYNAMIC_MULTIPLE flags. Call the check_relocs backend function if
1682 it is defined.
1683 (elf_link_create_dynamic_sections): Make globally visible. Use
1684 macro to rename to NAME(bfd_elf,link_create_dynamic_sections). If
1685 creating a shared library, make sure that _DYNAMIC is added as a
1686 dynamic symbol.
1687 (elf_link_read_relocs): New function.
1688 (NAME(bfd_elf,record_link_assignment)): If creating a shared
1689 library, always create symbols, and always make them dynamic.
1690 (elf_bfd_final_link): Permit creation of shared libraries.
1691 (elf_link_input_bfd): Use elf_link_read_relocs to get the relocs.
1692 * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize
1693 copy_offset. Initialize got_offset and plt_offset.
1694 * elf32-target.h (elf_backend_check_relocs): Define as 0 if not
1695 defined.
1696 (elf32_bed): Initialize check_relocs field.
1697 * elf64-target.h (elf_backend_check_relocs): Define as 0 if not
1698 defined.
1699 (elf64_bed): Initialize check_relocs field.
1700 * elf32-i386.c (elf_howto_table): Change R_386_PLT32 and
1701 R_386_GOTPC to be pc_relative and pcrel_offset.
1702 (elf_i386_pic_plt0_entry): Define.
1703 (elf_i386_pic_plt_entry): Define.
1704 (elf_i386_create_dynamic_sections): Create a .got.plt section, and
1705 define _GLOBAL_OFFSET_TABLE_ at the start of it. If creating a
1706 shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
1707 dynamic symbol. Don't create .rel.bss if creating a shared
1708 library.
1709 (elf_i386_check_relocs): New function.
1710 (elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the
1711 symbol already has one. When making a PLT entry, set plt_offset.
1712 Don't create a copy reloc when creating a shared library. Don't
1713 set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
1714 (elf_i386_allocate_dynamic_section): Remove.
1715 (elf_i386_size_dynamic_sections): Look through all the sections
1716 rather than assuming we know their names. Remove any empty reloc
1717 or plt sections. Only add a DT_DEBUG entry if not creating a
1718 shared library. Only add a DT_PLTGOT entry if there is a PLT.
1719 Add a DT_TEXTREL entry if required.
1720 (elf_i386_relocate_section): Permit undefined symbols when
1721 creating a shared library. Handle the special relocation types
1722 specially.
1723 (elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset
1724 is set. If creating a shared library, produce a PIC PLT entry.
1725 Only mark a PLT symbol as undefined if it was not defined by a
1726 regular object file. Create a GOT entry if got_offset is set.
1727 Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
1728 (elf_i386_finish_dynamic_sections): Change the handling of
1729 DT_RELSZ to simply subtract out the size of .rel.plt. If creating
1730 a shared library, produce PIC PLT code.
1731 (elf_backend_check_relocs): Define.
1732 * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10,
1733 R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow.
1734 (elf32_sparc_create_dynamic_sections): If creating a shared
1735 library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
1736 dynamic symbol, and set the type to STT_OBJECT. Likewise for
1737 _PROCEDURE_LINKAGE_TABLE_. Don't create .rel.bss if creating a
1738 shared library.
1739 (elf32_sparc_check_relocs): New function.
1740 (elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the
1741 symbol already has one. When making a PLT entry, set plt_offset.
1742 Don't create a copy reloc when creating a shared library. Don't
1743 set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
1744 (elf32_sparc_allocate_dynamic_section): Remove.
1745 (elf32_sparc_size_dynamic_sections): Look through all the sections
1746 rather than assuming we know their names. Only add a DT_DEBUG
1747 entry if not creating a shared library. Add a DT_TEXTREL entry if
1748 required.
1749 (elf32_sparc_relocate_section): Permit undefined symbols when
1750 creating a shared library. Handle the special relocation types
1751 specially.
1752 (elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset
1753 is set. Only mark a PLT symbol as undefined if it was not defined
1754 by a regular object file. Create a GOT entry if got_offset is
1755 set. Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
1756 (elf32_sparc_finish_dynamic_sections): Store dynobj in a local
1757 variable.
1758 (elf_backend_check_relocs): Define.
1759
1760 Mon Jul 25 12:21:07 1994 Stan Shebs (shebs@andros.cygnus.com)
1761
1762 * configure.in (pc532mach_vec): Change to pc532machaout_vec.
1763 * config.bfd (ns32k-*-netbsd*): Use ns32k-nbsd as bfd_name.
1764 * Makefile.in (ALL_MACHINES): Add cpu-ns32k.o.
1765 (BFD32_BACKENDS): Add aout-ns32k.o, netbsd532.o, m88kmach3.o,
1766 pc532-mach.o.
1767 * targets.c (pc532machaout_vec): Use instead of pc532mach_vec.
1768 * config/pc532-mach.mt (DEFAULT_VECTOR): Ditto.
1769 (SELECT_VECS): Remove.
1770 * config/ns32k-nbsd.mt: New file, was ns32k-netbsd.mt.
1771 * config/ns32k-netbsd.mt: Remove, name too long.
1772
1773 Fri Jul 22 11:07:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1774
1775 * linker.c (generic_link_check_archive_element): When changing a
1776 symbol to common, set the alignment.
1777 (_bfd_generic_link_add_one_symbol): When creating a common symbol,
1778 set the alignment.
1779 * aoutx.h (aout_link_check_ar_symbols): When changing a symbol to
1780 common, set the alignment.
1781 (aout_link_add_symbols): Restrict the alignment of a common symbol
1782 to the alignment power given by the architecture.
1783 * libelf.h (struct elf_link_hash_entry): Remove align field. Add
1784 copy_offset field.
1785 * elfcode.h (elf_link_add_object_symbols): Store alignment in
1786 new bfd_link_hash_entry field, not in elf_link_hash_entry field.
1787 (elf_link_output_extsym): Similar change when getting alignment.
1788 * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align. Do
1789 initialize copy_offset.
1790 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset
1791 field rather than align field. Get alignment using bfd_log2
1792 rather than switch.
1793 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1794 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset,
1795 not align.
1796 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
1797
1798 * aoutx.h (NAME(aout,some_aout_object_p)): Just check
1799 STAT_FOR_EXEC, don't check MACH.
1800 * m88kmach3.c (MACH): Don't define.
1801 * config/i386-mach3.mt (TDEFINES): Define STAT_FOR_EXEC.
1802 * config/m88k-mach3.mt (TDEFINES): Likewise.
1803 * config/mips-mach3.mt (TDEFINES): Likewise.
1804
1805 Thu Jul 21 17:24:31 1994 Stan Shebs (shebs@andros.cygnus.com)
1806
1807 * i386mach3.c: Reverted to version from before Jul 5 1994 changes.
1808
1809 Thu Jul 21 12:26:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1810
1811 * reloc.c (struct reloc_howto_struct): Remove special_function1.
1812 It's the wrong way to do things.
1813 (HOWTO): Change accordingly.
1814 (HOWTO2): Remove.
1815 (_bfd_final_link_relocate): Remove references to
1816 special_function1.
1817 * bfd-in2.h: Rebuilt.
1818 * aoutx.h (aout_link_input_section_std): Remove references to
1819 special_function1.
1820 (aout_link_reloc_link_order): Likewise.
1821
1822 Wed Jul 20 15:46:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1823
1824 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add rpath
1825 argument. If it is not NULL, use it to set DT_RPATH.
1826 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
1827 (bfd_elf64_size_dynamic_sections): Likewise.
1828 * bfd-in2.h: Rebuilt.
1829
1830 Sat Jul 16 21:10:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1831
1832 * elfcode.h (elf_get_dynamic_symtab_upper_bound): If there is no
1833 dynamic symtab, return error.
1834
1835 * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.
1836 * elfcode.h (elf_link_add_object_symbols): If symbol is defined as
1837 weak, set ELF_LINK_HASH_DEFINED_WEAK.
1838 (elf_link_output_extsym): If symbol is defined as weak, mark it
1839 STB_WEAK.
1840
1841 * libelf.h (struct bfd_elf_section_data): Add relocs field.
1842 (shdr_name): Remove; unused.
1843 * elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
1844 and RELA relocs. Free up the unswapped relocs. Permit the relocs
1845 to be cached in the section_data. Correct the reloc address.
1846 (elf_slurp_reloca_table): Remove.
1847 (elf_canonicalize_reloc): Rewrote.
1848 (elf_link_input_bfd): Permit the relocs to be cached in the
1849 section data.
1850
1851 Sat Jul 16 13:55:38 1994 Stan Shebs (shebs@andros.cygnus.com)
1852
1853 * config.bfd (m88*-harris-cxux*): Recognize.
1854 * hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
1855
1856 * configure.host (m68*-atari-sysv4*): New host.
1857 (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
1858 * hosts/amix.h: Remove.
1859 * hosts/m68kv4.h: New file, was amix.h.
1860
1861 Thu Jul 14 15:12:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1862
1863 * reloc.c (enum bfd_reloc_code_real, bfd_type, struct
1864 reloc_howto_struct, reloc_howto_type, HOWTO, HOWTO2): Copied
1865 changes over from bfd-in2.h so they get generated properly next
1866 time someone runs "make headers".
1867 * bfd-in2.h: Rebuilt.
1868
1869 * targets.c (netbsd532_vec, pc532mach_vec): Declare const.
1870 (m88kmach3_vec): Restore deleted declaration.
1871
1872 * configure.in: Alphabetize target vector names.
1873
1874 * config/pc532mach.mh: New file.
1875 (HDEPFILES, HDEFINES): Define here.
1876 * config/pc532-mach.mt (HDEPFILES, HDEFINES): Deleted.
1877 * config/ns32k-netbsd.mt (HDEPFILES, HDEFINES): Deleted.
1878
1879 Sun Jul 10 00:04:20 1994 Ian Dall (dall@hfrd.dsto.gov.au)
1880
1881 * pc532-mach.c: New File. pc532-mach a.out format.
1882
1883 * netbsd532.c: New file. pc532-netbsd532 a.out format.
1884
1885 * hosts/pc532mach.h: New file. pc532-mach host support.
1886
1887 * cpu-ns32k.c: New file. ns32k support cpu specific code rather
1888 than format specific code.
1889
1890 * config/pc532-mach.mt: New file. Support for pc532-mach target.
1891
1892 * config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
1893
1894 * aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
1895 ns32k series.
1896
1897 * targets.c: Add netbsd532_vec and pc532machaout_vec into
1898 bfd_target_vector array. Move netbsd386_vec to alphabetic order
1899 location.
1900
1901 * reloc.c (_bfd_final_link_relocate) Add support for
1902 special_function1 in howto.
1903
1904 * libaout.h: add M_NS32032, M_NS32532, M_532_NETBSD entries in
1905 machine_type enum.
1906
1907 * configure.in: add pc532mach_vec and netbsd532_vec entries.
1908
1909 * config.bfd: add pc532mach host entries. Use for both
1910 ns32k-pc532-mach and ns32k-pc532-netbsd.
1911
1912 * config.bfd: it doesn't work to use i386-mach3 for ns32k*-*-mach.
1913 add ns32k-pc532-mach* and ns32k-*-netbsd* entries.
1914
1915 * bfd-in2.h: Add ns32k specific relocations to bfd_reloc_code_real
1916 enum.
1917
1918 * bfd-in2.h: Add special_function1 to struct howto. Change HOWTO
1919 and NEWHOWTO macros to make special_function1 NULL. Neww HOWTO2
1920 macro.
1921
1922 * bfd-in2.h: Split definition of struct reloc_howto_struct
1923 and corresponding typedef into two statements.
1924
1925 * bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
1926
1927 * archures.c: Add bfd_ns32k_arch prototype, and entry in
1928 archures_init_table.
1929
1930 * aoutx.h (aout_link_reloc_link_order): Allow for target dependent
1931 MY_put_reloc macro. Allow for target dependent special_function1
1932 to apply the relocation.
1933
1934 * aoutx.h (aout_link_input_section_std): Allow for target
1935 dependent determination of reloc howto. Allow for target dependent
1936 special_function1 to apply the relocation.
1937
1938 * aoutx.h (get_reloc_upper_bound): Detect bss and return 0.
1939
1940 * aoutx.h (slurp_reloc_table): Detect bss and succesfully read
1941 zero reloc entries.
1942
1943 * aoutx.h (machine_type): Add bfd_arch_ns32k case.
1944
1945 * aoutx.h: Stat to determine executable status if STAT_FOR_EXEC
1946 is defined (not just MACH). Use fstat instead of stat and check
1947 for fstat error.
1948
1949 * aoutx.h: Allow target dependent swap_std_reloc_{in,out}.
1950
1951 * aoutx.h: Allow CTORS reloc info to be in target dependent reloc
1952 table.
1953
1954 * aout-target.h: Apply SWAP_MAGIC (if defined) after
1955 swap_exec_header_in, otherwise we have magic in the wrong order.
1956
1957 Thu Jul 14 11:47:27 1994 Stan Shebs (shebs@andros.cygnus.com)
1958
1959 * coff-sparc.c (sparccoff_vec): Have leading underscores.
1960
1961 Tue Jul 12 12:08:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1962
1963 * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
1964 hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
1965 rs6000-core.c, trad-core.c: Remove SEC_ALLOC flag from .reg
1966 sections, .reg sections are not allocated and contain debug
1967 information only.
1968 * osf-core.c (make_bfd_asection, osf_core_core_file_p): Use
1969 bfd_make_section_anyway instead of building unique section names.
1970
1971 Tue Jul 12 11:41:22 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1972
1973 * libelf.h (bfd_elf32_swap_symbol_in): Declare.
1974 (bfd_elf32_swap_symbol_out): Declare.
1975 (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
1976 * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
1977
1978 * aout-encap.c (ARCH): Don't define. Obsolete.
1979 * aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
1980 * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
1981 * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
1982 * newsos3.c, sparclynx.c, sunos.c: Likewise.
1983
1984 Mon Jul 11 20:08:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1985
1986 * section.c (STD_SECTION): Make the sixth argument boolean, not
1987 the seventh. From gary@tuva.pacsemi.oz.au (gary kopff).
1988
1989 Sun Jul 10 09:12:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
1990
1991 * aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
1992 in order not to collide with LynxOS's definition of FREE in
1993 /usr/include/sys/proc.h
1994
1995 Thu Jul 7 14:18:06 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
1996
1997 * reloc.c (bfd_perform_relocation): Don't clobber the relocation
1998 value for coff-Intel-little or coff-Intel-big. Hack upon hack.
1999
2000 Thu Jul 7 10:10:34 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2001
2002 * aoutx.h (howto_table_std): Add entry for GOT relocations
2003 which are present in sun3 shared libraries, to avoid assertions
2004 when reading the dynamic relocations.
2005
2006 Thu Jul 7 10:19:20 1994 Jeff Law (law@snake.cs.utah.edu)
2007
2008 * som.h (R_HPPA_COMPLEX): Fix dumb typo.
2009
2010 Wed Jul 6 19:21:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2011
2012 * hosts/sysv4.h (qsort, strtol): Don't declare.
2013
2014 * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
2015 if it is NULL.
2016
2017 * elf32-mips.c (mips_elf_final_write_processing): Add ignored info
2018 argument to correspond to recent libelf.h change.
2019
2020 Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2021
2022 * coff-alpha.c (alpha_ecoff_mkobject_hook): New hook to
2023 additionally copy object type information from the alpha file
2024 header to the BFD flags.
2025 (alpha_ecoff_backend_data): Use it.
2026 (ecoffalpha_little_vec): Add DYNAMIC to object_flags.
2027 * aout64.c: Fix typo in conditional QMAGIC definition.
2028
2029 Wed Jul 6 00:13:17 1994 Jeff Law (law@snake.cs.utah.edu)
2030
2031 * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
2032 value of clicksz to help weed out non HPPA BSD core files.
2033
2034 Tue Jul 5 13:26:02 1994 Stan Shebs (shebs@andros.cygnus.com)
2035
2036 Mach 3 support.
2037 * config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
2038 New targets.
2039 * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
2040 "mach3" instead of "mach".
2041 (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
2042 * targets.c (m88kmach3_vec): New target vector.
2043 (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
2044 inside #if 0.
2045 * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
2046 checking for execute permission, instead of looking at entry
2047 point.
2048 * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
2049 N_SHARED_LIB, don't include aout/*.h files, etc.
2050 * m88kmach3.c: New file, m88k Mach 3 target.
2051 * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target
2052 makefile fragments.
2053 * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
2054 New files, host makefile fragments.
2055 * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
2056
2057 Tue Jul 5 13:56:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2058
2059 * elfcode.h (swap_out_syms): Get alignment of common symbol from
2060 st_value field of saved ELF symbol information, if there is any.
2061
2062 Mon Jul 4 19:13:32 1994 Jeff Law (law@snake.cs.utah.edu)
2063
2064 * som.h (R_HPPA_COMPLEX): Define.
2065 * elf32-hppa.h (R_HPPA_COMPLEX): Define.
2066 (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
2067
2068 Fri Jul 1 12:07:41 1994 Jeff Law (law@snake.cs.utah.edu)
2069
2070 * Support code for enabling the new style linker for PA ELF.
2071 * elfcode.h (swap_symbol_in, swap_symbol_out): Externalize.
2072 (elf_compute_section_file_positions): Pass link_info to
2073 the begin_write_processing hook.
2074 (bfd_elf_write_object_contents): Pass NULL for new link_info
2075 argument to final_write_processing hook.
2076 (elf_link_output_sym): Accept new "input_section" argument for
2077 the symbols's input section. All callers changed. Call the
2078 link_output_symbol_hook if it's defined.
2079 (elf_bfd_final_link): Call the final_write_processing hook if
2080 it's defined.
2081 * libelf.h (elf_backend_link_output_symbol_hook): Declare.
2082 (elf_backend_begin_write_processing): Add new "info" argument.
2083 (elf_backend_final_write_processing): Likewise.
2084 * elf32-target.h (elf_backend_link_output_symbol_hook): Provide
2085 a default definition.
2086 (elf32_bed): Add elf_backend_link_output_symbol_hook.
2087 * elf64-target.h: Likewise.
2088
2089 * Major rework of the PA ELF code. Uses the new style BFD
2090 linker, major cleanups.
2091 * hppa_stubs.h: Rewrite from scratch. Much smaller and simpler.
2092 * elf32-hppa.h: Delete all symbol extension related code.
2093 (hppa_look_for_stubs_in_section): Delete decl.
2094 (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls.
2095 * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h
2096 into elf32-hppa.c. Do not include aout64.h.
2097 (typdef hppa_stub_type): Delete.
2098 (elf32_hppa_stub_name_list_struct): Delete.
2099 (elf32_hppa_stub_description_struct): Delete.
2100 (arg_reloc_type): Use simpler enumerations. All references changed.
2101 (arg_location, arg_reloc_relocation): Likewise.
2102 (elf32_hppa_symextn_map_struct): Delete.
2103 (get_symbol_value): Delete.
2104 (elf32_hppa_get_sym_extn): Delete.
2105 (find_stubs, new_stubs, type_of_mismatch): Delete.
2106 (find_stub_by_name, add_stub_by_name): Delete.
2107 (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete.
2108 (hppa_elf_arg_reloc_needed): Renamed. Simplify.
2109 (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete.
2110 (hppa_elf_long_branch_needed_p): Delete.
2111 (hppa_look_for_stubs_in_section): Delete.
2112 (hppa_elf_get_section_contents): Delete.
2113 (elf32_hppa_backend_symbol_processing): Delete.
2114 (elf32_hppa_backend_section_processing): Delete.
2115 (elf32_hppa_backend_section_from_shdr): Delete.
2116 (elf32_hppa_backend_fake_sections): Delete.
2117 (elf32_hppa_backend_section_from_bfd_section): Delete.
2118 (NEW_INSTRUCTION): Delete.
2119 (CURRENT_STUB_OFFSET): Delete.
2120 (elf32_hppa_relocate_section): New function.
2121 (elf32_hppa_bfd_final_link_relocate): New function.
2122 (elf32_hppa_size_symext): New function.
2123 (elf32_hppa_link_output_symbol_hook): New function.
2124 (elf32_hppa_read_symext_info): New function.
2125 (elf32_hppa_add_symbol_hook): New function.
2126 (elf32_hppa_name_of_stub): New function.
2127 (elf32_hppa_size_of_stub): New function.
2128 (elf32_hppa_build_one_sub): New function.
2129 (elf32_hppa_build_stubs): New function.
2130 (elf32_hppa_size_stubs): New function.
2131 (linker, stub and argument hash tables): Add appropriate
2132 structures, definitions and functions to implement all three
2133 hash tables.
2134 (hppa_elf_relocate_insn): Don't need argument location information
2135 in this function.
2136 (add_entry_to_symext_chain): Accept a symbol's argument location
2137 information rather than the symbol itself. All callers changed.
2138 (hppa_elf_gen_reloc_type): Simplify.
2139 (hppa_elf_set_section_contents): Stub section is no longer special.
2140 (hppa_elf_reloc): Greatly simplify.
2141 (elf32_hppa_begin_write_processing): Accept link_info argument.
2142 Handle being called from the BFD backend linker.
2143 (elf32_hppa_final_write_processing): Likewise.
2144 (elf_hppa_tc_make_sections): No longer call stub_finish.
2145
2146 Mon Jun 27 18:07:06 1994 Steve Chamberlain (sac@cirdan.cygnus.com)
2147
2148 * section.c (bfd_get_section_contents): Put in parens to get
2149 precedence right.
2150
2151 Sun Jun 26 18:08:29 1994 Jeff Law (law@snake.cs.utah.edu)
2152
2153 * libelf.h (relocate_section): New argument "output_names" added
2154 to prototype.
2155 * elfcode.h (elf_link_input_bfd): New argument "output_names"
2156 added to prototype of relocate_section. Pass the output symbol
2157 names to relocate_section.
2158 * elf32-i386.c (elf_i386_relocate_section): Use "output_names" to
2159 determine the name of a local symbol.
2160 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2161 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2162
2163 Fri Jun 24 08:15:42 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2164
2165 Add Solaris BCP (the part of Solaris which allows it to run
2166 SunOS4 a.out files) core file handling.
2167 * aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
2168 New structure and its swap in function.
2169 (internal_sunos_core): New member c_data_addr, to receive the
2170 start address of the data section in the core file.
2171 (swapcore_sun3, swapcore_sparc, sunos4_core_file_p): Use it.
2172 (sunos4_core_file_p): Recognize Solaris BCP core file.
2173 (sunos4_core_file_matches_executable_p): Always indicate match
2174 for Solaris BCP core files.
2175
2176 Thu Jun 23 15:31:28 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2177
2178 Preliminary support for generating shared libraries, from Eric
2179 Youngdale <ericy@cais.cais.com>.
2180 * elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
2181 (elf_link_add_object_symbols): If generating a shared library,
2182 create dynamic sections for first input BFD with the right format.
2183 (elf_link_create_dynamic_sections): Don't create .interp section
2184 if creating a shared library.
2185 (elf_link_input_bfd): Skip dynamic sections in input file.
2186 (elf_bfd_final_link): If creating a shared library, it's OK for
2187 dynobj to have sections which are not SEC_IN_MEMORY.
2188 * elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
2189 section if not creating a shared library.
2190 * elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
2191
2192 * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
2193 is an SHT_DYNAMIC section.
2194
2195 * cf-i386lynx.c (i386coff_vec): Don't include DYNAMIC in
2196 object_flags.
2197 * coff-sparc.c (sparccoff_vec): Likewise.
2198 * hppabsd-core.c (hppabsd_core_vec): Likewise.
2199
2200 * aoutx.h (NAME(aout,some_aout_object_p)): Don't set SEC_RELOC
2201 just because DYNAMIC is set.
2202
2203 Thu Jun 23 12:53:41 1994 David J. Mackenzie (djm@rtl.cygnus.com)
2204
2205 * configure.in: Change --with-targets to --enable-targets and
2206 --with-64-bit-bfd to --enable-64-bit-bfd.
2207 * Makefile.in, mpw-make.in, targets.c: Change comments.
2208
2209 Wed Jun 22 17:59:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2210
2211 * config.bfd (powerpc-*-elf*): New target, just like
2212 powerpc-*-sysv4*.
2213
2214 * linker.c (FAIL): Undefine macro before defining as enum.
2215
2216 Wed Jun 22 10:52:47 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2217
2218 * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
2219 pass from abfd->archive_pass, and save it there as well.
2220
2221 * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
2222 obstack_alloc returns NULL unless the size is non-zero.
2223
2224 * linker.c (archive_hash_allocate): Define.
2225 (_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
2226 rather than obstack_alloc, for clarity.
2227
2228 * elfcode.h (elf_get_reloc_upper_bound): Correct.
2229
2230 * aout64.c (BMAGIC, QMAGIC): Define if not already defined. From
2231 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
2232
2233 Linux ZMAGIC support from Eric Youngdale <ericy@cais.cais.com>.
2234 * libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
2235 * aout-target.h (MY(callback)): Only set alignment according to
2236 architecture if the section sizes are aligned to that alignment,
2237 for backward compatibility.
2238 (MY(set_sizes)): Initialize zmagic_disk_block_size field.
2239 * aoutx.h (adjust_z_magic): Set ztih if using q_magic_format. Set
2240 text section filepos to zmagic_disk_block_size if not ztih. Use a
2241 different padding algorithm if not ztih.
2242 * i386linux.c (MY_text_includes_header): Don't define.
2243
2244 * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
2245 symbols; don't look them up in the hash table. From
2246 ralphc@pyramid.com (Ralph Campbell).
2247
2248 Tue Jun 21 11:47:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2249
2250 * coff-go32.c (go32coff_archive_p): Remove unused function.
2251
2252 * section.c (bfd_abs_section): Make const.
2253 (bfd_abs_section_ptr, bfd_is_abs_section): Define.
2254 (bfd_und_section): Make const.
2255 (bfd_und_section_ptr, bfd_is_und_section): Define.
2256 (bfd_com_section): Make const.
2257 (bfd_com_section_ptr): Define.
2258 (bfd_ind_section): Make const.
2259 (bfd_ind_section_ptr, bfd_is_ind_section): Define.
2260 (bfd_abs_symbol, bfd_com_symbol): Make const.
2261 (bfd_und_symbol, bfd_ind_symbol): Likewise.
2262 (global_syms): Cast initialization of section field.
2263 (STD_SECTION): Define as const, and cast initializations.
2264 * bfd-in2.h: Rebuilt.
2265 * Many files: Change uses of bfd_abs_section, etc., to use
2266 bfd_abs_section_ptr or bfd_is_abs_section, etc.
2267
2268 Mon Jun 20 11:06:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2269
2270 * Many files: change all bfd_target vectors to be const. Change
2271 all uses of bfd_target * to be const bfd_target *. Change
2272 bfd_target_vector and bfd_default_vector arrays to be const
2273 bfd_target * const *.
2274
2275 * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
2276 elf32-mips.c: Renamed all externally visible ECOFF routines which
2277 are local to BFD to start with _bfd_ecoff instead of just ecoff.
2278
2279 * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
2280 (ecoff_swap_tir_out): Likewise.
2281 (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
2282 (ecoff_slurp_symbolic_info): Add new arguments to correspond to
2283 read_debug_info entry point in ecoff_debug_swap structure.
2284 Change all calls.
2285 * libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
2286 * ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
2287 (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
2288 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new
2289 ecoff_debug_swap fields.
2290 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2291 * elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
2292 (mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
2293 fields.
2294 * configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
2295 ecofflink.o.
2296 (bfd_elf32_littlemips_vec): Likewise.
2297 (ecoff_big_vec, ecoff_little_vec): Likewise.
2298 (ecoffalpha_little_vec): Likewise.
2299 * Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
2300 (BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
2301
2302 * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
2303 when computing reloc sizes. From Eric Youngdale
2304 <ericy@cais.cais.com>.
2305 * elfcode.h (elf_bfd_final_link): Don't try to compute maximum
2306 reloc count or size for a non-ELF file.
2307
2308 * mipsbsd.c (MY_final_link_callback): Define to avoid warning.
2309
2310 * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
2311 (BMAGIC, QMAGIC): Define; used by aoutx.h.
2312 (MY(slurp_symbol_table)): Change translate_from_native_sym_flags
2313 calls to use new parameters.
2314
2315 Fri Jun 17 14:45:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2316
2317 * aout-target.h (MY(callback)): Set the alignments of the text,
2318 data and bss sections after determining the architecture.
2319
2320 * sunos.c (sunos_add_one_symbol): Treat a common symbol from a
2321 dynamic object as being in the .bss section of the object, rather
2322 than as being undefined.
2323
2324 Fri Jun 17 11:16:50 1994 Jeff Law (law@snake.cs.utah.edu)
2325
2326 * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
2327
2328 * elf32-hppa.h (elf_hppa_final_processing): Delete decl.
2329
2330 Thu Jun 16 23:36:23 1994 Jeff Law (law@snake.cs.utah.edu)
2331
2332 * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
2333 if there aren't any in the input file.
2334
2335 Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
2336
2337 * i386linux.c: Many new functions and definitions for linker
2338 support for Linux shared libraries.
2339 * bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
2340 * bfd-in2.h: Rebuild.
2341
2342 Thu Jun 16 14:23:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2343
2344 * config.bfd: If second argument is ``_'', then, instead of
2345 echoing config file name, echo whether target uses leading
2346 underscores on symbol names. Add appropriate settings to
2347 different cases. Used by binutils/configure.in to set default for
2348 c++filt.
2349
2350 * elfcode.h (elf_bfd_final_link): If trying to generate a shared
2351 object, warn and return false.
2352
2353 * aoutx.h (NAME(aout,some_aout_object_p)): Accept BMAGIC objects
2354 and treat them as OMAGIC.
2355
2356 Wed Jun 15 18:02:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2357
2358 Enable sparc v9 support for release. Note that this is still a
2359 work in progress, pending release of an ABI specification.
2360 * config.bfd, configure.in: Include sparc v9 elf config.
2361 * elfcode.h (prep_headers): Handle sparc v9 (64 bit).
2362 * reloc.c (bfd_reloc_code_real): New reloc types.
2363 * elf64-sparc.c: Implement elf64-sparc target.
2364 * Makefile.in, targets.c: Updated.
2365
2366 Wed Jun 15 01:34:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2367
2368 * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
2369 (elf_dt_needed_name): New accessor macro.
2370 * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
2371 is set, use that instead of the filename for the DT_NEEDED dynamic
2372 entry.
2373 * elf.c (bfd_elf_set_dt_needed_name): New function.
2374 * bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
2375 * bfd-in2.h: Rebuilt.
2376
2377 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add sinterpptr
2378 argument, and set it to the .interp section.
2379 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
2380 (bfd_elf64_size_dynamic_sections): Likewise.
2381 * bfd-in2.h: Rebuilt.
2382
2383 * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
2384 field of the reloc rather than letting it be garbage.
2385
2386 * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as
2387 __.SYMDEF; the former was used in old Linux archives. From
2388 jrs@world.std.com (Rick Sladkey).
2389
2390 * i386linux.c (i386linux_write_object_contents): Define; like
2391 MY(write_object_contents) in aout-target.h, but set MACHTYPE to
2392 M_386. From jrs@world.std.com (Rick Sladkey).
2393 (MY_write_object_contents): Define.
2394
2395 * aoutx.h (translate_from_native_sym_flags): Treat N_SETV symbols
2396 as N_DATA symbols.
2397 (aout_link_add_symbols): Likewise.
2398
2399 * aoutx.h: Rewrite symbol duplicate elimination to use BFD hash
2400 tables.
2401 (struct stringtab_entry, struct stringtab_data): Remove.
2402 (HASHMAXLEN, HASH_CHAR, hash, compare, log2, emit_strtab): Remove.
2403 (struct strtab_hash_entry, struct strtab_hash): Define.
2404 (strtab_hash_newfunc, strtab_hash_lookup): Define.
2405 (stringtab_free, emit_stringtab): Define.
2406 (stringtab_init, add_to_stringtab): Rewrite.
2407 (NAME(aout,write_syms)): Use new stringtab code.
2408 (struct aout_final_link_info, NAME(aout,final_link)): Likewise.
2409 (aout_link_write_symbols, aout_link_write_other_symbol): Likewise.
2410
2411 * bfd-in.h (BFD_TRADITIONAL_FORMAT): Define new BFD flag to
2412 request BFD to write object in the traditional format, whatever
2413 that means for the particular backend.
2414 * bfd-in2.h: Rebuilt.
2415
2416 * hash.c (bfd_hash_allocate): If obstack_alloc fails, set
2417 bfd_error_no_memory.
2418
2419 Tue Jun 14 13:00:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2420
2421 * libaout.h (struct aoutdata): Add q_magic_format to subformat
2422 enum.
2423 * aout-target.h (MY_bfd_copy_private_bfd_data): Define as function
2424 if not already defined. Copy subformat information.
2425 (MY_text_includes_header): Define as 0 if not already defined.
2426 (MY(backend_data)): Use MY_text_includes_header rather than 0.
2427 (MY_final_link_callback): Rename from final_link_callback, and
2428 define only if MY_final_link_callback is not already defined.
2429 (MY_bfd_final_link): Rename use of final_link_callback to
2430 MY_final_link_callback.
2431 * aoutx.h (NAME(aout,some_aout_object_p)): Handle QMAGIC like
2432 ZMAGIC, but set the subformat to q_magic_format. Abort if the
2433 magic number if not recognized.
2434 (adjust_z_magic): Use QMAGIC if q_magic_format.
2435 * i386linux.c (MY_text_includes_header): Define as 1.
2436 (i386linux_bfd_final_link): New static function.
2437 (MY_bfd_final_link): Define as i386linux_bfd_final_link.
2438
2439 * aoutx.h (translate_to_native_sym_flags): Check both section and
2440 output_section against sections of abfd.
2441
2442 * libecoff.h (struct ecoff_link_hash_entry): Change type of
2443 written from boolean to char. Add new field small.
2444 * ecoff.c (ecoff_link_hash_newfunc): Initialize written to 0
2445 rather than false. Initialize small to 0.
2446 (ecoff_link_add_externals): If ECOFF type is scSUndefined, set
2447 small. If small is set, and hash table type is common, force the
2448 symbol into a section named SCOMMON and change the ECOFF type from
2449 scCommon to scSCommon.
2450 (ecoff_link_write_external): Set written to 1 rather than true.
2451 * coff-mips.c (mips_relocate_section): Correct JMPADDR reloc
2452 overflow check to consider section VMA of input file.
2453
2454 Mon Jun 13 14:20:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2455
2456 * aoutf1.h (aout_32_sunos4_write_object_contents): Handle a
2457 machine type of 68000.
2458 * aoutx.h (NAME(aout,machine_type)): Add new argument unknown.
2459 Set *unknown to true if machine type is really unknown, as opposed
2460 to M_UNKNOWN for the 68000.
2461 (NAME(aout,set_arch_mach)): Change NAME(aout,machine_type) call
2462 accordingly.
2463 * libaout.h (NAME(aout,machine_type)): Add new argument to
2464 prototype.
2465
2466 Sun Jun 12 20:21:03 1994 Jeff Law (law@snake.cs.utah.edu)
2467
2468 * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID
2469 or HIUX_AUX_ID.
2470 (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
2471 (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note
2472 som.c is careful to always define CPU_PA_RISC1_0.
2473
2474 Sat Jun 11 16:32:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2475
2476 Add weak symbols as an extension to a.out.
2477 * aoutx.h (sym_in_text_section): Don't define.
2478 (sym_in_data_section, sym_in_bss_section): Likewise.
2479 (sym_is_undefined, sym_is_global_defn): Likewise.
2480 (sym_is_debugger_info, sym_is_fortrancommon): Likewise.
2481 (sym_is_absolute, sym_is_indirect): Likewise.
2482 (translate_from_native_sym_flags): Rewrite for clarity. Rearrange
2483 arguments and change caller. Handle weak symbols.
2484 (translate_to_native_sym_flags): Likewise.
2485 (aout_link_check_ar_symbols): Don't ignore weak symbols. Pull
2486 object in from archive if a weak defintion is found for an
2487 existing undefined symbol.
2488 (aout_link_add_symbols): Put all cases in switch. Set flags of an
2489 undefined symbol to 0. Handle weak symbols.
2490 (aout_link_write_symbols): Handle weak symbols.
2491 (aout_link_write_other_symbol): Likewise.
2492 (aout_link_input_section_std): Likewise.
2493 (aout_link_input_section_ext): Likewise.
2494 * sunos.c (sunos_write_dynamic_symbol): Likewise.
2495
2496 Fri Jun 10 13:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2497
2498 * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
2499 (NAME(aout,get_reloc_upper_bound)): Likewise.
2500
2501 * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
2502 * linker.c (_bfd_generic_link_write_global_symbol): Don't assume
2503 the section of a common symbol is not NULL.
2504
2505 Wed Jun 8 23:15:53 1994 Stu Grossman (grossman@cygnus.com)
2506
2507 * nlmcode.h (nlm_object_p): Set EXEC_P and start address for GDB.
2508
2509 Wed Jun 8 23:57:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2510
2511 * aoutx.h (aout_get_external_symbols): Don't try to read the
2512 strings if there are no symbols.
2513 (aout_link_write_other_symbol): Use the output section when
2514 working out the type.
2515
2516 Tue Jun 7 13:25:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2517
2518 * elfcode.h (assign_section_numbers): Put shstrtab, symtab and
2519 strtab sections at end of file. Avoids bug in some versions of
2520 SVR4 strip. From Eric Youngdale <eric@tantalus.nrl.navy.mil>.
2521
2522 * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
2523 set SEC_DEBUGGING for STYP_INFO sections.
2524 (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
2525 defined, and D_PAGED is set, set the file position equal to the
2526 section VMA modulo COFF_PAGE_SIZE.
2527 * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
2528 * coff-i386.c: Set D_PAGED in BFD target.
2529 (COFF_PAGE_SIZE): Define.
2530 * coff-m68k.c, coff-sparc.c: Likewise.
2531
2532 Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2533
2534 * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
2535 into a BFD section just because SHF_ALLOC is set; require that it
2536 not use the normal symbol table.
2537 (elf_section_from_bfd_section): Corresponding change.
2538
2539 Better indirect and warning symbol handling inspired by Stuart
2540 Quick <stuck@cs.man.ac.uk>.
2541 * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
2542 (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
2543 to REF. Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
2544 REFC. Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
2545 Change DEFW_ROW/indr from CYCLE to NOACT. Change INDR_ROW/indr
2546 from MDEF to MIND. Change INDR_ROW/warn from WARNC to CYCLE.
2547 Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN. Change
2548 WARN_ROW/com from MWARN to WARN. Change WARN_ROW/warn from NOACT
2549 to CYCLE. Change SET_ROW/warn from WARNC to CYCLE>
2550 (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
2551 REFC. If a new indirect symbol has been referenced, push the
2552 reference down to the symbol it points to. FIx handling of WARN.
2553 * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
2554 clobber e_type of next symbol.
2555 (translate_to_native_sym_flags): Likewise.
2556 (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
2557 as bfd_link_hash_indirect.
2558
2559 * libaout.h (struct aout_link_hash_entry): New field written.
2560 * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
2561 (aout_link_write_symbols): Use written, not root.written.
2562 (aout_link_write_other_symbol): Likewise.
2563 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2564 * libecoff.h (struct ecoff_link_hash_entry): New field written.
2565 * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
2566 (ecoff_link_write_external): use written, not root.written.
2567 * genlink.h (struct generic_link_hash_entry): New field written.
2568 * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
2569 (generic_link_hash_newfunc): Initialize written.
2570 (_bfd_generic_link_output_symbols): Use written, not root.written.
2571 (_bfd_generic_link_write_global_symbol): Likewise.
2572 (_bfd_generic_reloc_link_order): Likewise.
2573
2574 * libecoff.h (ecoff_data_type): Add linker field.
2575 * ecoff.c (ecoff_write_object_contents): Check new tdata linker
2576 field, rather than outsymbols being non-NULL, to decide whether to
2577 output the symbols and relocs.
2578 (ecoff_bfd_final_link): Set new tdata linker field to true.
2579
2580 * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
2581 data to a non-ECOFF file.
2582
2583 * libbfd-in.h: Add warning that libbfd.h is a generated file.
2584 * libbfd.h: Rebuilt.
2585
2586 Sun Jun 5 15:02:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2587
2588 Changes to support ELF strip and objcopy on dynamically linked
2589 files.
2590 * elfcode.h (elf_fake_sections): Add prototype.
2591 (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
2592 section, and from an SHT_DYNSYM section, and from the dynamic
2593 string table section.
2594 (elf_object_p): Set D_PAGED if there is a program header.
2595 (elf_make_sections): Remove.
2596 (fix_up_strtabs): Remove.
2597 (elf_fake_sections): Rewrite. Now sets sh_entsize.
2598 (assign_section_numbers): Rewrite. Now sets sh_link and sh_info
2599 for all sections.
2600 (elf_compute_section_file_positions): Don't call obsolete
2601 functions elf_make_sections or fix_up_strtabs.
2602 (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
2603 (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
2604 objects.
2605 (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
2606 sections. If an SHT_REL or SHT_RELA section is allocated or uses
2607 an unusual symbol table, permit a BFD section to map to it.
2608 Permit most SHT_STRTAB sections to have a BFD section mapped to
2609 them.
2610 (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
2611 fields of dynamic sections here; do it in assign_section_numbers.
2612 * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
2613 flags.
2614
2615 * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
2616 SEC_LOAD is set, rather than checking SEC_ALLOC.
2617
2618 * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
2619
2620 Fri Jun 3 10:58:02 1994 Jeff Law (law@snake.cs.utah.edu)
2621
2622 * som.c (som_write_object_contents): Don't compute the file header's
2623 checksum here.
2624 (som_write_headers): Instead do it here.
2625
2626 * libbfd.h (bfd_realloc): Change last arg to "size_t size".
2627
2628 Thu Jun 2 17:39:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2629
2630 * hosts/sun3.h: Include <stdlib.h>. Don't declare free, exit or
2631 getenv.
2632
2633 Add linker support for SunOS shared libraries.
2634 * sunos.c: Include bfdlink.h. Add many new functions and
2635 definitions for SunOS shared library support.
2636 * bfd-in.h (bfd_sunos_record_link_assignment): Declare.
2637 (bfd_sunos_size_dynamic_sections): Declare.
2638 * bfd-in2.h: Rebuilt.
2639 * aoutx.h (struct aout_link_hash_entry): Move to libaout.h.
2640 (struct aout_link_hash_table): Likewise.
2641 (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
2642 (aout_hash_table): Likewise.
2643 (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc
2644 and make externally visible.
2645 (NAME(aout,link_hash_table_init)): New function.
2646 (NAME(aout,link_hash_table_create)): Call
2647 NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init.
2648 (aout_link_add_symbols): Don't fail if no symbols. If it exists,
2649 call add_dynamic_symbols backend entry point for dynamic objects.
2650 Use add_one_symbol backend entry point if it exists.
2651 (NAME(aout,final_link)): Call finish_dynamic_link backend entry
2652 point, if it exists.
2653 (aout_link_input_bfd): For a dynamic object, call
2654 link_dynamic_object backend entry point, if it exists.
2655 (aout_link_write_other_symbol): Call write_dynamic_symbol backend
2656 entry point, if it exists.
2657 (aout_link_input_section): Don't read the relocs if they have
2658 already been read.
2659 (aout_link_input_section_std): When doing a final link, for a
2660 reloc against an external symbol, call check_dynamic_reloc backend
2661 entry point, if it exists.
2662 (aout_link_input_section_ext): Likewise.
2663 * libaout.h: Protect against multiple inclusion. Include
2664 bfdlink.h.
2665 (struct aout_link_hash_entry): Move in from aoutx.h.
2666 (struct aout_link_hash_table): Likewise.
2667 (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
2668 (aout_hash_table): Likewise.
2669 (struct aout_backend_data): Add fields add_dynamic_symbols,
2670 add_one_symbol, link_dynamic_object, write_dynamic_symbol,
2671 check_dynamic_reloc, and finish_dynamic_link.
2672 (struct aout_section_data_struct): Define new structure.
2673 (aout_section_data): Define new accessor macro.
2674 (NAME(aout,link_hash_newfunc)): Declare.
2675 (NAME(aout,link_hash_table_init)): Declare.
2676 * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data
2677 fields.
2678 * aout-target.h (MY(backend_data)): Likewise.
2679 * i386aout.c (MY(backend_data)): Likewise.
2680 * i386mach3.c (MY(backend_data)): Likewise.
2681 * mipsbsd.c (MY(backend_data)): Likewise.
2682 * sparclynx.c (sparclynx_aout_backend): Likewise.
2683
2684 * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
2685 until we know it is non-NULL.
2686 (aout_link_write_symbols): Don't skip a warning symbol even if it
2687 has already been written out. If skipping an indirect symbol,
2688 skip the next symbol as well.
2689
2690 Wed Jun 1 14:37:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2691
2692 * hosts/sun3.h: Don't declare qsort, malloc or realloc.
2693
2694 Thu May 26 13:56:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2695
2696 * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
2697 to char pointer to avoid compiler warnings.
2698
2699 * dep-in.sed: Remove spaces before colons.
2700
2701 Merged changes back in from FSF gas release 2.3:
2702
2703 * Makefile.in (stmp-bfd.h): Wrap `if' block around grep
2704 invocation, to avoid a bug in BSD 4.4 make.
2705
2706 From Ralph Campbell:
2707 * mipsbsd.c (mips_fix_jmp_addr): If symbol is undefined, return an
2708 error.
2709 (mips_fix_hi16_s): Ditto.
2710
2711 Fri May 13 21:21:00 1994 DJ Delorie (dj@ctron.com)
2712
2713 * makefile.dos: define a default target, or archives won't work
2714 due to multiple matches.
2715
2716 Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
2717
2718 * configure.bat: update for latest files
2719 * makefile.dos: update for correct targets and sources
2720 * coff-go32.c: [new] go32's COFF format (i386coff with underscores)
2721 * targets.c: add go32coff target
2722 * makefile.in: add coff-go32.c support
2723
2724 Thu May 26 10:10:21 1994 Jeff Law (law@snake.cs.utah.edu)
2725
2726 * som.c (som_prep_headers): Do not set the system_id here, private
2727 bfd data has not been copied yet.
2728 (som_write_headers): Instead do it here.
2729
2730 Tue May 24 16:17:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2731
2732 Make MIPS ELF use new ELF backend linker. No shared library
2733 support yet.
2734 * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
2735 (bfd_mips_elf32_swap_gptab_out): New function.
2736 (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
2737 (mips_elf_final_write_processing): Set sh_info field for .gptab.*
2738 sections.
2739 (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
2740 (mips_elf_read_ecoff_info): Read and free external symbols last,
2741 not first, for clarity.
2742 (struct mips_elf_link_hash_entry): Define new structure.
2743 (struct mips_elf_link_hash_table): Define new structure.
2744 (mips_elf_link_hash_lookup): Define new macro.
2745 (mips_elf_link_hash_traverse): Define new macro.
2746 (mips_elf_hash_table): Define new macro.
2747 (mips_elf_link_hash_newfunc): New static function.
2748 (mips_elf_link_hash_table_create): New static function.
2749 (mips_elf_add_symbol_hook): New static function.
2750 (struct extsym_info): Define new structure.
2751 (mips_elf_get_extr, mips_elf_set_index): Remove.
2752 (mips_elf_output_extsym): New static function.
2753 (gptab_compare): New static function.
2754 (mips_elf_final_link): Rewrite to use ELF backend linker, and to
2755 merge gptab information in input files.
2756 (mips_elf_relocate_hi16): New static function.
2757 (mips_elf_relocate_section): New static function.
2758 (bfd_elf32_bfd_link_hash_table_create): Define as macro before
2759 including elf32-target.h.
2760 (elf_backend_relocate_section): Likewise.
2761 (elf_backend_add_symbol_hook): Likewise.
2762 * elf.c (_bfd_elf_link_hash_newfunc): Rename from
2763 elf_link_hash_newfunc and make globally visible. Change caller.
2764 (_bfd_elf_link_hash_table_init): New function, broken out of
2765 _bfd_elf_link_hash_table_create.
2766 (_bfd_elf_link_hash_table_create): Use
2767 _bfd_elf_link_hash_table_init.
2768 * libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
2769 (elf_bad_symtab): Define new accessor macro.
2770 (_bfd_elf_link_hash_newfunc): Declare.
2771 (_bew_elf_link_hash_table_init): Declare.
2772 * elfcode.h (elf_object_p): Call backend object_p hook after
2773 swapping in all the section headers.
2774 (map_program_segments): Correct typo: Internal for External.
2775 (elf_link_add_object_symbols): If elf_bad_symtab is set, read all
2776 the symbols. Skip STB_LOCAL symbols rather than giving an error.
2777 (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
2778 all symbols, not just locals.
2779 (elf_link_output_extsym): Only skip a symbol not mentioned by a
2780 regular file if it is mentioned by a dynamic object.
2781 (elf_link_input_bfd): If elf_bad_symtab is set, read all the
2782 symbols.
2783
2784 Fri May 20 13:38:23 1994 Jeff Law (law@snake.cs.utah.edu)
2785
2786 * som.c (som_set_reloc_info): Do not set any relocation info
2787 for SOM fixups which are never passed to BFD.
2788
2789 Fri May 20 11:57:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2790
2791 * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
2792 checking.
2793
2794 * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
2795 the dynamic linking information for the benefit of the debugger.
2796 From Peter Schauer.
2797 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2798
2799 * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
2800 code repeated three times in bfd_section_from_shdr in elfcode.h.
2801 * libelf.h (_bfd_elf_make_section_from_shdr): Declare.
2802 * elfcode.h (bfd_section_from_shdr): Use new function
2803 _bfd_elf_make_section_from_shdr to create BFD sections. If a
2804 reloc section does not use the main symbol table, or it is part of
2805 the process image, treat it as a normal section, not relocs.
2806 * elf32-mips.c (mips_elf_section_from_shdr): Use new function
2807 _bfd_elf_make_section_from_shdr.
2808
2809 Thu May 19 11:37:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2810
2811 * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
2812 15 to 14 to match SVR4 ar.
2813
2814 Add support for ELF shared libraries. Loosely based on work by
2815 Eric Youngdale <ericy@cais.com>.
2816 * libelf.h (struct elf_backend_data): Add new fields for dynamic
2817 linking: elf_backend_create_dynamic_sections,
2818 elf_backend_adjust_dynamic_symbol,
2819 elf_backend_size_dynamic_sections,
2820 elf_backend_finish_dynamic_symbol,
2821 elf_backend_finish_dynamic_sections.
2822 (struct elf_link_hash_entry): Change type of align field to
2823 bfd_size_type. Add fields dynindx, dynstr_index, weakdef,
2824 elf_link_hash_flags.
2825 (struct elf_link_hash_table): Add fields dynobj, dynsymcount,
2826 dynstr, bucketcount.
2827 (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
2828 (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
2829 (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
2830 (bfd_elf32_add_dynamic_entry): Declare.
2831 (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
2832 (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
2833 (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
2834 (bfd_elf64_add_dynamic_entry): Declare.
2835 * elfcode.h (Elf_External_Dyn): Define.
2836 (elf_swap_reloc_in): Define as macro using NAME. Make externally
2837 visible.
2838 (elf_swap_reloc_out): Likewise.
2839 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
2840 (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
2841 and as new externally visible function.
2842 (elf_fake_sections): Set section type of dynamic sections based on
2843 section names.
2844 (elf_write_phdrs): Remove.
2845 (assign_file_position_for_section): Add new align argument.
2846 Change all callers.
2847 (get_program_header_size): New static function.
2848 (struct seg_info): Remove.
2849 (map_program_segments): Completely rewrite.
2850 (assign_file_positions_except_relocs): Completely rewrite.
2851 (assign_file_positions_for_relocs): Don't set a file position for
2852 sections which already have one. Don't bother to align the file
2853 position here.
2854 (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
2855 section types.
2856 (elf_section_from_bfd_section): Likewise.
2857 (elf_slurp_symbol_table): If section_from_elf_index fails, just
2858 use bfd_abs_section rather than returning an error.
2859 (elf_sizeof_headers): Make useful.
2860 (elf_link_record_dynamic_symbol): New static function.
2861 (elf_link_add_object_symbols): Handle dynamic objects.
2862 (elf_link_create_dynamic_sections): New static function.
2863 (elf_add_dynamic_entry): Define as macro using NAME and as new
2864 externally visible function.
2865 (NAME(bfd_elf,record_link_assignment)): New function.
2866 (elf_buckets): New static variable.
2867 (NAME(bfd_elf,size_dynamic_sections)): New function.
2868 (struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
2869 (elf_bfd_final_link): Handle dynamic linking. Create a section
2870 symbol for all ELF sections, not all BFD sections. Store section
2871 symbol index in target_index field, not index field. Traverse
2872 over global symbols even if stripping.
2873 (elf_link_output_extsym): Output dynamic symbols. Mark symbols
2874 defined by dynamic objects as undefined.
2875 (elf_link_input_bfd): Ignore dynamic objects. Use target_index
2876 field for section relocs, and make sure it is set.
2877 (elf_reloc_link_order): Use target_index field for section relocs,
2878 and make sure it is set.
2879 * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
2880 weakdef and elf_link_hash_flags fields.
2881 (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
2882 dynstr and bucketcount fields.
2883 * elf32-target.h: Initialize new dynamic linking fields.
2884 * elf64-target.h: Likewise.
2885 * elf32-i386.c: New functions for dynamic linking support.
2886 * elf32-sparc.c: Likewise.
2887 * bfd-in.h (bfd_elf32_record_link_assignment): Declare.
2888 (bfd_elf64_record_link_assignment): Declare.
2889 (bfd_elf32_size_dynamic_sections): Declare.
2890 (bfd_elf64_size_dynamic_sections): Declare.
2891 * bfd-in2.h: Rebuilt.
2892
2893 Wed May 18 08:29:04 1994 Ian Lance Taylor (ian@cygnus.com)
2894
2895 * som.c: Don't include <sys/dir.h> or <sys/user.h>.
2896 (som_reloc_queue_find): Call memcmp instead of bcmp.
2897 (som_bfd_reloc_type_lookup): Change first argument to bfd *.
2898 (compare_syms): Change types of arguments to const void *.
2899 (bfd_section_from_som_symbol): Removed unused local found.
2900 (som_write_armap): Add elength, map, orl_count and int arguments.
2901 (som_write_armap): Use %ld and cast to long for getuid result.
2902
2903 Wed May 18 09:09:32 1994 Jeff Law (law@snake.cs.utah.edu)
2904
2905 * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
2906 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
2907
2908 * som.h (R_HPPA_ABS_CALL): Define.
2909 * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
2910
2911 Tue May 17 19:33:12 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2912
2913 * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading
2914 underscore, for compatibility with Intel tool chain (gnu960v2).
2915
2916 Mon May 16 10:09:22 1994 Jeff Law (law@snake.cs.utah.edu)
2917
2918 * bfd-in2.h: Rebuilt.
2919
2920 * elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
2921 likewise for other PA specific sections.
2922 (hppa_elf_relocate_unwind_table): Delete unused
2923 function.
2924 (elf_hppa_howto_table): Completely new table based on 94-02-02
2925 draft PA ELF spec. Change relocation tags appropriately
2926 throughout elf32-hppa.c
2927 (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
2928 spec.
2929 (hppa_elf_reloc): Likewise.
2930 (hppa_look_for_stubs_in_section): Likewise
2931 (ELF_MACHINE_CODE): Change to EM_PARISC.
2932 * elf32-hppa.h: Include "elf/hppa.h". Change relocation tags
2933 appropriately throughout elf32-hppa.h.
2934 (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
2935 spec.
2936 (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
2937 * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
2938 * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
2939 * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.
2940
2941 * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
2942 the final value twice for LR and RR field selectors.
2943
2944 Sat May 14 09:09:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2945
2946 * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert. This
2947 avoids __eprintf troubles.
2948
2949 Fri May 13 10:51:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2950
2951 * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.
2952
2953 * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
2954 ecoff_little_vec since Irix 5 supports ECOFF executables.
2955
2956 Wed May 11 00:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2957
2958 * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
2959 correctly.
2960
2961 * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
2962 make to invoke the shell.
2963
2964 Tue May 10 14:23:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2965
2966 * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
2967 SEC_SHARED_LIBRARY for clarity. Changed all uses.
2968 * bfd-in2.h: Rebuilt.
2969 * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
2970 set, set STYP_NOLOAD.
2971 * coffgen.c (coff_section_from_bfd_index): Don't get an assertion
2972 failure because of a bad shared library.
2973
2974 Mon May 9 18:53:40 1994 Bill Cox (bill@rtl.cygnus.com)
2975
2976 * linker.c: Add missing comment terminator.
2977
2978 Mon May 9 11:53:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2979
2980 * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
2981 are not NULL, assume the caller has already looked up the symbol
2982 in the hash table and has stored the entry in *hashp.
2983 (generic_link_add_symbol_list): Set h to NULL before calling
2984 _bfd_generic_link_add_one_symbol.
2985 * ecoff.c (ecoff_link_add_externals): Likewise.
2986
2987 * elfcode.h (assign_file_positions_except_relocs): Don't require
2988 page shared between .data and .bss segments to contain zeroes.
2989
2990 * elfcode.h: Include bfdlink.h. Added several new functions to do
2991 linking.
2992 (ELF_R_TYPE): Define.
2993 (bfd_add_to_strtab): Return unsigned long. Change check for
2994 realloc failure.
2995 (elf_fake_sections): Check return value of bfd_add_to_strtab.
2996 (elf_compute_section_file_positions): Add link_info argument.
2997 Call elf_backend_begin_write_processing hook and prep_headers
2998 here. Only call swap_out_syms if link_info is NULL. Set up
2999 .shstrtab section here. Pass dosyms argument to
3000 assign_file_positions_except_relocs. Set output_has_begun flag.
3001 (assign_file_positions_for_symtab_and_strtabs): Add dosyms
3002 argument, and use it to control setting .symtab and .strtab file
3003 positions.
3004 (assign_file_positions_except_relocs): Add dosyms argument, and
3005 pass it on.
3006 (prep_headers): Check return value of bfd_add_to_strtab.
3007 (swap_out_syms): Likewise. Also, don't set up .shstrtab here.
3008 (NAME(bfd_elf,write_object_contents)): Some calls moved into
3009 elf_compute_section_file_positions.
3010 (elf_set_section_contents): Likewise.
3011 (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
3012 * libelf.h: Include bfdlink.h.
3013 (struct elf_backend_data): Add fields collect,
3014 elf_add_symbol_hook, elf_backend_relocate_section.
3015 (struct bfd_elf_section_data): Add field rel_hashes.
3016 (struct elf_obj_tdata): Remove fields internal_syms and symbols.
3017 Add field sym_hashes.
3018 (obj_symbols, obj_internal_syms): Remove definitions.
3019 (elf_sym_hashes): Define.
3020 (struct elf_link_hash_entry): Define.
3021 (struct elf_link_hash_table): Define.
3022 (elf_link_hash_lookup): Define.
3023 (elf_link_hash_traverse): Define.
3024 (elf_hash_table): Define.
3025 (_bfd_elf_link_hash_table_create): Declare.
3026 (bfd_elf32_bfd_link_add_symbols): Declare.
3027 (bfd_elf32_bfd_final_link): Declare.
3028 (bfd_elf64_bfd_link_add_symbols): Declare.
3029 (bfd_elf64_bfd_final_link): Declare.
3030 * elf.c: Include bfdlink.h.
3031 (elf_link_hash_newfunc): New function.
3032 (_bfd_elf_link_hash_table_create): New function.
3033 * elf32-target.h (elf_backend_relocate_section): If not defined,
3034 define as 0 and use generic linker. Otherwise, use ELF backend
3035 linker.
3036 (elf_backend_collect): If not defined, define as false.
3037 (elf_backend_add_symbol_hook): If not defined, define as 0.
3038 (elf32_bed): Initialize new fields.
3039 * elf64-target.h: Same changes as elf32-target.h.
3040 * elf32-i386.c: Include bfdlink.h.
3041 (elf_i386_relocate_section): New function.
3042 (elf_backend_relocate_section): Define.
3043 * elf32-sparc.c: Include bfdlink.h.
3044 (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
3045 to Elf_Internal_Rela (they're the same type anyhow).
3046 (elf_sparc_relocate_section): New function.
3047 (elf_backend_relocate_section): Define.
3048 * elf32-mips.c (elf_backend_collect): Define.
3049
3050 * Makefile.in (stmp-bfd.h): Avoid useless make error message in a
3051 different way; touch takes a numeric argument on some systems.
3052
3053 Fri May 6 13:34:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3054
3055 * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
3056 handling for latest suggested format.
3057 (nlm_swap_auxiliary_headers_out): Likewise.
3058 (nlm_compute_section_file_positions): Likewise.
3059
3060 Fri May 6 11:11:50 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
3061
3062 * config.bfd: handle erricsson config (for OSE).
3063
3064 Thu May 5 15:40:47 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3065
3066 Patches from Ralph Campbell:
3067 * mipsbsd.c (mips_fix_jmp_addr): New function.
3068 (mips_fix_hi16_s): Use bfd_is_com_section.
3069 (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
3070
3071 Fri May 6 11:48:55 1994 Steve Chamberlain (sac@cygnus.com)
3072
3073 * config/go32.mh: XX support.
3074
3075 From bill
3076 * Makefile.in: Build sysdep.h without causing worrying but
3077 harmless error message.
3078
3079 Wed May 4 11:09:53 1994 Ian Lance Taylor (ian@cygnus.com)
3080
3081 Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
3082 * aout0.c: New file.
3083 * targets.c (aout0_big_vec): Declare.
3084 (bfd_target_vector): Add aout0_big_vec.
3085 * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
3086 * config/m68k-aout.mt (SELECT_VECS): Removed.
3087 * config/m68k-0aout.mt: New file.
3088 * configure.in (aout0_big_vec): New target vector: use aout0.o,
3089 aout32.o and stab-syms.o.
3090 * Makefile.in: Rebuilt dependencies.
3091 (BFD32_BACKENDS): Add aout0.o.
3092 (CFILES): Add aout0.c.
3093
3094 * libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
3095 * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
3096 MY(backend_data): Initialize exec_hdr_flags field.
3097 * aoutf1.h (sunos_32_set_arch_mach): Make static.
3098 (aout32_sunos4_write_object_contents): Set flags from backend
3099 info.
3100 (MY_exec_hdr_flags): If not defined, define as 1.
3101 (sunos4_aout_backend): Initialize exec_hdr_flags field.
3102 * aout-encap.c (encap_write_object_contents): Set flags from
3103 backend info.
3104 (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
3105 * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
3106 (MY(write_object_contents)): Set flags from backend info.
3107 * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
3108 * i386mach3.c (MY(backend_data)): Likewise.
3109 * mipsbsd.c (MY(backend_data)): Likewise.
3110 * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
3111 flags from backend info.
3112 (sparclynx_aout_backend): Initialize exec_hdr_flags field.
3113
3114 Wed May 4 02:56:00 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
3115
3116 * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
3117 (m68*-apollo-*): Treat all Apollo configs the same, don't handle
3118 BSD specially.
3119
3120 Tue May 3 19:43:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3121
3122 * cache.c: Rewrote to work correctly.
3123 * libbfd.h: Rebuilt.
3124 * opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
3125 (bfd_fdopenr): Check return value of bfd_cache_init.
3126
3127 Fri Apr 29 15:08:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3128
3129 * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
3130 enumerating them, since the reloc type can not serve as an index
3131 into the m68k COFF howto_table.
3132
3133 Fri Apr 29 09:42:39 1994 Steve Chamberlain (sac@cygnus.com)
3134
3135 * config.bfd (*-go32): Changed to coff.
3136 * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
3137 * srec.c (srec_write_symbols): Write out the correct number of
3138 symbols and don't stick in extra nulls.
3139
3140 Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)
3141
3142 * cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
3143 * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
3144 (COFF_SPARC): Define.
3145 * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
3146 power of data and bss sections to 3.
3147 * hosts/lynx.h (__LYNXOS): Define.
3148
3149 Tue Apr 26 15:04:26 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3150
3151 * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
3152 against section symbols to avoid losing during ld -r.
3153
3154 Tue Apr 26 12:16:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3155
3156 * elfcode.h (shstrtab_length_fixed): Remove useless static
3157 variable.
3158 (struct elf_sect_data): Remove unused structure.
3159 (elf_object_p): Free memory if error occurs. Check return value
3160 of bfd_default_set_arch_mach. If elf_get_str_section fails,
3161 preserve error code rather than setting wrong_format.
3162 (null_shdr): Remove static variable.
3163 (assign_section_numbers): Remove shstrtab_length_fixed assignment.
3164 Allocate first section header on BFD obstack rather than using
3165 null_shdr.
3166 (bfd_prpsinfo): Remove unused local variable newsect.
3167
3168 Mon Apr 25 15:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3169
3170 * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.
3171
3172 * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
3173 to create sections. Check return value of recursive calls.
3174 (bfd_section_from_phdr): Check return value of bfd_make_section.
3175 (elf_symbol_from_bfd_symbol): Likewise.
3176 (elf_object_p): Check return value of bfd_section_from_shdr.
3177 (section_from_elf_index): Likewise.
3178 (elf_slurp_symbol_table): Check return value of
3179 section_from_elf_index.
3180 (bfd_prstatus): Return boolean value. Check return value of
3181 bfd_make_section.
3182 (bfd_fpregset): Likewise.
3183 (bfd_prpsinfo): Return boolean value.
3184 (elf_corefile_note): Check return values of bfd_prstatus,
3185 bfd_fpregset, and bfd_prpsinfo.
3186 (elf_core_file_p): Check return value of elf_corefile_note.
3187
3188 Fri Apr 22 11:08:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3189
3190 Get rid of the ECOFF .reginfo section hack.
3191 * ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
3192 (ecoff_new_section_hook): Don't handle the .reginfo section.
3193 (ecoff_sizeof_headers): Likewise.
3194 (ecoff_get_section_contents): Likewise.
3195 (ecoff_compute_section_file_positions): Likewise.
3196 (ecoff_compute_reloc_file_positions): Likewise.
3197 (ecoff_set_section_contents): Likewise.
3198 (ecoff_write_object_contents): Likewise.
3199 (ecoff_bfd_final_link): Likewise.
3200 (ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
3201 register masks.
3202 (bfd_ecoff_get_gp_value): New function.
3203 (bfd_ecoff_set_gp_value): New function.
3204 (bfd_ecoff_set_regmasks): New function.
3205 * bfd-in.h (bfd_ecoff_get_gp_value): Declare.
3206 (bfd_ecoff_set_gp_value): Declare.
3207 (bfd_ecoff_set_regmasks): Declare.
3208 * bfd-in2.h: Rebuilt.
3209
3210 Fix ECOFF objcopy to actually copy debugging information.
3211 * ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
3212 (ecoff_get_extr): Assume that any ECOFF symbol with local clear is
3213 an external symbol, rather than checking the symbol flags. Only
3214 check the flags for non-ECOFF symbols.
3215 * ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
3216 output_section field of the symbol section is NULL.
3217 * libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
3218 function rather than defining as macro.
3219
3220 * ieee.c (ieee_object_p): Set bfd_error_got_wrong_format if
3221 appropriate.
3222
3223 * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec.
3224
3225 * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
3226 bfd_default_set_arch_mach. Accept bfd_arch_m68k as well as
3227 bfd_arch_unknown.
3228 * coffcode.h (coff_set_arch_mach): Check return value of
3229 bfd_default_set_arch_mach.
3230 * elfcode.h (elf_set_arch_mach): Don't check a list of ELF
3231 architectures, just see if the desired architecture matches what
3232 the ELF backend permits.
3233
3234 * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to
3235 SH_ARCH_MAGIC to match change in coff/sh.h.
3236 (coff_set_flags): Likewise.
3237
3238 Follow convention in which each NLM header has an 8 byte stamp
3239 followed by a four byte length.
3240 * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
3241 to nlm_cygnus_ext_header, and change type to
3242 Nlm_Internal_Cygnus_Ext_Header.
3243 (nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
3244 * nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
3245 of CyGnUsSeCs. Rename from cygnus_section to cygnus_ext. Require
3246 length word to be 8.
3247 (nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
3248 cygnus_ext. Set length word to 8.
3249 (nlm_compute_section_file_positions): Rename from cygnus_section
3250 to cygnus_ext.
3251
3252 Thu Apr 21 22:54:22 1994 Stu Grossman (grossman at cygnus.com)
3253
3254 * nlmcode.h (nlm_swap_auxiliary_headers_in): Keep section table
3255 (from CyGnUsSeCs) in more permanent memory to keep section names
3256 from getting trashed.
3257
3258 Thu Apr 21 09:29:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3259
3260 * libelf.h (elf_obj_tdata): Add members for dynamic symbol table
3261 handling.
3262 * elfcode.h (bfd_section_from_shdr): Handle dynamic symbol table.
3263 * elfcode.h (elf_slurp_symbol_table): Take additional parameter
3264 to select static or dynamic symbol table and return number of
3265 symbols slurped or -1 on error.
3266 * elfcode.h (elf_get_symtab): Set bfd symcount from
3267 elf_slurp_symbol_table result.
3268 * elfcode.h (elf_get_dynamic_symtab_upper_bound,
3269 elf_canonicalize_dynamic_symtab): New functions to handle dynamic
3270 symbol table.
3271 * elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
3272 Change to handle dynamic symbol table, provide default definitions
3273 for dynamic relocs.
3274 * aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
3275 NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
3276 aout_link_reloc_link_order): Handle r_jmptable and r_relative
3277 relocations.
3278
3279 Thu Apr 21 11:58:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3280
3281 Clean up uses of _bfd_dummy_target (from Peter Schauer).
3282 * libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
3283 * nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
3284 NULL.
3285 * srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
3286 _bfd_check_format.
3287 (symbolsrec_vec): Likewise.
3288 * tekhex.c (tekhex_vec): Likewise.
3289
3290 * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
3291 field.
3292 (nlm_cygnus_section_header): New accessor macro.
3293 * nlmcode.h (nlm_object_p): Free new tdata structure if failure.
3294 Add fixed sections before swapping in auxiliary headers. After
3295 adding sections, treat errors as real, not as wrong format.
3296 (nlm_swap_auxiliary_headers_in): Swap in the sections header; add
3297 sections to the BFD for each section it describes.
3298 (nlm_swap_auxiliary_headers_out): Swap out the sections header.
3299 (nlm_compute_section_file_positions): Account for the size of the
3300 sections header.
3301
3302 Wed Apr 20 16:45:51 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3303
3304 * coff-sparc.c (sparccoff_vec): Change minimum alignment power to
3305 2, so that stab sections can be multiples of 4 bytes only.
3306
3307 * hosts/i386aix.h: Changes to avoid prototypes conflicts with the
3308 ones defined in stdlib.h. (From Minh Tran-Le.)
3309
3310 Wed Apr 20 14:15:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3311
3312 * nlm32-ppc.c: Complete rewrite for new version of PowerPC
3313 NetWare. Old code still present, but ifdeffed out.
3314
3315 * nlmcode.h (nlm_swap_auxiliary_headers_in): Don't assume a
3316 particular format for the customer header. Allocate a block of
3317 memory and read it into that.
3318 (nlm_swap_auxiliary_headers_out): Write out the block of memory.
3319 (nlm_compute_section_file_positions): Include length of customer
3320 header when computing its size.
3321
3322 Mon Apr 18 14:27:17 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3323
3324 * som.c (som_prep_headers): Get the space's number from the
3325 backend private section data rather than target_index.
3326 (bfd_som_set_section_attributes): Store the space's number
3327 in the backend private section data rather than target_index.
3328
3329 * som.h (som_copyable_section_data_struct): Add space_number.
3330
3331 Fri Apr 15 12:22:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3332
3333 * coff-a29k.c (reloc_processing): Always set the address of a
3334 R_IHCONST reloc to that of the immediately preceding R_IHIHALF.
3335 gas does this anyhow, but some other assemblers seem to leave
3336 garbage in the R_IHCONST address field.
3337
3338 * bfd/archive.c: Consistently use ARFMAG; from
3339 schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
3340 (_bfd_write_archive_contents): Use ARFMAG rather than '`' and
3341 '\012'.
3342 (bsd_write_armap): Likewise.
3343 (coff_write_armap): Likewise.
3344
3345 * coff-mips.c (mips_relocate_section): When relaxing, adjust local
3346 relocs against the .text section as required.
3347 * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust
3348 PDR addresses as required.
3349
3350 * ecoff.c (ecoff_emit_aggregate): Take fdr argument. Map fdr
3351 index through rfd map if it exists. Check for a couple of cases
3352 which gdb handles specially. Change all callers.
3353 (ecoff_type_to_string): Take fdr argument rather than aux_ptr and
3354 bigendian argument. Change all callers.
3355 (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
3356
3357 Thu Apr 14 13:05:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3358
3359 * coff-mips.c (mips_howto_table): Add dummy entries to account for
3360 numbering changes in include/coff/mips.h. Add entries for
3361 MIPS_R_RELHI and MIPS_R_RELLO.
3362 (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type
3363 when little endian. Treat internal MIPS_R_RELLO or MIPS_R_RELHI
3364 relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32
3365 bits.
3366 (mips_ecoff_swap_reloc_out): Likewise.
3367 (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or
3368 MIPS_R_RELHI relocs like MIPS_R_SWITCH.
3369 (mips_adjust_reloc_out): Likewise.
3370 (mips_relhi_addr, mips_relhi_addend): New static variables.
3371 (mips_relhi_reloc, mips_rello_reloc): New functions.
3372 (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into
3373 MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO.
3374 (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel
3375 argument. Changed all callers.
3376 (mips_relocate_section): Rename got_reflo to got_lo and
3377 reflo_int_rel to lo_int_rel. Handle MIPS_R_RELLO and MIPS_R_RELHI
3378 relocs.
3379 (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when
3380 expanding a PC relative call.
3381
3382 * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_S
3383 and BFD_RELOC_PCREL_LO16.
3384 * bfd-in2.h: Rebuilt.
3385
3386 Wed Apr 13 11:50:07 1994 Stan Shebs (shebs@andros.cygnus.com)
3387
3388 * coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
3389
3390 Tue Apr 12 13:36:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3391
3392 * som.c (som_write_fixups): Always emit at least
3393 one relocation for any non-bss section.
3394
3395 Mon Apr 11 14:41:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3396
3397 * elfcode.h (assign_file_positions_except_relocs): Don't require
3398 the file alignment to correspond to the page size when linking
3399 with -N.
3400
3401 Sun Apr 10 01:02:24 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3402
3403 * elfcode.h (write_relocs): For rela relocations, adjust the
3404 addend for relocations involving section symbols to account
3405 for the lossage of 1:1 mapping from input section symbols to
3406 output section symbols.
3407
3408 Fri Apr 8 12:22:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3409
3410 * aoutx.h (NAME(aout,make_sections)): New function.
3411 (NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
3412 rather than making sections inline.
3413 (NAME(aout,mkobject)): Don't make any sections.
3414 (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
3415 (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
3416 obj_datasec (abfd) if they are NULL.
3417 * libaout.h (NAME(aout,make_sections)): Declare.
3418 * bout.c (b_out_mkobject): Don't make any sections.
3419 (b_out_write_object_contents): Call aout_32_make_sections.
3420 (b_out_set_section_contents): Likewise.
3421 * i386os9k.c (os9k_mkobject): Don't make any sections.
3422 (os9k_write_object_contents): Call aout_32_make_sections.
3423 (os9k_set_section_contents): Likewise.
3424
3425 * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
3426 index.
3427
3428 Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3429
3430 * config.bfd, configure.host: Add mips-*-sysv4* support.
3431
3432 Thu Apr 7 14:23:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3433
3434 * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
3435 (mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
3436 r_offset and set r_symndx to RELOC_SECTION_TEXT.
3437 (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
3438 value from the r_offset field.
3439 (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
3440 For MIPS_R_SWITCH, copy the r_offset field into the addend field.
3441 (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
3442 into the r_offset field.
3443 (mips_switch_reloc): New function.
3444 (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
3445 MIPS_R_SWITCH.
3446 (mips_relocate_section): Handle MIPS_R_SWITCH.
3447 (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
3448
3449 Thu Apr 7 11:10:51 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3450
3451 * elfcode.h (elf_set_section_contents): Support calling the backend
3452 function elf_backend_begin_write_processing when just beginning to
3453 write an object file.
3454
3455 * libelf.h (elf_backend_begin_write_processing): Declare.
3456
3457 * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
3458 a default definition.
3459 (elf{32,64}_bed): Add elf_backend_begin_write_processing.
3460
3461 * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
3462 (elf_hppa_tc_make_sections): Likewise.
3463
3464 * elf32-hppa.c (symext_chain_built): Delete.
3465 (symext_chain_size): Renamed from symextn_contents_real_size.
3466 (elf32_hppa_backend_{begin,final}_write_processing): New functions.
3467 (add_entry_to_symext_chain): New function.
3468 (hppa_elf_set_section_contents): Ignore writes to the symbol extension
3469 section until it's been rebuilt internally.
3470 (hppa_elf_get_section_contents): Symbol extension section is no
3471 longer special.
3472 (elf_backend_{begin,final}_write_processing): Define.
3473 (elf_hppa_tc_make_sections): Simplify now that much code has
3474 migrated into elf32_hppa_backend_{being,final}_write_processing.
3475
3476 Wed Apr 6 17:24:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3477
3478 Add new target vectors to read the dynamic symbols and dynamic
3479 relocs. Change a.out to use these rather than reading the dynamic
3480 symbols and relocs along with the normal symbols and relocs.
3481 * targets.c (bfd_target): Add fields
3482 _bfd_get_dynamic_symtab_upper_bound,
3483 _bfd_canonicalize_dynamic_symtab,
3484 _bfd_get_dynamic_reloc_upper_bound,
3485 _bfd_canonicalize_dynamic_reloc.
3486 (BFD_JUMP_TABLE_DYNAMIC): Define.
3487 * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
3488 Define.
3489 (_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
3490 (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
3491 (_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
3492 * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
3493 (bfd_canonicalize_dynamic_symtab): Define.
3494 (bfd_get_dynamic_reloc_upper_bound): Define.
3495 (bfd_canonicalize_dynamic_reloc): Define.
3496 * sunos.c (MY_read_dynamic_symbols): Don't define.
3497 (MY_read_dynamic_relocs): Don't define.
3498 (MY_get_dynamic_symtab_upper_bound): Define.
3499 (MY_canonicalize_dynamic_symtab): Define.
3500 (MY_get_dynamic_reloc_upper_bound): Define.
3501 (MY_canonicalize_dynamic_reloc): Define.
3502 (struct sunos_dynamic_info): Change type of dynsym_count and
3503 dynrel_count to long. Add fields canonical_dynsym and
3504 canonical_dynrel.
3505 (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
3506 Clear info->canonical_dynsym and info->canonical_dynrel.
3507 (MY(read_dynamic_symbols)): Removed.
3508 (MY(read_dynamic_relocs)): Removed.
3509 (sunos_get_dynamic_symtab_upper_bound): New function.
3510 (sunos_canonicalize_dynamic_symtab): New function.
3511 (sunos_get_dynamic_reloc_upper_bound): New function.
3512 (sunos_canonicalize_dynamic_reloc): New function.
3513 * libaout.h: Declare struct reloc_ext_external and
3514 reloc_std_external to avoid prototype problems.
3515 (struct aout_backend_data): Remove fields read_dynamic_symbols and
3516 read_dynamic_relocs.
3517 (NAME(aout,translate_symbol_table)): Declare.
3518 (NAME(aout,swap_ext_reloc_in)): Declare.
3519 (NAME(aout,swap_std_reloc_in)): Declare.
3520 * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
3521 translate_symbol_table and made non-static. Changed all callers.
3522 (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
3523 (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
3524 (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
3525 * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
3526 remove dynamic symbols and relocs. They will no longer be
3527 present.
3528 (MY_read_dynamic_symbols): Don't define.
3529 (MY_read_dynamic_relocs): Don't define.
3530 (sunos4_aout_backend): Don't initialize dynamic entry points.
3531 * aout-target.h (MY_read_dynamic_symbols): Don't define.
3532 (MY_read_dynamic_relocs): Don't define.
3533 (MY(backend_data)): Don't initialize dynamic entry points.
3534 (MY_get_dynamic_symtab_upper_bound): If not defined, define to
3535 _bfd_nodynamic version.
3536 (MY_canonicalize_dynamic_symtab): Likewise.
3537 (MY_get_dynamic_reloc_upper_bound): Likewise.
3538 (MY_canonicalize_dynamic_reloc): Likewise.
3539 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
3540 * bfd-in2.h: Rebuilt.
3541 * libbfd.h: Rebuilt.
3542
3543 * cf-m68klynx.c: Include sysdep.h.
3544
3545 * hp300hpux.c: Removed some spaces in uses of NAME to avoid
3546 problems with traditional C compilers.
3547
3548 * targets.c (bfd_target): Rearranged fields in target vector.
3549 Removed _bfd_debug_info_start, _bfd_debug_info_end and
3550 _bfd_debug_info_accumulate, which were never used.
3551 (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
3552 (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
3553 (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
3554 (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
3555 * All backends: Changed to use the new BFD_JUMP_TABLE_* macros
3556 rather than the single JUMP_TABLE macro. Removed many of the
3557 weird macro definitions needed to support the monolithic
3558 JUMP_TABLE.
3559 * bfd-in.h (JUMP_TABLE): Removed.
3560 * libbfd-in.h: Define a bunch of macros, and declare a few
3561 functions, for use with the new BFD_JUMP_TABLE_* macros.
3562 * libbfd.c (_bfd_dummy_new_section_hook): Removed.
3563 (bfd_false): Set bfd_error_invalid_operation.
3564 (bfd_nullvoidptr): Likewise.
3565 (bfd_n1): New function.
3566 (_bfd_nocore_core_file_matches_executable_p): Renamed from
3567 _bfd_dummy_core_file_matches_executable_p.
3568 (_bfd_nocore_core_file_failing_command): Similar rename. Set
3569 bfd_error_invalid_operation.
3570 (_bfd_nocore_core_file_failing_signal): Likewise.
3571 (_bfd_generic_get_section_contents): Renamed from
3572 bfd_generic_get_section_contents. Changed all callers.
3573 (_bfd_generic_set_section_contents): Similar rename.
3574 * ieee.c: #if 0 out ieee_bfd_debug_info_start,
3575 ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
3576 were never called.
3577 * bfd-in2.h: Rebuilt.
3578 * libbfd.h: Rebuilt.
3579
3580 Tue Apr 5 22:10:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3581
3582 * Crude support for examining dynamic libraries.
3583 * som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
3584 DL_MAGIC objects.
3585 (som_prep_headers): Preserve the system_id for DYNAMIC objects.
3586 Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
3587 Write exec headers for DYNAMIC objects.
3588 (som_begin_writing): DYNAMIC objects have the same alignment
3589 restrictions as D_PAGED objects.
3590 (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
3591 objects.
3592 (object_flags): Add DYNAMIC.
3593
3594 Tue Apr 5 17:48:52 1994 Stan Shebs (shebs@andros.cygnus.com)
3595
3596 * i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
3597 macro uses, confuses some non-ANSI compilers.
3598
3599 Tue Apr 5 15:50:01 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3600
3601 * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
3602 Don't free anything if we don't have a bfd_object.
3603 (som_close_and_cleanup): Call som_bfd_free_cached_info.
3604
3605 Tue Apr 5 11:22:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3606
3607 * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
3608 It turns out not to be required on Irix 5, and it causes problems
3609 if the sections happen to contain symbols.
3610
3611 * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.
3612
3613 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
3614 section->relocation is NULL; malloc might have returned NULL when
3615 given a zero size if there were no relocations.
3616 * bout.c (b_out_canonicalize_reloc): Likewise.
3617 * coffcode.h (coff_canonicalize_reloc): Likewise.
3618 * ecoff.c (ecoff_canonicalize_reloc): Likewise.
3619 * elfcode.h (elf_canonicalize_reloc): Likewise.
3620 * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
3621 * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
3622 * nlmcode.h (nlm_canonicalize_reloc): Likewise.
3623 * som.c (som_canonicalize_reloc): Likewise.
3624 * hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc
3625 returns NULL, don't report an error if we asked for zero bytes.
3626 * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
3627 NULL, don't report an error if we asked for zero bytes.
3628 * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
3629
3630 Mon Apr 4 15:30:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3631
3632 * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
3633 if we don't have a bfd_object.
3634
3635 Made sure that every call to bfd_read, bfd_write, and bfd_seek
3636 checks the return value and handled bfd_error correctly. These
3637 changes are not itemised. Also:
3638 * aoutx.h (emit_strtab): Change return type to boolean, and return
3639 errors.
3640 (NAME(aout,write_syms)): Check emit_strtab return value.
3641 (NAME(aout,final_link)): Likewise.
3642 * coffcode.h (coff_write_relocs): Change return type to boolean,
3643 and return errors.
3644 (coff_write_object_contents): Check coff_write_relocs return
3645 value.
3646 * i386os9k.c (os9k_swap_exec_header_in): Change return type to
3647 boolean.
3648 (os9k_object_p): Check os9k_swap_exec_header_in return value.
3649 * oasys.c (oasys_read_record): Change return type to boolean.
3650 (oasys_slurp_symbol_table: Check oasys_read_record return value.
3651 (oasys_object_p, oasys_slurp_section_data): Likewise.
3652 (oasys_write_record): Change return type to boolean.
3653 (oasys_write_syms): Likewise. Also, check oasys_write_record
3654 return value.
3655 (oasys_write_sections): Check oasys_write_record return value.
3656 (oasys_write_header): Change return type to boolean. Check
3657 oasys_write_record return value.
3658 (oasys_write_end, oasys_write_data): Likewise.
3659 (oasys_write_object_contents): Check return values of
3660 oasys_write_header, oasys_write_syms, oasys_write_data, and
3661 oasys_write_end.
3662 * srec.c (srec_write_record): Change return type to boolean.
3663 (srec_write_header): Likewise. Also, check srec_write_record
3664 return value.
3665 (srec_write_section, srec_write_terminator): Likewise.
3666 (srec_write_symbols): Change return type to boolean.
3667 (internal_srec_write_object_contents): Check return value of
3668 srec_write_symbols, srec_write_header, srec_write_section, and
3669 srec_write_terminator.
3670
3671 * Makefile.in: Rebuilt dependencies.
3672
3673 Mon Apr 4 10:56:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3674
3675 * aix386-core.c (aix386_bfd_is_local_label): Correct cast from
3676 asection to asymbol.
3677 * ptrace-core.c (ptrace_unix_bfd_is_local_label): Correct cast from
3678 bfd to asymbol.
3679 * trad-core.c (trad_unix_bfd_is_local_label): Correct cast from
3680 asection to asymbol.
3681
3682 Sun Apr 3 18:27:29 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3683
3684 * som.c (som_slurp_string_table): Use malloc to allocate space
3685 for the cached copy of the native string table.
3686 (som_slurp_symbol_table): Likewise for the native symbol table.
3687 (som_slurp_reloc_table): Likewise for the native and generic
3688 relocation tables.
3689 (som_bfd_free_cached_info): Free the cached native strings,
3690 symbols, and relocations. Also free the canonical cached
3691 relocations.
3692
3693 Fri Apr 1 12:40:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3694
3695 * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
3696 sure the symbol name is stored in permanent memory before adding
3697 it to the string table.
3698
3699 * archive.c (_bfd_write_archive_contents): Once we've found an
3700 object, don't bother to look for more when deciding whether to
3701 build a map.
3702 (compute_and_write_armap): After adding the symbols for a BFD,
3703 call bfd_free_cached_info on it.
3704
3705 Add bfd_free_cached_info support to a.out backends.
3706 * aoutx.h (aout_get_external_symbols): Renamed from
3707 aout_link_get_symbols. Read strings even if symbols have been
3708 read. Store string size in obj_aout_string_size.
3709 (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
3710 read the symbols. Allocate the cached symbols with malloc, not
3711 bfd_alloc.
3712 (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
3713 malloc, not bfd_alloc.
3714 (NAME(aout,bfd_free_cached_info)): New function; free cached
3715 symbols and relocs.
3716 * libaout.h (struct aoutdata): Add external_string_size field.
3717 (obj_aout_external_string_size): New accessor macro.
3718 (NAME(aout,close_and_cleanup)): Don't declare.
3719 (NAME(aout,bfd_free_cached_info)): Declare.
3720 (aout_32_close_and_cleanup): Don't define.
3721 (aout_64_close_and_cleanup): Don't define.
3722 * aout-target.h (MY_bfd_free_cached_info): If not already defined,
3723 define as NAME(aout,free_cached_info).
3724 (MY_close_and_cleanup): If not already defined, define as
3725 MY_bfd_free_cached_info.
3726 * aout-adobe.c (aout_32_close_and_cleanup): Define.
3727 (aout_32_bfd_free_cached_info): Don't define.
3728 * bout.c (aout_32_close_and_cleanup): Define.
3729 (aout_32_bfd_free_cached_info): Don't define.
3730 * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
3731 (MY_close_and_cleanup): Don't define.
3732 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
3733 relocs with malloc, not bfd_alloc.
3734 * i386os9k.c (aout_32_close_and_cleanup): Define.
3735 (aout_32_bfd_free_cached_info): Don't define.
3736
3737 Add a new entry point to free memory cached by a BFD.
3738 * targets.c (bfd_target): Add _bfd_free_cached_info field.
3739 * bfd.c (bfd_free_cached_info): Define.
3740 * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
3741 * bfd-in2.h: Rebuilt.
3742 * All backends: Initialize bfd_free_cached_info entry point to
3743 bfd_true.
3744
3745 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
3746 first, unused, argument.
3747 (hppa_elf_is_local_label): Declare instead of
3748 som_bfd_is_local_label.
3749
3750 * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
3751 absolute R_IREL reloc.
3752
3753 Thu Mar 31 11:52:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3754
3755 Added some support for Irix 4 shared libraries.
3756 * ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
3757 .lib section.
3758 (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
3759 STYP_ECOFF_LIB bit is set.
3760 (ecoff_compute_section_file_positions): Round the contents of a
3761 .lib section up to the next page boundary.
3762 (ecoff_set_section_contents): If we see a .lib section, increment
3763 the vma by one to count the number of shared libraries we have.
3764 (ecoff_write_object_contents): Don't crash if we see a
3765 STYP_ECOFF_LIB section, and don't adjust text_start or data_start
3766 or bss_size either.
3767
3768 * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
3769 from original BFD, rather than using value of current BFD symbol.
3770 Needed for new linker.
3771 * coff-sparc.c (CALC_ADDEND): Likewise.
3772
3773 * ecoff.c (ecoff_write_object_contents): Set the text_start and
3774 data_start entries in the optional header correctly even if a text
3775 or data section starts at location zero.
3776
3777 * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_26 (from sef
3778 and raeburn).
3779 * bfd-in2.h: Rebuilt.
3780
3781 * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
3782 name.
3783 * nlm32-alpha.c (nlm_alpha_read_import): Likewise.
3784 * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
3785
3786 * coffgen.c (coff_write_symbol): Reindented. Changed to return
3787 boolean, and changed written to unsigned int *. Check error
3788 returns from called functions.
3789 (coff_write_alien_symbol): Likewise.
3790 (coff_write_native_symbol): Likewise.
3791 (coff_write_symbols): Likewise. Reworked checks on whether to
3792 write symbol name to string table for clarity and to avoid core
3793 dumping when given a non COFF symbol.
3794 * libcoff-in.h (coff_write_symbols): Declare as returning boolean.
3795 * libcoff.h: Rebuilt.
3796 * coffcode.h (coff_write_object_contents): Check return value of
3797 coff_write_symbols.
3798
3799 Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3800
3801 Changes to let BFD return an error indication from
3802 get_symtab_upper_bound, bfd_canonicalize_symtab,
3803 bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now
3804 return long instead of unsigned int, and use -1 to indicate an
3805 error. Along the way, rename get_symtab_upper_bound to
3806 bfd_get_symtab_upper_bound.
3807 * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
3808 errors.
3809 (bfd_canonicalize_reloc): Likewise.
3810 * syms.c (bfd_get_symtab_upper_bound): Renamed from
3811 get_symtab_upper_bound.
3812 * targets.c (bfd_target): Renamed _get_symtab_upper_bound to
3813 _bfd_get_symtab_upper_bound, and changed it and
3814 _bfd_canonicalize_symtab and _get_reloc_upper_bound and
3815 _bfd_canonicalize_reloc to all return long.
3816 * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
3817 (NAME(aout,canonicalize_reloc)): Likewise.
3818 (NAME(aout,get_reloc_upper_bound)): Likewise.
3819 (NAME(aout,get_symtab_upper_bound)): Likewise.
3820 * bout.c (b_out_canonicalize_reloc): Likewise.
3821 (b_out_get_reloc_upper_bound): Likewise.
3822 * coffcode.h (coff_canonicalize_reloc): Likewise.
3823 * coffgen.c (coff_get_symtab_upper_bound): Likewise.
3824 (coff_get_symtab): Likewise.
3825 (coff_get_reloc_upper_bound): Likewise.
3826 * ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
3827 (ecoff_get_symtab): Likewise.
3828 (ecoff_canonicalize_reloc): Likewise.
3829 * elfcode.h (elf_get_symtab_upper_bound): Likewise.
3830 (elf_get_reloc_upper_bound): Likewise.
3831 (elf_canonicalize_reloc): Likewise.
3832 (elf_get_symtab): Likewise.
3833 * hp300hpux.c (MY(get_symtab)): Likewise.
3834 (MY(get_symtab_upper_bound)): Likewise.
3835 (MY(canonicalize_reloc)): Likewise.
3836 * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
3837 * ieee.c (ieee_slurp_external_symbols): Change return type to
3838 boolean. Check for errors from get_symbol.
3839 (ieee_slurp_symbol_table): Change return type to boolean. Check
3840 for errors from ieee_slurp_external_symbols.
3841 (ieee_get_symtab_upper_bound): Return long, and -1 on errors.
3842 (ieee_get_symtab): Likewise.
3843 (ieee_get_reloc_upper_bound): Likewise.
3844 (ieee_canonicalize_reloc): Likewise.
3845 * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
3846 * nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
3847 (nlm_get_symtab): Likewise.
3848 (nlm_get_reloc_upper_bound): Likewise.
3849 (nlm_canonicalize_reloc): Likewise.
3850 * oasys.c (oasys_get_symtab_upper_bound): Likewise.
3851 (oasys_get_symtab): Likewise.
3852 (oasys_get_reloc_upper_bound): Likewise.
3853 (oasys_canonicalize_reloc): Likewise.
3854 * som.c (som_get_symtab_upper_bound): Likewise.
3855 (som_get_symtab): Likewise.
3856 (som_get_reloc_upper_bound): Likewise.
3857 (som_canonicalize_reloc): Likewise.
3858 * srec.c (srec_get_symtab_upper_bound): Likewise.
3859 (srec_get_symtab): Likewise.
3860 (srec_get_reloc_upper_bound): Define as bfd_0l.
3861 (srec_canonicalize_reloc): Likewise.
3862 * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
3863 (tekhex_get_symtab_upper_bound): Likewise.
3864 (tekhex_get_reloc_upper_bound): Define as bfd_0l.
3865 (tekhex_canonicalize_reloc): Likewise.
3866 * libaout.h (NAME(aout,get_symtab_upper_bound)): Change
3867 declaration to return long.
3868 (NAME(aout,get_symtab)): Likewise.
3869 (NAME(aout,canonicalize_reloc)): Likewise.
3870 (NAME(aout,get_reloc_upper_bound)): Likewise.
3871 * libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
3872 (coff_get_symtab): Likewise.
3873 (coff_get_reloc_upper_bound): Likewise.
3874 * libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
3875 (ecoff_get_symtab): Likewise.
3876 (ecoff_canonicalize_reloc): Likewise.
3877 * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
3878 (bfd_elf32_get_symtab): Likewise.
3879 (bfd_elf32_get_reloc_upper_bound): Likewise.
3880 (bfd_elf32_canonicalize_reloc): Likewise.
3881 (bfd_elf64_get_symtab_upper_bound): Likewise.
3882 (bfd_elf64_get_symtab): Likewise.
3883 (bfd_elf64_get_reloc_upper_bound): Likewise.
3884 (bfd_elf64_canonicalize_reloc): Likewise.
3885 * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
3886 (nlmNAME(get_symtab)): Likewise.
3887 (nlmNAME(get_reloc_upper_bound)): Likewise.
3888 (nlmNAME(canonicalize_reloc)): Likewise.
3889 * archive.c (compute_and_write_armap): Use error_return and
3890 no_memory_return labels rather than freeing information in various
3891 places. Change storage, symcount and src_count to long. Check
3892 errors from bfd_get_symtab_upper_bound and
3893 bfd_canonicalize_symtab.
3894 * bout.c (b_out_relax_section): Change reloc_size to long. Check
3895 for errors from bfd_get_reloc_upper_bound and
3896 bfd_canonicalize_reloc.
3897 (b_out_get_relocated_section_contents): Likewise.
3898 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3899 Likewise.
3900 * elf32-mips.c: Likewise.
3901 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
3902 (hppa_look_for_stubs_in_section): Check for errors from
3903 bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
3904 bfd_canonicalize_reloc.
3905 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
3906 from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
3907 * linker.c (generic_link_read_symbols): Likewise.
3908 (_bfd_generic_final_link): Check for errors from
3909 bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
3910 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
3911 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
3912 (bfd_coff_reloc16_get_relocated_section_contents): Likewise.
3913 * libbfd.c (bfd_0l): New function.
3914 * libbfd-in.h (bfd_0l): Declare.
3915 * aix386-core.c: Change get_symtab_upper_bound, get_symtab,
3916 get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
3917 than bfd_0u.
3918 * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
3919 * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
3920 * bfd-in2.h: Rebuilt.
3921 * libbfd.h: Rebuilt.
3922 * libcoff.h: Rebuilt.
3923
3924 * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
3925 temp and name.
3926
3927 Wed Mar 30 08:33:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3928
3929 * hosts/dpx2.h: Define POSIX_UTIME.
3930
3931 Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3932
3933 * i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
3934 variant of a.out.
3935 * configure.in, config.bfd: Use them for Dynix.
3936 * Makefile.in: Add dependencies for i386dynix.o.
3937 * targets.c: Add definition for i386dynix_vec.
3938 * hosts/symmetry.h: Do not define TRAD_CORE_USER_OFFSET for Dynix.
3939 Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
3940 for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
3941 i386dynix.c
3942
3943 Mon Mar 28 12:53:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3944
3945 * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
3946
3947 * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
3948 bfd_arch_rs6000.
3949
3950 * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.
3951 * config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
3952
3953 * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flag
3954 for generated constructor section.
3955
3956 Sun Mar 27 16:25:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3957
3958 * som.c (som_begin_writing): New approach at dealing with holes
3959 in executables left by the HP linker. Does not rely on subspace
3960 alignments as subspaces are *NOT* guaranteed to be properly
3961 aligned in an executable (can you believe that!).
3962
3963 Sat Mar 26 10:25:43 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
3964
3965 * som.c (som_get_section_contents): New function. Do not try
3966 to actually read data from a section that doesn't have either
3967 SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
3968
3969 * libbfd.c (bfd_read): Set bfd_error as appropriate for a short
3970 read. (bfd_error_system_call or bfd_error_file_truncated).
3971
3972 * som.c: Do not blindly set bfd_error_system_call after a
3973 failing bfd_read, bfd_write, or bfd_seek. In a few places
3974 (like som_object_p) override the error status set by bfd_read.
3975
3976 * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
3977 * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
3978 * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
3979 * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
3980
3981 * som.c: Check return values from several bfd_{seek,read,write}
3982 calls that we just assumed were not failing.
3983
3984 Fri Mar 25 11:44:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
3985
3986 * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
3987 * config/sysv4.mh: Add comment.
3988 * config/symmetry.mh: Change comment.
3989 * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
3990
3991 Fri Mar 25 17:10:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3992
3993 Changes to support linker relaxing of embedded MIPS PIC code to
3994 use a five instruction sequence for function calls which are out of
3995 range of the bal instruction.
3996 * libecoff.h (struct ecoff_section_tdata): Define.
3997 (ecoff_section_data): Define.
3998 (ecoff_bfd_relax_section): Don't define.
3999 * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
4000 the debugging information if it has already been read.
4001 (ecoff_indirect_link_order): Handle _cooked_size being different
4002 from _raw_size. Don't reread the contents or the relocs if they
4003 have already been read in.
4004 * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
4005 18 to 16.
4006 (PCREL16_EXPANSION_ADJUSTMENT): Define.
4007 (mips_relocate_refhi): Take adjust argument.
4008 (mips_relocate_section): Handle reloc offsets stored in section
4009 used_by_bfd field. Call mips_relax_pcrel16 to handle details of
4010 expanding an out of range PCREL16. Keep trace of adjustments
4011 required by expansions. Set s and unset h when converting a reloc
4012 from undefined to section. Change handling of PC relative relocs:
4013 if against a section, they are correct in the object file, if
4014 against an external symbol they are pcrel_offset.
4015 (mips_relax_section): New function.
4016 (mips_relax_pcrel16): New function.
4017 (ecoff_bfd_relax_section): Define.
4018 * coff-alpha.c (ecoff_bfd_relax_section): Define.
4019 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
4020 built by mips_relax_section when writing out addresses.
4021 * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
4022
4023 * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
4024 functionname_ptr to be set to a symbol name, so prepend
4025 symbol_leading_char.
4026
4027 Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)
4028
4029 * coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
4030 for 16bit relative branches.
4031 * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
4032 overflow.
4033
4034 Thu Mar 24 09:21:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4035
4036 * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
4037 (som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
4038
4039 Wed Mar 23 14:29:31 1994 David J. Mackenzie (djm@rtl.cygnus.com)
4040
4041 * netbsd386.c (N_SET_FLAGS): Delete the old definition.
4042
4043 Wed Mar 23 14:58:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4044
4045 Clean up the relaxing code for the new linker.
4046 * targets.c (_bfd_relax_section): Take boolean *again argument
4047 rather than asymbol list.
4048 * bfd.c (bfd_relax_section): Change name of fourth argument from
4049 symbols to again.
4050 * reloc.c (bfd_generic_relax_section): Take boolean *again
4051 argument rather than asymbol list. Always return true.
4052 * bout.c: Include genlink.h.
4053 (aligncode, perform_slip): Declare.
4054 (perform_slip): Take BFD argument rather than asymbol list.
4055 Changed all callers. Get the symbols from the BFD. Change the
4056 hash table entry value as well as the symbol value.
4057 (abs32code): Take BFD argument rather than asymbol list. Changed
4058 all callers.
4059 (aligncode): Likewise.
4060 (b_out_relax_section): Take boolean *again argument rather than
4061 asymbol list. Only return false if an error occurred. Set *again
4062 to false. Get symbols from BFD.
4063 * reloc16.c: Include genlink.h.
4064 (bfd_perform_slip): Take BFD argument rather than asymbol list.
4065 Get the symbols from the BFD. Change the hash table entry value
4066 as well as the symbol value.
4067 (bfd_coff_reloc16_relax_section): Take boolean *again argument
4068 rather than asymbol list. Only return false if an error occurred.
4069 Set *again to false. Get symbols from BFD.
4070 * coffcode.h (bfd_coff_backend_data): Change
4071 _bfd_coff_reloc16_estimate to take BFD argument rather than
4072 asymbol list.
4073 (bfd_coff_reloc16_estimate): Corresponding change.
4074 (dummy_reloc16_estimate): Corresponding change.
4075 * libcoff-in.h (bfd_coff_reloc16_relax_section): Change
4076 declaration to take boolean * rather than asymbol list.
4077 (bfd_perform_slip): Change declaration to take BFD rather than
4078 asymbol list.
4079 * coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
4080 than asymbol list. Changed calls to bfd_perform_slip.
4081 * bfd-in2.h: Rebuilt.
4082 * libbfd.h: Rebuilt.
4083 * libcoff.h: Rebuilt.
4084 * Makefile.in: Rebuilt dependencies.
4085
4086 * genlink.h (_bfd_generic_link_get_symbols): Define.
4087 (_bfd_generic_link_get_symcount): Define.
4088 * linker.c (generic_link_read_symbols): New function.
4089 (generic_link_add_object_symbols): Use it. Use
4090 _bfd_generic_link_get_symbols and _bfd_generic_link_get_symcount
4091 to get the symbols from the BFD.
4092 (generic_link_check_archive_element): Likewise.
4093 (_bfd_generic_final_link): Likewise.
4094 (_bfd_generic_link_output_symbols): Likewise.
4095 (default_indirect_link_order): Likewise.
4096 (generic_link_add_symbol_list): Store pointer to hash table entry
4097 in asymbol udata field.
4098
4099 Tue Mar 22 13:09:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4100
4101 * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
4102 reloc, used in embedded PIC code.
4103 (mips_adjust_reloc_in): Change sanity check to permit new reloc.
4104 (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
4105 MIPS_R_PCREL16.
4106
4107 * elf32-mips.c (mips_elf_final_link): Account for link_order
4108 relocs when allocating space for relocations. Set SEC_RELOC flag
4109 for any section which has relocs. Handle link_order relocs in
4110 link_order loop. Use _bfd_generic_link_add_symbols_collect for
4111 add_symbls entry point.
4112
4113 * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
4114 counting relocs. Set SEC_RELOC flag for any section which has
4115 relocs.
4116
4117 * linker.c (_bfd_default_link_order): Handle bfd_data_link_order.
4118
4119 * linker.c (_bfd_generic_link_add_symbols): Just call
4120 generic_link_add_symbols.
4121 (_bfd_generic_link_add_symbols_collect): New function, like
4122 _bfd_generic_link_add_symbols but also collect constructors and
4123 destructors by name as collect2 does.
4124 (generic_link_add_symbols): New function, like old
4125 _bfd_generic_link_add_symbols but with collect argument.
4126 (generic_link_add_object_symbols): Take collect argument.
4127 (generic_link_check_archive_element_no_collect): New function.
4128 (generic_link_check_archive_element_collect): New function.
4129 (generic_link_check_archive_element): Take collect argument.
4130 (generic_link_add_symbol_list): Take collect argument.
4131 (_bfd_generic_link_add_one_symbol): Rename constructor argument to
4132 collect.
4133 * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
4134 * libbfd.h: Rebuilt.
4135
4136 Tue Mar 22 10:04:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4137
4138 * archive.c (bfd_construct_extended_name_table): Use ar_padchar
4139 for first character in an extended name.
4140 (_bfd_write_archive_contents): If ar_padchar == '/', then use
4141 "//" as the name of the special archive member holding the
4142 extended name table.
4143
4144 Mon Mar 21 12:28:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4145
4146 Support for link_order types which generate relocs in order to
4147 support -Ur in the linker.
4148 * linker.c (generic_link_add_symbol_list): Remove bitsize argument
4149 from call to _bfd_generic_link_add_one_symbol.
4150 (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
4151 Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR
4152 instead of bitsize to add_to_set call back.
4153 (_bfd_generic_final_link): Account for link_order relocs when
4154 allocating space for relocations. Handle them in link_order loop.
4155 (_bfd_generic_reloc_link_order): New function.
4156 (_bfd_default_link_order): If a reloc_link_order is seen here,
4157 abort.
4158 (_bfd_count_link_order_relocs): New function.
4159 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
4160 argument from declaration.
4161 (_bfd_generic_reloc_link_order): Declare.
4162 (_bfd_count_link_order_relocs): Declare.
4163 * libbfd.h: Rebuilt.
4164 * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
4165 call to _bfd_generic_link_add_one_symbol.
4166 (NAME(aout,final_link)): Account for link_order relocs when
4167 allocating space for relocations. Handle them after handling all
4168 input BFDs.
4169 (aout_link_reloc_link_order): New function.
4170 * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
4171 call to _bfd_generic_link_add_one_symbol.
4172 (ecoff_bfd_final_link): Account for link_order relocs when
4173 allocating space for relocations. Handle them in link_order loop.
4174 (ecoff_link_write_external): Set the storage class of a defined
4175 linker created symbol based on the section it is in. Correct
4176 bfd_link_hash_weak case to use .sc rather than .st.
4177 (ecoff_reloc_link_order): New function.
4178 * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
4179 BFD_RELOC_CTOR.
4180 * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
4181
4182 * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
4183 and buf.
4184
4185 * cisco-core.c (cisco_core_file_p): Only pass one argument to
4186 bfd_zmalloc. Free a pointer, not a union.
4187 (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
4188
4189 Sun Mar 20 09:24:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4190
4191 * bfd/som.c (som_begin_writing): Fix thinko (off by one error).
4192
4193 * som.c (bfd_section_from_som_symbol): Only to do the value
4194 comparison for function symbols within executables.
4195
4196 * som.c (bfd_section_from_som_symbol): Renamed from
4197 som_section_from_subspace_index. Pass in a native SOM symbol.
4198 For executables, iterate through the sections to find out
4199 which contains the symbol's address rather than using the
4200 symbol_info field. (symbol_info has a different meaning for
4201 dynamicly linked executables.)
4202
4203 * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
4204 bfd_zmalloc.
4205
4206 * som.c (som_begin_writing): Fix braino (one call to align
4207 space/subspace data was done unconditionally rather than
4208 just for executables.)
4209
4210 * som.c (som_begin_writing): Align text in all executables to
4211 make HPUX kernel happy. Fixes strip/objcopy for shared
4212 executables.
4213
4214 Sat Mar 19 07:06:59 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4215
4216 * som.c (som_begin_writing): Account for alignment needs of
4217 subspaces too when writing executables. Never request a negative
4218 bss size. Fixes some problems with demand paged executables,
4219 still having problems with pure executables and shared executables.
4220
4221 Fri Mar 18 19:12:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
4222
4223 * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
4224 bfd_zalloc for rawptr, because later on we may call free, not
4225 bfd_release, on it.
4226
4227 * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
4228 * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
4229 * cisco-core.c: New file.
4230 * Makefile.in: Change accordingly.
4231 * configure.in: Recognize cisco_core_vec.
4232 * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
4233 * targets.c: Add cisco_core_vec.
4234 * bfd-in2.h: Rebuilt.
4235
4236 Fri Mar 18 18:13:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4237
4238 * som.h (som_copyable_section_data_struct): New structure
4239 containing all the private section information which needs
4240 to be copied from input section to output section during
4241 objcopy or strip.
4242 (som_section_data_struct): Remove several fields now in
4243 som_copyable_section_data_struct. Make the space and
4244 subspace dictionaries be pointers (to save space when
4245 only reading objects).
4246
4247 * som.c (bfd_som_set_section_attributes): Now returns a boolean;
4248 some references changed. Allocate a copyable data stucture if
4249 none exists. Store info into the copyable data structure.
4250 (bfd_som_set_subsection_attributes): Likewise.
4251 (som_is_space, som_is_subspace, som_is_container): New functions.
4252 Use these instead of directly accessing private data.
4253 (som_prep_headers): Allocate space and subspace headers here.
4254 Fill in some fields in the space/subspace headers from the
4255 copyable data.
4256 (som_bfd_copy_private_section_data): Only copy the stuff
4257 that we really need to make objcopy and strip work. Allocate
4258 the copy_data structure for the output bfd before copying.
4259
4260 * som.h (struct som_exec_data): New structure to hold exec
4261 info that must be preserved when running objcopy/strip.
4262 (struct somdata): Add new "exec_data" field and accessor
4263 macro. Add some comments on how the various fields are used.
4264 (som_section_data_struct): Make is_space and is_subspace bitfields.
4265 Delete unused subspace_index. All references now use the
4266 target_index field within the section structure itself.
4267
4268 * som.c (make_unique_section): Delete unused declaration.
4269 (som_bfd_copy_private_bfd_data): New function.
4270 (som_object_setup): Allocate space for and save exec information
4271 that needs to be copied during objcopy/strip.
4272 (som_mkobject): Do not allocate space for a file header here.
4273 It is not used when only reading SOM objects.
4274 (som_prep_headers): Allocate space for and attach a file header
4275 to the output bfd. For executables, use the saved system_id
4276 value rather than trying to guess the right value. Do not abort
4277 wwhen setting file_hdr->entry* for executables.
4278 (som_begin_writing): For executables, set the exec_entry and
4279 exec_flags fields.
4280 (som_copy_private_backend_section_data): Always return a value.
4281
4282 * libhppa.h (PA_PAGESIZE): Define.
4283
4284 * som.c (SOM_ALIGN): Define.
4285 (som_begin_writing): If writing an executable, initialize all
4286 fields in the exec header to zero. Update fields in the exec
4287 header as sizes of loadable subspaces are computed. Carefully
4288 preserve alignments when building executables. Actually write the
4289 exec after all the fields are filled in.
4290
4291 * Better long-filename handling. Reads SOM ABI compliant extended
4292 names, but doesn't quite write compliant extended names yet.
4293 * som.c (som_slurp_extended_name_table): Delete function. The
4294 generic code will handle things correctly.
4295 (som_slurp_armap): Seek to the beginning of the next member.
4296 (normalize): New function.
4297 (som_bfd_ar_write_symbol_stuff): Take the size of the extended
4298 name table into account when computing the file offsets in the
4299 SOM dictionary. Make sure to align to an even boundary.
4300 (som_write_armap): Initialize the checksum to zero.
4301 (ar_maxchars): Fix. Opps.
4302
4303 Fri Mar 18 20:35:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4304
4305 * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
4306 machine. Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
4307
4308 Thu Mar 17 18:26:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4309
4310 * bfd-in.h (BFD_VERSION): Use @VERSION@.
4311 * Makefile.in (bfd.h): Replace it with contents of VERSION file.
4312 * bfd-in2.h: Regenerated.
4313
4314 * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
4315 this was also named trad_unix_bfd_copy_private_bfd_data.
4316
4317 Thu Mar 17 10:37:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
4318
4319 * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
4320 elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
4321 returns NULL, it is not an error. It's possible that some of
4322 these checks are not necessary (because the size can never be
4323 zero), but putting in the checks is the conservative thing to do
4324 in light of the fact that some of these malloc calls replaced
4325 unchecked alloca calls, in which a zero argument would work fine.
4326
4327 Thu Mar 17 11:44:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4328
4329 * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
4330 duplicate definition.
4331 (osf_core_bfd_is_local_label): Define.
4332
4333 * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
4334 if malloc (0) fails. bfd_canonicalize_reloc returning 0 is not a
4335 failure indication, it merely means there are no relocs.
4336
4337 * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
4338 after NAME, since SunOS /bin/cc can't handle it.
4339
4340 Wed Mar 16 16:43:33 1994 David J. Mackenzie (djm@thepub.cygnus.com)
4341
4342 * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
4343 From sukes@glue.umd.edu (Tasuki Hirata).
4344
4345 Wed Mar 16 07:55:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
4346
4347 * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
4348 all that convoluted stuff with NAME, CAT3, etc. The convoluted
4349 stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
4350
4351 Wed Mar 16 00:02:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4352
4353 * som.c (som_prep_for_fixups): Detect section symbols based
4354 on either the lack of private data or the symbol flags. Do not
4355 munge section symbol names anymore -- they no longer confuse GDB.
4356 (som_begin_writing): Leave space for an exec header if writing
4357 an executable.
4358 (som_slurp_symbol_table): Recognize both forms of section symbol
4359 names "L$0\002" and "$<FOO>$". Change the name of "L$0\002"
4360 section symbols to be the name of the section they represent.
4361 Debugging symbols begin with "L$0\001", not just "L$".
4362
4363 Tue Mar 15 22:58:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4364
4365 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
4366
4367 * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
4368 for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
4369 and bfd_is_local_label.
4370
4371 * targets.c: Add new entries to the bfd_target structure.
4372
4373 * bfd.c (bfd_copy_private_bfd_data): New definition.
4374
4375 * section.c (bfd_copy_private_section_data): New definition.
4376
4377 * syms.c (bfd_is_local_label): New definition.
4378
4379 * libbfd-in.h (bfd_generic_is_local_label): Declare.
4380
4381 * libbfd.c (bfd_generic_is_local_label): New function.
4382
4383 * *-core.c: Provide default definitions for new functions in
4384 the target vector which all point to bfd_false.
4385
4386 * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
4387 libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
4388 Default new vectors for copying private backend data to bfd_true.
4389 Default new vector for determining if a symbol is a local label
4390 to bfd_generic_is_local_label.
4391
4392 * som.c (som_bfd_copy_private_section_data): New function.
4393 (som_bfd_is_local_label): New function.
4394 (som_bfd_copy_private_bfd_data): For now default to bfd_true.
4395
4396 * elf32-hppa.c (hppa_elf_is_local_label): New function.
4397
4398 Tue Mar 15 23:55:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4399
4400 * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
4401
4402 Tue Mar 15 04:41:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
4403
4404 * Most files:
4405 Replace DEFUN and DEFUN_VOID with K&R-style function definition.
4406 Indent some of them to GNU standards.
4407
4408 * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
4409 cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
4410 elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
4411 libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
4412 Update copyright years.
4413
4414 Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4415
4416 * som.c (som_prep_for_fixups): A relocation involving the section
4417 symbol for the *ABS* section is really a relocation involving
4418 no symbol.
4419 (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
4420 undefined symbols. Correctly distinguish between debugger symbols
4421 and section symbols.
4422
4423 * som (setup_sections): Set SEC_DEBUGGING and the section attributes
4424 for spaces and subspaces.
4425
4426 * som.c (som_bfd_count_ar_symbols): Fix typo.
4427
4428 * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
4429 HAS_RELOC based on the object's magic number.
4430 (make_unique_section): Delete function. BFD and its users are
4431 prepared to handle multiple sections with the same name.
4432 (setup_sections): Allocate space on the BFD's obstack to hold
4433 section names. Use bfd_make_setion_anyway rather than the
4434 obsolete make_unique_section.
4435 (som_prep_headers): Choose the correct SOM magic number based
4436 on the BFD's flags.
4437 (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
4438
4439 Sat Mar 12 09:46:09 1994 Ian Lance Taylor (ian@cygnus.com)
4440
4441 * elf32-ppc.c: Renamed from elf32-powerpc.c.
4442 * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
4443 * Makefile.in, configure.in: Corresponding changes.
4444
4445 Fri Mar 11 22:27:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4446
4447 * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
4448
4449 Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4450
4451 * sunos.c (sunos_read_dynamic_info): Assume that dynamic info
4452 is always located at the start of the data section to allow
4453 recovery of the dynamic info from a stripped executable.
4454 * ecoff.c (ecoff_styp_to_sec_flags): Handle STYP_PDATA, STYP_XDATA
4455 and STYP_COMMENT.
4456
4457 Wed Mar 9 17:17:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
4458
4459 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
4460 cruft (like the #pragma alloca for AIX).
4461 In addition to that problem, the C alloca calls xmalloc, which
4462 means checking for being out of memory can't work right. The
4463 following changes remove all uses of alloca from BFD.
4464 * hosts/solaris2.h: Remove alloca cruft.
4465 * som.c: Replace alloca with a fixed size auto array.
4466 * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
4467 ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
4468 sunos.c: Replace alloca with malloc and appropriate error checking and
4469 freeing.
4470 * linker.c: Replace alloca with obstack_alloc.
4471 * libbfd.h: Rebuilt.
4472
4473 Tue Mar 8 12:10:38 1994 Ian Lance Taylor (ian@cygnus.com)
4474
4475 * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
4476 MIPS_R_GPREL.
4477
4478 Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4479
4480 * elf32-hppa.h, elfcode.h: Replace uses of Elf*_Half, Elf*_Word,
4481 Elf*_Off typedefs by their expansion, the typedefs have been
4482 removed from include/elf/internal.h.
4483 * elfcode.h (bfd_section_from_shdr): Handle SHT_DYNAMIC section like
4484 SHT_PROGBITS section.
4485
4486 Thu Mar 3 20:03:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4487
4488 * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
4489
4490 Wed Mar 2 13:28:06 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
4491
4492 * configure.host: Recognize i[34]86-sequent-*.
4493
4494 * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
4495 return from bfd_seek indicates an error.
4496 New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
4497 TRAD_CORE_STACK_OFFSET.
4498 * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
4499 TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
4500
4501 Wed Mar 2 11:57:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4502
4503 * som.[ch]: Do not include libhppa.h in som.c, instead include
4504 it in som.h.
4505
4506 * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
4507 include it in elf32-hppa.h.
4508
4509 * som.c (log2): Return -1 on error rather than aborting.
4510 (setup_sections): Bubble up an error from log2.
4511
4512 * Changes to make HP C compiler happy in both traditional
4513 and ANSI mode.
4514 * som.c (hppa_som_gen_reloc_type): Use correct enum type for
4515 field parameter.
4516 (bfd_som_set_section_attributes): Use unsigned int rather than
4517 unsigned char to avoid GNU-C extensions.
4518 (bfd_som_attach_aux_hdr): Return a boolean to indicate success
4519 or failure rather than aborting on failure.
4520
4521 * som.h (bfd_som_set_section_attributes): Fix prototype to match
4522 som.c changes.
4523 (bfd_som_attach_aux_hdr): Add prototype.
4524 (hppa_som-gen_reloc_type): Likewise.
4525
4526 * elf32-hppa.c: Add a couple casts to make HP compiler happy.
4527 (hppa_look_for_stubs_in_section): Do not return false on failure
4528 until rest of code is ready to handle it. Abort for now.
4529
4530 Tue Mar 1 18:33:59 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
4531
4532 * bfd-in2.h: Rebuilt.
4533
4534 Tue Mar 1 13:06:53 1994 Kung Hsu (kung@mexican.cygnus.com)
4535
4536 * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
4537 * Makefile.in: delete an extra blank.
4538 * configure.in : Add i396os9k_vec.
4539
4540 Mon Feb 28 15:41:01 1994 Kung Hsu (kung@mexican.cygnus.com)
4541
4542 * config.bfd : Add i386-os9k.
4543 * config/i386-os9k.mt : Newly add os9k target makefile.
4544
4545 * i386os9k.c : new file to handle os9k format bfd.
4546 * Makefile.in : Handle new file i386os9k.c
4547 * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
4548 * cache.c : Initialize cache_sentinel to 0.
4549
4550 Sun Feb 27 16:30:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4551
4552 * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
4553 action in case where caller specified no argument relocation.
4554 (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
4555 right in the original relocation and the stub's relocation.
4556
4557 * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo. Delete
4558 unused symbols argument.
4559
4560 * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
4561 than asymbol * for original target symbol. All callers changed.
4562 Set reloc->sym_ptr_ptr appropriately.
4563 (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
4564 (hppa_elf_look_for_stubs_in_section): No longer need symbols
4565 argument. Use the output symbols when canonicalizing the relocs,
4566 creating them if necessary.
4567
4568 * linker.c (_bfd_generic_link_output_symbols): Do not
4569 rebuild/clobber the output symbols if they already exist.
4570
4571 Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
4572
4573 * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
4574 check all the pointer dereferences. Enabled via DEBUG_BFD_SEND.
4575 * bfd-in2.h: Rebuilt.
4576
4577 * srec.c (hex_value): Always set to a size of 256 bytes.
4578 (srec_init): Cosmetic changes.
4579
4580 Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4581
4582 * elf32-hppa.c: Second half of major cleanup. More comments,
4583 PARAMize and staticize rest of functions. Delete unused
4584 functions. Delete unused/unnecessary arguments to some functions.
4585 Group static vars together. Abort for bad errors until we have
4586 error code propogation working. Work on spacing and indention.
4587 Add FIXMEs for unresolved problems. Use enums rather than
4588 #defines for lots of things. Merge two functions which build
4589 linker stubs into a single function (so they can easily share a
4590 ton of common code).
4591
4592 Sat Feb 26 10:00:45 1994 Ian Lance Taylor (ian@cygnus.com)
4593
4594 * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
4595 avoid depending upon right shifts of signed numbers, and to
4596 correct handling of src_mask with lower bits zero.
4597
4598 * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
4599 * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
4600 * elf32-i386.c: Likewise.
4601 * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
4602 #if 0 code.
4603 (elf_write_phdrs): Make i unsigned.
4604 (map_program_segments): Make i and n_left unsigned.
4605 (assign_file_positions_except_relocs): Make i unsigned.
4606 (write_shdrs_and_ehdr): Make count unsigned.
4607 (assign_file_positions_for_relocs): Make i unsigned.
4608 (NAME(bfd,elf_write_object_contents)): Make count unsigned.
4609 (section_from_elf_index): Make index argument unsigned.
4610
4611 Fri Feb 25 21:34:58 1994 Ian Lance Taylor (ian@cygnus.com)
4612
4613 * elfcode.h: Don't include assert.h.
4614 (swap_out_syms): Use BFD_ASSERT rather than assert.
4615
4616 * linker.c (_bfd_generic_link_write_global_symbol): Add missing
4617 break in switch.
4618
4619 * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
4620 declarations.
4621
4622 Fri Feb 25 16:35:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4623
4624 * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
4625
4626 * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
4627 (elf_hppa_tc_make_sections): Likewise.
4628 (elf_hppa_final_processing): Add extern decl.
4629
4630 * elf32-hppa.c: First half of major cleanup. Add/cleanup lots of
4631 comments. PARAMize some static functions. Delete unused functions.
4632 Delete unused/unnecessary arguments to many functions. Group
4633 static vars together. Collapse common case statements together
4634 in many places. Use default case when possible instead of listing
4635 each case separately. Abort for bad errors until we get error
4636 code propogation working. Work on spacing and indention problems.
4637 Add FIXMEs for some unresolved problems. Delete hopelessly broken
4638 COMPLEX relocation support (it's never used anyway).
4639 (hppa_elf_rebuild_insn): Delete. Moved into libhppa.h.
4640 (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
4641 (elf_hppa_tc_make_sections): Likewise.
4642
4643 * format.c (bfd_check_format_matches): Initialize matching_vector
4644 to keep gcc -Wall quiet.
4645
4646 * elfcode.h (elf_slurp_reloca_table): Fix typo.
4647
4648 * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
4649 not "sizeof (som_symbol_type *)".
4650
4651 * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
4652 not "sizeof (asymbol"). Opps.
4653
4654 Fri Feb 25 13:19:04 1994 Ted Lemon (mellon@pepper.ncd.com)
4655
4656 * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
4657 (bfd_set_gp_size): Can't set gp value on an archive.
4658
4659 Fri Feb 25 12:57:00 1994 Steve Chamberlain (sac@jonny.cygnus.com)
4660
4661 * srec.c (pass_over): Don't skip too many characters when
4662 end of line seen.
4663
4664 Fri Feb 25 11:41:57 1994 Ian Lance Taylor (ian@cygnus.com)
4665
4666 * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
4667 boundary.
4668
4669 Thu Feb 24 07:13:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4670
4671 * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
4672 field for absolute symbols in the same manner as undefined
4673 and common symbols.
4674
4675 Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4676
4677 * elfcode.h (elf_core_file_p): Check for core file e_machine match
4678 like in elf_object_p.
4679
4680 Wed Feb 23 18:28:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4681
4682 * elfcode.h (alloca): Delete declaration.
4683
4684 * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
4685 number rather than HP9000S800_ID. Note som.c is careful
4686 to make sure CPU_PA_RISC1_0 is always defined.
4687
4688 Mon Feb 21 10:12:02 1994 Stan Shebs (shebs@andros.cygnus.com)
4689
4690 * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
4691 flags to explicit compile actions.
4692
4693 Mon Feb 21 09:50:06 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
4694
4695 * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
4696 * ecoff.c (ecoff_write_object_contents): Make sure .bss section
4697 ends on a page boundary if there is no symbol table.
4698 (ecoff_bfd_final_link): Don't set symhdr->magic here.
4699
4700 * hosts/hp300.h: Include <stdlib.h>; don't declare free.
4701
4702 * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
4703 rather than an array of variable size.
4704 (som_bfd_fill_in_ar_symbols): Likewise.
4705 (som_bfd_ar_write_symbol_stuff): Likewise.
4706
4707 * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
4708 operation to avoid OSF 1.3 cc bug.
4709 * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
4710 and bss_size bfd_size_type instead of unsigned long. Make
4711 text_start and data_start bfd_vma instead of unsigned long.
4712 * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
4713 value.
4714
4715 Sun Feb 20 16:06:54 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
4716
4717 * linker.c (_bfd_generic_link_add_archive_symbols): Consider
4718 symbols in the order they appear in the archive map.
4719
4720 Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4721
4722 * coff-alpha.c (reloc_nil): Add forward declaration, add missing
4723 error_message argument.
4724 * coff-sparc.c (bfd_coff_generic_reloc): Add forward declaration,
4725 add missing error_message argument.
4726 * mipsbsd.c (mips_fix_hi16_s): Add forward declaration, add missing
4727 error_message argument.
4728
4729 Fri Feb 18 11:41:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4730
4731 Support for PowerPC NetWare.
4732 * nlm32-powerpc.c: New file.
4733 * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
4734 * config/ppc-nlm.mt: New file.
4735 * configure.in (nlm32_powerpc_vec): New target vector; use
4736 nlm32-powerpc.o, nlm32.o, nlm.o.
4737 * targets.c (nlm32_powerpc_vec): Declare.
4738 * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
4739 (CFILES): Add nlm32-powerpc.c.
4740
4741 Initial support for PowerPC ELF. Done without an ABI, and
4742 probably to be changed when I get an ABI.
4743 * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
4744 * config/ppc-elf.mt: New file.
4745 * configure.in (bfd_elf32_powerpc_vec): New target vector; use
4746 elf32-powerpc.o, elf32.o, elf.o.
4747 * elf32-powerpc.c: New file.
4748 * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
4749 (elf_set_arch_mach): Likewise.
4750 * targets.c (bfd_elf32_powerpc_vec): Declare.
4751 * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
4752 (CFILES): Add elf32-powerpc.c.
4753 Rebuilt dependencies.
4754
4755 Thu Feb 17 15:29:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4756
4757 * coffgen.c (coff_write_linenumbers): Always return a value.
4758
4759 * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
4760 reasonably. Allocate x_symp using alloca.
4761
4762 * elfcode.h (map_program_segments): ELF program header entries
4763 must be sorted by load address. This used to generate the entries
4764 in reverse order.
4765
4766 * section.c (SEC_IN_MEMORY): Define.
4767 (asection): Rename unused field otheruserdata to contents, and
4768 make it char *.
4769 (bfd_make_section_anyway): Initialize contents field to NULL.
4770 (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
4771 contents from contents field rather than from file.
4772 * bfd-in2.h: Rebuilt.
4773
4774 Thu Feb 17 08:30:53 1994 David J. Mackenzie (djm@thepub.cygnus.com)
4775
4776 * bfd.c (bfd_get_error, bfd_set_error): New functions.
4777 (bfd_error): Make static.
4778 (bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
4779 all values.
4780 * bfd-in2.h: Regenerated.
4781 * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
4782 aoutf1.h, aoutx.h, archive.c, archures.c,
4783 bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
4784 coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
4785 ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
4786 elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
4787 i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
4788 lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4789 nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4790 ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
4791 srec.c, sunos.c, syms.c, targets.c, tekhex.c,
4792 trad-core.c: Change callers.
4793
4794 Tue Feb 15 22:27:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4795
4796 * som.c: Remove FIXMEs for things which have been dealt with.
4797
4798 Tue Feb 15 19:39:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4799
4800 * section.c (bfd_get_section_contents): Since this function reads
4801 unrelocated contents, the section's raw size is always the one to
4802 use for bounds checking.
4803
4804 * linker.c (default_indirect_link_order): In assertion, compare
4805 link_order size field against cooked size, not raw size, of input
4806 section.
4807
4808 * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
4809 return 0.
4810 (aligncode): When shrinking, the addend should be set to the
4811 current offset in the section plus the number of bytes of padding
4812 that will actually be retained.
4813 (b_out_relax_section): If a section contains no relocations, don't
4814 bother processing them.
4815 (b_out_get_relocated_section_contents): Set reloc_done. Assert
4816 that bfd_get_section_contents returns true. Check that relocs are
4817 properly ordered.
4818 (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
4819 that reloc->addend falls between the current source offset and the
4820 raw size of the input section.
4821
4822 * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
4823 bout. Default with no version number is still bout. Support
4824 explicit i960-coff target too.
4825
4826 * bout.c: Changed some indentation, deleted trailing whitespace,
4827 fixed some comments, removed some "#if 1" lines.
4828 (output_addr): New macro.
4829 (calljx_callback, callj_callback, get_value, abs32code, aligncode,
4830 b_out_get_relocated_section_contents): Use it for readability.
4831
4832 Tue Feb 15 09:00:16 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4833
4834 * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
4835 symbols, not the BFD symbols.
4836 (som_bfd_ar_write_symbol_stuff): Likewise.
4837
4838 Mon Feb 14 22:55:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4839
4840 * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
4841 have any symbols.
4842
4843 * Finish basic read-write support for SOM archive libraries. Bugs
4844 surely remain as this hasn't been tested all that much.
4845 * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
4846 (struct som_misc_symbol_info): New structure to hold info necessary
4847 to build both normal and library symbol tables.
4848 (som_derive_misc_symbol_info): New function to derive info necessary
4849 to build both normal and library symbol tables.
4850 (som_build_and_write_symbol_table): Use new function to derive misc
4851 symbol information.
4852 (som_slurp_symbol_table): Update backend private data for symbols
4853 appropriately.
4854 (som_bfd_prep_for_ar_write): New function.
4855 (som_bfd_ar_symbol_hash): New function.
4856 (som_bfd_ar_write_symbol_stuff): New function.
4857 (som_write_armap): Flesh out.
4858 (som_vec): Fix ar padding character.
4859
4860 * som.c: Consistently use memset rather than bzero.
4861
4862 Mon Feb 14 17:02:28 1994 Stu Grossman (grossman at cygnus.com)
4863
4864 * coff-rs6000.c: Add Lynx core file support, use HOST_AIX, where
4865 appropriate.
4866 * rs6000-core.c: Use HOST_AIX instead of COREFILES_PLEASE.
4867 * config/rs6000.mh: Remove defs of ARCHIVES_PLEASE and
4868 COREFILES_PLEASE.
4869 * config/rs6000lynx.mh: Turn on Lynx core file support.
4870 * hosts/rs6000.h: #define HOST_AIX.
4871 * hosts/rs6000lynx.h: Create this to enable Lynx host support.
4872
4873 Sun Feb 13 14:30:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4874
4875 * som.h (som_symbol_data): Safely access backend private data
4876 for BFD symbols. All callers changed.
4877
4878 * Read-only SOM archive support.
4879 * som.c (som_bfd_count_ar_symbols): New helper function.
4880 (som_bfd_fill_in_ar_symbols): New helper function.
4881 (som_slurp_armap): New function to read a SOM LST.
4882
4883 * som.h: Include <lst.h> and <ar.h>.
4884
4885 Sat Feb 12 22:34:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4886
4887 * elfcode.h (elf_map_symbols): Fix typo.
4888 (write_object_contents): Check return values from prep_headers and
4889 elf_compute_section_file_positions.
4890 (set_section_contents): Likewise.
4891
4892 Fri Feb 11 16:56:50 1994 David J. Mackenzie (djm@thepub.cygnus.com)
4893
4894 * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
4895 (bfd_construct_extended_name_table): Check result of normalize.
4896
4897 Tue Feb 8 08:57:31 1994 David J. Mackenzie (djm@thepub.cygnus.com)
4898
4899 Make all callers of malloc or realloc (including via obstacks)
4900 check the result for NULL. Most set bfd_error to no_memory and
4901 return in that case; a few are harder to fix, and are marked
4902 with "FIXME <return type>".
4903
4904 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
4905 hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return.
4906 * linker.c (_bfd_generic_link_output_symbols
4907 _bfd_generic_link_write_global_symbol): Ditto
4908 * section.c (bfd_make_section_anyway): Ditto.
4909
4910 * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
4911 (first_phase): Ditto. FIXME void
4912 (tekhex_make_empty_symbol): Check bfd_zalloc.
4913
4914 * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
4915 (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
4916
4917 * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
4918
4919 * srec.c: Indent.
4920 (fillup_symbols): Check bfd_alloc. FIXME void
4921 (srec_mkobject srec_get_section_contents
4922 srec_set_section_contents): Check bfd_alloc.
4923 (srec_make_empty_symbol): Check bfd_zalloc.
4924
4925 * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
4926 (make_unique_section): Check bfd_alloc.
4927 (som_new_section_hook): Check bfd_zalloc.
4928 (bfd_som_attach_aux_hdr): Ditto. FIXME void
4929
4930 * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
4931
4932 * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
4933 (osf_core_core_file_p): Check bfd_alloc.
4934
4935 * oasys.c (oasys_slurp_symbol_table oasys_archive_p
4936 oasys_mkobject oasys_object_p oasys_new_section_hook
4937 oasys_set_section_contents): Check bfd_alloc.
4938 (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
4939 (oasys_make_empty_symbol): Check bfd_zalloc.
4940
4941 * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
4942 (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
4943
4944 * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
4945
4946 * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
4947
4948 * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
4949
4950 * linker.c (_bfd_link_hash_newfunc
4951 (generic_link_hash_newfunc
4952 (archive_hash_newfunc
4953 (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
4954 (_bfd_generic_final_link
4955 (_bfd_generic_link_output_symbols
4956 (default_indirect_link_order): Check bfd_alloc.
4957 (bfd_new_link_order): Check bfd_alloc_by_size_t.
4958
4959 * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
4960
4961 * ieee.c: Indent.
4962 (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
4963 ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
4964 (do_one): Check bfd_alloc. Return a boolean.
4965 (ieee_slurp_section_data): Check it.
4966 (init_for_output): Check bfd_alloc. Return a boolean.
4967 (ieee_set_section_contents): Check it.
4968 (do_with_relocs): Check bfd_alloc. Return a boolean.
4969 (ieee_bfd_debug_info_accumulate): Ditto. FIXME void.
4970 (ieee_mkobject): Check bfd_zalloc.
4971 (ieee_make_empty_symbol): Check bfd_zmalloc.
4972
4973 * hpux-core.c (hpux_core_make_empty_symbol): Check
4974 bfd_zalloc.
4975
4976 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
4977 bfd_zalloc.
4978 (hppabsd_core_core_file_p): Check bfd_zalloc.
4979
4980 * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
4981
4982 * elfcode.h (elf_new_section_hook): Check bfd_alloc.
4983 (bfd_section_from_phdr): Ditto.
4984 (write_relocs): Ditto. FIXME void
4985 (elf_map_symbols assign_section_numbers map_program_segments):
4986 Ditto. Return a boolean.
4987 (swap_out_syms): Ditto. Check elf_map_symbols.
4988 (elf_slurp_symbol_table): Check bfd_zalloc.
4989 (elf_slurp_reloca_table): Check bfd_alloc.
4990 (elf_slurp_reloc_table): Ditto.
4991 (elf_compute_section_file_positions): Check assign_section_numbers.
4992 (assign_file_positions_except_relocs): Return a boolean.
4993 Check map_program_segments.
4994 (elf_compute_section_file_positions): Check it.
4995
4996 * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
4997
4998 * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
4999 realloc.
5000 (hppa_elf_stub_reloc): Ditto.
5001 (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
5002 (hppa_elf_build_long_branch_stub): Ditto.
5003 (elf32_hppa_backend_symbol_table_processing): Ditto.
5004
5005 * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean.
5006 (ecoff_slurp_symbol_table): Check it.
5007 (ecoff_slurp_armap): Check bfd_alloc.
5008 (ecoff_write_armap): Check bfd_zalloc.
5009 (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
5010 _bfd_link_hash_newfunc.
5011 (ecoff_link_add_externals): Check bfd_alloc.
5012
5013 * ctor.c (bfd_constructor_entry): Check bfd_alloc.
5014
5015 * coffgen.c (coff_real_object_p): Check bfd_alloc.
5016 (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean.
5017 (coff_write_symbol): Check bfd_alloc. FIXME int
5018 (coff_write_linenumbers): Check bfd_alloc. Return a boolean.
5019 (coff_section_symbol): Check bfd_alloc_by_size_t.
5020 (coff_get_normalized_symtab): Check bfd_alloc.
5021 (coff_bfd_make_debug_symbol): Check bfd_zalloc.
5022 * libcoff-in.h: Change decls of coff_renumber_symbols,
5023 coff_write_linenumbers.
5024 * libcoff.h: Rebuilt.
5025 * coffcode.h (coff_write_object_contents): Check
5026 coff_renumber_symbols, coff_write_linenumbers.
5027
5028 * coffcode.h: Indent.
5029 (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a
5030 boolean.
5031 (coff_write_object_contents): Check it.
5032
5033 * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
5034 * coff-mips.c (mips_relocate_section): Ditto.
5035
5036 * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
5037 (do_slurp_bsd_armap): Ditto.
5038 (compute_and_write_armap): Check bfd_realloc value.
5039
5040 * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
5041 return value. Return boolean value.
5042 (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
5043 (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
5044 return value.
5045 (add_to_stringtab): Ditto. FIXME void
5046 (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
5047 (aout_link_add_symbols): Check bfd_alloc value.
5048 (translate_symbol_table): Check translate_from_native_sym_flags.
5049 * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
5050 * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
5051
5052 * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
5053
5054 * opncls.c (obstack_chunk_alloc): Define as malloc, not
5055 bfd_xmalloc_by_size_t.
5056 (_bfd_new_bfd): Check obstack_begin for 0 return.
5057
5058 * ieee.c (obstack_chunk_alloc): Define as malloc, not
5059 bfd_xmalloc_by_size_t.
5060 (ieee_archive_p): Check obstack_begin for 0 return and
5061 obstack_finish for NULL return.
5062
5063 * hash.c (obstack_chunk_alloc): Define as malloc, not
5064 bfd_xmalloc_by_size_t.
5065 (bfd_hash_table_init_n): Check obstack_begin for 0 return and
5066 obstack_finish for NULL return.
5067 (bfd_hash_lookup): Check obstack_alloc for NULL return.
5068
5069 * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
5070 bfd_xmalloc_by_size_t.
5071 bfd_ecoff_debug_accumulate
5072 bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
5073 (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
5074 NULL return. Return boolean, not void.
5075 (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
5076 (bfd_ecoff_debug_accumulate): Check add_file_shuffle
5077 and add_memory_shuffle return.
5078 (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
5079 (bfd_ecoff_debug_accumulate): Check bfd_alloc.
5080 (ecoff_add_string): Check add_memory_shuffle return.
5081
5082 * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
5083 Remove decls.
5084 * libbfd.h: Rebuilt.
5085
5086 Fri Feb 11 15:35:32 1994 Stu Grossman (grossman at cygnus.com)
5087
5088 * configure.host: Add Lynx/rs6000 support.
5089 * config/i386-nlm.mt: Enable a.out file support.
5090 * config/rs6000lynx.mh: Lynx/rs6000 host support.
5091
5092 Fri Feb 11 17:25:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5093
5094 * archive.c (compute_and_write_armap): Rewrite somewhat to improve
5095 memory usage.
5096
5097 Fri Feb 11 13:10:42 1994 Stan Shebs (shebs@andros.cygnus.com)
5098
5099 * archive.c: Change all references to '\n' in archive magic
5100 to '\012', for greater portability.
5101 * ecoff.c (ecoff_write_armap): Ditto.
5102
5103 Thu Feb 10 12:58:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5104
5105 * aoutx.h (aout_link_write_other_symbol): Check strip settings to
5106 see whether symbol should be output.
5107 * genlink.h (struct generic_write_global_symbol_info): Added info
5108 field.
5109 * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
5110 (_bfd_generic_link_write_global_symbol): Check strip settings to
5111 see whether symbol should be output.
5112 * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
5113
5114 Wed Feb 9 21:34:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5115
5116 * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
5117
5118 * som.c: Cast return values from BFD memory allocation routines to
5119 avoid warnings from the HP compiler.
5120
5121 Wed Feb 9 12:55:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5122
5123 * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
5124 reloc on an "ldl" instruction too.
5125
5126 * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
5127 when passing them to sprintf. Use %ld instead of %d.
5128
5129 * coff-rs6000.c (rs6000coff_mkarchive): Return false.
5130 (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
5131 Also removed unused variable namelen.
5132 (rs6000coff_write_armap): Declare orl_count and stridx parameters.
5133
5134 Tue Feb 8 18:00:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5135
5136 * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
5137 conflicts.
5138 * libbfd.h: Rebuilt.
5139
5140 Tue Feb 8 15:55:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5141
5142 * coff-alpha.c (reloc_nil): New function.
5143 (alpha_howto_table): Use it as special_function to prevent certain
5144 relocs from being adjusted by bfd_perform_relocation. IGNORE
5145 reloc should be partial_inplace.
5146 (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
5147 reloc on an "ldl" instruction too.
5148
5149 Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5150
5151 * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
5152 hppa_elf_build_long_branch_stub): Cast to char * instead of int
5153 before performing pointer arithmetic.
5154
5155 Mon Feb 7 20:56:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5156
5157 * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
5158 configuration.
5159 (hppa*-*-*elf*): This configuration used hppa-elf now.
5160
5161 * som.c: This file is also used for HOST_HPPAOSF.
5162
5163 * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
5164
5165 * hosts/hppaosf.h: New host configuration file.
5166
5167 * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
5168 BSD handles both SOM and ELF object files.
5169
5170 * config/hppaosf.mh (HDEFINES): Delete. No longer needed.
5171 (RANLIB): Doesn't do anything, define it to be "echo".
5172
5173 * config/hppaosf.mt: New target makefile fragment for a PA running
5174 OSF1.
5175
5176 Mon Feb 7 15:02:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5177
5178 * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
5179 (archures_init_table): If SELECT_ARCHITECTURES is not defined,
5180 added bfd_powerpc_arch.
5181 * bfd-in2.h: Rebuilt.
5182 * cpu-powerpc.c: New file.
5183 * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
5184 Rebuilt dependencies.
5185
5186 * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
5187 of an SHT_STRTAB section from sh_addr and sh_addralign, rather
5188 than just setting them to zero.
5189
5190 Sun Feb 6 20:04:10 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5191
5192 * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
5193 from bfd_new_strtab.
5194 (elf_compute_section_file_positions): Check for false return from
5195 swap_out_syms.
5196
5197 * linker.c (default_indirect_link_order): Check for NULL return
5198 from bfd_get_relocated_section_contents.
5199
5200 * syms.c: Make example application in doc call xmalloc, not
5201 bfd_xmalloc.
5202
5203 * aoutx.h (NAME(aout,slurp_symbol_table),
5204 aout_link_get_symbols, NAME(aout,link_hash_table_create)):
5205 * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
5206 * ecoff.c (ecoff_bfd_link_hash_table_create):
5207 * ecofflink.c (bfd_ecoff_debug_init):
5208 * format.c (bfd_check_format_matches):
5209 * linker.c (_bfd_generic_link_hash_table_create):
5210 (_bfd_generic_final_link):
5211 * reloc16.c (bfd_coff_reloc16_relax_section):
5212 (bfd_coff_reloc16_get_relocated_section_contents):
5213 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
5214 * elf32-mips.c (mips_elf_final_link):
5215 * elfcode.h (bfd_new_strtab):
5216 (bfd_add_2_to_strtab):
5217 (elf_slurp_symbol_table):
5218 (elf_corefile_note):
5219 * libbfd.c (bfd_zmalloc):
5220 Use malloc and check the result, instead of bfd_xmalloc.
5221
5222 Sat Feb 5 12:39:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5223
5224 * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
5225
5226 Sat Feb 5 05:32:44 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5227
5228 * srec.c (srec_write_record): Put CONST keyword for "src" before
5229 "unsigned", some compilers don't like it after "unsigned".
5230 * libcoff.h, libcoff-in.h (bfd_perform_slip): Rename "value" to
5231 "val" in prototype declaration because some compilers don't like
5232 arguments whose names are the same as types.
5233
5234 Sat Feb 5 01:14:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5235
5236 * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
5237 object file defines symbol. Also, if skipping a symbol, skip the
5238 second symbol of a N_WARNING or N_INDR symbol as well.
5239
5240 Fri Feb 4 23:55:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5241
5242 Add basic support for writing RS/6000 XCOFF files.
5243 * coff-rs6000.c (dummy_reloc): Removed.
5244 (rs6000coff_howto_table): Defined XCOFF relocs.
5245 (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
5246 (rs6000coff_rtype2howto): New function.
5247 (coff_bfd_reloc_type_lookup): Defined to use
5248 rs6000coff_reloc_type_lookup.
5249 (rs6000coff_reloc_type_lookup): New function.
5250 (SELECT_RELOC): Defined to set r_type and r_size fields.
5251 (COFF_LONG_FILENAMES): Defined.
5252 * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
5253 fields to bitfields. Added fields fix_value and fix_scnlen.
5254 (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
5255 STYP_INFO for the type of a section named .debug.
5256 (coff_add_missing_symbols): Don't define if RS6000COFF_C.
5257 (coff_write_object_contents): If RS6000COFF_C, don't call
5258 coff_add_missing_symbols.
5259 (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
5260 entry has type STY_LD change the x_scnlen into a pointer to a
5261 symbol and set fix_scnlen. Also, for a C_BSTAT symbol, change the
5262 value into a pointer to a symbol and set fix_value.
5263 * libcoff.h: Rebuilt.
5264 * coffgen.c (coff_mangle_symbols): Reindent. If fix_value is set,
5265 get the symbol offset. Likewise for fix_scnlen.
5266 (string_size): Change type to bfd_size_type.
5267 (debug_string_size, debug_string_section): New static variables.
5268 (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
5269 write the symbol name into the .debug section; assume that the
5270 section has already been created with the right size.
5271 (coff_write_symbols): Initialize debug_string_size to 0. If
5272 bfd_coff_symname_in_debug returns true, don't put symbol name in
5273 usual string table. After writing out all symbols, if
5274 debug_string_size is not 0, check that it matches the size of the
5275 .debug section.
5276 (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
5277 fields. If the string offset is 0, always use an empty string as
5278 the name.
5279 (coff_make_empty_symbol): Zero out the symbol structure.
5280 * reloc.c (bfd_perform_relocation): Work around one gross hack
5281 with another: actually look at the target name to avoid the broken
5282 COFF check.
5283 (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
5284 BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
5285 * bfd-in2.h: Rebuilt.
5286
5287 Fri Feb 4 17:28:32 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5288
5289 * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
5290 (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
5291 * libbfd-in.h: Define them as macros calling xmalloc and declare
5292 xmalloc.
5293 * libbfd.h: Rebuilt.
5294
5295 Thu Feb 3 16:49:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5296
5297 * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
5298 symbol has a value in the ECOFF symbol but not in the BFD symbol,
5299 keep the value in the ECOFF symbol. This helps gas.
5300
5301 * linker.c (_bfd_generic_link_output_symbols,
5302 _bfd_generic_link_write_global_symbol): Don't require that all
5303 references to a common symbol be themselves common symbols.
5304
5305 * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
5306
5307 Wed Feb 2 20:37:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5308
5309 * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
5310 sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
5311 * bfd-in2.h: Rebuilt.
5312
5313 Wed Feb 2 12:30:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5314
5315 * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
5316 and size correctly.
5317 (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
5318 x_csect.x_scnlen.l to match change in coff/internal.h.
5319 (coff_swap_aux_out): Likewise.
5320
5321 * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
5322 (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
5323 fields to match yesterday's changes.
5324
5325 * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
5326 in the internal_reloc itself, not the type.
5327 * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
5328 coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
5329 definition of SELECT_RELOC accordingly.
5330
5331 Tue Feb 1 12:05:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5332
5333 * coffcode.h (bfd_coff_backend_data): Added new arguments to
5334 _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
5335 and number of aux entries.
5336 (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
5337 accordingly.
5338 * libcoff.h: Rebuilt.
5339 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
5340 arguments. If RS6000COFF_C, only treat C_EXT and C_HIDEXT
5341 specially if this is the last aux entry.
5342 * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
5343 new arguments to swap_aux functions.
5344
5345 Sun Jan 30 15:14:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5346
5347 * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
5348 (only testing for m68k and vax at the moment); do verify that the
5349 preprocessor didn't trash the arch name inside the string version.
5350 Don't print out "pagesize =" line that prevents output from
5351 compiling. Derive BYTES_IN_WORD and ARCH values from sizeof
5352 results.
5353 * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
5354 (check, installcheck): Identify directory in "no testsuites"
5355 message.
5356
5357 Sun Jan 30 13:25:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5358
5359 * aoutx.h (aout_link_write_symbols): Write out correct value for
5360 object file symbol.
5361
5362 Fri Jan 28 18:34:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5363
5364 * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
5365 KERNBASE, so hard-code 0x80000000 instead.
5366
5367 Thu Jan 27 13:54:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5368
5369 * linker.c (generic_link_add_symbol_list): If symbol is common,
5370 set the BSF_OLD_COMMON flag.
5371
5372 Wed Jan 26 13:47:15 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5373
5374 * format.c (bfd_check_format_matches): Put the new entry in the
5375 correct element of matching_vector.
5376
5377 Tue Jan 25 11:43:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5378
5379 * som.c, som.h (bfd_som_set_section_attributes,
5380 bfd_som_set_subsection_attributes): Change parameters from char
5381 to int. Following a prototype with an old-style function definition
5382 in the presence of widened parameters is a GCC-ism not supported
5383 by the HP compiler in ANSI mode.
5384
5385 Tue Jan 25 11:46:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5386
5387 * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
5388
5389 * hp300hpux.c (MY(write_object_contents)): Write out the symbols
5390 before writing out the relocs, so that the right symbol indices
5391 are used.
5392
5393 * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
5394 try to overlay the internal carsyms on the external symdefs. That
5395 can not work if the size of a host pointer is larger than 4 bytes.
5396
5397 * format.c (bfd_check_format_matches): Cast result of
5398 bfd_xmalloc_by_size_t.
5399 * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
5400
5401 * archive.c: Reindented to GNU standards.
5402
5403 Mon Jan 24 14:41:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5404
5405 * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
5406 "_bfd_" to function names.
5407 * archive.c (_bfd_create_empty_archive_element_shell),
5408 libbfd-in.h: Change callers.
5409
5410 * libbfd.c (bfd_zmalloc): Renamed from zalloc.
5411 * libbfd.c (bfd_add_to_string_table),
5412 trad-core.c (trad_unix_core_file_p),
5413 targets.c (bfd_target_list),
5414 ptrace-core.c (ptrace_unix_core_file_p),
5415 opncls.c (new_bfd), libbfd-in.h,
5416 ieee.c (ieee_make_empty_symbol),
5417 elf32-hppa.c (hppa_elf_stub_branch_reloc),
5418 (hppa_elf_stub_reloc): Change callers.
5419 * libbfd.h: Regenerated.
5420
5421 * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
5422 (_bfd_get_elt_at_filepos),
5423 coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
5424 Change callers.
5425
5426 * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
5427 elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
5428 and default_vector to bfd_default_vector.
5429 * libbfd.h: Regenerated.
5430
5431 * format.c (bfd_check_format_matches): New function.
5432 (bfd_check_format): Call it.
5433 (bfd_matching_formats): Function removed.
5434 * targets.c: Replace the vector added on Jan 21 with a count of
5435 entries in default_vector.
5436 * bfd-in2.h: Regenerated.
5437
5438 Mon Jan 24 12:38:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5439
5440 * coff-alpha.c (alpha_ecoff_object_p): New function. Set size of
5441 .pdata section based on lnnoptr field, not section header.
5442 (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
5443 since it is unsigned.
5444 (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
5445 coff_object_p.
5446 * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
5447 .pdata section to 3.
5448 (ecoff_compute_section_file_positions): Save the size of the
5449 .pdata section in the line_filepos field, and actually align the
5450 .pdata section to an alignment power of 4.
5451 (ecoff_compute_reloc_file_positions): Set output_has_begun after
5452 calling ecoff_compute_section_file_positions.
5453 (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
5454 section from the line_filepos field. Set vstamp for the optional
5455 header from the vstamp of the symbolic header.
5456 (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
5457 vstamp used by the first object file in the link.
5458
5459 * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
5460
5461 * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
5462 for a created common section.
5463 (_bfd_generic_link_add_one_symbol): Likewise.
5464
5465 * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
5466 get the index of a common section, rather than always using
5467 SHN_COMMON (MIPS has multiple common sections).
5468
5469 * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
5470
5471 * bfd/aoutx.h (aout_link_input_section_std,
5472 aout_link_input_section_ext): Pass additional arguments to
5473 reloc_overflow callback.
5474 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
5475 alpha_relocat_section): Likewise.
5476 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
5477 * coff-h8500.c (extra_case): Likewise.
5478 * coff-mips.c (mips_relocate_section): Likewise.
5479 * coff-z8k.c (extra_case): Likewise.
5480 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
5481 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5482
5483 * bout.c (calljx_callback, callj_callback): Use get_value to get
5484 the symbol value and check for undefined symbols.
5485 (get_value): If the symbol is undefined, look it up in the linker
5486 hash table.
5487 (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
5488 use get_value to get the symbol value and check for undefined
5489 symbols.
5490 * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
5491 undefined, look it up in the linker hash table.
5492
5493 * aoutx.h (translate_symbol_table): The string index 0 has a
5494 special meaning for normal symbols, but not for dynamic symbols.
5495
5496 Sat Jan 22 12:26:01 1994 Stu Grossman (grossman at cygnus.com)
5497
5498 * sparclynx.c: Setup appropriate macros to enable core file
5499 support.
5500
5501 Fri Jan 21 16:25:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5502
5503 * targets.c: Add a vector of matching format names.
5504 * format.c (bfd_matching_formats): New function to return it.
5505 (bfd_check_format): Set it.
5506 * bfd-in2.h: Regenerated.
5507
5508 * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
5509 Remove decl of type symclass; wasn't used.
5510 * bfd.c: Document error handling, including code fragments
5511 containing the error decls that were in bfd-in.h.
5512 Remove DEFUNs.
5513 * bfd-in2.h: Regenerated.
5514
5515 Fri Jan 21 14:11:16 1994 Sean Fagan (sef@cygnus.com)
5516
5517 * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
5518 The sparc (and possibly other?) NLM format requires a different
5519 way to write exports, so add a write_export field to the backend
5520 data (and set it to NULL for everything but the sparc).
5521
5522 Fri Jan 21 14:11:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5523
5524 * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
5525 not (struct external_nlist *) NULL. info->dynrel is a PTR, not
5526 a struct external_nlist *.
5527
5528 Fri Jan 21 09:29:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5529
5530 * bfd.c: Remove error strings for errors removed below.
5531 * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
5532 oasys.c (oasys_write_sections): Rename
5533 bfd_error_nonrepresentable_section to nonrepresentable_section.
5534 None of the other bfd error names start with "bfd_error".
5535 Remove errors symbol_not_found and no_relocation_info, which seem
5536 to be unused.
5537 * bfd-in2.h: Regenerated.
5538
5539 Fri Jan 21 01:11:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5540
5541 * bfd.c (bfd_get_gp_size): Added support for ELF.
5542
5543 * syms.c (BSF_DYNAMIC): New symbol flag.
5544 (bfd_print_symbol_vandf): Print it.
5545 * bfd-in2.h: Rebuilt.
5546 * libaout.h (struct aout_backend_data): New read_dynamic_symbols
5547 and read_dynamic_relocs fields.
5548 (struct aoutdata): New dynamic_info field.
5549 (obj_aout_dynamic_info): New accessor macro.
5550 * sunos.c (struct sunos_dynamic_info): New structure.
5551 (sunos_read_dynamic_info, MY(read_dynamic_symbols),
5552 MY(read_dynamic_relocs)): New functions to read dynamic symbols
5553 and relocs.
5554 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
5555 dynamically linked, set SEC_RELOC for both the .text and .data
5556 sections.
5557 (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
5558 undefined symbol.
5559 (translate_symbol_table): New function, split out of
5560 slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
5561 (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
5562 (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
5563 (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
5564 return value.
5565 * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
5566 out dynamic symbols or relocs against reloc symbols, since they
5567 are already in the .text section and we wouldn't know where to
5568 write them anyhow.
5569 (sunos4_aout_backend): Initialize read_dynamic_symbols and
5570 read_dynamic_relocs fields.
5571 * aout-target.h (MY(backend_data)): Initialize
5572 read_dynamic_symbols and read_dynamic_relocs fields.
5573
5574 Thu Jan 20 20:57:27 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5575
5576 * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
5577 typedefs, since HOST_64_BIT will take care of defining them in
5578 bfd.h.
5579
5580 Wed Jan 19 17:28:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5581
5582 * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
5583 that's dealt with elsewhere.
5584 * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
5585 (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
5586 they get copied to bfd.h.
5587
5588 * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
5589 types. Reorganized some of the existing ones.
5590 * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
5591 values in case of compilation on a 32-bit machine. Fix pcrel
5592 fields of some reloc types.
5593 (alpha_bfd_reloc_type_lookup): Handle more relocation types.
5594
5595 * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
5596 definitions when not defined, regardless of whether uint64_type is
5597 a defined macro or not.
5598 (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
5599 already defined.
5600
5601 Wed Jan 19 00:02:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5602
5603 * aoutx.h (translate_to_native_sym_flags): Set the type of a
5604 BSF_WARNING symbol to N_WARNING.
5605
5606 Tue Jan 18 16:43:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5607
5608 * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
5609 for an indirect or warning symbol.
5610 (aout_link_write_symbols): Update sym_hash with the target of an
5611 indirect or warning symbol. If an indirect symbol is defined,
5612 output the calculated value and don't output the target symbol.
5613
5614 Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5615
5616 * aoutx.h (translate_from_native_sym_flags): Give warning symbols
5617 an (unused) nonzero section value, needed for check below.
5618
5619 Mon Jan 17 15:12:07 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5620
5621 * aoutx.h (translate_from_native_sym_flags,
5622 aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
5623 N_SET[ABDT].
5624
5625 Fri Jan 14 16:45:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5626
5627 * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
5628 the DYNAMIC flag for the BFD.
5629 (NAME(bfd_elf,write_object_contents)): Don't try to write out a
5630 BFD with the DYNAMIC flag set, since we don't generate the program
5631 header table correctly.
5632
5633 Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5634
5635 * elfcode.h (elf_slurp_symbol_table): Free x_symp at the end
5636 of the function to avoid storage leak.
5637
5638 Thu Jan 13 23:07:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5639
5640 * ecoff.c (ecoff_link_write_external): An ifd can be -1.
5641
5642 Thu Jan 13 12:33:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5643
5644 * som.c (som_set_reloc_info): Provide a default symbol for
5645 relocations which don't actually have an associated symbol.
5646
5647 * som.c (hppa_som_reloc): Add new "error message" argument.
5648
5649 Wed Jan 12 13:36:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5650
5651 Enable gdb to write to core files on more core file readers.
5652 * libbfd.c (bfd_generic_set_section_contents): Remove range check
5653 for section size, it is already done in bfd_set_section_contents
5654 with bfd_get_section_size_now.
5655 * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
5656 osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
5657 Use bfd_generic_set_section_contents instead of bfd_false.
5658
5659 Wed Jan 12 15:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5660
5661 * linker.c: Added initial documentation.
5662
5663 * linker.c (default_indirect_link_order): Don't expect space for
5664 output relocations if there aren't any input relocations.
5665
5666 Tue Jan 11 14:37:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5667
5668 * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
5669 file offsets.
5670
5671 * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
5672 STT_NOTYPE.
5673
5674 Tue Jan 11 09:10:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5675
5676 * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
5677 Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
5678
5679 Tue Jan 11 00:07:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5680
5681 * ecofflink.c: Extensive changes to compress and merge debugging
5682 information, and to write some of out directly rather than saving
5683 it in memory. Several new functions and structures, and new
5684 arguments to existing functions.
5685 * ecoff.c (ecoff_compute_reloc_file_positions): Compute
5686 sym_filepos as well.
5687 (ecoff_get_extr): Use ifdmap instead of ifdbase.
5688 (ecoff_write_object_contents): Don't compute sym_filepos here.
5689 Only output symbols if outsymbols is not NULL.
5690 (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
5691 bfd_ecoff_debug functions. Write out debugging information here.
5692 (ecoff_final_link_debug_accumulate): Adjust for changes in
5693 bfd_ecoff_debug functions.
5694 (ecoff_link_write_external): Use ifdmap rather than ifdbase.
5695 * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
5696 first, to put them in the first memory buffer. Clear fdr field.
5697 (mips_elf_get_extr): Use pointer to unswapped external symbol.
5698 (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
5699 Preserve .text, .data and .bss even if they are empty. Save
5700 pointer to unswapped external symbol rather than copying it.
5701 Don't free up the external symbols.
5702 * libelf.h (elf_symbol_type): Change mips_extr to PTR.
5703 * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
5704 (bfd_ecoff_debug_accumulate): Update declaration.
5705 (bfd_ecoff_debug_accumulate_other): Rename declaration from
5706 bfd_ecoff_debug_link_other and update.
5707 (bfd_ecoff_write_accumulated_debug): Declare.
5708 * bfd-in2.h: Rebuilt.
5709 * Makefile.in: Rebuilt dependencies.
5710
5711 Mon Jan 10 20:46:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5712
5713 * Makefile.in (install): Remove "@" which follows a backslash. In
5714 this position it just causes errors, not suppresses echoes.
5715
5716 Mon Jan 10 09:06:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5717
5718 * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
5719 field selectors.
5720
5721 Sun Jan 9 04:32:25 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
5722
5723 * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
5724
5725 Fri Jan 7 10:27:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
5726
5727 * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
5728 end of data if they are not contiguous.
5729
5730 * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
5731
5732 Fri Jan 7 15:40:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5733
5734 * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
5735 for .reginfo section here.
5736 (ecoff_new_section_hook): Set it here instead.
5737
5738 Fri Jan 7 10:29:27 1994 Stan Shebs (shebs@andros.cygnus.com)
5739
5740 * bfd-in.h: (bfd_boolean): Add workaround for systems that also
5741 define true and false as enums.
5742 (ALMOST_STDC): Add as alternative to __STDC__.
5743 * bfd-in2.h: Rebuilt.
5744 * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
5745
5746 Thu Jan 6 14:24:44 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5747
5748 * aoutx.h (translate_to_native_sym_flags): Catch the case where
5749 there is no output section.
5750
5751 Thu Jan 6 14:37:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5752
5753 * nlmcode.h (nlm_object_p): If we can't read the fixed header,
5754 count it as a wrong format error, not a system call error, since
5755 the object file might simply be too small.
5756
5757 * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
5758 BFD64.
5759 * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
5760 (BFD64_BACKENDS): Add nlm32-alpha.o. It depends on 64 bit
5761 support, even though it is for an Alpha in 32 bit mode.
5762 * configure.in (nlm32_alpha_vec): Set target64 to true.
5763
5764 * nlm32-gen.c, nlm64-gen.c: Removed. All nlm targets are
5765 different, so there is no point to providing a generic one.
5766 * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
5767 in the backend accessor macros; that should no longer be possible.
5768 * targets.c (target_vector): Removed nlm32_big_generic_vec,
5769 nlm64_big_generic_vec, nlm64_little_generic_vec.
5770 * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
5771 nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
5772 * Makefile.in: Rebuilt dependencies, and
5773 (BFD32_BACKENDS): Removed nlm32-gen.o.
5774 (BFD64_BACKENDS): Removed nlm64-gen.o.
5775 (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
5776
5777 * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
5778
5779 * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
5780 bitsize arguments. Changed all callers (aoutx.h).
5781 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
5782 and bitsize arguments to declaration.
5783 * libbfd.h: Rebuilt.
5784
5785 * ecoff.c: First cut at new style of linker backend for
5786 ECOFF--added a bunch of functions. Also:
5787 (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
5788 (ecoff_slurp_symbolic_header): New function.
5789 (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
5790 (ecoff_compute_reloc_file_positions): New function.
5791 (ecoff_set_section_contents): Get out quickly if count is zero.
5792 Check errors better.
5793 (ecoff_write_object_contents): Put .xdata section in data segment.
5794 Call ecoff_compute_reloc_file_positions. Don't output relocs or
5795 external symbols if outsymbols is NULL.
5796 (ecoff_bfd_final_link): Completely rewritten.
5797 * libecoff.h: Include bfdlink.h.
5798 (struct ecoff_backend_data): Add relocate_section field.
5799 (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
5800 (struct ecoff_link_hash_entry): Define.
5801 (struct ecoff_link_hash_table): Define.
5802 (ecoff_bfd_link_add_symbols): Declare as function, not macro.
5803 (ecoff_bfd_link_hash_table_create): Likewise.
5804 * ecofflink.c (bfd_ecoff_debug_one_external): New function.
5805 (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
5806 * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
5807 * bfd-in2.h: Rebuilt.
5808 * coff-alpha.c (alpha_howto_table): Mark BRADDR as
5809 partial_inplace, and set the src_mask to 0x1fffff.
5810 (alpha_ecoff_get_relocated_section_contents): Remove unused
5811 variable gp_warned.
5812 (alpha_convert_external_reloc): New static function.
5813 (alpha_relocate_section): New static function.
5814 (alpha_ecoff_backend_data): Initialize relocate_section field.
5815 * coff-mips.c (mips_relocate_refhi): New static function.
5816 (mips_relocate_section): New static function.
5817 (mips_ecoff_backend_data): Initialize relocate_section field.
5818
5819 * reloc.c (_bfd_relocate_contents): Corrected signed overflow
5820 checking when there is an addend.
5821
5822 * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
5823 a non a.out file, just pass it to _bfd_default_link_order.
5824 (aout_link_input_section_std): When doing a final PC relative link
5825 against a section symbol, subtract the VMA of the input section.
5826 (aout_link_input_section_ext): Likewise.
5827
5828 * linker.c (default_indirect_link_order): Renamed from
5829 _bfd_generic_indirect_link_order and made static.
5830 (_bfd_generic_final_link): Don't switch on link_order type, just
5831 call _bfd_default_link_order.
5832 (_bfd_default_link_order): Handle bfd_indirect_link_order type.
5833 * genlink.h: Removed declaration of
5834 _bfd_generic_indirect_link_order.
5835 * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
5836 type, just call _bfd_default_link_order.
5837
5838 Tue Jan 4 21:23:37 1994 Ian Lance Taylor (ian@cygnus.com)
5839
5840 * linker.c (generic_link_check_archive_element): Base the name of
5841 the created common section on the name of the section the symbol
5842 came from.
5843 (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
5844 must have a section, so don't bother to create one.
5845
5846 Mon Jan 3 15:32:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5847
5848 * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
5849 * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
5850 If the DYNAMIC flag is set, set it in the exec header.
5851 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
5852 dynamically linked, set the DYNAMIC flag in the BFD.
5853 * libaout.h (N_SET_DYNAMIC): New macro.
5854 (N_DYNAMIC): Add missing 0 in mask.
5855
5856 Mon Jan 3 11:41:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5857
5858 * ecoff.c (ecoff_get_extr): Don't output section symbols as
5859 external symbols.
5860
5861 * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
5862 to unsigned int, because size_t may not be defined in bfd.h.
5863 * bfd-in2.h: Rebuilt.
5864
5865 * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
5866 be a const pointer.
5867 * bfd-in2.h: Rebuilt.
5868 * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
5869 be a const pointer.
5870 * targets.c (bfd_target): Change swap function pointers
5871 accordingly.
5872 * archive.c (do_slurp_coff_armap): Change swap accordingly.
5873 * aix386-core.c: Change NO_GET and NO_GETS accordingly.
5874 * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
5875 ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
5876 accordingly.
5877
5878 * libbfd-in.h (struct artdata): Added tdata field.
5879 (_bfd_add_bfd_to_archive_cache): Declare.
5880 (_bfd_get_elt_at_filepos): Declare.
5881 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
5882 * libbfd.h: Rebuilt.
5883 * archive.c: Cleaned up some more.
5884 (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
5885 pointer elements of artdata.
5886 (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
5887 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
5888 (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
5889 (get_extended_arelt_filename, bfd_construct_extended_name_table,
5890 bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
5891 * ecoff.c: Some comment changes.
5892 (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set
5893 ardata->tdata to raw_armap.
5894 (ecoff_archive_p): Initialize pointer elements of artdata.
5895 * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
5896 add_bfd_to_cache.
5897
5898 * hash.c: Added some documentation.
5899
5900 Mon Jan 3 11:09:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5901
5902 * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
5903 and do the swapping here rather than calling ntohl from the N_*
5904 macros. This cleans up assumptions about the size of a host long,
5905 the existence to ntohl, etc.
5906
5907 Sat Jan 1 13:50:05 1994 Rob Savoye (rob@darkstar.cygnus.com)
5908
5909 * config.bfd: Add support for VSTa micro-kernel. It currently uses
5910 i386-aout.
5911
5912 Sat Jan 1 10:18:54 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5913
5914 * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
5915 * i386mach3.c (SEGMENT_SIZE): Fix value.
5916
5917 Fri Dec 31 16:23:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5918
5919 Minor cleanups suggested by CodeCenter.
5920 * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
5921 linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
5922 appropriate.
5923 * aoutx.h (struct external_exec): Removed unnecessary declaration.
5924 (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
5925 (adjust_z_magic): Removed useless variable data_vma.
5926 (stringtab_init): Initialize hash_zero.
5927 (add_to_stringtab): Removed unused fourth argument.
5928 (NAME(aout,swap_std_reloc_out)): Removed useless variable
5929 r_addend.
5930 (aout_link_input_section): Added some casts.
5931 * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
5932 bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
5933 Minor code rewriting to make it more C like.
5934 (do_slurp_bsd_armap): Added some casts.
5935 * ecoff.c (ecoff_write_object_contents): Removed useless variable
5936 scn_base.
5937 (ecoff_write_armap): Added some casts. Use "" rather than "\0".
5938 * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
5939 * libaout.h (struct internal_exec): Removed unnecessary
5940 declaration.
5941 * linker.c (_bfd_generic_indirect_link_order): Added a cast.
5942 * opncls.c (new_bfd): Removed a cast.
5943 * reloc.c (bfd_generic_get_relocated_section_contents): Added
5944 some casts.
5945 * srec.c (internal_srec_write_object_contents): Removed useless
5946 variable bytes_written.
5947
5948 Fri Dec 31 11:46:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
5949
5950 * i386mach3.c (N_TXTADDR): Don't define after all.
5951 (TEXT_START_ADDR): Don't include exec header size in value.
5952
5953 Thu Dec 30 15:47:54 1993 David J. Mackenzie (djm@thepub.cygnus.com)
5954
5955 * i386mach3.c (N_TXTADDR): Define.
5956
5957 Thu Dec 30 13:37:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5958
5959 Extensive changes to move the bulk of the linker into BFD so that
5960 more efficient backend code can be written for specific object
5961 files. Only existing efficient backend is a.out.
5962 * seclet.c, seclet.h: Removed.
5963 * hash.c, linker.c, genlink.h: New files.
5964 * bfd-in.h: Removed bfd_error_vector. Declared hash table
5965 structures and functions.
5966 (JUMP_TABLE): Removed bfd_seclet_link, added
5967 bfd_link_hash_table_create, bfd_link_add_symbols and
5968 bfd_final_link.
5969 * All backends: Changed accordingly.
5970 * bfd-in2.h: Rebuilt.
5971 * bfd.c (struct _bfd): Added link_next and archive_pass fields.
5972 Removed ld_symbols field.
5973 (bfd_nonrepresentable_section, bfd_undefined_symbol,
5974 bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
5975 bfd_error_vector): Removed.
5976 (bfd_default_error_trap, bfd_error_trap,
5977 bfd_error_nonrepresentabltrap): Removed.
5978 (bfd_get_relocated_section_contents): Pass link_info. Pass
5979 link_order instead of seclet. Pass symbols.
5980 (bfd_relax_section): Pass link_info.
5981 (bfd_seclet_link): Removed.
5982 (bfd_link_hash_table_create, bfd_link_add_symbols,
5983 bfd_final_link): New macros.
5984 * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
5985 alloca as __builtin_alloca. Declare internal linking functions.
5986 * libbfd.h: Rebuilt.
5987 * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
5988 for months.
5989 * reloc.c (reloc_howto_type): Added error_message argument to
5990 special_function field. Changed all callers and all definitions.
5991 (bfd_get_reloc_size): Make argument a const pointer.
5992 (bfd_perform_relocation): Add error_message argument to hold
5993 string set if return value if bfd_reloc_dangerous. Changed all
5994 callers.
5995 (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
5996 * section.c (asection): Renamed seclets_head and seclets_tail to
5997 link_order_head and link_order_tail.
5998 * targets.c (bfd_target): Replaced seclet argument with link_info
5999 and link_order and symbols arguments in
6000 bfd_get_relocated_section_contents. Added symbols argument to
6001 bfd_relax_section. Removed bfd_seclet_link. Added
6002 bfd_link_hash_table_create, bfd_link_add_symbols and
6003 bfd_final_link.
6004 * libaout.h (struct aoutdata): Added external_syms,
6005 external_sym_count, external_strings, sym_hashes fields.
6006 (obj_aout_external_syms, obj_aout_external_sym_count,
6007 obj_aout_external_strings, obj_aout_sym_hashes): New accessor
6008 macros.
6009 (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
6010 * aoutx.h: Wrote new back end linker routines.
6011 (translate_to_native_sym_flags): Return boolean value. Don't use
6012 bfd_error_vector.
6013 (NAME(aout,write_syms)): Return boolean value. Check return value
6014 of translate_to_native_sym_flags and bfd_write.
6015 * aout-target.h (final_link_callback): New function.
6016 (MY_bfd_final_link): New function.
6017 * aout-adobe.c (aout_adobe_write_object_contents): Check return
6018 value of aout_32_write_syms.
6019 * hp300hpux.c (MY(write_object_contents)): Likewise.
6020 * i386lynx.c (WRITE_HEADERS): Likewise.
6021 * libaout.h (WRITE_HEADERS): Likewise.
6022 * bout.c: Changed functions to use link_info->callbacks rather
6023 than bfd_error_vector, and link_orders rather than seclets.
6024 * coff-alpha.c: Likewise.
6025 * coff-h8300.c: Likewise.
6026 * coff-h8500.c: Likewise.
6027 * coff-sh.c: Likewise.
6028 * coff-z8k.c: Likewise.
6029 * elf32-hppa.c: Likewise.
6030 * reloc16.c: Likewise.
6031 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
6032 up _gp in the hash table rather than in outsymbols.
6033 * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
6034 argument rather than printing them.
6035 * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
6036 link_order arguments rather than seclet. Changed all uses and
6037 definitions.
6038 (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
6039 all uses and definitions.
6040 * libcoff.h: Rebuilt.
6041 * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
6042 not by ECOFF, make it scAbs.
6043 (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
6044 rewritten.
6045 * elf32-mips.c (mips_elf_final_link): Renamed from
6046 mips_elf_seclet_link and rewritten.
6047 * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
6048 field.
6049 (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
6050 hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
6051 Added link_info arguments. Changed all callers.
6052 * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
6053 not NULL.
6054 * oasys.c (oasys_write_sections): Return boolean value rather than
6055 using bfd_error_vector.
6056 (oasys_write_object_contents): Check return value of
6057 oasys_write_sections.
6058 * hosts/std-host.h: Don't declare qsort or strtol.
6059 * Makefile.in: Rebuild dependencies.
6060 (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
6061 (CFILES): Removed seclet.c. Added hash.c and linker.c.
6062 (HFILES): Removed seclet.h. Added genlink.h.
6063
6064 Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6065
6066 * section.c (bfd_get_section_contents): Return zero filled buffer
6067 if section has no contents.
6068
6069 Tue Dec 28 12:43:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6070
6071 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
6072 then skip bfd_perform_relocation even if the addend is non-zero.
6073
6074 Tue Dec 21 09:22:19 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
6075
6076 * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
6077 addend to r_offset field.
6078
6079 * Makefile.in (CFILES): Added coff-sparc.c. Rebuild dependencies.
6080
6081 * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
6082 CALC_ADDEND): Define.
6083
6084 * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
6085 the offsetof because AIX /bin/cc does not like to take the address
6086 of an array. (From Minh Tran-Le.)
6087
6088 Thu Dec 16 13:06:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6089
6090 * Thu Dec 16 15:41:06 1993 Peter Hoogenboom (hoogen@cs.utah.edu)
6091
6092 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
6093 the return pointer into %r2 if no jump-in-call-delay-slot
6094 optimization was done.
6095
6096 * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
6097
6098 Wed Dec 15 08:04:16 1993 David J. Mackenzie (djm@thepub.cygnus.com)
6099
6100 * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
6101
6102 * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
6103 (HOST_SEGMENT_SIZE): Set to 0 for same reason.
6104
6105 * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
6106 (TEXT_START_ADDR): Correct.
6107 (MY_backend_data): Define.
6108
6109 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
6110 New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
6111
6112 Tue Dec 14 21:48:33 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6113
6114 * som.c (som_begin_writing): Fix thinkos in auxiliary header
6115 support.
6116 (bfd_som_attach_aux_hdr): Likewise.
6117
6118 Mon Dec 13 23:34:48 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6119
6120 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
6121 selectors for PIC code.
6122
6123 * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
6124 (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
6125 relocations needed by PIC.
6126
6127 Tue Dec 7 15:47:51 1993 Stu Grossman (grossman at cygnus.com)
6128
6129 * nlmcode.h: Fixes to avoid compiler warnings...
6130
6131 Tue Dec 7 15:10:54 1993 Ian Lance Taylor (ian@cygnus.com)
6132
6133 * libnlm.h (nlm_backend_data): Removed macro definition.
6134 (nlm_alpha_backend_data): Adjusted accordingly.
6135
6136 Sun Dec 5 19:32:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6137
6138 * som.c (som_begin_writing): Flesh out code for handling simple
6139 auxiliary headers.
6140 (bfd_som_attach_aux_hdr): New function.
6141
6142 * som.h (struct somdata): Add fields for attaching version and
6143 copyright headers. Add accessor macros.
6144
6145 * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
6146 definitions for old versions of HPUX which fail to define them.
6147 (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
6148 now that they're safe. Delete bogus R_STATEMENT relocations.
6149
6150 * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
6151 extra R_DATA_OVERRIDE.
6152 (hppa_som_gen_reloc_type): Generate a relocation for the rounding
6153 mode selector if needed.
6154 (som_write_fixups): Handle requests for a change in the default
6155 rounding mode. Rounding modes do not consume input bytes, but
6156 are just markers much like R_ENTRY and R_EXIT.
6157
6158 Sat Dec 4 19:40:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6159
6160 Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
6161
6162 * elf32-hppa.c: (hppa_elf_reloc): Do not do code reordering when
6163 the branch instruction as originally been nullified.
6164 hppa_elf_reloc): Avoid useless call to bfd_put_32 () in the
6165 case of no code reordering due to an LDO instruction in the
6166 delay slot of the branch. Make sure to relocate the correct
6167 instruction. Do not perform instruction reordering for millicode
6168 calls.
6169 (hppa_elf_build_arg_reloc_stub): Change the relocation type
6170 to R_HPPA_STUB_CALL_17 when special processing might be needed.
6171 (hppa_elf_build_long_branch_stub): Prevent code reordering on
6172 a call from a linker stub to another linker stub and for millicode
6173 calls. Do not trash the return register for calls from one linker
6174 stub to a second linker stub.
6175
6176 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
6177 relocations are not pc-relative.
6178
6179 * hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in
6180 linker stub code.
6181 (COPY_2_31): Likewise.
6182
6183 Fri Dec 3 18:40:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6184
6185 * config/solaris2.mh (HDEFINES): Remove -Dconst=
6186 * hosts/solaris.h: If not __GNUC__, define const as empty.
6187
6188 Thu Dec 2 15:43:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6189
6190 * ecoff.c: Added various casts for 32/64 bit cross targeting.
6191 (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
6192 section so that the linker ignores it.
6193 * ecofflink.c: Added various casts for 32/64 bit cross targeting.
6194 (ecoff_add_bytes): Changed need argument to size_t.
6195 (bfd_ecoff_debug_link_other): Check return value of
6196 ecoff_add_string.
6197
6198 * libbfd-in.h (new_bfd): Use void rather than an empty parameter
6199 list.
6200 * libbfd.h: Rebuilt.
6201
6202 * libnlm.h (struct nlm_obj_tdata): New field backend_data.
6203 (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
6204 (struct nlm_backend_data): New field no_uninitialized_data.
6205 (nlm_no_uninitialized_data): New accessor macro.
6206 * nlmcode.h (nlm_compute_section_file_positions): Handle
6207 no_uninitialized_data.
6208 (nlm_external_reloc_compare): Sort relocs by address for a
6209 particular symbol, to make the sort more stable.
6210 (nlm_write_object_contents): Cast the arguments to qsort. Get the
6211 value of a debugging symbol the same way we get the value of a
6212 normal symbol.
6213 * nlm32-alpha.c: Various changes. Write out GP and .lita relocs.
6214 Set no_uninitialized_data to true.
6215 * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
6216 (nlm32_sparc_backend): Set no_uninitialized_data field false.
6217 * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
6218 before filling it in.
6219
6220 Wed Dec 1 21:47:58 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6221
6222 * som.c (som_section_type, som_decode_symcalss): New functions.
6223 (som_get_symbol_info): Use them.
6224 (som_slurp_symbol_table): Set the section of common and undefined
6225 symbols correctly.
6226
6227 Wed Dec 1 14:15:10 1993 Ken Raeburn (raeburn@cygnus.com)
6228
6229 * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
6230 make gcc happy.
6231
6232 * mipsbsd.c: Changes from Ralph Campbell:
6233 (mips_howto_table_ext): MIPS_RELOC_LO16 should use
6234 complain_overflow_dont.
6235 (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
6236 make gdb happy.
6237
6238 * bfd.c (bfd_errmsgs): Reword invalid-target message.
6239
6240 * config.bfd: For sparc*-*-coff, use sparc-coff.
6241 * configure.in: Handle sparccoff_vec.
6242 * targets.c (sparccoff_vec): Declare.
6243
6244 * reloc.c (bfd_get_reloc_size): New function.
6245 (struct reloc_howto_type): Update documentation of size field.
6246
6247 Wed Dec 1 14:39:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6248
6249 * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
6250 * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
6251 * config/alpha-nlm.mt: New file.
6252 * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
6253 nlm32.o, and nlm.o.
6254 * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
6255 (CFILES): Added nlm32-alpha.c.
6256 Rebuilt dependencies.
6257 * targets.c (nlm32_alpha_vec): Declare.
6258
6259 * libnlm.h (struct nlm_backend_data): New fields
6260 optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
6261 nlm_set_public_section, nlm_get_public_offset. Removed unused
6262 nlm_write_reloc field. Changed nlm_write_import to remove
6263 unnecessary symbol argument. Renamed nlm_write_externals to
6264 nlm_write_external, and changed cound argument from bfd_vma to
6265 bfd_size_type.
6266 (nlm_optional_prefix_size, nlm_backend_object_p_func,
6267 nlm_write_prefix_func, nlm_set_public_section_func,
6268 nlm_get_public_offset_func): New accessor macros.
6269 (nlm_write_reloc_func): Removed.
6270 (nlm_write_external_func): Adjusted for field renaming.
6271 * nlm32-i386.c (nlm_i386_write_import): Renamed from
6272 nlm_i386_write_reloc. Removed old nlm_i386_write_import which
6273 just called old nlm_i386_write_reloc.
6274 (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
6275 Declared. Changed second argument from bfd_vma to bfd_size_type.
6276 (nlm32_i386_backend): Adjusted for changes to fields and names.
6277 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
6278 ifdeffed out code.
6279 (nlm_sparc_write_import): Removed second argument.
6280 (nlm_sparc_write_external): Renamed from
6281 nlm_sparc_write_externals. Changed second argument from bfd_vma
6282 to bfd_size_type.
6283 (nlm32_sparc_backend): Adjusted for changes to fields and names.
6284 * nlmcode.h: Removed some unused code.
6285 (nlm_object_p): Don't destroy tdata pointer. Call
6286 backend_object_p function if it exists.
6287 (nlm_slurp_symbol_table): Removed unused variable rcount. Call
6288 set_public_section_func if it exists instead of checking
6289 NLM_HIBIT.
6290 (nlm_compute_section_file_positions): Account for
6291 optional_prefix_size.
6292 (nlm_write_object_contents): Account for optional_prefix_size.
6293 Removed useless variable write_reloc_func. Changed declaration
6294 and call of write_import_func. Call write_prefix_func if it
6295 exists. Removed unused variables len and temp. Call
6296 get_public_offset_func if it exists rather than setting NLM_HIBIT.
6297 * nlmswap.h: Declare functions.
6298
6299 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
6300 for clarity.
6301 (fprintf_vma, sprintf_vma): Use %lx, not %x.
6302 * bfd-in2.h: Rebuilt.
6303 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
6304 to unsigned long.
6305
6306 * config.bfd: Don't set target64 here, as the setting is ignored.
6307 * configure.in (ecoffalpha_little_vec): Set target64.
6308
6309 * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
6310 in TDEFINES is wrong.
6311
6312 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
6313 Remove unused variable output_section.
6314
6315 Tue Nov 30 16:45:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6316
6317 * irix-core.c: New file for Irix 4 and Irix 5 core support.
6318 Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
6319 * coff-mips.c: Irix 4 core file support moved to irix-core.c.
6320 * targets.c: If IRIX_CORE defined, include irix_core_vec in
6321 target_vector.
6322 * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
6323 (HDEPFILES): Define to be irix-core.o.
6324 * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
6325 (HDEPFILES): Define to be irix-core.o.
6326 * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
6327 sco-core.o, which no longer exists.
6328 (CFILES): Added all *-core.c files.
6329 Rebuilt dependencies.
6330
6331 Wed Nov 24 02:02:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6332
6333 * elfcode.h (map_program_segments): Restore check of file_size !=
6334 mem_size, but only if SHT_PROGBITS.
6335
6336 * ecofflink.c: New file to hold ECOFF debug information linking
6337 routines.
6338 * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
6339 ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
6340 ecofflink.c.
6341 (ecoff_get_extr, ecoff_set_index): New functions.
6342 (ecoff_slurp_symbolic_info): Don't save raw_size.
6343 (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
6344 (ecoff_compute_section_file_positions): Don't set EXEC_P just
6345 because there is a start address.
6346 (ecoff_write_object_contents): Handle external symbols here. Use
6347 ecofflink.c functions to write out debugging information.
6348 * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
6349 mips_elf_set_index): New functions.
6350 (mips_elf_seclet_link): Discard empty sections, the .options
6351 section and .gptab sections. Handle linking .mdebug section.
6352 * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
6353 * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
6354 * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
6355 called by gas, so they are public).
6356 * bfd-in2.h: Rebuilt.
6357 * Makefile.in (BFD_LIBS): Added ecofflink.o.
6358 (CFILES): Added ecofflink.c.
6359 (ecofflink.o): New target. Rebuilt dependencies.
6360
6361 Mon Nov 22 22:26:42 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6362
6363 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
6364 a valid magic number if it's been defined.
6365
6366 Mon Nov 22 14:17:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6367
6368 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
6369 no longer requires it.
6370 (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
6371 ecoff_write_object_contents): Don't treat .scommon section
6372 specially.
6373
6374 Mon Nov 22 10:54:27 1993 Fred Fish (fnf@cygnus.com)
6375
6376 Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
6377 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
6378 * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
6379 * bfd/ptrace-core.c: New file for dealing with core files with
6380 start with the ptrace_user structure found on BCS compliant systems.
6381 * bfd/targets.c (ptrace_core_vec): New vector.
6382
6383 Mon Nov 22 02:33:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6384
6385 * Minimal support for reading SOM fixup streams. Allows
6386 objdump -r to do something reasonable.
6387 * som.c (som_get_reloc_upper_bound): Implement.
6388 (som_canonicalize_reloc): Implement.
6389 (som_set_reloc_info, som_slurp_reloc_table): New functions.
6390
6391 Sun Nov 21 13:46:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
6392
6393 * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
6394 * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
6395
6396 Fri Nov 19 14:34:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6397
6398 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
6399 signed_value before sign extending it. Don't subtract out
6400 reloc_entry->address. This makes it compatible with what gas is
6401 generating.
6402
6403 * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
6404 SHT_NOBITS sections.
6405 (map_program_segments): Don't leave the loop after the first
6406 SHT_NOBITS section.
6407 (assign_file_positions_except_relocs): Only force sh_offset and
6408 sh_addr to match modulo maxpagesize for a section which is not
6409 SHT_NOBITS. Changed the method used to force page alignment after
6410 a SHT_NOBITS section to only do it for the last such consecutive
6411 section, and to really force page alignment.
6412
6413 Fri Nov 19 04:02:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
6414
6415 * coffcode.h (coff_slurp_symbol_table): Print more verbose message
6416 in the case of an unknown (or unhandled) storage class.
6417
6418 * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
6419 not be defined here, since it is a host attribute, not a target
6420 one.
6421 * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
6422
6423 * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
6424 defined.
6425
6426 * coff-sparc.c: Define some relocations, based on ELF relocations.
6427 (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
6428 struct coff_reloc_map, sparc_reloc_map,
6429 coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
6430 elf.c, renamed.
6431 (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
6432 (rtype2howto): Index into coff_sparc_howto_table using
6433 dst->r_type.
6434
6435 Thu Nov 18 11:45:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6436
6437 * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
6438 * configure.host (mips-sgi-irix5*) New host; use irix5 (no
6439 hosts/irix5.h created; just use std-host.h).
6440 * config/irix5.mh: New file; like irix4.mh, but don't use -G or
6441 -lmalloc.
6442 * Makefile.in: Rebuilt dependencies.
6443
6444 * ecoffswap.h: Changed type of internal pointers for swap out
6445 functions to const *.
6446
6447 * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
6448 correctly for assembler, but linker support not implemented.
6449 (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
6450 (mips_elf_sym_is_global): New function; at least on Irix 5, all
6451 non section symbols are considered global.
6452 (elf_backend_sym_is_global): Define.
6453 (mips_elf_final_write_processing): New function. Set the MIPS
6454 architecture level correctly.
6455 (elf_backend_final_write_processing): Define.
6456 (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
6457 (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
6458 section to 1. Handle .options section.
6459 (mips_elf_acom_section, mips_elf_acom_symbol,
6460 mips_elf_acom_symbol_ptr): New static variables, used to build a
6461 generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
6462 (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
6463 putting them all in a global .acommon section.
6464
6465 * elfcode.h (bfd_section_from_shdr): Don't dump core if target
6466 section has no ELF section data.
6467 (elf_make_sections): Set addralign of reloc section to 4.
6468 (elf_fake_sections): Likewise.
6469 (map_program_segments): Don't consider section 0.
6470 (assign_file_positions_except_relocs): Don't consider section 0.
6471 In the main loop, skip the symtab and strtab sections, since their
6472 positions are set elsewhere.
6473 (swap_out_syms): Set addralign of symtab section to 4. Set
6474 addralign of strtab sections to 1.
6475 (assign_file_positions_for_relocs): Don't consider section 0.
6476 (write_object_contents): Don't write out section 0.
6477
6478 * libelf.h (struct elf_backend_data): Added fields
6479 elf_backend_sym_is_global and elf_backend_final_write_processing.
6480 * elf32-target.h (elf32_bed): Added corresponding initializers.
6481 * elf64-target.h (elf64_bed): Likewise.
6482 * elfcode.h (sym_is_global): Take abfd argument. Call
6483 elf_backend_sym_is_global if it is not NULL.
6484 (elf_map_symbols): Pass abfd to sym_is_global.
6485 (write_object_contents): Call elf_backend_final_write_processing
6486 if it is defined.
6487
6488 Wed Nov 17 18:43:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6489
6490 * libecoff.h: Include coff/ecoff.h.
6491 (struct ecoff_backend_data): Move external debugging information
6492 fields into a single field pointing to an ecoff_debug_swap
6493 structure.
6494 (ecoff_data_type): Move debugging information fields into a single
6495 field pointing to an ecoff_debug_info structure.
6496 * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
6497
6498 Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
6499
6500 * nlmswap.h: New file to swap fixed header. Included by NLM
6501 backends.
6502 * libnlm.h (struct reloc_and_sec): Define.
6503 (struct nlm_backend_data): Add fields fixed_header_size,
6504 nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
6505 nlm_swap_fhdr_out.
6506 (nlm_fixed_header_size, nlm_read_import_func,
6507 nlm_write_import_func, nlm_swap_fixed_header_in_func,
6508 nlm_swap_fixed_header_out_func, nlm_write_external_func): New
6509 accessor macros.
6510 * nlmcode.h: Use new functions.
6511 * nlm32-i386.c: Provide new functions.
6512 * nlm32-sparc.c: New file; SPARC NLM backend.
6513
6514 Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
6515
6516 * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
6517 garbage bits appearing in the upper end of symbolnums.
6518
6519 * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
6520
6521 Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
6522
6523 * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
6524 * m68klynx.c: Define core file macros.
6525 * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
6526 non-architecture specific stuff into lynx.h.
6527
6528 Tue Nov 16 15:45:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
6529
6530 * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
6531 change PAGE_SIZE to 4096.
6532
6533 Mon Nov 15 11:48:08 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
6534
6535 * Makefile.in (diststuff): New target.
6536
6537 * VERSION: Updated.
6538
6539 Sun Nov 14 23:33:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6540
6541 * som.c (som_object_setup): Do not create dummy ".text", ".data",
6542 and ".bss" sections.
6543 (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
6544 is zero. Recognize BSS type sections and turn off SEC_LOAD and
6545 SEC_DATA (so binutils/size works). Set the correct value for
6546 a section's _raw_size.
6547 (som_slurp_symbol_table): Program entry points, and millicode are
6548 also functions. Mark them as such. Also mark L$* symbols as
6549 debugging symbols.
6550
6551 * bfd-in2.h: Rebuilt.
6552
6553 Sat Nov 13 15:27:15 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6554
6555 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
6556 a pointer to constant data. Delete bogus #define which made the
6557 function useless.
6558
6559 * som.c (som_prep_for_fixups): New function.
6560 (som_write_fixups): New function.
6561 (som_write_space_strings): New function.
6562 (som_write_symbol_strings): New function.
6563 (som_begin_writing): New function.
6564
6565 Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6566
6567 * som.c (som_write_object_contents): Do not abort. Flesh out.
6568 (som_set_section_contents): Do not abort. Flesh out.
6569
6570 * som.c (som_write_headers): New function.
6571 (som_prep_headers): New function.
6572 (som_build_and_write_symbol_table): New function.
6573
6574 * som.c (som_sizeof_headers): Add missing prototype.
6575 (som_set_arch_mach): Do not abort.
6576
6577 * som.c (som_count_spaces): New function.
6578 (som_count_subspaces): New function.
6579 (compare_syms): New function.
6580 (som_compute_checksum): New function.
6581
6582 * som.c (hppa_som_gen_reloc_type): New function.
6583 (som_bfd_reloc_type_lookup): New function.
6584
6585 * som.c (try_prev_fixup): New function.
6586 (som_reloc_skip): New function.
6587 (som_reloc_addend): New function.
6588 (som_reloc_call): New function.
6589
6590 * som.c (som_initialize_reloc_queue): New function.
6591 (som_reloc_queue_insert): Likewise.
6592 (som_reloc_queue_fix): Likewise.
6593 (som_reloc_queue_find): Likewise.
6594
6595 * som.c (som_hppa_howto_table): SOM howto relocation table.
6596 (hppa_som_reloc): New function.
6597
6598 * som.c (struct reloc_queue): New structure to keep track of
6599 the last four multibyte relocations emitted.
6600 (enum pa_symbol_type): Type to fully describe the symbol types
6601 associated with .import/.export assembler directives.
6602
6603 * som.c: Include libhppa.h
6604
6605 * som.c (bfd_som_set_section_attributes): New function.
6606 (bfd_som_set_subsection_attributes): Likewise.
6607 (bfd_som_set_symboL_type): Likewise.
6608 (bfd_som_attach_unwind_info): Likewise.
6609 * som.h: Declare new exported functions.
6610
6611 * som.h (struct som_symbol): Add new fields to hold additional
6612 information needed to build/write symbol tables and fixup streams.
6613 (struct som_section_data_struct): Add new fields to hold additional
6614 information needed to build/write space and subspace headers.
6615 (som_symbol_data): New accessor macro for SOM symbol information.
6616 (R_HPPA_*): Basic relocation types to be used by the assembler.
6617
6618 Fri Nov 12 11:00:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
6619
6620 * trad-core.c (trad_unix_core_file_p): If new hook
6621 TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
6622 corefile being too big.
6623 * hosts/i386sco.h: Define it.
6624
6625 Thu Nov 11 15:16:28 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6626
6627 * bfd.c (struct _bfd): Add hppabsd_core_data.
6628 * targets.c (target_vector): Add hppabsd_core_vec.
6629 * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
6630 section is encountered during core section scanning.
6631 * hppabsd-core.c: New file.
6632 * config/hppabsd.mh: Enable HPPA BSD core files.
6633
6634 * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
6635 which is either commented out or ifdef'd out. Add, update and
6636 clean comments. Fix various indention and spacing problems. Handle
6637 problems related to using "ble" to jump to a stub rather than "bl"
6638 (%r31 is trashed by "ble", but not by "bl").
6639 (NEW_INSTRUCTION): Put inside curly braces.
6640 (CURRENT_STUB_OFFSET): Fix indention problems.
6641 (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
6642 Add, update and clean comments. Handle "ble" %r31 lossage problems.
6643 (hppa_elf_build_long_branch_stub): Likewise.
6644 (hppa_look_for_stubs_in_section): Likewise.
6645 (hppa_elf_stub_check): Remove obsolete function.
6646
6647 * hppa_stubs.h: Add new instructions to deal with %r31 lossage
6648 problems. Delete unused instructions.
6649
6650 Tue Nov 9 11:40:27 1993 Stan Shebs (shebs@rtl.cygnus.com)
6651
6652 * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
6653
6654 Tue Nov 9 11:26:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6655
6656 * elfcode.h (elf_object_p): Rather than looking through an array
6657 of architectures, get the ELF EM_xxx code from the backend
6658 information. Let the generic ELF target match any EM_xxx code not
6659 matched by another ELF target. Call elf_backend_object_p to let
6660 the backend do more checks and set global information.
6661 * libelf.h (struct elf_backend_data): Added elf_machine_code and
6662 elf_backend_object_p fields.
6663 (struct bfd_elf_arch_map): Removed.
6664 (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
6665 * elf32-target.h, elf64-target.h: Initialize elf_machine_code
6666 field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
6667 field with elf_backend_object_p (if it is defined).
6668 * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
6669 elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
6670 elf64-gen.c (ELF_MACHINE_CODE): Defined.
6671 * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
6672 routines.
6673 (mips_elf_object_p): Set the right machine number.
6674 (mips_elf_ecoff_debug_swap): Defined.
6675 (elf_backend_object_p): Defined to be mips_elf_object_p.
6676 (elf_backend_ecoff_debug_swap): Defined to be
6677 mips_elf_ecoff_debug_swap.
6678 * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
6679
6680 * libbfd-in.h (target_vector, default_vector): Declare.
6681 * libbfd.h: Rebuilt.
6682 * format.c (target_vector, default_vector): Don't declare.
6683
6684 * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
6685 for R_MIPS_26. Correct overflow detection requires matching the
6686 upper four bits of the destination against the PC. From Ted Lemon
6687 <mellon@pepper.ncd.com>.
6688
6689 * bout.c (b_out_reloc_type_lookup): Return type should point to
6690 const data.
6691 * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
6692 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
6693 * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
6694 * coff-i386.c (coff_i386_reloc): Made howto const.
6695 * oasys.c (oasys_write_data): Made how const.
6696
6697 * libelf.h: Added some comments.
6698 (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
6699 field. Removed unused write_relocs field.
6700 * elf32-target.h: Adjusted elf_backend_data initialization
6701 accordingly.
6702 * elf64-target.h: Corrected elf_backend_data initialization to
6703 fill in all fields and to set elf_64_p to 1.
6704
6705 Mon Nov 8 18:13:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6706
6707 * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
6708 to filepos in SHT_STRTAB case.
6709 (assign_file_position_for_section): Set BFD section filepos as
6710 well as ELF section sh_offset.
6711
6712 * reloc.c: Use const instead of CONST.
6713 (bfd_perform_relocation): Make variable howto a const pointer.
6714 * bfd-in2.h, libbfd.h: Rebuilt.
6715
6716 Mon Nov 8 12:19:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
6717
6718 * Makefile.in (realclean): Don't remove generated headers. Reverts
6719 change of 2 Jul 1993.
6720
6721 Mon Nov 8 06:08:31 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
6722
6723 * configure.bfd: make unixware equivalent to sysv4.
6724
6725 * config/i386-nlm.mt: bring in elf config; make it the default.
6726
6727 Sun Nov 7 20:21:38 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6728
6729 * libbfd.c (bfd_put_8): Add parens around reference to "val"
6730 argument.
6731
6732 Fri Nov 5 21:45:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
6733
6734 * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
6735 i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
6736
6737 Fri Nov 5 15:17:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6738
6739 * coffcode.h (coff_write_object_contents): Zero out internal_a.
6740
6741 Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com)
6742
6743 * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
6744 core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
6745 section.c, syms.c, targets.c:
6746 Doc cleanup (spelling, punctuation, grammar, formatting).
6747 * bfd-in2.h, libbfd.h: Rebuild.
6748
6749 Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com)
6750
6751 * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
6752 * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
6753
6754 Thu Nov 4 08:54:30 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
6755
6756 * From Pete Hoogenboom (hoogen@cs.utah.edu)
6757 * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
6758 in last change. Always rebuild symbol extension section the first
6759 time though if output sections exist (fixes ld -r problems).
6760
6761 Thu Nov 04 08:08:46 1993 Jeffrey Wheat (cassidy@cygnus.com)
6762
6763 * Makefile.in: Add .PHONY for check and installcheck rules.
6764
6765 Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
6766
6767 * libbfd-in.h (artdata): Use long, not time_t for portability, at
6768 least to HPUX. File below is a derived file.
6769
6770 Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
6771
6772 * libbfd.h (artdata): Use long, not time_t for portability, at
6773 least to HPUX.
6774
6775 Tue Nov 2 09:32:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
6776
6777 * config.bfd: Use bigmips for mips*-*-bsd*.
6778
6779 Mon Nov 1 14:30:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6780
6781 * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
6782 Handle symbol number of zero.
6783
6784 * reloc.c (enum bfd_reloc_code_real): Added
6785 BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
6786 BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
6787 * bfd-in2.h: Rebuilt.
6788 * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
6789 BFD_RELOC_MIPS_LITERAL.
6790 * elf32-mips.c (mips_reloc_map): Handle new relocs.
6791 (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
6792 checks slightly.
6793
6794 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
6795 MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
6796 (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
6797 MY_bfd_seclet_link): Define.
6798 (MY_bfd_reloc_type_lookup): Rename from
6799 MY_reloc_howto_type_lookup.
6800 (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
6801 (MY(vec)): Use JUMP_TABLE rather than listing functions.
6802 * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
6803 MY_canonicalize_reloc, MY_write_object_contents): Don't define in
6804 terms of MY, because that causes a recusive invocation of CAT when
6805 expanded within JUMP_TABLE, and ANSI compilers don't expand
6806 recursive macros.
6807 * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
6808 MY_reloc_howto_type_lookup, and don't define in terms of MY.
6809 (MY_canonicalize_reloc): Don't define in terms of MY.
6810 (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
6811 than listing functions.
6812
6813 Mon Nov 1 09:12:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
6814
6815 * config.bfd: Use m68k-elf for m68*-*-sysv4*.
6816
6817 See file ChangeLog.1
6818
6819 \f
6820 Local Variables:
6821 mode: indented-text
6822 left-margin: 8
6823 fill-column: 74
6824 version-control: never
6825 End:
This page took 0.181207 seconds and 4 git commands to generate.