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