Support for link_order types which generate relocs in order to
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 Mon Mar 21 12:28:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2
3 Support for link_order types which generate relocs in order to
4 support -Ur in the linker.
5 * linker.c (generic_link_add_symbol_list): Remove bitsize argument
6 from call to _bfd_generic_link_add_one_symbol.
7 (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
8 Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR
9 instead of bitsize to add_to_set call back.
10 (_bfd_generic_final_link): Account for link_order relocs when
11 allocating space for relocations. Handle them in link_order loop.
12 (_bfd_generic_reloc_link_order): New function.
13 (_bfd_default_link_order): If a reloc_link_order is seen here,
14 abort.
15 (_bfd_count_link_order_relocs): New function.
16 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
17 argument from declaration.
18 (_bfd_generic_reloc_link_order): Declare.
19 (_bfd_count_link_order_relocs): Declare.
20 * libbfd.h: Rebuilt.
21 * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
22 call to _bfd_generic_link_add_one_symbol.
23 (NAME(aout,final_link)): Account for link_order relocs when
24 allocating space for relocations. Handle them after handling all
25 input BFDs.
26 (aout_link_reloc_link_order): New function.
27 * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
28 call to _bfd_generic_link_add_one_symbol.
29 (ecoff_bfd_final_link): Account for link_order relocs when
30 allocating space for relocations. Handle them in link_order loop.
31 (ecoff_link_write_external): Set the storage class of a defined
32 linker created symbol based on the section it is in. Correct
33 bfd_link_hash_weak case to use .sc rather than .st.
34 (ecoff_reloc_link_order): New function.
35 * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
36 BFD_RELOC_CTOR.
37 * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
38
39 * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
40 and buf.
41
42 * cisco-core.c (cisco_core_file_p): Only pass one argument to
43 bfd_zmalloc. Free a pointer, not a union.
44 (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
45
46 Sun Mar 20 09:24:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
47
48 * bfd/som.c (som_begin_writing): Fix thinko (off by one error).
49
50 * som.c (bfd_section_from_som_symbol): Only to do the value
51 comparison for function symbols within executables.
52
53 * som.c (bfd_section_from_som_symbol): Renamed from
54 som_section_from_subspace_index. Pass in a native SOM symbol.
55 For executables, iterate through the sections to find out
56 which contains the symbol's address rather than using the
57 symbol_info field. (symbol_info has a different meaning for
58 dynamicly linked executables.)
59
60 * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
61 bfd_zmalloc.
62
63 * som.c (som_begin_writing): Fix braino (one call to align
64 space/subspace data was done unconditionally rather than
65 just for executables.)
66
67 * som.c (som_begin_writing): Align text in all executables to
68 make HPUX kernel happy. Fixes strip/objcopy for shared
69 executables.
70
71 Sat Mar 19 07:06:59 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
72
73 * som.c (som_begin_writing): Account for alignment needs of
74 subspaces too when writing executables. Never request a negative
75 bss size. Fixes some problems with demand paged executables,
76 still having problems with pure executables and shared executables.
77
78 Fri Mar 18 19:12:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
79
80 * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
81 bfd_zalloc for rawptr, because later on we may call free, not
82 bfd_release, on it.
83
84 * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
85 * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
86 * cisco-core.c: New file.
87 * Makefile.in: Change accordingly.
88 * configure.in: Recognize cisco_core_vec.
89 * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
90 * targets.c: Add cisco_core_vec.
91 * bfd-in2.h: Rebuilt.
92
93 Fri Mar 18 18:13:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
94
95 * som.h (som_copyable_section_data_struct): New structure
96 containing all the private section information which needs
97 to be copied from input section to output section during
98 objcopy or strip.
99 (som_section_data_struct): Remove several fields now in
100 som_copyable_section_data_struct. Make the space and
101 subspace dictionaries be pointers (to save space when
102 only reading objects).
103
104 * som.c (bfd_som_set_section_attributes): Now returns a boolean;
105 some references changed. Allocate a copyable data stucture if
106 none exists. Store info into the copyable data structure.
107 (bfd_som_set_subsection_attributes): Likewise.
108 (som_is_space, som_is_subspace, som_is_container): New functions.
109 Use these instead of directly accessing private data.
110 (som_prep_headers): Allocate space and subspace headers here.
111 Fill in some fields in the space/subspace headers from the
112 copyable data.
113 (som_bfd_copy_private_section_data): Only copy the stuff
114 that we really need to make objcopy and strip work. Allocate
115 the copy_data structure for the output bfd before copying.
116
117 * som.h (struct som_exec_data): New structure to hold exec
118 info that must be preserved when running objcopy/strip.
119 (struct somdata): Add new "exec_data" field and accessor
120 macro. Add some comments on how the various fields are used.
121 (som_section_data_struct): Make is_space and is_subspace bitfields.
122 Delete unused subspace_index. All references now use the
123 target_index field within the section structure itself.
124
125 * som.c (make_unique_section): Delete unused declaration.
126 (som_bfd_copy_private_bfd_data): New function.
127 (som_object_setup): Allocate space for and save exec information
128 that needs to be copied during objcopy/strip.
129 (som_mkobject): Do not allocate space for a file header here.
130 It is not used when only reading SOM objects.
131 (som_prep_headers): Allocate space for and attach a file header
132 to the output bfd. For executables, use the saved system_id
133 value rather than trying to guess the right value. Do not abort
134 wwhen setting file_hdr->entry* for executables.
135 (som_begin_writing): For executables, set the exec_entry and
136 exec_flags fields.
137 (som_copy_private_backend_section_data): Always return a value.
138
139 * libhppa.h (PA_PAGESIZE): Define.
140
141 * som.c (SOM_ALIGN): Define.
142 (som_begin_writing): If writing an executable, initialize all
143 fields in the exec header to zero. Update fields in the exec
144 header as sizes of loadable subspaces are computed. Carefully
145 preserve alignments when building executables. Actually write the
146 exec after all the fields are filled in.
147
148 * Better long-filename handling. Reads SOM ABI compliant extended
149 names, but doesn't quite write compliant extended names yet.
150 * som.c (som_slurp_extended_name_table): Delete function. The
151 generic code will handle things correctly.
152 (som_slurp_armap): Seek to the beginning of the next member.
153 (normalize): New function.
154 (som_bfd_ar_write_symbol_stuff): Take the size of the extended
155 name table into account when computing the file offsets in the
156 SOM dictionary. Make sure to align to an even boundary.
157 (som_write_armap): Initialize the checksum to zero.
158 (ar_maxchars): Fix. Opps.
159
160 Fri Mar 18 20:35:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
161
162 * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
163 machine. Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
164
165 Thu Mar 17 18:26:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
166
167 * bfd-in.h (BFD_VERSION): Use @VERSION@.
168 * Makefile.in (bfd.h): Replace it with contents of VERSION file.
169 * bfd-in2.h: Regenerated.
170
171 * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
172 this was also named trad_unix_bfd_copy_private_bfd_data.
173
174 Thu Mar 17 10:37:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
175
176 * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
177 elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
178 returns NULL, it is not an error. It's possible that some of
179 these checks are not necessary (because the size can never be
180 zero), but putting in the checks is the conservative thing to do
181 in light of the fact that some of these malloc calls replaced
182 unchecked alloca calls, in which a zero argument would work fine.
183
184 Thu Mar 17 11:44:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
185
186 * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
187 duplicate definition.
188 (osf_core_bfd_is_local_label): Define.
189
190 * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
191 if malloc (0) fails. bfd_canonicalize_reloc returning 0 is not a
192 failure indication, it merely means there are no relocs.
193
194 * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
195 after NAME, since SunOS /bin/cc can't handle it.
196
197 Wed Mar 16 16:43:33 1994 David J. Mackenzie (djm@thepub.cygnus.com)
198
199 * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
200 From sukes@glue.umd.edu (Tasuki Hirata).
201
202 Wed Mar 16 07:55:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
203
204 * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
205 all that convoluted stuff with NAME, CAT3, etc. The convoluted
206 stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
207
208 Wed Mar 16 00:02:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
209
210 * som.c (som_prep_for_fixups): Detect section symbols based
211 on either the lack of private data or the symbol flags. Do not
212 munge section symbol names anymore -- they no longer confuse GDB.
213 (som_begin_writing): Leave space for an exec header if writing
214 an executable.
215 (som_slurp_symbol_table): Recognize both forms of section symbol
216 names "L$0\002" and "$<FOO>$". Change the name of "L$0\002"
217 section symbols to be the name of the section they represent.
218 Debugging symbols begin with "L$0\001", not just "L$".
219
220 Tue Mar 15 22:58:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
221
222 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
223
224 * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
225 for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
226 and bfd_is_local_label.
227
228 * targets.c: Add new entries to the bfd_target structure.
229
230 * bfd.c (bfd_copy_private_bfd_data): New definition.
231
232 * section.c (bfd_copy_private_section_data): New definition.
233
234 * syms.c (bfd_is_local_label): New definition.
235
236 * libbfd-in.h (bfd_generic_is_local_label): Declare.
237
238 * libbfd.c (bfd_generic_is_local_label): New function.
239
240 * *-core.c: Provide default definitions for new functions in
241 the target vector which all point to bfd_false.
242
243 * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
244 libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
245 Default new vectors for copying private backend data to bfd_true.
246 Default new vector for determining if a symbol is a local label
247 to bfd_generic_is_local_label.
248
249 * som.c (som_bfd_copy_private_section_data): New function.
250 (som_bfd_is_local_label): New function.
251 (som_bfd_copy_private_bfd_data): For now default to bfd_true.
252
253 * elf32-hppa.c (hppa_elf_is_local_label): New function.
254
255 Tue Mar 15 23:55:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
256
257 * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
258
259 Tue Mar 15 04:41:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
260
261 * Most files:
262 Replace DEFUN and DEFUN_VOID with K&R-style function definition.
263 Indent some of them to GNU standards.
264
265 * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
266 cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
267 elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
268 libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
269 Update copyright years.
270
271 Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
272
273 * som.c (som_prep_for_fixups): A relocation involving the section
274 symbol for the *ABS* section is really a relocation involving
275 no symbol.
276 (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
277 undefined symbols. Correctly distinguish between debugger symbols
278 and section symbols.
279
280 * som (setup_sections): Set SEC_DEBUGGING and the section attributes
281 for spaces and subspaces.
282
283 * som.c (som_bfd_count_ar_symbols): Fix typo.
284
285 * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
286 HAS_RELOC based on the object's magic number.
287 (make_unique_section): Delete function. BFD and its users are
288 prepared to handle multiple sections with the same name.
289 (setup_sections): Allocate space on the BFD's obstack to hold
290 section names. Use bfd_make_setion_anyway rather than the
291 obsolete make_unique_section.
292 (som_prep_headers): Choose the correct SOM magic number based
293 on the BFD's flags.
294 (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
295
296 Sat Mar 12 09:46:09 1994 Ian Lance Taylor (ian@cygnus.com)
297
298 * elf32-ppc.c: Renamed from elf32-powerpc.c.
299 start-sanitize-powerpc-netware
300 * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
301 end-sanitize-powerpc-netware
302 * Makefile.in, configure.in: Corresponding changes.
303
304 Fri Mar 11 22:27:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
305
306 * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
307
308 Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
309
310 * sunos.c (sunos_read_dynamic_info): Assume that dynamic info
311 is always located at the start of the data section to allow
312 recovery of the dynamic info from a stripped executable.
313 * ecoff.c (ecoff_styp_to_sec_flags): Handle STYP_PDATA, STYP_XDATA
314 and STYP_COMMENT.
315
316 Wed Mar 9 17:17:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
317
318 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
319 cruft (like the #pragma alloca for AIX).
320 In addition to that problem, the C alloca calls xmalloc, which
321 means checking for being out of memory can't work right. The
322 following changes remove all uses of alloca from BFD.
323 * hosts/solaris2.h: Remove alloca cruft.
324 * som.c: Replace alloca with a fixed size auto array.
325 * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
326 ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
327 sunos.c: Replace alloca with malloc and appropriate error checking and
328 freeing.
329 * linker.c: Replace alloca with obstack_alloc.
330 * libbfd.h: Rebuilt.
331
332 Tue Mar 8 12:10:38 1994 Ian Lance Taylor (ian@cygnus.com)
333
334 * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
335 MIPS_R_GPREL.
336
337 Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
338
339 * elf32-hppa.h, elfcode.h: Replace uses of Elf*_Half, Elf*_Word,
340 Elf*_Off typedefs by their expansion, the typedefs have been
341 removed from include/elf/internal.h.
342 * elfcode.h (bfd_section_from_shdr): Handle SHT_DYNAMIC section like
343 SHT_PROGBITS section.
344
345 Thu Mar 3 20:03:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
346
347 * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
348
349 Wed Mar 2 13:28:06 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
350
351 * configure.host: Recognize i[34]86-sequent-*.
352
353 * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
354 return from bfd_seek indicates an error.
355 New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
356 TRAD_CORE_STACK_OFFSET.
357 * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
358 TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
359
360 Wed Mar 2 11:57:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
361
362 * som.[ch]: Do not include libhppa.h in som.c, instead include
363 it in som.h.
364
365 * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
366 include it in elf32-hppa.h.
367
368 * som.c (log2): Return -1 on error rather than aborting.
369 (setup_sections): Bubble up an error from log2.
370
371 * Changes to make HP C compiler happy in both traditional
372 and ANSI mode.
373 * som.c (hppa_som_gen_reloc_type): Use correct enum type for
374 field parameter.
375 (bfd_som_set_section_attributes): Use unsigned int rather than
376 unsigned char to avoid GNU-C extensions.
377 (bfd_som_attach_aux_hdr): Return a boolean to indicate success
378 or failure rather than aborting on failure.
379
380 * som.h (bfd_som_set_section_attributes): Fix prototype to match
381 som.c changes.
382 (bfd_som_attach_aux_hdr): Add prototype.
383 (hppa_som-gen_reloc_type): Likewise.
384
385 * elf32-hppa.c: Add a couple casts to make HP compiler happy.
386 (hppa_look_for_stubs_in_section): Do not return false on failure
387 until rest of code is ready to handle it. Abort for now.
388
389 Tue Mar 1 18:33:59 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
390
391 * bfd-in2.h: Rebuilt.
392
393 Tue Mar 1 13:06:53 1994 Kung Hsu (kung@mexican.cygnus.com)
394
395 * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
396 * Makefile.in: delete an extra blank.
397 * configure.in : Add i396os9k_vec.
398
399 Mon Feb 28 15:41:01 1994 Kung Hsu (kung@mexican.cygnus.com)
400
401 * config.bfd : Add i386-os9k.
402 * config/i386-os9k.mt : Newly add os9k target makefile.
403
404 * i386os9k.c : new file to handle os9k format bfd.
405 * Makefile.in : Handle new file i386os9k.c
406 * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
407 * cache.c : Initialize cache_sentinel to 0.
408
409 Sun Feb 27 16:30:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
410
411 * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
412 action in case where caller specified no argument relocation.
413 (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
414 right in the original relocation and the stub's relocation.
415
416 * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo. Delete
417 unused symbols argument.
418
419 * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
420 than asymbol * for original target symbol. All callers changed.
421 Set reloc->sym_ptr_ptr appropriately.
422 (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
423 (hppa_elf_look_for_stubs_in_section): No longer need symbols
424 argument. Use the output symbols when canonicalizing the relocs,
425 creating them if necessary.
426
427 * linker.c (_bfd_generic_link_output_symbols): Do not
428 rebuild/clobber the output symbols if they already exist.
429
430 Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
431
432 * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
433 check all the pointer dereferences. Enabled via DEBUG_BFD_SEND.
434 * bfd-in2.h: Rebuilt.
435
436 * srec.c (hex_value): Always set to a size of 256 bytes.
437 (srec_init): Cosmetic changes.
438
439 Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
440
441 * elf32-hppa.c: Second half of major cleanup. More comments,
442 PARAMize and staticize rest of functions. Delete unused
443 functions. Delete unused/unnecessary arguments to some functions.
444 Group static vars together. Abort for bad errors until we have
445 error code propogation working. Work on spacing and indention.
446 Add FIXMEs for unresolved problems. Use enums rather than
447 #defines for lots of things. Merge two functions which build
448 linker stubs into a single function (so they can easily share a
449 ton of common code).
450
451 Sat Feb 26 10:00:45 1994 Ian Lance Taylor (ian@cygnus.com)
452
453 * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
454 avoid depending upon right shifts of signed numbers, and to
455 correct handling of src_mask with lower bits zero.
456
457 * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
458 * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
459 * elf32-i386.c: Likewise.
460 * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
461 #if 0 code.
462 (elf_write_phdrs): Make i unsigned.
463 (map_program_segments): Make i and n_left unsigned.
464 (assign_file_positions_except_relocs): Make i unsigned.
465 (write_shdrs_and_ehdr): Make count unsigned.
466 (assign_file_positions_for_relocs): Make i unsigned.
467 (NAME(bfd,elf_write_object_contents)): Make count unsigned.
468 (section_from_elf_index): Make index argument unsigned.
469
470 Fri Feb 25 21:34:58 1994 Ian Lance Taylor (ian@cygnus.com)
471
472 * elfcode.h: Don't include assert.h.
473 (swap_out_syms): Use BFD_ASSERT rather than assert.
474
475 * linker.c (_bfd_generic_link_write_global_symbol): Add missing
476 break in switch.
477
478 * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
479 declarations.
480
481 Fri Feb 25 16:35:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
482
483 * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
484
485 * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
486 (elf_hppa_tc_make_sections): Likewise.
487 (elf_hppa_final_processing): Add extern decl.
488
489 * elf32-hppa.c: First half of major cleanup. Add/cleanup lots of
490 comments. PARAMize some static functions. Delete unused functions.
491 Delete unused/unnecessary arguments to many functions. Group
492 static vars together. Collapse common case statements together
493 in many places. Use default case when possible instead of listing
494 each case separately. Abort for bad errors until we get error
495 code propogation working. Work on spacing and indention problems.
496 Add FIXMEs for some unresolved problems. Delete hopelessly broken
497 COMPLEX relocation support (it's never used anyway).
498 (hppa_elf_rebuild_insn): Delete. Moved into libhppa.h.
499 (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
500 (elf_hppa_tc_make_sections): Likewise.
501
502 * format.c (bfd_check_format_matches): Initialize matching_vector
503 to keep gcc -Wall quiet.
504
505 * elfcode.h (elf_slurp_reloca_table): Fix typo.
506
507 * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
508 not "sizeof (som_symbol_type *)".
509
510 * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
511 not "sizeof (asymbol"). Opps.
512
513 Fri Feb 25 13:19:04 1994 Ted Lemon (mellon@pepper.ncd.com)
514
515 * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
516 (bfd_set_gp_size): Can't set gp value on an archive.
517
518 Fri Feb 25 12:57:00 1994 Steve Chamberlain (sac@jonny.cygnus.com)
519
520 * srec.c (pass_over): Don't skip too many characters when
521 end of line seen.
522
523 Fri Feb 25 11:41:57 1994 Ian Lance Taylor (ian@cygnus.com)
524
525 * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
526 boundary.
527
528 Thu Feb 24 07:13:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
529
530 * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
531 field for absolute symbols in the same manner as undefined
532 and common symbols.
533
534 Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
535
536 * elfcode.h (elf_core_file_p): Check for core file e_machine match
537 like in elf_object_p.
538
539 Wed Feb 23 18:28:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
540
541 * elfcode.h (alloca): Delete declaration.
542
543 * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
544 number rather than HP9000S800_ID. Note som.c is careful
545 to make sure CPU_PA_RISC1_0 is always defined.
546
547 Mon Feb 21 10:12:02 1994 Stan Shebs (shebs@andros.cygnus.com)
548
549 * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
550 flags to explicit compile actions.
551
552 Mon Feb 21 09:50:06 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
553
554 * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
555 * ecoff.c (ecoff_write_object_contents): Make sure .bss section
556 ends on a page boundary if there is no symbol table.
557 (ecoff_bfd_final_link): Don't set symhdr->magic here.
558
559 * hosts/hp300.h: Include <stdlib.h>; don't declare free.
560
561 * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
562 rather than an array of variable size.
563 (som_bfd_fill_in_ar_symbols): Likewise.
564 (som_bfd_ar_write_symbol_stuff): Likewise.
565
566 * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
567 operation to avoid OSF 1.3 cc bug.
568 * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
569 and bss_size bfd_size_type instead of unsigned long. Make
570 text_start and data_start bfd_vma instead of unsigned long.
571 * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
572 value.
573
574 Sun Feb 20 16:06:54 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
575
576 * linker.c (_bfd_generic_link_add_archive_symbols): Consider
577 symbols in the order they appear in the archive map.
578
579 Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
580
581 * coff-alpha.c (reloc_nil): Add forward declaration, add missing
582 error_message argument.
583 * coff-sparc.c (bfd_coff_generic_reloc): Add forward declaration,
584 add missing error_message argument.
585 * mipsbsd.c (mips_fix_hi16_s): Add forward declaration, add missing
586 error_message argument.
587
588 Fri Feb 18 11:41:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
589
590 start-sanitize-powerpc-netware
591 Support for PowerPC NetWare.
592 * nlm32-powerpc.c: New file.
593 * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
594 * config/ppc-nlm.mt: New file.
595 * configure.in (nlm32_powerpc_vec): New target vector; use
596 nlm32-powerpc.o, nlm32.o, nlm.o.
597 * targets.c (nlm32_powerpc_vec): Declare.
598 * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
599 (CFILES): Should add nlm32-powerpc.c, but didn't, because the
600 dependencies can't be sanitized.
601 end-sanitize-powerpc-netware
602
603 Initial support for PowerPC ELF. Done without an ABI, and
604 probably to be changed when I get an ABI.
605 * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
606 * config/ppc-elf.mt: New file.
607 * configure.in (bfd_elf32_powerpc_vec): New target vector; use
608 elf32-powerpc.o, elf32.o, elf.o.
609 * elf32-powerpc.c: New file.
610 * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
611 (elf_set_arch_mach): Likewise.
612 * targets.c (bfd_elf32_powerpc_vec): Declare.
613 * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
614 (CFILES): Add elf32-powerpc.c.
615 Rebuilt dependencies.
616
617 Thu Feb 17 15:29:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
618
619 * coffgen.c (coff_write_linenumbers): Always return a value.
620
621 * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
622 reasonably. Allocate x_symp using alloca.
623
624 * elfcode.h (map_program_segments): ELF program header entries
625 must be sorted by load address. This used to generate the entries
626 in reverse order.
627
628 * section.c (SEC_IN_MEMORY): Define.
629 (asection): Rename unused field otheruserdata to contents, and
630 make it char *.
631 (bfd_make_section_anyway): Initialize contents field to NULL.
632 (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
633 contents from contents field rather than from file.
634 * bfd-in2.h: Rebuilt.
635
636 Thu Feb 17 08:30:53 1994 David J. Mackenzie (djm@thepub.cygnus.com)
637
638 * bfd.c (bfd_get_error, bfd_set_error): New functions.
639 (bfd_error): Make static.
640 (bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
641 all values.
642 * bfd-in2.h: Regenerated.
643 * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
644 aoutf1.h, aoutx.h, archive.c, archures.c,
645 bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
646 coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
647 ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
648 elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
649 i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
650 lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
651 nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
652 ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
653 srec.c, sunos.c, syms.c, targets.c, tekhex.c,
654 trad-core.c: Change callers.
655
656 Tue Feb 15 22:27:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
657
658 * som.c: Remove FIXMEs for things which have been dealt with.
659
660 Tue Feb 15 19:39:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
661
662 * section.c (bfd_get_section_contents): Since this function reads
663 unrelocated contents, the section's raw size is always the one to
664 use for bounds checking.
665
666 * linker.c (default_indirect_link_order): In assertion, compare
667 link_order size field against cooked size, not raw size, of input
668 section.
669
670 * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
671 return 0.
672 (aligncode): When shrinking, the addend should be set to the
673 current offset in the section plus the number of bytes of padding
674 that will actually be retained.
675 (b_out_relax_section): If a section contains no relocations, don't
676 bother processing them.
677 (b_out_get_relocated_section_contents): Set reloc_done. Assert
678 that bfd_get_section_contents returns true. Check that relocs are
679 properly ordered.
680 (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
681 that reloc->addend falls between the current source offset and the
682 raw size of the input section.
683
684 * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
685 bout. Default with no version number is still bout. Support
686 explicit i960-coff target too.
687
688 * bout.c: Changed some indentation, deleted trailing whitespace,
689 fixed some comments, removed some "#if 1" lines.
690 (output_addr): New macro.
691 (calljx_callback, callj_callback, get_value, abs32code, aligncode,
692 b_out_get_relocated_section_contents): Use it for readability.
693
694 Tue Feb 15 09:00:16 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
695
696 * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
697 symbols, not the BFD symbols.
698 (som_bfd_ar_write_symbol_stuff): Likewise.
699
700 Mon Feb 14 22:55:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
701
702 * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
703 have any symbols.
704
705 * Finish basic read-write support for SOM archive libraries. Bugs
706 surely remain as this hasn't been tested all that much.
707 * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
708 (struct som_misc_symbol_info): New structure to hold info necessary
709 to build both normal and library symbol tables.
710 (som_derive_misc_symbol_info): New function to derive info necessary
711 to build both normal and library symbol tables.
712 (som_build_and_write_symbol_table): Use new function to derive misc
713 symbol information.
714 (som_slurp_symbol_table): Update backend private data for symbols
715 appropriately.
716 (som_bfd_prep_for_ar_write): New function.
717 (som_bfd_ar_symbol_hash): New function.
718 (som_bfd_ar_write_symbol_stuff): New function.
719 (som_write_armap): Flesh out.
720 (som_vec): Fix ar padding character.
721
722 * som.c: Consistently use memset rather than bzero.
723
724 Mon Feb 14 17:02:28 1994 Stu Grossman (grossman at cygnus.com)
725
726 * coff-rs6000.c: Add Lynx core file support, use HOST_AIX, where
727 appropriate.
728 * rs6000-core.c: Use HOST_AIX instead of COREFILES_PLEASE.
729 * config/rs6000.mh: Remove defs of ARCHIVES_PLEASE and
730 COREFILES_PLEASE.
731 * config/rs6000lynx.mh: Turn on Lynx core file support.
732 * hosts/rs6000.h: #define HOST_AIX.
733 * hosts/rs6000lynx.h: Create this to enable Lynx host support.
734
735 Sun Feb 13 14:30:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
736
737 * som.h (som_symbol_data): Safely access backend private data
738 for BFD symbols. All callers changed.
739
740 * Read-only SOM archive support.
741 * som.c (som_bfd_count_ar_symbols): New helper function.
742 (som_bfd_fill_in_ar_symbols): New helper function.
743 (som_slurp_armap): New function to read a SOM LST.
744
745 * som.h: Include <lst.h> and <ar.h>.
746
747 Sat Feb 12 22:34:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
748
749 * elfcode.h (elf_map_symbols): Fix typo.
750 (write_object_contents): Check return values from prep_headers and
751 elf_compute_section_file_positions.
752 (set_section_contents): Likewise.
753
754 Fri Feb 11 16:56:50 1994 David J. Mackenzie (djm@thepub.cygnus.com)
755
756 * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
757 (bfd_construct_extended_name_table): Check result of normalize.
758
759 Tue Feb 8 08:57:31 1994 David J. Mackenzie (djm@thepub.cygnus.com)
760
761 Make all callers of malloc or realloc (including via obstacks)
762 check the result for NULL. Most set bfd_error to no_memory and
763 return in that case; a few are harder to fix, and are marked
764 with "FIXME <return type>".
765
766 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
767 hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return.
768 * linker.c (_bfd_generic_link_output_symbols
769 _bfd_generic_link_write_global_symbol): Ditto
770 * section.c (bfd_make_section_anyway): Ditto.
771
772 * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
773 (first_phase): Ditto. FIXME void
774 (tekhex_make_empty_symbol): Check bfd_zalloc.
775
776 * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
777 (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
778
779 * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
780
781 * srec.c: Indent.
782 (fillup_symbols): Check bfd_alloc. FIXME void
783 (srec_mkobject srec_get_section_contents
784 srec_set_section_contents): Check bfd_alloc.
785 (srec_make_empty_symbol): Check bfd_zalloc.
786
787 * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
788 (make_unique_section): Check bfd_alloc.
789 (som_new_section_hook): Check bfd_zalloc.
790 (bfd_som_attach_aux_hdr): Ditto. FIXME void
791
792 * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
793
794 * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
795 (osf_core_core_file_p): Check bfd_alloc.
796
797 * oasys.c (oasys_slurp_symbol_table oasys_archive_p
798 oasys_mkobject oasys_object_p oasys_new_section_hook
799 oasys_set_section_contents): Check bfd_alloc.
800 (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
801 (oasys_make_empty_symbol): Check bfd_zalloc.
802
803 * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
804 (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
805
806 * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
807
808 * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
809
810 * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
811
812 * linker.c (_bfd_link_hash_newfunc
813 (generic_link_hash_newfunc
814 (archive_hash_newfunc
815 (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
816 (_bfd_generic_final_link
817 (_bfd_generic_link_output_symbols
818 (default_indirect_link_order): Check bfd_alloc.
819 (bfd_new_link_order): Check bfd_alloc_by_size_t.
820
821 * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
822
823 * ieee.c: Indent.
824 (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
825 ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
826 (do_one): Check bfd_alloc. Return a boolean.
827 (ieee_slurp_section_data): Check it.
828 (init_for_output): Check bfd_alloc. Return a boolean.
829 (ieee_set_section_contents): Check it.
830 (do_with_relocs): Check bfd_alloc. Return a boolean.
831 (ieee_bfd_debug_info_accumulate): Ditto. FIXME void.
832 (ieee_mkobject): Check bfd_zalloc.
833 (ieee_make_empty_symbol): Check bfd_zmalloc.
834
835 * hpux-core.c (hpux_core_make_empty_symbol): Check
836 bfd_zalloc.
837
838 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
839 bfd_zalloc.
840 (hppabsd_core_core_file_p): Check bfd_zalloc.
841
842 * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
843
844 * elfcode.h (elf_new_section_hook): Check bfd_alloc.
845 (bfd_section_from_phdr): Ditto.
846 (write_relocs): Ditto. FIXME void
847 (elf_map_symbols assign_section_numbers map_program_segments):
848 Ditto. Return a boolean.
849 (swap_out_syms): Ditto. Check elf_map_symbols.
850 (elf_slurp_symbol_table): Check bfd_zalloc.
851 (elf_slurp_reloca_table): Check bfd_alloc.
852 (elf_slurp_reloc_table): Ditto.
853 (elf_compute_section_file_positions): Check assign_section_numbers.
854 (assign_file_positions_except_relocs): Return a boolean.
855 Check map_program_segments.
856 (elf_compute_section_file_positions): Check it.
857
858 * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
859
860 * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
861 realloc.
862 (hppa_elf_stub_reloc): Ditto.
863 (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
864 (hppa_elf_build_long_branch_stub): Ditto.
865 (elf32_hppa_backend_symbol_table_processing): Ditto.
866
867 * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean.
868 (ecoff_slurp_symbol_table): Check it.
869 (ecoff_slurp_armap): Check bfd_alloc.
870 (ecoff_write_armap): Check bfd_zalloc.
871 (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
872 _bfd_link_hash_newfunc.
873 (ecoff_link_add_externals): Check bfd_alloc.
874
875 * ctor.c (bfd_constructor_entry): Check bfd_alloc.
876
877 * coffgen.c (coff_real_object_p): Check bfd_alloc.
878 (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean.
879 (coff_write_symbol): Check bfd_alloc. FIXME int
880 (coff_write_linenumbers): Check bfd_alloc. Return a boolean.
881 (coff_section_symbol): Check bfd_alloc_by_size_t.
882 (coff_get_normalized_symtab): Check bfd_alloc.
883 (coff_bfd_make_debug_symbol): Check bfd_zalloc.
884 * libcoff-in.h: Change decls of coff_renumber_symbols,
885 coff_write_linenumbers.
886 * libcoff.h: Rebuilt.
887 * coffcode.h (coff_write_object_contents): Check
888 coff_renumber_symbols, coff_write_linenumbers.
889
890 * coffcode.h: Indent.
891 (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a
892 boolean.
893 (coff_write_object_contents): Check it.
894
895 * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
896 * coff-mips.c (mips_relocate_section): Ditto.
897
898 * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
899 (do_slurp_bsd_armap): Ditto.
900 (compute_and_write_armap): Check bfd_realloc value.
901
902 * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
903 return value. Return boolean value.
904 (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
905 (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
906 return value.
907 (add_to_stringtab): Ditto. FIXME void
908 (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
909 (aout_link_add_symbols): Check bfd_alloc value.
910 (translate_symbol_table): Check translate_from_native_sym_flags.
911 * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
912 * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
913
914 * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
915
916 * opncls.c (obstack_chunk_alloc): Define as malloc, not
917 bfd_xmalloc_by_size_t.
918 (_bfd_new_bfd): Check obstack_begin for 0 return.
919
920 * ieee.c (obstack_chunk_alloc): Define as malloc, not
921 bfd_xmalloc_by_size_t.
922 (ieee_archive_p): Check obstack_begin for 0 return and
923 obstack_finish for NULL return.
924
925 * hash.c (obstack_chunk_alloc): Define as malloc, not
926 bfd_xmalloc_by_size_t.
927 (bfd_hash_table_init_n): Check obstack_begin for 0 return and
928 obstack_finish for NULL return.
929 (bfd_hash_lookup): Check obstack_alloc for NULL return.
930
931 * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
932 bfd_xmalloc_by_size_t.
933 bfd_ecoff_debug_accumulate
934 bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
935 (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
936 NULL return. Return boolean, not void.
937 (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
938 (bfd_ecoff_debug_accumulate): Check add_file_shuffle
939 and add_memory_shuffle return.
940 (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
941 (bfd_ecoff_debug_accumulate): Check bfd_alloc.
942 (ecoff_add_string): Check add_memory_shuffle return.
943
944 * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
945 Remove decls.
946 * libbfd.h: Rebuilt.
947
948 Fri Feb 11 15:35:32 1994 Stu Grossman (grossman at cygnus.com)
949
950 * configure.host: Add Lynx/rs6000 support.
951 * config/i386-nlm.mt: Enable a.out file support.
952 * config/rs6000lynx.mh: Lynx/rs6000 host support.
953
954 Fri Feb 11 17:25:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
955
956 * archive.c (compute_and_write_armap): Rewrite somewhat to improve
957 memory usage.
958
959 Fri Feb 11 13:10:42 1994 Stan Shebs (shebs@andros.cygnus.com)
960
961 * archive.c: Change all references to '\n' in archive magic
962 to '\012', for greater portability.
963 * ecoff.c (ecoff_write_armap): Ditto.
964
965 Thu Feb 10 12:58:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
966
967 * aoutx.h (aout_link_write_other_symbol): Check strip settings to
968 see whether symbol should be output.
969 * genlink.h (struct generic_write_global_symbol_info): Added info
970 field.
971 * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
972 (_bfd_generic_link_write_global_symbol): Check strip settings to
973 see whether symbol should be output.
974 * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
975
976 Wed Feb 9 21:34:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
977
978 * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
979
980 * som.c: Cast return values from BFD memory allocation routines to
981 avoid warnings from the HP compiler.
982
983 Wed Feb 9 12:55:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
984
985 * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
986 reloc on an "ldl" instruction too.
987
988 * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
989 when passing them to sprintf. Use %ld instead of %d.
990
991 * coff-rs6000.c (rs6000coff_mkarchive): Return false.
992 (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
993 Also removed unused variable namelen.
994 (rs6000coff_write_armap): Declare orl_count and stridx parameters.
995
996 Tue Feb 8 18:00:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
997
998 * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
999 conflicts.
1000 * libbfd.h: Rebuilt.
1001
1002 Tue Feb 8 15:55:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1003
1004 * coff-alpha.c (reloc_nil): New function.
1005 (alpha_howto_table): Use it as special_function to prevent certain
1006 relocs from being adjusted by bfd_perform_relocation. IGNORE
1007 reloc should be partial_inplace.
1008 (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
1009 reloc on an "ldl" instruction too.
1010
1011 Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1012
1013 * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
1014 hppa_elf_build_long_branch_stub): Cast to char * instead of int
1015 before performing pointer arithmetic.
1016
1017 Mon Feb 7 20:56:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1018
1019 * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
1020 configuration.
1021 (hppa*-*-*elf*): This configuration used hppa-elf now.
1022
1023 * som.c: This file is also used for HOST_HPPAOSF.
1024
1025 * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
1026
1027 * hosts/hppaosf.h: New host configuration file.
1028
1029 * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
1030 BSD handles both SOM and ELF object files.
1031
1032 * config/hppaosf.mh (HDEFINES): Delete. No longer needed.
1033 (RANLIB): Doesn't do anything, define it to be "echo".
1034
1035 * config/hppaosf.mt: New target makefile fragment for a PA running
1036 OSF1.
1037
1038 Mon Feb 7 15:02:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1039
1040 * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
1041 (archures_init_table): If SELECT_ARCHITECTURES is not defined,
1042 added bfd_powerpc_arch.
1043 * bfd-in2.h: Rebuilt.
1044 * cpu-powerpc.c: New file.
1045 * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
1046 Rebuilt dependencies.
1047
1048 * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
1049 of an SHT_STRTAB section from sh_addr and sh_addralign, rather
1050 than just setting them to zero.
1051
1052 Sun Feb 6 20:04:10 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1053
1054 * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
1055 from bfd_new_strtab.
1056 (elf_compute_section_file_positions): Check for false return from
1057 swap_out_syms.
1058
1059 * linker.c (default_indirect_link_order): Check for NULL return
1060 from bfd_get_relocated_section_contents.
1061
1062 * syms.c: Make example application in doc call xmalloc, not
1063 bfd_xmalloc.
1064
1065 * aoutx.h (NAME(aout,slurp_symbol_table),
1066 aout_link_get_symbols, NAME(aout,link_hash_table_create)):
1067 * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
1068 * ecoff.c (ecoff_bfd_link_hash_table_create):
1069 * ecofflink.c (bfd_ecoff_debug_init):
1070 * format.c (bfd_check_format_matches):
1071 * linker.c (_bfd_generic_link_hash_table_create):
1072 (_bfd_generic_final_link):
1073 * reloc16.c (bfd_coff_reloc16_relax_section):
1074 (bfd_coff_reloc16_get_relocated_section_contents):
1075 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
1076 * elf32-mips.c (mips_elf_final_link):
1077 * elfcode.h (bfd_new_strtab):
1078 (bfd_add_2_to_strtab):
1079 (elf_slurp_symbol_table):
1080 (elf_corefile_note):
1081 * libbfd.c (bfd_zmalloc):
1082 Use malloc and check the result, instead of bfd_xmalloc.
1083
1084 Sat Feb 5 12:39:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1085
1086 * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
1087
1088 Sat Feb 5 05:32:44 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1089
1090 * srec.c (srec_write_record): Put CONST keyword for "src" before
1091 "unsigned", some compilers don't like it after "unsigned".
1092 * libcoff.h, libcoff-in.h (bfd_perform_slip): Rename "value" to
1093 "val" in prototype declaration because some compilers don't like
1094 arguments whose names are the same as types.
1095
1096 Sat Feb 5 01:14:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1097
1098 * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
1099 object file defines symbol. Also, if skipping a symbol, skip the
1100 second symbol of a N_WARNING or N_INDR symbol as well.
1101
1102 Fri Feb 4 23:55:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1103
1104 Add basic support for writing RS/6000 XCOFF files.
1105 * coff-rs6000.c (dummy_reloc): Removed.
1106 (rs6000coff_howto_table): Defined XCOFF relocs.
1107 (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
1108 (rs6000coff_rtype2howto): New function.
1109 (coff_bfd_reloc_type_lookup): Defined to use
1110 rs6000coff_reloc_type_lookup.
1111 (rs6000coff_reloc_type_lookup): New function.
1112 (SELECT_RELOC): Defined to set r_type and r_size fields.
1113 (COFF_LONG_FILENAMES): Defined.
1114 * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
1115 fields to bitfields. Added fields fix_value and fix_scnlen.
1116 (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
1117 STYP_INFO for the type of a section named .debug.
1118 (coff_add_missing_symbols): Don't define if RS6000COFF_C.
1119 (coff_write_object_contents): If RS6000COFF_C, don't call
1120 coff_add_missing_symbols.
1121 (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
1122 entry has type STY_LD change the x_scnlen into a pointer to a
1123 symbol and set fix_scnlen. Also, for a C_BSTAT symbol, change the
1124 value into a pointer to a symbol and set fix_value.
1125 * libcoff.h: Rebuilt.
1126 * coffgen.c (coff_mangle_symbols): Reindent. If fix_value is set,
1127 get the symbol offset. Likewise for fix_scnlen.
1128 (string_size): Change type to bfd_size_type.
1129 (debug_string_size, debug_string_section): New static variables.
1130 (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
1131 write the symbol name into the .debug section; assume that the
1132 section has already been created with the right size.
1133 (coff_write_symbols): Initialize debug_string_size to 0. If
1134 bfd_coff_symname_in_debug returns true, don't put symbol name in
1135 usual string table. After writing out all symbols, if
1136 debug_string_size is not 0, check that it matches the size of the
1137 .debug section.
1138 (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
1139 fields. If the string offset is 0, always use an empty string as
1140 the name.
1141 (coff_make_empty_symbol): Zero out the symbol structure.
1142 * reloc.c (bfd_perform_relocation): Work around one gross hack
1143 with another: actually look at the target name to avoid the broken
1144 COFF check.
1145 (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
1146 BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
1147 * bfd-in2.h: Rebuilt.
1148
1149 Fri Feb 4 17:28:32 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1150
1151 * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
1152 (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
1153 * libbfd-in.h: Define them as macros calling xmalloc and declare
1154 xmalloc.
1155 * libbfd.h: Rebuilt.
1156
1157 Thu Feb 3 16:49:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1158
1159 * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
1160 symbol has a value in the ECOFF symbol but not in the BFD symbol,
1161 keep the value in the ECOFF symbol. This helps gas.
1162
1163 * linker.c (_bfd_generic_link_output_symbols,
1164 _bfd_generic_link_write_global_symbol): Don't require that all
1165 references to a common symbol be themselves common symbols.
1166
1167 * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
1168
1169 Wed Feb 2 20:37:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1170
1171 * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
1172 sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
1173 * bfd-in2.h: Rebuilt.
1174
1175 Wed Feb 2 12:30:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1176
1177 * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
1178 and size correctly.
1179 (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
1180 x_csect.x_scnlen.l to match change in coff/internal.h.
1181 (coff_swap_aux_out): Likewise.
1182
1183 * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
1184 (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
1185 fields to match yesterday's changes.
1186
1187 * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
1188 in the internal_reloc itself, not the type.
1189 * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
1190 coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
1191 definition of SELECT_RELOC accordingly.
1192
1193 Tue Feb 1 12:05:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1194
1195 * coffcode.h (bfd_coff_backend_data): Added new arguments to
1196 _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
1197 and number of aux entries.
1198 (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
1199 accordingly.
1200 * libcoff.h: Rebuilt.
1201 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
1202 arguments. If RS6000COFF_C, only treat C_EXT and C_HIDEXT
1203 specially if this is the last aux entry.
1204 * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
1205 new arguments to swap_aux functions.
1206
1207 Sun Jan 30 15:14:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1208
1209 * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
1210 (only testing for m68k and vax at the moment); do verify that the
1211 preprocessor didn't trash the arch name inside the string version.
1212 Don't print out "pagesize =" line that prevents output from
1213 compiling. Derive BYTES_IN_WORD and ARCH values from sizeof
1214 results.
1215 * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
1216 (check, installcheck): Identify directory in "no testsuites"
1217 message.
1218
1219 Sun Jan 30 13:25:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1220
1221 * aoutx.h (aout_link_write_symbols): Write out correct value for
1222 object file symbol.
1223
1224 Fri Jan 28 18:34:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1225
1226 * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
1227 KERNBASE, so hard-code 0x80000000 instead.
1228
1229 Thu Jan 27 13:54:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1230
1231 * linker.c (generic_link_add_symbol_list): If symbol is common,
1232 set the BSF_OLD_COMMON flag.
1233
1234 Wed Jan 26 13:47:15 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1235
1236 * format.c (bfd_check_format_matches): Put the new entry in the
1237 correct element of matching_vector.
1238
1239 Tue Jan 25 11:43:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1240
1241 * som.c, som.h (bfd_som_set_section_attributes,
1242 bfd_som_set_subsection_attributes): Change parameters from char
1243 to int. Following a prototype with an old-style function definition
1244 in the presence of widened parameters is a GCC-ism not supported
1245 by the HP compiler in ANSI mode.
1246
1247 Tue Jan 25 11:46:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1248
1249 * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
1250
1251 * hp300hpux.c (MY(write_object_contents)): Write out the symbols
1252 before writing out the relocs, so that the right symbol indices
1253 are used.
1254
1255 * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
1256 try to overlay the internal carsyms on the external symdefs. That
1257 can not work if the size of a host pointer is larger than 4 bytes.
1258
1259 * format.c (bfd_check_format_matches): Cast result of
1260 bfd_xmalloc_by_size_t.
1261 * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
1262
1263 * archive.c: Reindented to GNU standards.
1264
1265 Mon Jan 24 14:41:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1266
1267 * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
1268 "_bfd_" to function names.
1269 * archive.c (_bfd_create_empty_archive_element_shell),
1270 libbfd-in.h: Change callers.
1271
1272 * libbfd.c (bfd_zmalloc): Renamed from zalloc.
1273 * libbfd.c (bfd_add_to_string_table),
1274 trad-core.c (trad_unix_core_file_p),
1275 targets.c (bfd_target_list),
1276 ptrace-core.c (ptrace_unix_core_file_p),
1277 opncls.c (new_bfd), libbfd-in.h,
1278 ieee.c (ieee_make_empty_symbol),
1279 elf32-hppa.c (hppa_elf_stub_branch_reloc),
1280 (hppa_elf_stub_reloc): Change callers.
1281 * libbfd.h: Regenerated.
1282
1283 * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
1284 (_bfd_get_elt_at_filepos),
1285 coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
1286 Change callers.
1287
1288 * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
1289 elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
1290 and default_vector to bfd_default_vector.
1291 * libbfd.h: Regenerated.
1292
1293 * format.c (bfd_check_format_matches): New function.
1294 (bfd_check_format): Call it.
1295 (bfd_matching_formats): Function removed.
1296 * targets.c: Replace the vector added on Jan 21 with a count of
1297 entries in default_vector.
1298 * bfd-in2.h: Regenerated.
1299
1300 Mon Jan 24 12:38:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1301
1302 * coff-alpha.c (alpha_ecoff_object_p): New function. Set size of
1303 .pdata section based on lnnoptr field, not section header.
1304 (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
1305 since it is unsigned.
1306 (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
1307 coff_object_p.
1308 * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
1309 .pdata section to 3.
1310 (ecoff_compute_section_file_positions): Save the size of the
1311 .pdata section in the line_filepos field, and actually align the
1312 .pdata section to an alignment power of 4.
1313 (ecoff_compute_reloc_file_positions): Set output_has_begun after
1314 calling ecoff_compute_section_file_positions.
1315 (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
1316 section from the line_filepos field. Set vstamp for the optional
1317 header from the vstamp of the symbolic header.
1318 (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
1319 vstamp used by the first object file in the link.
1320
1321 * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
1322
1323 * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
1324 for a created common section.
1325 (_bfd_generic_link_add_one_symbol): Likewise.
1326
1327 * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
1328 get the index of a common section, rather than always using
1329 SHN_COMMON (MIPS has multiple common sections).
1330
1331 * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
1332
1333 * bfd/aoutx.h (aout_link_input_section_std,
1334 aout_link_input_section_ext): Pass additional arguments to
1335 reloc_overflow callback.
1336 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
1337 alpha_relocat_section): Likewise.
1338 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
1339 * coff-h8500.c (extra_case): Likewise.
1340 * coff-mips.c (mips_relocate_section): Likewise.
1341 * coff-z8k.c (extra_case): Likewise.
1342 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
1343 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
1344
1345 * bout.c (calljx_callback, callj_callback): Use get_value to get
1346 the symbol value and check for undefined symbols.
1347 (get_value): If the symbol is undefined, look it up in the linker
1348 hash table.
1349 (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
1350 use get_value to get the symbol value and check for undefined
1351 symbols.
1352 * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
1353 undefined, look it up in the linker hash table.
1354
1355 * aoutx.h (translate_symbol_table): The string index 0 has a
1356 special meaning for normal symbols, but not for dynamic symbols.
1357
1358 Sat Jan 22 12:26:01 1994 Stu Grossman (grossman at cygnus.com)
1359
1360 * sparclynx.c: Setup appropriate macros to enable core file
1361 support.
1362
1363 Fri Jan 21 16:25:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1364
1365 * targets.c: Add a vector of matching format names.
1366 * format.c (bfd_matching_formats): New function to return it.
1367 (bfd_check_format): Set it.
1368 * bfd-in2.h: Regenerated.
1369
1370 * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
1371 Remove decl of type symclass; wasn't used.
1372 * bfd.c: Document error handling, including code fragments
1373 containing the error decls that were in bfd-in.h.
1374 Remove DEFUNs.
1375 * bfd-in2.h: Regenerated.
1376
1377 Fri Jan 21 14:11:16 1994 Sean Fagan (sef@cygnus.com)
1378
1379 * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
1380 The sparc (and possibly other?) NLM format requires a different
1381 way to write exports, so add a write_export field to the backend
1382 data (and set it to NULL for everything but the sparc).
1383
1384 Fri Jan 21 14:11:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1385
1386 * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
1387 not (struct external_nlist *) NULL. info->dynrel is a PTR, not
1388 a struct external_nlist *.
1389
1390 Fri Jan 21 09:29:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1391
1392 * bfd.c: Remove error strings for errors removed below.
1393 * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
1394 oasys.c (oasys_write_sections): Rename
1395 bfd_error_nonrepresentable_section to nonrepresentable_section.
1396 None of the other bfd error names start with "bfd_error".
1397 Remove errors symbol_not_found and no_relocation_info, which seem
1398 to be unused.
1399 * bfd-in2.h: Regenerated.
1400
1401 Fri Jan 21 01:11:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1402
1403 * bfd.c (bfd_get_gp_size): Added support for ELF.
1404
1405 * syms.c (BSF_DYNAMIC): New symbol flag.
1406 (bfd_print_symbol_vandf): Print it.
1407 * bfd-in2.h: Rebuilt.
1408 * libaout.h (struct aout_backend_data): New read_dynamic_symbols
1409 and read_dynamic_relocs fields.
1410 (struct aoutdata): New dynamic_info field.
1411 (obj_aout_dynamic_info): New accessor macro.
1412 * sunos.c (struct sunos_dynamic_info): New structure.
1413 (sunos_read_dynamic_info, MY(read_dynamic_symbols),
1414 MY(read_dynamic_relocs)): New functions to read dynamic symbols
1415 and relocs.
1416 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
1417 dynamically linked, set SEC_RELOC for both the .text and .data
1418 sections.
1419 (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
1420 undefined symbol.
1421 (translate_symbol_table): New function, split out of
1422 slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
1423 (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
1424 (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
1425 (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
1426 return value.
1427 * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
1428 out dynamic symbols or relocs against reloc symbols, since they
1429 are already in the .text section and we wouldn't know where to
1430 write them anyhow.
1431 (sunos4_aout_backend): Initialize read_dynamic_symbols and
1432 read_dynamic_relocs fields.
1433 * aout-target.h (MY(backend_data)): Initialize
1434 read_dynamic_symbols and read_dynamic_relocs fields.
1435
1436 Thu Jan 20 20:57:27 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1437
1438 * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
1439 typedefs, since HOST_64_BIT will take care of defining them in
1440 bfd.h.
1441
1442 Wed Jan 19 17:28:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
1443
1444 * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
1445 that's dealt with elsewhere.
1446 * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
1447 (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
1448 they get copied to bfd.h.
1449
1450 * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
1451 types. Reorganized some of the existing ones.
1452 * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
1453 values in case of compilation on a 32-bit machine. Fix pcrel
1454 fields of some reloc types.
1455 (alpha_bfd_reloc_type_lookup): Handle more relocation types.
1456
1457 * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
1458 definitions when not defined, regardless of whether uint64_type is
1459 a defined macro or not.
1460 (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
1461 already defined.
1462
1463 Wed Jan 19 00:02:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1464
1465 * aoutx.h (translate_to_native_sym_flags): Set the type of a
1466 BSF_WARNING symbol to N_WARNING.
1467
1468 Tue Jan 18 16:43:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1469
1470 * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
1471 for an indirect or warning symbol.
1472 (aout_link_write_symbols): Update sym_hash with the target of an
1473 indirect or warning symbol. If an indirect symbol is defined,
1474 output the calculated value and don't output the target symbol.
1475
1476 Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1477
1478 * aoutx.h (translate_from_native_sym_flags): Give warning symbols
1479 an (unused) nonzero section value, needed for check below.
1480
1481 Mon Jan 17 15:12:07 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1482
1483 * aoutx.h (translate_from_native_sym_flags,
1484 aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
1485 N_SET[ABDT].
1486
1487 Fri Jan 14 16:45:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1488
1489 * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
1490 the DYNAMIC flag for the BFD.
1491 (NAME(bfd_elf,write_object_contents)): Don't try to write out a
1492 BFD with the DYNAMIC flag set, since we don't generate the program
1493 header table correctly.
1494
1495 Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1496
1497 * elfcode.h (elf_slurp_symbol_table): Free x_symp at the end
1498 of the function to avoid storage leak.
1499
1500 Thu Jan 13 23:07:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1501
1502 * ecoff.c (ecoff_link_write_external): An ifd can be -1.
1503
1504 Thu Jan 13 12:33:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1505
1506 * som.c (som_set_reloc_info): Provide a default symbol for
1507 relocations which don't actually have an associated symbol.
1508
1509 * som.c (hppa_som_reloc): Add new "error message" argument.
1510
1511 Wed Jan 12 13:36:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1512
1513 Enable gdb to write to core files on more core file readers.
1514 * libbfd.c (bfd_generic_set_section_contents): Remove range check
1515 for section size, it is already done in bfd_set_section_contents
1516 with bfd_get_section_size_now.
1517 * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
1518 osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
1519 Use bfd_generic_set_section_contents instead of bfd_false.
1520
1521 Wed Jan 12 15:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1522
1523 * linker.c: Added initial documentation.
1524
1525 * linker.c (default_indirect_link_order): Don't expect space for
1526 output relocations if there aren't any input relocations.
1527
1528 Tue Jan 11 14:37:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1529
1530 * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
1531 file offsets.
1532
1533 * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
1534 STT_NOTYPE.
1535
1536 Tue Jan 11 09:10:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1537
1538 * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
1539 Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
1540
1541 Tue Jan 11 00:07:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1542
1543 * ecofflink.c: Extensive changes to compress and merge debugging
1544 information, and to write some of out directly rather than saving
1545 it in memory. Several new functions and structures, and new
1546 arguments to existing functions.
1547 * ecoff.c (ecoff_compute_reloc_file_positions): Compute
1548 sym_filepos as well.
1549 (ecoff_get_extr): Use ifdmap instead of ifdbase.
1550 (ecoff_write_object_contents): Don't compute sym_filepos here.
1551 Only output symbols if outsymbols is not NULL.
1552 (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
1553 bfd_ecoff_debug functions. Write out debugging information here.
1554 (ecoff_final_link_debug_accumulate): Adjust for changes in
1555 bfd_ecoff_debug functions.
1556 (ecoff_link_write_external): Use ifdmap rather than ifdbase.
1557 * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
1558 first, to put them in the first memory buffer. Clear fdr field.
1559 (mips_elf_get_extr): Use pointer to unswapped external symbol.
1560 (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
1561 Preserve .text, .data and .bss even if they are empty. Save
1562 pointer to unswapped external symbol rather than copying it.
1563 Don't free up the external symbols.
1564 * libelf.h (elf_symbol_type): Change mips_extr to PTR.
1565 * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
1566 (bfd_ecoff_debug_accumulate): Update declaration.
1567 (bfd_ecoff_debug_accumulate_other): Rename declaration from
1568 bfd_ecoff_debug_link_other and update.
1569 (bfd_ecoff_write_accumulated_debug): Declare.
1570 * bfd-in2.h: Rebuilt.
1571 * Makefile.in: Rebuilt dependencies.
1572
1573 Mon Jan 10 20:46:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1574
1575 * Makefile.in (install): Remove "@" which follows a backslash. In
1576 this position it just causes errors, not suppresses echoes.
1577
1578 Mon Jan 10 09:06:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
1579
1580 * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
1581 field selectors.
1582
1583 Sun Jan 9 04:32:25 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
1584
1585 * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
1586
1587 Fri Jan 7 10:27:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
1588
1589 * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
1590 end of data if they are not contiguous.
1591
1592 * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
1593
1594 Fri Jan 7 15:40:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1595
1596 * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
1597 for .reginfo section here.
1598 (ecoff_new_section_hook): Set it here instead.
1599
1600 Fri Jan 7 10:29:27 1994 Stan Shebs (shebs@andros.cygnus.com)
1601
1602 * bfd-in.h: (bfd_boolean): Add workaround for systems that also
1603 define true and false as enums.
1604 (ALMOST_STDC): Add as alternative to __STDC__.
1605 * bfd-in2.h: Rebuilt.
1606 * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
1607
1608 Thu Jan 6 14:24:44 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1609
1610 * aoutx.h (translate_to_native_sym_flags): Catch the case where
1611 there is no output section.
1612
1613 Thu Jan 6 14:37:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1614
1615 * nlmcode.h (nlm_object_p): If we can't read the fixed header,
1616 count it as a wrong format error, not a system call error, since
1617 the object file might simply be too small.
1618
1619 * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
1620 BFD64.
1621 * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
1622 (BFD64_BACKENDS): Add nlm32-alpha.o. It depends on 64 bit
1623 support, even though it is for an Alpha in 32 bit mode.
1624 * configure.in (nlm32_alpha_vec): Set target64 to true.
1625
1626 * nlm32-gen.c, nlm64-gen.c: Removed. All nlm targets are
1627 different, so there is no point to providing a generic one.
1628 * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
1629 in the backend accessor macros; that should no longer be possible.
1630 * targets.c (target_vector): Removed nlm32_big_generic_vec,
1631 nlm64_big_generic_vec, nlm64_little_generic_vec.
1632 * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
1633 nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
1634 * Makefile.in: Rebuilt dependencies, and
1635 (BFD32_BACKENDS): Removed nlm32-gen.o.
1636 (BFD64_BACKENDS): Removed nlm64-gen.o.
1637 (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
1638
1639 * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
1640
1641 * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
1642 bitsize arguments. Changed all callers (aoutx.h).
1643 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
1644 and bitsize arguments to declaration.
1645 * libbfd.h: Rebuilt.
1646
1647 * ecoff.c: First cut at new style of linker backend for
1648 ECOFF--added a bunch of functions. Also:
1649 (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
1650 (ecoff_slurp_symbolic_header): New function.
1651 (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
1652 (ecoff_compute_reloc_file_positions): New function.
1653 (ecoff_set_section_contents): Get out quickly if count is zero.
1654 Check errors better.
1655 (ecoff_write_object_contents): Put .xdata section in data segment.
1656 Call ecoff_compute_reloc_file_positions. Don't output relocs or
1657 external symbols if outsymbols is NULL.
1658 (ecoff_bfd_final_link): Completely rewritten.
1659 * libecoff.h: Include bfdlink.h.
1660 (struct ecoff_backend_data): Add relocate_section field.
1661 (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
1662 (struct ecoff_link_hash_entry): Define.
1663 (struct ecoff_link_hash_table): Define.
1664 (ecoff_bfd_link_add_symbols): Declare as function, not macro.
1665 (ecoff_bfd_link_hash_table_create): Likewise.
1666 * ecofflink.c (bfd_ecoff_debug_one_external): New function.
1667 (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
1668 * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
1669 * bfd-in2.h: Rebuilt.
1670 * coff-alpha.c (alpha_howto_table): Mark BRADDR as
1671 partial_inplace, and set the src_mask to 0x1fffff.
1672 (alpha_ecoff_get_relocated_section_contents): Remove unused
1673 variable gp_warned.
1674 (alpha_convert_external_reloc): New static function.
1675 (alpha_relocate_section): New static function.
1676 (alpha_ecoff_backend_data): Initialize relocate_section field.
1677 * coff-mips.c (mips_relocate_refhi): New static function.
1678 (mips_relocate_section): New static function.
1679 (mips_ecoff_backend_data): Initialize relocate_section field.
1680
1681 * reloc.c (_bfd_relocate_contents): Corrected signed overflow
1682 checking when there is an addend.
1683
1684 * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
1685 a non a.out file, just pass it to _bfd_default_link_order.
1686 (aout_link_input_section_std): When doing a final PC relative link
1687 against a section symbol, subtract the VMA of the input section.
1688 (aout_link_input_section_ext): Likewise.
1689
1690 * linker.c (default_indirect_link_order): Renamed from
1691 _bfd_generic_indirect_link_order and made static.
1692 (_bfd_generic_final_link): Don't switch on link_order type, just
1693 call _bfd_default_link_order.
1694 (_bfd_default_link_order): Handle bfd_indirect_link_order type.
1695 * genlink.h: Removed declaration of
1696 _bfd_generic_indirect_link_order.
1697 * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
1698 type, just call _bfd_default_link_order.
1699
1700 Tue Jan 4 21:23:37 1994 Ian Lance Taylor (ian@cygnus.com)
1701
1702 * linker.c (generic_link_check_archive_element): Base the name of
1703 the created common section on the name of the section the symbol
1704 came from.
1705 (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
1706 must have a section, so don't bother to create one.
1707
1708 Mon Jan 3 15:32:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1709
1710 * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
1711 * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
1712 If the DYNAMIC flag is set, set it in the exec header.
1713 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
1714 dynamically linked, set the DYNAMIC flag in the BFD.
1715 * libaout.h (N_SET_DYNAMIC): New macro.
1716 (N_DYNAMIC): Add missing 0 in mask.
1717
1718 Mon Jan 3 11:41:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1719
1720 * ecoff.c (ecoff_get_extr): Don't output section symbols as
1721 external symbols.
1722
1723 * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
1724 to unsigned int, because size_t may not be defined in bfd.h.
1725 * bfd-in2.h: Rebuilt.
1726
1727 * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
1728 be a const pointer.
1729 * bfd-in2.h: Rebuilt.
1730 * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
1731 be a const pointer.
1732 * targets.c (bfd_target): Change swap function pointers
1733 accordingly.
1734 * archive.c (do_slurp_coff_armap): Change swap accordingly.
1735 * aix386-core.c: Change NO_GET and NO_GETS accordingly.
1736 * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
1737 ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
1738 accordingly.
1739
1740 * libbfd-in.h (struct artdata): Added tdata field.
1741 (_bfd_add_bfd_to_archive_cache): Declare.
1742 (_bfd_get_elt_at_filepos): Declare.
1743 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
1744 * libbfd.h: Rebuilt.
1745 * archive.c: Cleaned up some more.
1746 (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
1747 pointer elements of artdata.
1748 (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
1749 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
1750 (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
1751 (get_extended_arelt_filename, bfd_construct_extended_name_table,
1752 bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
1753 * ecoff.c: Some comment changes.
1754 (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set
1755 ardata->tdata to raw_armap.
1756 (ecoff_archive_p): Initialize pointer elements of artdata.
1757 * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
1758 add_bfd_to_cache.
1759
1760 * hash.c: Added some documentation.
1761
1762 Mon Jan 3 11:09:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
1763
1764 * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
1765 and do the swapping here rather than calling ntohl from the N_*
1766 macros. This cleans up assumptions about the size of a host long,
1767 the existence to ntohl, etc.
1768
1769 Sat Jan 1 13:50:05 1994 Rob Savoye (rob@darkstar.cygnus.com)
1770
1771 * config.bfd: Add support for VSTa micro-kernel. It currently uses
1772 i386-aout.
1773
1774 Sat Jan 1 10:18:54 1994 David J. Mackenzie (djm@thepub.cygnus.com)
1775
1776 * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
1777 * i386mach3.c (SEGMENT_SIZE): Fix value.
1778
1779 Fri Dec 31 16:23:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1780
1781 Minor cleanups suggested by CodeCenter.
1782 * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
1783 linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
1784 appropriate.
1785 * aoutx.h (struct external_exec): Removed unnecessary declaration.
1786 (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
1787 (adjust_z_magic): Removed useless variable data_vma.
1788 (stringtab_init): Initialize hash_zero.
1789 (add_to_stringtab): Removed unused fourth argument.
1790 (NAME(aout,swap_std_reloc_out)): Removed useless variable
1791 r_addend.
1792 (aout_link_input_section): Added some casts.
1793 * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
1794 bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
1795 Minor code rewriting to make it more C like.
1796 (do_slurp_bsd_armap): Added some casts.
1797 * ecoff.c (ecoff_write_object_contents): Removed useless variable
1798 scn_base.
1799 (ecoff_write_armap): Added some casts. Use "" rather than "\0".
1800 * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
1801 * libaout.h (struct internal_exec): Removed unnecessary
1802 declaration.
1803 * linker.c (_bfd_generic_indirect_link_order): Added a cast.
1804 * opncls.c (new_bfd): Removed a cast.
1805 * reloc.c (bfd_generic_get_relocated_section_contents): Added
1806 some casts.
1807 * srec.c (internal_srec_write_object_contents): Removed useless
1808 variable bytes_written.
1809
1810 Fri Dec 31 11:46:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
1811
1812 * i386mach3.c (N_TXTADDR): Don't define after all.
1813 (TEXT_START_ADDR): Don't include exec header size in value.
1814
1815 Thu Dec 30 15:47:54 1993 David J. Mackenzie (djm@thepub.cygnus.com)
1816
1817 * i386mach3.c (N_TXTADDR): Define.
1818
1819 Thu Dec 30 13:37:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1820
1821 Extensive changes to move the bulk of the linker into BFD so that
1822 more efficient backend code can be written for specific object
1823 files. Only existing efficient backend is a.out.
1824 * seclet.c, seclet.h: Removed.
1825 * hash.c, linker.c, genlink.h: New files.
1826 * bfd-in.h: Removed bfd_error_vector. Declared hash table
1827 structures and functions.
1828 (JUMP_TABLE): Removed bfd_seclet_link, added
1829 bfd_link_hash_table_create, bfd_link_add_symbols and
1830 bfd_final_link.
1831 * All backends: Changed accordingly.
1832 * bfd-in2.h: Rebuilt.
1833 * bfd.c (struct _bfd): Added link_next and archive_pass fields.
1834 Removed ld_symbols field.
1835 (bfd_nonrepresentable_section, bfd_undefined_symbol,
1836 bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
1837 bfd_error_vector): Removed.
1838 (bfd_default_error_trap, bfd_error_trap,
1839 bfd_error_nonrepresentabltrap): Removed.
1840 (bfd_get_relocated_section_contents): Pass link_info. Pass
1841 link_order instead of seclet. Pass symbols.
1842 (bfd_relax_section): Pass link_info.
1843 (bfd_seclet_link): Removed.
1844 (bfd_link_hash_table_create, bfd_link_add_symbols,
1845 bfd_final_link): New macros.
1846 * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
1847 alloca as __builtin_alloca. Declare internal linking functions.
1848 * libbfd.h: Rebuilt.
1849 * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
1850 for months.
1851 * reloc.c (reloc_howto_type): Added error_message argument to
1852 special_function field. Changed all callers and all definitions.
1853 (bfd_get_reloc_size): Make argument a const pointer.
1854 (bfd_perform_relocation): Add error_message argument to hold
1855 string set if return value if bfd_reloc_dangerous. Changed all
1856 callers.
1857 (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
1858 * section.c (asection): Renamed seclets_head and seclets_tail to
1859 link_order_head and link_order_tail.
1860 * targets.c (bfd_target): Replaced seclet argument with link_info
1861 and link_order and symbols arguments in
1862 bfd_get_relocated_section_contents. Added symbols argument to
1863 bfd_relax_section. Removed bfd_seclet_link. Added
1864 bfd_link_hash_table_create, bfd_link_add_symbols and
1865 bfd_final_link.
1866 * libaout.h (struct aoutdata): Added external_syms,
1867 external_sym_count, external_strings, sym_hashes fields.
1868 (obj_aout_external_syms, obj_aout_external_sym_count,
1869 obj_aout_external_strings, obj_aout_sym_hashes): New accessor
1870 macros.
1871 (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
1872 * aoutx.h: Wrote new back end linker routines.
1873 (translate_to_native_sym_flags): Return boolean value. Don't use
1874 bfd_error_vector.
1875 (NAME(aout,write_syms)): Return boolean value. Check return value
1876 of translate_to_native_sym_flags and bfd_write.
1877 * aout-target.h (final_link_callback): New function.
1878 (MY_bfd_final_link): New function.
1879 * aout-adobe.c (aout_adobe_write_object_contents): Check return
1880 value of aout_32_write_syms.
1881 * hp300hpux.c (MY(write_object_contents)): Likewise.
1882 * i386lynx.c (WRITE_HEADERS): Likewise.
1883 * libaout.h (WRITE_HEADERS): Likewise.
1884 * bout.c: Changed functions to use link_info->callbacks rather
1885 than bfd_error_vector, and link_orders rather than seclets.
1886 * coff-alpha.c: Likewise.
1887 * coff-h8300.c: Likewise.
1888 * coff-h8500.c: Likewise.
1889 * coff-sh.c: Likewise.
1890 * coff-z8k.c: Likewise.
1891 * elf32-hppa.c: Likewise.
1892 * reloc16.c: Likewise.
1893 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
1894 up _gp in the hash table rather than in outsymbols.
1895 * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
1896 argument rather than printing them.
1897 * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
1898 link_order arguments rather than seclet. Changed all uses and
1899 definitions.
1900 (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
1901 all uses and definitions.
1902 * libcoff.h: Rebuilt.
1903 * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
1904 not by ECOFF, make it scAbs.
1905 (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
1906 rewritten.
1907 * elf32-mips.c (mips_elf_final_link): Renamed from
1908 mips_elf_seclet_link and rewritten.
1909 * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
1910 field.
1911 (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
1912 hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
1913 Added link_info arguments. Changed all callers.
1914 * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
1915 not NULL.
1916 * oasys.c (oasys_write_sections): Return boolean value rather than
1917 using bfd_error_vector.
1918 (oasys_write_object_contents): Check return value of
1919 oasys_write_sections.
1920 * hosts/std-host.h: Don't declare qsort or strtol.
1921 * Makefile.in: Rebuild dependencies.
1922 (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
1923 (CFILES): Removed seclet.c. Added hash.c and linker.c.
1924 (HFILES): Removed seclet.h. Added genlink.h.
1925
1926 Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1927
1928 * section.c (bfd_get_section_contents): Return zero filled buffer
1929 if section has no contents.
1930
1931 Tue Dec 28 12:43:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1932
1933 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
1934 then skip bfd_perform_relocation even if the addend is non-zero.
1935
1936 Tue Dec 21 09:22:19 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
1937
1938 * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
1939 addend to r_offset field.
1940
1941 * Makefile.in (CFILES): Added coff-sparc.c. Rebuild dependencies.
1942
1943 * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
1944 CALC_ADDEND): Define.
1945
1946 * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
1947 the offsetof because AIX /bin/cc does not like to take the address
1948 of an array. (From Minh Tran-Le.)
1949
1950 Thu Dec 16 13:06:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
1951
1952 * Thu Dec 16 15:41:06 1993 Peter Hoogenboom (hoogen@cs.utah.edu)
1953
1954 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
1955 the return pointer into %r2 if no jump-in-call-delay-slot
1956 optimization was done.
1957
1958 * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
1959
1960 Wed Dec 15 08:04:16 1993 David J. Mackenzie (djm@thepub.cygnus.com)
1961
1962 * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
1963
1964 * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
1965 (HOST_SEGMENT_SIZE): Set to 0 for same reason.
1966
1967 * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
1968 (TEXT_START_ADDR): Correct.
1969 (MY_backend_data): Define.
1970
1971 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
1972 New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
1973
1974 Tue Dec 14 21:48:33 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
1975
1976 * som.c (som_begin_writing): Fix thinkos in auxiliary header
1977 support.
1978 (bfd_som_attach_aux_hdr): Likewise.
1979
1980 Mon Dec 13 23:34:48 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
1981
1982 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
1983 selectors for PIC code.
1984
1985 * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
1986 (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
1987 relocations needed by PIC.
1988
1989 Tue Dec 7 15:47:51 1993 Stu Grossman (grossman at cygnus.com)
1990
1991 * nlmcode.h: Fixes to avoid compiler warnings...
1992
1993 Tue Dec 7 15:10:54 1993 Ian Lance Taylor (ian@cygnus.com)
1994
1995 * libnlm.h (nlm_backend_data): Removed macro definition.
1996 (nlm_alpha_backend_data): Adjusted accordingly.
1997
1998 Sun Dec 5 19:32:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
1999
2000 * som.c (som_begin_writing): Flesh out code for handling simple
2001 auxiliary headers.
2002 (bfd_som_attach_aux_hdr): New function.
2003
2004 * som.h (struct somdata): Add fields for attaching version and
2005 copyright headers. Add accessor macros.
2006
2007 * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
2008 definitions for old versions of HPUX which fail to define them.
2009 (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
2010 now that they're safe. Delete bogus R_STATEMENT relocations.
2011
2012 * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
2013 extra R_DATA_OVERRIDE.
2014 (hppa_som_gen_reloc_type): Generate a relocation for the rounding
2015 mode selector if needed.
2016 (som_write_fixups): Handle requests for a change in the default
2017 rounding mode. Rounding modes do not consume input bytes, but
2018 are just markers much like R_ENTRY and R_EXIT.
2019
2020 Sat Dec 4 19:40:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2021
2022 Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
2023
2024 * elf32-hppa.c: (hppa_elf_reloc): Do not do code reordering when
2025 the branch instruction as originally been nullified.
2026 hppa_elf_reloc): Avoid useless call to bfd_put_32 () in the
2027 case of no code reordering due to an LDO instruction in the
2028 delay slot of the branch. Make sure to relocate the correct
2029 instruction. Do not perform instruction reordering for millicode
2030 calls.
2031 (hppa_elf_build_arg_reloc_stub): Change the relocation type
2032 to R_HPPA_STUB_CALL_17 when special processing might be needed.
2033 (hppa_elf_build_long_branch_stub): Prevent code reordering on
2034 a call from a linker stub to another linker stub and for millicode
2035 calls. Do not trash the return register for calls from one linker
2036 stub to a second linker stub.
2037
2038 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
2039 relocations are not pc-relative.
2040
2041 * hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in
2042 linker stub code.
2043 (COPY_2_31): Likewise.
2044
2045 Fri Dec 3 18:40:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2046
2047 * config/solaris2.mh (HDEFINES): Remove -Dconst=
2048 * hosts/solaris.h: If not __GNUC__, define const as empty.
2049
2050 Thu Dec 2 15:43:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2051
2052 * ecoff.c: Added various casts for 32/64 bit cross targeting.
2053 (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
2054 section so that the linker ignores it.
2055 * ecofflink.c: Added various casts for 32/64 bit cross targeting.
2056 (ecoff_add_bytes): Changed need argument to size_t.
2057 (bfd_ecoff_debug_link_other): Check return value of
2058 ecoff_add_string.
2059
2060 * libbfd-in.h (new_bfd): Use void rather than an empty parameter
2061 list.
2062 * libbfd.h: Rebuilt.
2063
2064 * libnlm.h (struct nlm_obj_tdata): New field backend_data.
2065 (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
2066 (struct nlm_backend_data): New field no_uninitialized_data.
2067 (nlm_no_uninitialized_data): New accessor macro.
2068 * nlmcode.h (nlm_compute_section_file_positions): Handle
2069 no_uninitialized_data.
2070 (nlm_external_reloc_compare): Sort relocs by address for a
2071 particular symbol, to make the sort more stable.
2072 (nlm_write_object_contents): Cast the arguments to qsort. Get the
2073 value of a debugging symbol the same way we get the value of a
2074 normal symbol.
2075 * nlm32-alpha.c: Various changes. Write out GP and .lita relocs.
2076 Set no_uninitialized_data to true.
2077 * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
2078 (nlm32_sparc_backend): Set no_uninitialized_data field false.
2079 * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
2080 before filling it in.
2081
2082 Wed Dec 1 21:47:58 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2083
2084 * som.c (som_section_type, som_decode_symcalss): New functions.
2085 (som_get_symbol_info): Use them.
2086 (som_slurp_symbol_table): Set the section of common and undefined
2087 symbols correctly.
2088
2089 Wed Dec 1 14:15:10 1993 Ken Raeburn (raeburn@cygnus.com)
2090
2091 * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
2092 make gcc happy.
2093
2094 * mipsbsd.c: Changes from Ralph Campbell:
2095 (mips_howto_table_ext): MIPS_RELOC_LO16 should use
2096 complain_overflow_dont.
2097 (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
2098 make gdb happy.
2099
2100 * bfd.c (bfd_errmsgs): Reword invalid-target message.
2101
2102 * config.bfd: For sparc*-*-coff, use sparc-coff.
2103 * configure.in: Handle sparccoff_vec.
2104 * targets.c (sparccoff_vec): Declare.
2105
2106 * reloc.c (bfd_get_reloc_size): New function.
2107 (struct reloc_howto_type): Update documentation of size field.
2108
2109 Wed Dec 1 14:39:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2110
2111 * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
2112 * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
2113 * config/alpha-nlm.mt: New file.
2114 * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
2115 nlm32.o, and nlm.o.
2116 * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
2117 (CFILES): Added nlm32-alpha.c.
2118 Rebuilt dependencies.
2119 * targets.c (nlm32_alpha_vec): Declare.
2120
2121 * libnlm.h (struct nlm_backend_data): New fields
2122 optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
2123 nlm_set_public_section, nlm_get_public_offset. Removed unused
2124 nlm_write_reloc field. Changed nlm_write_import to remove
2125 unnecessary symbol argument. Renamed nlm_write_externals to
2126 nlm_write_external, and changed cound argument from bfd_vma to
2127 bfd_size_type.
2128 (nlm_optional_prefix_size, nlm_backend_object_p_func,
2129 nlm_write_prefix_func, nlm_set_public_section_func,
2130 nlm_get_public_offset_func): New accessor macros.
2131 (nlm_write_reloc_func): Removed.
2132 (nlm_write_external_func): Adjusted for field renaming.
2133 * nlm32-i386.c (nlm_i386_write_import): Renamed from
2134 nlm_i386_write_reloc. Removed old nlm_i386_write_import which
2135 just called old nlm_i386_write_reloc.
2136 (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
2137 Declared. Changed second argument from bfd_vma to bfd_size_type.
2138 (nlm32_i386_backend): Adjusted for changes to fields and names.
2139 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
2140 ifdeffed out code.
2141 (nlm_sparc_write_import): Removed second argument.
2142 (nlm_sparc_write_external): Renamed from
2143 nlm_sparc_write_externals. Changed second argument from bfd_vma
2144 to bfd_size_type.
2145 (nlm32_sparc_backend): Adjusted for changes to fields and names.
2146 * nlmcode.h: Removed some unused code.
2147 (nlm_object_p): Don't destroy tdata pointer. Call
2148 backend_object_p function if it exists.
2149 (nlm_slurp_symbol_table): Removed unused variable rcount. Call
2150 set_public_section_func if it exists instead of checking
2151 NLM_HIBIT.
2152 (nlm_compute_section_file_positions): Account for
2153 optional_prefix_size.
2154 (nlm_write_object_contents): Account for optional_prefix_size.
2155 Removed useless variable write_reloc_func. Changed declaration
2156 and call of write_import_func. Call write_prefix_func if it
2157 exists. Removed unused variables len and temp. Call
2158 get_public_offset_func if it exists rather than setting NLM_HIBIT.
2159 * nlmswap.h: Declare functions.
2160
2161 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
2162 for clarity.
2163 (fprintf_vma, sprintf_vma): Use %lx, not %x.
2164 * bfd-in2.h: Rebuilt.
2165 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
2166 to unsigned long.
2167
2168 * config.bfd: Don't set target64 here, as the setting is ignored.
2169 * configure.in (ecoffalpha_little_vec): Set target64.
2170
2171 * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
2172 in TDEFINES is wrong.
2173
2174 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2175 Remove unused variable output_section.
2176
2177 Tue Nov 30 16:45:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2178
2179 * irix-core.c: New file for Irix 4 and Irix 5 core support.
2180 Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
2181 * coff-mips.c: Irix 4 core file support moved to irix-core.c.
2182 * targets.c: If IRIX_CORE defined, include irix_core_vec in
2183 target_vector.
2184 * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
2185 (HDEPFILES): Define to be irix-core.o.
2186 * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
2187 (HDEPFILES): Define to be irix-core.o.
2188 * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
2189 sco-core.o, which no longer exists.
2190 (CFILES): Added all *-core.c files.
2191 Rebuilt dependencies.
2192
2193 Wed Nov 24 02:02:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2194
2195 * elfcode.h (map_program_segments): Restore check of file_size !=
2196 mem_size, but only if SHT_PROGBITS.
2197
2198 * ecofflink.c: New file to hold ECOFF debug information linking
2199 routines.
2200 * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
2201 ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
2202 ecofflink.c.
2203 (ecoff_get_extr, ecoff_set_index): New functions.
2204 (ecoff_slurp_symbolic_info): Don't save raw_size.
2205 (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
2206 (ecoff_compute_section_file_positions): Don't set EXEC_P just
2207 because there is a start address.
2208 (ecoff_write_object_contents): Handle external symbols here. Use
2209 ecofflink.c functions to write out debugging information.
2210 * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
2211 mips_elf_set_index): New functions.
2212 (mips_elf_seclet_link): Discard empty sections, the .options
2213 section and .gptab sections. Handle linking .mdebug section.
2214 * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
2215 * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
2216 * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
2217 called by gas, so they are public).
2218 * bfd-in2.h: Rebuilt.
2219 * Makefile.in (BFD_LIBS): Added ecofflink.o.
2220 (CFILES): Added ecofflink.c.
2221 (ecofflink.o): New target. Rebuilt dependencies.
2222
2223 Mon Nov 22 22:26:42 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2224
2225 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
2226 a valid magic number if it's been defined.
2227
2228 Mon Nov 22 14:17:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2229
2230 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
2231 no longer requires it.
2232 (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
2233 ecoff_write_object_contents): Don't treat .scommon section
2234 specially.
2235
2236 Mon Nov 22 10:54:27 1993 Fred Fish (fnf@cygnus.com)
2237
2238 Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
2239 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
2240 * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
2241 * bfd/ptrace-core.c: New file for dealing with core files with
2242 start with the ptrace_user structure found on BCS compliant systems.
2243 * bfd/targets.c (ptrace_core_vec): New vector.
2244
2245 Mon Nov 22 02:33:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2246
2247 * Minimal support for reading SOM fixup streams. Allows
2248 objdump -r to do something reasonable.
2249 * som.c (som_get_reloc_upper_bound): Implement.
2250 (som_canonicalize_reloc): Implement.
2251 (som_set_reloc_info, som_slurp_reloc_table): New functions.
2252
2253 Sun Nov 21 13:46:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
2254
2255 * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
2256 * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
2257
2258 Fri Nov 19 14:34:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2259
2260 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
2261 signed_value before sign extending it. Don't subtract out
2262 reloc_entry->address. This makes it compatible with what gas is
2263 generating.
2264
2265 * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
2266 SHT_NOBITS sections.
2267 (map_program_segments): Don't leave the loop after the first
2268 SHT_NOBITS section.
2269 (assign_file_positions_except_relocs): Only force sh_offset and
2270 sh_addr to match modulo maxpagesize for a section which is not
2271 SHT_NOBITS. Changed the method used to force page alignment after
2272 a SHT_NOBITS section to only do it for the last such consecutive
2273 section, and to really force page alignment.
2274
2275 Fri Nov 19 04:02:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
2276
2277 * coffcode.h (coff_slurp_symbol_table): Print more verbose message
2278 in the case of an unknown (or unhandled) storage class.
2279
2280 * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
2281 not be defined here, since it is a host attribute, not a target
2282 one.
2283 * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
2284
2285 * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
2286 defined.
2287
2288 * coff-sparc.c: Define some relocations, based on ELF relocations.
2289 (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
2290 struct coff_reloc_map, sparc_reloc_map,
2291 coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
2292 elf.c, renamed.
2293 (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
2294 (rtype2howto): Index into coff_sparc_howto_table using
2295 dst->r_type.
2296
2297 Thu Nov 18 11:45:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2298
2299 * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
2300 * configure.host (mips-sgi-irix5*) New host; use irix5 (no
2301 hosts/irix5.h created; just use std-host.h).
2302 * config/irix5.mh: New file; like irix4.mh, but don't use -G or
2303 -lmalloc.
2304 * Makefile.in: Rebuilt dependencies.
2305
2306 * ecoffswap.h: Changed type of internal pointers for swap out
2307 functions to const *.
2308
2309 * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
2310 correctly for assembler, but linker support not implemented.
2311 (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
2312 (mips_elf_sym_is_global): New function; at least on Irix 5, all
2313 non section symbols are considered global.
2314 (elf_backend_sym_is_global): Define.
2315 (mips_elf_final_write_processing): New function. Set the MIPS
2316 architecture level correctly.
2317 (elf_backend_final_write_processing): Define.
2318 (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
2319 (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
2320 section to 1. Handle .options section.
2321 (mips_elf_acom_section, mips_elf_acom_symbol,
2322 mips_elf_acom_symbol_ptr): New static variables, used to build a
2323 generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
2324 (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
2325 putting them all in a global .acommon section.
2326
2327 * elfcode.h (bfd_section_from_shdr): Don't dump core if target
2328 section has no ELF section data.
2329 (elf_make_sections): Set addralign of reloc section to 4.
2330 (elf_fake_sections): Likewise.
2331 (map_program_segments): Don't consider section 0.
2332 (assign_file_positions_except_relocs): Don't consider section 0.
2333 In the main loop, skip the symtab and strtab sections, since their
2334 positions are set elsewhere.
2335 (swap_out_syms): Set addralign of symtab section to 4. Set
2336 addralign of strtab sections to 1.
2337 (assign_file_positions_for_relocs): Don't consider section 0.
2338 (write_object_contents): Don't write out section 0.
2339
2340 * libelf.h (struct elf_backend_data): Added fields
2341 elf_backend_sym_is_global and elf_backend_final_write_processing.
2342 * elf32-target.h (elf32_bed): Added corresponding initializers.
2343 * elf64-target.h (elf64_bed): Likewise.
2344 * elfcode.h (sym_is_global): Take abfd argument. Call
2345 elf_backend_sym_is_global if it is not NULL.
2346 (elf_map_symbols): Pass abfd to sym_is_global.
2347 (write_object_contents): Call elf_backend_final_write_processing
2348 if it is defined.
2349
2350 Wed Nov 17 18:43:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2351
2352 * libecoff.h: Include coff/ecoff.h.
2353 (struct ecoff_backend_data): Move external debugging information
2354 fields into a single field pointing to an ecoff_debug_swap
2355 structure.
2356 (ecoff_data_type): Move debugging information fields into a single
2357 field pointing to an ecoff_debug_info structure.
2358 * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
2359
2360 Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
2361
2362 * nlmswap.h: New file to swap fixed header. Included by NLM
2363 backends.
2364 * libnlm.h (struct reloc_and_sec): Define.
2365 (struct nlm_backend_data): Add fields fixed_header_size,
2366 nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
2367 nlm_swap_fhdr_out.
2368 (nlm_fixed_header_size, nlm_read_import_func,
2369 nlm_write_import_func, nlm_swap_fixed_header_in_func,
2370 nlm_swap_fixed_header_out_func, nlm_write_external_func): New
2371 accessor macros.
2372 * nlmcode.h: Use new functions.
2373 * nlm32-i386.c: Provide new functions.
2374 * nlm32-sparc.c: New file; SPARC NLM backend.
2375
2376 Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
2377
2378 * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
2379 garbage bits appearing in the upper end of symbolnums.
2380
2381 * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
2382
2383 Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
2384
2385 * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
2386 * m68klynx.c: Define core file macros.
2387 * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
2388 non-architecture specific stuff into lynx.h.
2389
2390 Tue Nov 16 15:45:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
2391
2392 * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
2393 change PAGE_SIZE to 4096.
2394
2395 Mon Nov 15 11:48:08 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
2396
2397 * Makefile.in (diststuff): New target.
2398
2399 * VERSION: Updated.
2400
2401 Sun Nov 14 23:33:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2402
2403 * som.c (som_object_setup): Do not create dummy ".text", ".data",
2404 and ".bss" sections.
2405 (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
2406 is zero. Recognize BSS type sections and turn off SEC_LOAD and
2407 SEC_DATA (so binutils/size works). Set the correct value for
2408 a section's _raw_size.
2409 (som_slurp_symbol_table): Program entry points, and millicode are
2410 also functions. Mark them as such. Also mark L$* symbols as
2411 debugging symbols.
2412
2413 * bfd-in2.h: Rebuilt.
2414
2415 Sat Nov 13 15:27:15 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2416
2417 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
2418 a pointer to constant data. Delete bogus #define which made the
2419 function useless.
2420
2421 * som.c (som_prep_for_fixups): New function.
2422 (som_write_fixups): New function.
2423 (som_write_space_strings): New function.
2424 (som_write_symbol_strings): New function.
2425 (som_begin_writing): New function.
2426
2427 Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2428
2429 * som.c (som_write_object_contents): Do not abort. Flesh out.
2430 (som_set_section_contents): Do not abort. Flesh out.
2431
2432 * som.c (som_write_headers): New function.
2433 (som_prep_headers): New function.
2434 (som_build_and_write_symbol_table): New function.
2435
2436 * som.c (som_sizeof_headers): Add missing prototype.
2437 (som_set_arch_mach): Do not abort.
2438
2439 * som.c (som_count_spaces): New function.
2440 (som_count_subspaces): New function.
2441 (compare_syms): New function.
2442 (som_compute_checksum): New function.
2443
2444 * som.c (hppa_som_gen_reloc_type): New function.
2445 (som_bfd_reloc_type_lookup): New function.
2446
2447 * som.c (try_prev_fixup): New function.
2448 (som_reloc_skip): New function.
2449 (som_reloc_addend): New function.
2450 (som_reloc_call): New function.
2451
2452 * som.c (som_initialize_reloc_queue): New function.
2453 (som_reloc_queue_insert): Likewise.
2454 (som_reloc_queue_fix): Likewise.
2455 (som_reloc_queue_find): Likewise.
2456
2457 * som.c (som_hppa_howto_table): SOM howto relocation table.
2458 (hppa_som_reloc): New function.
2459
2460 * som.c (struct reloc_queue): New structure to keep track of
2461 the last four multibyte relocations emitted.
2462 (enum pa_symbol_type): Type to fully describe the symbol types
2463 associated with .import/.export assembler directives.
2464
2465 * som.c: Include libhppa.h
2466
2467 * som.c (bfd_som_set_section_attributes): New function.
2468 (bfd_som_set_subsection_attributes): Likewise.
2469 (bfd_som_set_symboL_type): Likewise.
2470 (bfd_som_attach_unwind_info): Likewise.
2471 * som.h: Declare new exported functions.
2472
2473 * som.h (struct som_symbol): Add new fields to hold additional
2474 information needed to build/write symbol tables and fixup streams.
2475 (struct som_section_data_struct): Add new fields to hold additional
2476 information needed to build/write space and subspace headers.
2477 (som_symbol_data): New accessor macro for SOM symbol information.
2478 (R_HPPA_*): Basic relocation types to be used by the assembler.
2479
2480 Fri Nov 12 11:00:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
2481
2482 * trad-core.c (trad_unix_core_file_p): If new hook
2483 TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
2484 corefile being too big.
2485 * hosts/i386sco.h: Define it.
2486
2487 Thu Nov 11 15:16:28 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2488
2489 * bfd.c (struct _bfd): Add hppabsd_core_data.
2490 * targets.c (target_vector): Add hppabsd_core_vec.
2491 * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
2492 section is encountered during core section scanning.
2493 * hppabsd-core.c: New file.
2494 * config/hppabsd.mh: Enable HPPA BSD core files.
2495
2496 * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
2497 which is either commented out or ifdef'd out. Add, update and
2498 clean comments. Fix various indention and spacing problems. Handle
2499 problems related to using "ble" to jump to a stub rather than "bl"
2500 (%r31 is trashed by "ble", but not by "bl").
2501 (NEW_INSTRUCTION): Put inside curly braces.
2502 (CURRENT_STUB_OFFSET): Fix indention problems.
2503 (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
2504 Add, update and clean comments. Handle "ble" %r31 lossage problems.
2505 (hppa_elf_build_long_branch_stub): Likewise.
2506 (hppa_look_for_stubs_in_section): Likewise.
2507 (hppa_elf_stub_check): Remove obsolete function.
2508
2509 * hppa_stubs.h: Add new instructions to deal with %r31 lossage
2510 problems. Delete unused instructions.
2511
2512 Tue Nov 9 11:40:27 1993 Stan Shebs (shebs@rtl.cygnus.com)
2513
2514 * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
2515
2516 Tue Nov 9 11:26:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2517
2518 * elfcode.h (elf_object_p): Rather than looking through an array
2519 of architectures, get the ELF EM_xxx code from the backend
2520 information. Let the generic ELF target match any EM_xxx code not
2521 matched by another ELF target. Call elf_backend_object_p to let
2522 the backend do more checks and set global information.
2523 * libelf.h (struct elf_backend_data): Added elf_machine_code and
2524 elf_backend_object_p fields.
2525 (struct bfd_elf_arch_map): Removed.
2526 (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
2527 * elf32-target.h, elf64-target.h: Initialize elf_machine_code
2528 field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
2529 field with elf_backend_object_p (if it is defined).
2530 * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
2531 elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
2532 elf64-gen.c (ELF_MACHINE_CODE): Defined.
2533 * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
2534 routines.
2535 (mips_elf_object_p): Set the right machine number.
2536 (mips_elf_ecoff_debug_swap): Defined.
2537 (elf_backend_object_p): Defined to be mips_elf_object_p.
2538 (elf_backend_ecoff_debug_swap): Defined to be
2539 mips_elf_ecoff_debug_swap.
2540 * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
2541
2542 * libbfd-in.h (target_vector, default_vector): Declare.
2543 * libbfd.h: Rebuilt.
2544 * format.c (target_vector, default_vector): Don't declare.
2545
2546 * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
2547 for R_MIPS_26. Correct overflow detection requires matching the
2548 upper four bits of the destination against the PC. From Ted Lemon
2549 <mellon@pepper.ncd.com>.
2550
2551 * bout.c (b_out_reloc_type_lookup): Return type should point to
2552 const data.
2553 * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
2554 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
2555 * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
2556 * coff-i386.c (coff_i386_reloc): Made howto const.
2557 * oasys.c (oasys_write_data): Made how const.
2558
2559 * libelf.h: Added some comments.
2560 (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
2561 field. Removed unused write_relocs field.
2562 * elf32-target.h: Adjusted elf_backend_data initialization
2563 accordingly.
2564 * elf64-target.h: Corrected elf_backend_data initialization to
2565 fill in all fields and to set elf_64_p to 1.
2566
2567 Mon Nov 8 18:13:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2568
2569 * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
2570 to filepos in SHT_STRTAB case.
2571 (assign_file_position_for_section): Set BFD section filepos as
2572 well as ELF section sh_offset.
2573
2574 * reloc.c: Use const instead of CONST.
2575 (bfd_perform_relocation): Make variable howto a const pointer.
2576 * bfd-in2.h, libbfd.h: Rebuilt.
2577
2578 Mon Nov 8 12:19:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
2579
2580 * Makefile.in (realclean): Don't remove generated headers. Reverts
2581 change of 2 Jul 1993.
2582
2583 Mon Nov 8 06:08:31 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
2584
2585 * configure.bfd: make unixware equivalent to sysv4.
2586
2587 * config/i386-nlm.mt: bring in elf config; make it the default.
2588
2589 Sun Nov 7 20:21:38 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2590
2591 * libbfd.c (bfd_put_8): Add parens around reference to "val"
2592 argument.
2593
2594 Fri Nov 5 21:45:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
2595
2596 * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
2597 i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
2598
2599 Fri Nov 5 15:17:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2600
2601 * coffcode.h (coff_write_object_contents): Zero out internal_a.
2602
2603 Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com)
2604
2605 * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
2606 core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
2607 section.c, syms.c, targets.c:
2608 Doc cleanup (spelling, punctuation, grammar, formatting).
2609 * bfd-in2.h, libbfd.h: Rebuild.
2610
2611 Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com)
2612
2613 * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
2614 * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
2615
2616 Thu Nov 4 08:54:30 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
2617
2618 * From Pete Hoogenboom (hoogen@cs.utah.edu)
2619 * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
2620 in last change. Always rebuild symbol extension section the first
2621 time though if output sections exist (fixes ld -r problems).
2622
2623 Thu Nov 04 08:08:46 1993 Jeffrey Wheat (cassidy@cygnus.com)
2624
2625 * Makefile.in: Add .PHONY for check and installcheck rules.
2626
2627 Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
2628
2629 * libbfd-in.h (artdata): Use long, not time_t for portability, at
2630 least to HPUX. File below is a derived file.
2631
2632 Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
2633
2634 * libbfd.h (artdata): Use long, not time_t for portability, at
2635 least to HPUX.
2636
2637 Tue Nov 2 09:32:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
2638
2639 * config.bfd: Use bigmips for mips*-*-bsd*.
2640
2641 Mon Nov 1 14:30:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2642
2643 * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
2644 Handle symbol number of zero.
2645
2646 * reloc.c (enum bfd_reloc_code_real): Added
2647 BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
2648 BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
2649 * bfd-in2.h: Rebuilt.
2650 * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
2651 BFD_RELOC_MIPS_LITERAL.
2652 * elf32-mips.c (mips_reloc_map): Handle new relocs.
2653 (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
2654 checks slightly.
2655
2656 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
2657 MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
2658 (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
2659 MY_bfd_seclet_link): Define.
2660 (MY_bfd_reloc_type_lookup): Rename from
2661 MY_reloc_howto_type_lookup.
2662 (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
2663 (MY(vec)): Use JUMP_TABLE rather than listing functions.
2664 * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
2665 MY_canonicalize_reloc, MY_write_object_contents): Don't define in
2666 terms of MY, because that causes a recusive invocation of CAT when
2667 expanded within JUMP_TABLE, and ANSI compilers don't expand
2668 recursive macros.
2669 * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
2670 MY_reloc_howto_type_lookup, and don't define in terms of MY.
2671 (MY_canonicalize_reloc): Don't define in terms of MY.
2672 (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
2673 than listing functions.
2674
2675 Mon Nov 1 09:12:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
2676
2677 * config.bfd: Use m68k-elf for m68*-*-sysv4*.
2678
2679 See file ChangeLog.1
2680
2681 \f
2682 Local Variables:
2683 mode: indented-text
2684 left-margin: 8
2685 fill-column: 74
2686 version-control: never
2687 End:
This page took 0.087829 seconds and 5 git commands to generate.