* doc/c-mips.texi: Document -m4010 and -mno-4010.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6f904fce
ILT
1Tue Jul 11 12:29:49 1995 Rick Sladkey <jrs@world.std.com>
2
3 * elf.c (_bfd_elf_find_nearest_line): Handle the simple case where
4 there is no debugging information.
5
5b2c2b36
KR
6Mon Jul 10 11:45:55 1995 Ken Raeburn <raeburn@cygnus.com>
7
8 * makefile.dos (OBJS): Add binary.o and tekhex.o. From DJ
9 Delorie.
10
d11d1fb6
ILT
11Mon Jul 10 11:09:58 1995 Ian Lance Taylor <ian@cygnus.com>
12
6f904fce
ILT
13 * linker.c (set_symbol_from_hash): bfd_link_hash_new case: Don't
14 abort; it can happen for constructor symbols when not building
15 constructors.
16
921fc281
ILT
17 * coff-i960.c (coff_i960_relocate): Correct typo: use ! on strcmp,
18 not on string.
56fd39e8
ILT
19 * cofflink.c (_bfd_coff_generic_relocate_section): Remove unused
20 local i.
21 * coff-arm.c (coff_arm_rtype_to_howto): Don't declare.
9ab8a0e8
ILT
22 (PCRELOFFSET): Define if not already defined.
23 * Makefile.in: Rebuild dependencies.
24 (BFD32_BACKENDS): Add coff-arm.o
25 (CFILES): Add coff-arm.c, pe-arm.c, pei-arm.c.
921fc281 26
e3364701
ILT
27 * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
28 using bfd_alloc, not malloc.
29 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
30 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
31 * i386linux.c (linux_link_hash_table_create): Likewise.
32 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
33 * sunos.c (sunos_link_hash_table_create): Likewise.
34
951fe66d
ILT
35 Based on patches from Eric Youngdale <eric@aib.com>:
36 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): If -Bsymbolic,
37 output a DT_SYMBOLIC dynamic entry.
38 (elf_adjust_dynamic_symbol): If -Bsymbolic, don't require a PLT
39 entry for a locally defined symbol.
40 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, do warn
41 about undefined symbols, and fill in the GOT entry for a symbol
42 defined in a regular object file.
43 (elf_i386_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
44 reloc rather than a GLOB_DAT reloc for a symbol defined in a
45 regular object file.
46 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, do warn
47 about undefined symbols, and fill in the GOT entry for a symbol
48 defined in a regular object file.
49 (elf_m68k_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
50 reloc rather than a GLOB_DAT reloc for a symbol defined in a
51 regular object file.
52 * elf32-sparc.c (elf32_sparc_relocate_section): If -Bsymbolic, do
53 warn about undefined symbols, and fill in the GOT entry for a
54 symbol defined in a regular object file.
55 (elf32_sparc_finish_dynamic_symbol): If -Bsymbolic, output a
56 RELATIVE reloc rather than a GLOB_DAT reloc for a symbol defined
57 in a regular object file.
58
d11d1fb6
ILT
59 * config/m68k-coff.mt (SELECT_VECS): Rename from SELECT_VECTORS.
60 Correct elements to be actual BFD vector names.
61
62 * Makefile.in (Makefile): Don't depend upon @frags@.
63 (config.status): Depend upon @frags@.
64
c7e76b5e
ILT
65Fri Jul 7 17:36:44 1995 Ian Lance Taylor <ian@cygnus.com>
66
67 * coffgen.c (coff_renumber_symbols): Sort defined symbols that are
68 neither BSF_FUNCTION not BSF_NOT_AT_END just before undefined
69 symbols.
70 * coffcode.h (coff_slurp_symbol_table): Set BSF_FUNCTION as well
71 as BSF_NOT_AT_END.
72
53751507
KR
73Fri Jul 7 17:16:15 1995 Ken Raeburn <raeburn@cygnus.com>
74
75 * Makefile.in (do_mostlyclean): Remove config.log.
76 (do_distclean): Remove config.cache.
77
b10e9afb
ILT
78Thu Jul 6 14:37:43 1995 Ian Lance Taylor <ian@cygnus.com>
79
1d5d75e9
ILT
80 * elf32-i386.c (elf_i386_relocate_section): Revert May 24 patch.
81 Don't copy PC32 reloc against section into shared object.
82
b10e9afb
ILT
83 * Makefile.in: Rebuild dependencies.
84 (CFILES): Added elflink.c.
85 (Makefile): Depend upon config.status, not configure.in.
86 (config.status): New target; depend upon configure configure.host
87 and config.bfd.
88
ede4eed4
KR
89Wed Jul 5 20:17:14 1995 Ken Raeburn <raeburn@cygnus.com>
90
91 * elfcore.h, elflink.h, elfcode.h, elf.c, elflink.c: Moved some
92 primarily size-independent code from elfcode.h to elf.c and new
93 file elflink.c; moved out other core- or linker-related routines
94 into other new .h files for clarity. Renamed many routines to
95 start with bfd_elf or _bfd_elf. Added a structure of
96 size-dependent but target-independent info to elfcode.h.
97 * Makefile.in: Build elflink.o. Update dependencies.
98 * libelf.h: Updated some declarations. Added a definition for the
99 new structure in elfcode.h. Added more fields to elf backend data
100 structure.
101 * elfxx-target.h: Refer to the appropriate size-dependent info.
102 * elf32-*.c: Changed some function names. Moved common
103 create_dynamic_sections code from m68k, sparc, and i386 support
104 into elflink.c. Define some new macros to fill in new fields of
105 back end data. Also clean up some "gcc -Wall" warnings regarding
106 unused or uninitialized variables.
107
0a8310ac
KR
108 * Makefile.in (BFD_LIBS): No, don't put elflink.o here.
109 * configure.in: Include it here whenever elf.o is specified.
110
9525b61b
ILT
111Wed Jul 5 10:31:47 1995 Ian Lance Taylor <ian@cygnus.com>
112
6c495350
ILT
113 * elf32-mips.c (mips_elf_object_p): Unconditionally set
114 elf_bad_symtab, since sometimes the symbol table is messed up and
115 the last symbol is global.
116
a2546fce
ILT
117 * ecoff.c (_bfd_ecoff_bfd_is_local_label): New function.
118 * libecoff.h (_bfd_ecoff_bfd_is_local_label): Declare.
119 * elf32-mips.c (mips_elf_is_local_label): New static function.
120 (bfd_elf32_bfd_is_local_label): Define.
121
9525b61b
ILT
122 * configure.in: Use $ac_config_sub, not $configsub.
123 * configure: Likewise.
124
125 Permit --enable-targets=ieee:
126 * config.bfd (*-*-ieee*): New target.
127 * config/ieee.mt: New file.
128
8c693660
KR
129Wed Jul 5 04:16:35 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
130
b6113657
KR
131 * config/i386aix.mh (HDEFINES): Remove -DFASCIST_FDOPEN.
132
8c693660
KR
133 Autoconfiscation:
134 * configure.in, Makefile.in, doc/Makefile.in: Switch from Cygnus
135 configure to autoconf ways of processing --enable arguments,
136 setting up symlinks, incorporating makefile fragments, printing
137 messages at configuration time, setting variables in Makefile.
138 Deleted some unused variables. Check for ranlib via autoconf.
139 For now, configure script removes doc/config.status.
140 * configure: New file.
141 * dep-in.sed: Use @SRCDIR@ instead of @srcdir@, so Makefile.in
142 line doesn't get broken by configure.
143 * doc/configure.in: Removed.
144
194fc935
ILT
145Tue Jul 4 12:22:21 1995 Ian Lance Taylor <ian@cygnus.com>
146
27b1ec94
ILT
147 * archive.c (_bfd_construct_extended_name_table): If
148 BFD_TRADITIONAL_FORMAT is set, limit the length of all file names
149 to ar_max_namelen.
150 (bfd_dont_truncate_arname): If BFD_TRADITIONAL_FORMAT is set, call
151 bfd_bsd_truncate_arname.
152 (_bfd_write_archive_contents): Revert June 1 change.
e5100743 153
b5279eb6
ILT
154 * elfcode.h (NAME(bfd_elf,record_link_assignment)): Add provide
155 argument.
156 * bfd-in.h (bfd_elf32_record_link_assignment): Update prototype.
157 (bfd_elf64_record_link_assignment): Likewise.
158 * bfd-in2.h: Rebuild.
159
b176e1e9
ILT
160 * libelf.h (struct elf_link_hash_table): Add needed field. Remove
161 saw_needed field.
162 * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
163 is an empty string, don't make a DT_NEEDED entry in the output
164 file. Record all DT_NEEDED entries found in input dynamic
165 objects.
166 (elf_link_output_extsym): Don't check saw_needed when issuing
167 warnings.
168 * elf.c (_bfd_elf_link_hash_table_init): Initialize needed, not
169 saw_needed.
170 (bfd_elf_get_needed_list): New function.
171 * bfd-in.h (struct bfd_elf_link_needed_list): Define.
172 (bfd_elf_get_needed_list): Define.
173 * bfd-in2.h: Rebuild.
174
194fc935
ILT
175 * ecoff.c (_bfd_ecoff_find_nearest_line): Also initialize
176 find_buffer and fdrtab_len fields of newly allocated
177 find_line_info structure.
178
c40439a2
JL
179Mon Jul 3 17:03:52 1995 Jeff Law (law@snake.cs.utah.edu)
180
181 * som.c (hppa_som_gen_reloc_type): New argument "sym_diff",
182 nonzero when we're generating relocations for an expression
183 using the difference of two symbols. All callers changed.
184 Handle difference of symbols for both R_HPPA and R_COMPLEX
185 cases.
186 (som_write_fixups): Handle R_COMP1, R_COMP2 and R_CODE_EXPR
187 fixups.
188
bd676d26
SC
189Mon Jul 3 13:55:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
190
191 * config.bfd (win32): New configuration.
192 * configure.host (pe): Changed to i386win32.
193 * config/i386pe.mh: Deleted.
194 * config/i386win32.mh: New file.
195
8809320b
ILT
196Mon Jul 3 11:30:45 1995 Ian Lance Taylor <ian@cygnus.com>
197
3a6eecd4
ILT
198 * ecoff.c (_bfd_ecoff_find_nearest_line): If we allocate
199 find_line_info, clear the fdrtab field.
200
9fd10c34
ILT
201 * targets.c (enum bfd_flavour): Add bfd_target_msdos_flavour here,
202 rather than in bfd-in2.h.
203
204 * bfd.c (enum bfd_error): Define bfd_error_no_armap.
205 (bfd_errmsgs): Add string for bfd_error_no_armap.
206 * bfd-in2.h: Rebuild.
207 * ecoff.c (ecoff_link_add_archive_symbols): If an archive has no
208 armap, set bfd_error_no_armap rather than bfd_error_no_symbols.
209 * elfcode.h (elf_link_add_archive_symbols): Likewise.
210 * linker.c (_bfd_generic_link_add_archive_symbols): Likewise.
211
3004a68c
ILT
212 * elfcode.h (elf_link_add_object_symbols): Permit common and
213 indirect symbols in weakdefs BFD_ASSERT.
214 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Simplify
215 BFD_ASSERT to permit some legal, but odd, cases.
30dc85f1
ILT
216 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
217 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
218
8809320b
ILT
219 * Makefile.in: Rebuild dependencies.
220 (BFD32_BACKENDS): Add versados.o.
221 (CFILES): Add pe-i386.c, pei-i386.c, and versados.c.
222start-sanitize-arc
9fd10c34
ILT
223 (elf32-arc.o): New target. This target should be removed when
224 elf32-arc.c can be added to CFILES, after which the automatic
225 dependency building will handle it.
8809320b
ILT
226end-sanitize-arc
227
be89267c
ILT
228Sun Jul 2 17:49:32 1995 Ian Lance Taylor <ian@cygnus.com>
229
230 * cofflink.c (_bfd_coff_generic_relocate_section): Cast base_file
231 to FILE * before using it.
232 * stab-syms.c: Revert yesterday's patch.
233
033d545b
FF
234Sat Jul 1 12:10:42 1995 Fred Fish <fnf@cygnus.com>
235
236 * stab-syms.c (stdio.h): Include prior to libaout.h, which
237 includes bfdlink.h, which now uses FILE.
238
b968e4f4
KR
239Sat Jul 1 00:11:08 1995 Ken Raeburn <raeburn@cygnus.com>
240
241 * elfxx-target.h: New file.
5cab016b
KR
242
243 * libelf.h (struct elf_backend_data): Remove elf_64_p field.
244 * elfxx-target.h (elfNN_bed): Don't set it.
245
b968e4f4
KR
246 * elf32-target.h, elf64-target.h: Deleted.
247 * Makefile.in (elf32-target.h, elf64-target.h): Build them from
248 elfxx-target.h.
249
ece22cd0
SC
250Fri Jun 30 16:07:18 1995 Steve Chamberlain <sac@slash.cygnus.com>
251
252 * cofflink.c (_bfd_coff_generic_relocate_section): Compare
253 the full text of .reloc or .edata section names.
254
033d545b 255Fri Jun 30 15:47:37 1995 Fred Fish <fnf@cygnus.com>
d84d840f
FF
256
257 * cofflink.c (_bfd_coff_generic_relocate_section):
258 Remove extra '+'.
259
69b799df
SC
260Thu Jun 29 17:24:52 1995 Steve Chamberlain <sac@slash.cygnus.com>
261
262 * coff-h8300.c (COFF_LONG_FILENAMES): Define.
263
89665c85
SC
264Wed Jun 28 18:04:42 1995 Steve Chamberlain <sac@slash.cygnus.com>
265
266 * Makefile.in: versados.o is now conditionally built.
267 * coffcode.h (add_data_entry): New function.
268 (coff_write_object_contents): Clean up. Calculate
269 data entries.
270 * cofflink.c (_bfd_coff_generic_relocate_section):
271 .reloc and .edata sections are IMAGE_BASED too.
272 If there's a base_file then write out base information.
273 * configure.host (i386-*-pe): New.
274 * syms.c (coff_section_type): Only scan prefixes.
275 * targets.c (bfd_target_vector): Versados is now conditionally
276 built.
277 * config/m68k-coff.mt: Build versados.o
278 * hosts/i386pe.h: New file.
279
6cb964d4
JL
280Mon Jun 26 13:53:49 1995 Jeff Law (law@snake.cs.utah.edu)
281
282 * elf32-hpa.c (elf32_hppa_relocate_section): Close comment before
283 R_PARISC_DPREL21L handling.
284
285Thu Jun 22 19:28:36 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
286
287 Sun May 7 11:53:41 MDT 1995 Bryan Ford <baford@cs.utah.edu>
288
289 * config/i386-moss.mt: created.
290
f4761bb2
SC
291Thu Jun 22 08:56:10 1995 Steve Chamberlain <sac@slash.cygnus.com>
292
293 * reloc.c (bfd_perform_relocation): Add case for -ve words.
294
775d1255
JL
295Wed Jun 21 13:13:49 1995 Jeff Law (law@snake.cs.utah.edu)
296
297 * elf32-hppa.c (elf32_hppa_relocate_section): Don't try to apply a
298 relocation against an undefined symbols.
299
9eacc5c4
SC
300Wed Jun 21 10:16:10 1995 Steve Chamberlain <sac@slash.cygnus.com>
301
302 * versados.c: Second pass/rewrite.
303
304Mon Jun 19 08:40:45 1995 Steve Chamberlain <sac@slash.cygnus.com>
305
306 * syms.c (coff_section_type): Compare only the front part
307 of a section name. (bfd/7238)
308
9a688057
JL
309Sat Jun 17 09:40:44 1995 Jeff Law (law@snake.cs.utah.edu)
310
9fe4fade
JL
311 * elf32-hppa.c (elf32_hppa_size_stubs): Set the size of the stub
312 section if we get an error.
313
9a688057
JL
314 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Don't mess
315 with the operands of an R_PARISC_DPREL21L relocation if the insn
316 is not "addil <symbol>,%r27".
317
018dafca
SS
318Fri Jun 16 15:04:47 1995 Stan Shebs <shebs@andros.cygnus.com>
319
320 * bfd-in.h (NT_subsystem, NT_stack_heap): Declare but don't
321 define.
322 * bfd-in2.h: Rebuilt.
323 * bfd.c (NT_subsystem, NT_stack_heap): Define.
324
31dabb6c
JL
325Fri Jun 16 00:07:25 1995 Jeff Law (law@snake.cs.utah.edu)
326
327 * elf32-hppa.c (elf32_hppa_bfd_link_link_relocate): Use the right
328 type field (there are two!) when checking to see if $global$ is
329 defined.
330
e0151f38
SS
331Thu Jun 15 14:03:47 1995 Stan Shebs <shebs@andros.cygnus.com>
332
333 * bfd-in.h, bfd-in2.h (bfd_boolean): Rename bfd_true, bfd_false
334 to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
335 * coffswap.h (coff_swap_scnhdr_out): Remove version that was
336 hacked for MPW C.
337 * mpw-config.in: Set shell vars instead of pasting to makefile
338 for each configuration, edit coffswap.h to make MPW C not choke.
339 (i386-unknown-coff, sh-hitachi-hms): Recognize.
340 * mpw-make.in (BFD_LIBS): Add versados.c.o.
341
342 * versados.c (versados_scan): Properly cast results from bfd_alloc.
343
344Wed Jun 14 15:27:32 1995 Steve Chamberlain <sac@slash.cygnus.com>
345
346 * cofflink.c (process_embedded_commands): New function
347 reads and handles .drectve sections for PE.
348 (coff_link_input_bfd): Call new function if PE.
349
080f1fcb
JL
350Mon Jun 12 12:09:39 1995 Jeff Law (law@snake.cs.utah.edu)
351
352 * bfd-in.h (bfd_set_section_vma): Case true to a boolean.
353 (bfd_set_cacheable): Likewise.
354 * bfd-in2.h: Rebuilt.
355
d1ec549d
SC
356Fri Jun 9 12:20:28 1995 Steve Chamberlain <sac@rtl.cygnus.com>
357
358 * elfcode.h (elf_sort_hdrs): Rewrite to be symmetrical.
359
3b1f83ad
JL
360Fri Jun 9 12:49:00 1995 Jeff Law (law@snake.cs.utah.edu)
361
6167a840
JL
362 * targets.c: Add copy_private_symbol_data and link_split_section
363 to the target vector.
364 * libbfd-in.h (_bfd_generic_bfd_copy_private_symbol_data): Define.
365 (_bfd_nolink_bfd_link_split_section): Likewise.
366 (bfd_generic_link_split_section): Declare.
367 * syms.c (bfd_copy_private_symbol_data): Define.
368 * linker.c (bf_link_split_section): Likewise.
369 * som.c (som_bfd_copy_private_symbol_data): New function
370 (som_bfd_link_split_section): Likewise.
371 * All other targets updated with default versions of new routines.
372
373 * Take out my braindamaged bfd_true/bfd_false changes from earlier
374 today. Replace with just:
3b1f83ad
JL
375 * bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
376 compiling with g++-2.6 or later.
3b1f83ad
JL
377 * bfd-in2.h: Rebuilt.
378
9ff2fb3d
SC
379Fri Jun 9 07:54:29 1995 Steve Chamberlain <sac@slash.cygnus.com>
380
e6304bc7
SC
381 * versados.c (struct esd, get_4): Lint; use unsigned chars.
382
9ff2fb3d
SC
383 * coff-i960.c (coff_i960_relocate): Compare output section names
384 when converting for vxworks.
385
0ef449df
KR
386Wed Jun 7 19:01:30 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
387
388 * elfcode.h (elf_fake_sections): Permit .scommon or COMMON
389 sections as random SHT_NOBITS sections, in case a linker script is
390 strange.
391
392Tue Jun 6 17:29:32 1995 Steve Chamberlain <sac@slash.cygnus.com>
393
394 * bfd-in.h (NT_subsystem, NT_stack_heap): Moved from pe.h
395 * coff-i386.c (coff_i386_rtype_to_howto): Get PE relocs right.
396 * coffcode.h (coff_mkobject): Set pe tdata bit when using PE.
397 * cofflink.c (COFF_WITH_PE code): Test on obj_pe bit rather
398 than conditional compile.
399 * configure.in: Fix PE dependencies.
400 * libcoff-in.h (obj_pe): New.
401 (coff_tdata): Added pe entry.
402 * libcoff.h: Regenerated.
403
404Mon Jun 5 09:07:13 1995 Steve Chamberlain <sac@slash.cygnus.com>
405
406 * coff-a29k.c (coff_a29k_adjust_symndx): Completely parenthesize
c7e76b5e 407 macro.
0ef449df 408
1be0c30e
KR
409Mon Jun 5 02:15:20 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
410
9e1b4d57
KR
411 Linker support for m68k-elf from Andreas Schwab
412 <schwab@issan.informatik.uni-dortmund.de>:
413 * elfcode.h (elf_link_add_object_symbols): Check for NULL when
414 looping through the symbol hashes.
415 (elf_bfd_final_link): When looking for _init and _fini don't use
416 the symbol if it is imported from another object.
417 * elf32-m68k.c: Relocation type changed from REL to RELA. Regular
418 and dynamic linking support functions added, similar to other elf
419 targets.
420
1be0c30e
KR
421 * config.bfd (i[345]86-*-gnu*): Use ELF configuration.
422
c3c112fc
SC
423Fri Jun 2 18:54:59 1995 Steve Chamberlain <sac@slash.cygnus.com>
424
425 * versados.c: New file.
426 * bfd-in2.h (struct _bfd): New field.
427 * bfd.c (struct _bfd): New field.
428 * configure.in (versados_vec): New field.
429 * targets.c (bfd_flavor): Added versados.
430
fa29f969
SC
431Thu Jun 1 13:51:49 1995 Steve Chamberlain <sac@slash.cygnus.com>
432
433 * coffcode.h (sec_to_styp_flags, styp_to_sec_flags,
434 coff_new_section_hook): Any section that starts ".stab"
435 is now marked as debugging.
436
45fb9cd1
KR
437Thu Jun 1 16:15:16 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
438
db88e79a
KR
439 * archive.c (_bfd_write_archive_contents): Disable extended name
440 table until it can be made optional, so that native AR has half a
441 chance on SunOS and HP/UX.
442
45fb9cd1
KR
443 * linker.c (_bfd_generic_link_output_symbols, case
444 bfd_link_hash_indirect): Add cast to correct pointer types.
445
446Sat May 27 21:37:31 1995 J.T. Conklin <jtc@rtl.cygnus.com>
447
448 * config.bfd (m68k-bull-sysv*): Added strip_underscore=yes.
449 (m68k-est-coff): Removed. target does not effect object format.
450
a3444c49
SC
451Wed May 24 10:52:01 1995 Steve Chamberlain <sac@slash.cygnus.com>
452
45fb9cd1
KR
453 * linker.c (_bfd_generic_link_output_symbols): Cope with
454 indirect symbols.
455
a3444c49
SC
456 * elf32-i386.c (elf_i386_relocate_section): Give error
457 message when linking to a shared reloc which isn't there.
458
459Wed May 24 10:40:00 1995 Steve Chamberlain <sac@slash.cygnus.com>
460
461 Support for ARM-PE.
462
463 * Makefile.in, coffcode.h, config.bfd, configure.in, pe-arm.c,
9ab8a0e8 464 pei-arm.c, coff-arm.c, reloc.c, targets.c, config/arm-pe.mt:
a3444c49
SC
465 Support for ARM COFF/PE.
466
467Tue May 23 19:24:58 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
468
469 * bfd.c (bfd_get_relocated_section_contents): Now a function,
470 tries calling routine from input bfd target vector for
471 bfd_indirect_link_order. Put a declaration into the header file.
472 * bfd-in2.h: Regenerated.
473 * elf32-mips.c (gprel16_with_gp): New function, split out from
474 mips_elf_gprel16_reloc.
475 (mips_elf_gprel16_reloc): Call it. If output bfd target vector
476 isn't elf flavoured, abort, since it's assumed to be elf in some
477 of this code, including the code that looks up the gp value.
478 (elf32_mips_get_relocated_section_contents): New function,
479 modified from bfd_generic_get_relocated_section_contents to deal
480 with passing gp to gprel16_with_gp.
481 (bfd_elf32_bfd_get_relocated_section_contents): New macro.
482 * elf32-target.h (bfd_elf32_bfd_get_relocated_section_contents):
483 Don't define if already defined.
484
58c56c60
JL
485Tue May 23 15:58:15 1995 Jeff Law (law@snake.cs.utah.edu)
486
487 * Makefile.in: Install bfdlink.h too.
488
489Sun May 21 22:25:09 1995 Jeff Law (law@snake.cs.utah.edu)
490
491 * elf32-hppa.c (elf32_hppa_relocate_section): Handle undefined and
492 notsupported return codes from final_link_relocate (used when
493 $global$ is undefined or nonexistant).
494 (elf32_hppa_bfd_link_link_relocate): If $global$ exists, but is
495 not defined,then return bfd_reloc_undefined.
496
7cdedb42
SC
497Fri May 19 10:00:14 1995 Steve Chamberlain <sac@rtl.cygnus.com>
498
499 * coffswap.h: (IMAGE_BASE): Define to 0 if not.
500
ff15324f
KR
501Thu May 18 04:24:01 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
502
503 Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
504
505 * aoutx.h (aout_link_input_section_standard): If defined, call
506 MY_relocatable_reloc before doing a partial relocation.
507
508 * aout-arm.c: (WRITE_HEADERS): Delete.
509 (NAME): Define version to override default in aoutx.h
510 (MY(howto_table)): Reformat. Alter some entries slightly.
511 (RELOC_ARM_BITS_NEG_{BIG,LITTLE}): Define.
512 (MY(reloc_howto), MY(put_reloc), MY(relocatable_reloc)): New functions.
513 (MY_reloc_howto, MY_put_reloc, MY_relocatable_reloc): Define.
514 (MY(fix_pcrel_26)): Renamed from aoutarm_fix_pcrel_26, return
515 bfd_reloc_ok not bfd_reloc_continue.
516 (MY(fix_pcrel_26_done)): Likewise.
517 (MY(bfd_reloc_type_lookup)): Renamed from aoutarm_reloc_type_lookup.
518 (MY_bfd_link_hash_table_create, MY_bfd_link_add_symbols,
519 MY_bfd_final_link): Delete.
520 (MY_swap_std_reloc_in, MY_swap_std_reloc_out, MY_get_section_contents):
521 Define.
522 (aoutx.h): Include it.
523 (MY(swap_std_reloc_{in,out})): New functions.
524 Use RELOC_ARM_BITS_NEG_{BIG,LITTLE} to extract negative reloc bit.
525 (aoutarm_squirt_out_relocs): Delete.
526
527 From: David Taylor (dtaylor@armltd.co.uk)
528 * config/arm[lb]-aout.mt: New files.
529 * aout-arm.c: New file.
530 * config.bfd: Handle arm{,e[lb]}-*-aout
531 * configure.in: Add vetor for aout_arm_{big,little}_vec.
532 * reloc.c: New relocation types for the ARM.
533 * targets.c (aout_arm_{big,little}_vec): declare.
534
8558c4e3
JK
535Tue May 16 10:29:51 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
536
537 * libbfd.c (bfd_stat): If bfd_cache_lookup returns an error,
538 return an error to the caller. Call bfd_set_error on errors.
539
540Tue May 16 14:44:45 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
541
542 * libcoff-in.h (coff_renumber_symbols): Modified prototypes in
543 accordance with 11 May libcoff.h change.
544
b297038d
SC
545Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
546
547 tekhex.c (first_phase): Understand type 0 symbols.
548 (tekhex_write_object_contents): Fix typo in final record.
549
550Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
551
b297038d
SC
552 * coff-i960.c (optcall_callback): don't try and optimize
553 undefined refs.
554 (coff_write_relocs): Search for broken relocs on the way
555 out and fix them up.
556 (coff_renumber_symbols): Calculate and return index of
557 first undefined symbol.
558 (coff_write_object_contents): Call coff_renumber_symbols
559 and coff_write_relocs with the new args.
560 * libcoff.h: (coff_renumber_symbols, coff_renumber_symbols):
561 Modified prototypes.
562
563Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
564 Tom Griest <griest@cs.yale.edu>
565
566 Initial support for PE format.
567
568 * Makefile.in, targets.c, configure.in, config.bfd:
569 Add support for i386-*-winnt and i386-*-pe.
570 * archive.c (do_slurp_coff_armap): Understand NTPE format
571 archives.
572 (_bfd_slurp_extended_name_table): Turn \ in a filename
573 into /.
574 * bfd-in.h (bfd_link_subsystem, _bfd_link_stack_heap): New.
575 * coff-i386.c (howto_table): Conditionalize PCRELOFFSET.
576 * coffcode.h (IMAGE_BASE): New.
577 (coff_compute_section_file_positions): Throw away .junk
578 sections for PE, align symbols.
579 (coff_write_object_contents): Throw away .junk sections
580 for PE. Remember info on .idata and .rsrc sections.
581 Fill in the PE header.
582 (coff_slurp_symbol_table): PE uses C_SECTION class.
583 * cofflink.c (_bfd_coff_final_link): Keep PE info up to date.
584 (_bfd_coff_generic_relocate_section): Cope with PE relocs.
585 * coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}):
586 New code for PE headers.
587
c7b44b04
MM
588Tue May 9 17:01:38 1995 Michael Meissner <meissner@tiktok.cygnus.com>
589
590 * config.bfd: Add little endian PowerPC support.
591 * configure.in: Ditto.
592 * targets.c: Ditto.
593 * config/ppcle-elf.mt: New file, for little endian PowerPC
594 support.
595 * config/ppc-elf.mt: Add little endian powerpc to the BFD
596 selection vectors.
597 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Complain if
598 linking a different endian object than we expect.
599 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define, to provide little
600 endian support.
601
602Tue May 2 16:32:24 1995 Jeff Law (law@snake.cs.utah.edu)
603
604 * config.bfd (hppa*-*-lites*): Treat just like hppa*-*-*elf*.
605
606Tue Apr 25 19:38:43 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
607
608 * coffgen.c (make_a_section_from_file): Initialize lma same as
609 vma.
610
0c3c868b
JM
611Tue Apr 25 11:03:21 1995 Jason Molenda (crash@phydeaux.cygnus.com)
612
613 * hosts/std-host.h: #include ansidecl.h 'cause PTR is used in
614 std-host.h.
615
616Mon Apr 24 23:56:44 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
617
618 * hosts/i386linux.h (HAVE_PROCFS): Don't define it. Added lengthy
619 comment explaining why.
620
423b654e
MM
621Mon Apr 24 10:34:02 1995 Michael Meissner <meissner@cygnus.com>
622
623 * hosts/i386linux.h (HAVE_PROCFS): If NO_PROCFS is defined, don't
624 define HAVE_PROCFS.
625
a96c03cc
MM
626Mon Apr 24 08:33:12 1995 Michael Meissner <meissner@cygnus.com>
627
628 * elf32-ppc.c (ppc_elf_relocate_section): Do not continue
629 processing unknown symbols to prevent a cascade of errors.
630
1f2025d9
KR
631Fri Apr 21 12:48:48 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
632
633 Patches from H.J. Lu for Linux ELF core file support.
634 * elfcode.h (elf_core_file_matches_executable_p) [HAVE_PROCFS]:
635 Use prpsinfo_t instead of struct prpsinfo, for consistency.
636 * hosts/i386linux.h (HAVE_PROCFS): Define.
637
42aade75
SC
638Thu Apr 20 09:07:39 1995 Steve Chamberlain <sac@slash.cygnus.com>
639
640 * linker.c (link_action): Do the right thing when a undefined
641 strong symbol appears after an undefined weak symbol.
642
643Fri Apr 14 16:51:17 1995 Michael Meissner <meissner@tiktok.cygnus.com>
644
645 * elf32-ppc.c (ppc_elf_relocate_section): New function to relocate
646 a whole section for the linker, bypassing bfd_perform_relocation.
647 (ppc_elf_reloc_type_lookup): New function to map the BFD
648 enumeration code into a howto structure.
649 (ppc_elf_howto_raw): Rename from ppc_elf_howto_table.
650 (ppc_elf_howto_table): New array that maps PowerPC relocation
651 numbers to howto structures without a linear search. Change from
652 using bfd_elf_generic_reloc to use ppc_elf_std_reloc.
653 (ppc_elf_howto_init): Initialize ppc_elf_howto_table from
654 ppc_elf_howto_raw.
655 (ppc_elf_reloc_type_lookup): Use a case statement instead of a
656 loop.
657 (ppc_elf_std_reloc): Replacement for bfd_elf_generic_reloc.
658 (ppc_elf_unsupported_reloc): Print a real error message, instead
659 of calling abort.
660 (ppc_elf_addr16_ha_inner): Abstract getting adjustment from
661 ppc_elf_addr16_ha_reloc, so ppc_elf_relocate_section can use it
662 too.
663 (ppc_elf_addr16_ha_reloc): Call it.
664 (ppc_elf_got16_inner): Abstract getting adjustment from
665 ppc_elf_got16_reloc, so ppc_elf_relocate_section can use it too.
666 (ppc_elf_got16_reloc): Call it.
667 (ppc_elf_info_to_howto): Rename from powerpc_info_to_howto.
668
669 * elfcode.h (elf_symbol_from_bfd_symbol): Omit space in debugging
670 output.
671 (elf_symbol_flags): Add debug function to decode flags so that
672 defining DEBUG to be 4 will compile again.
673 (elf_debug_section): Fix typo in debug output.
674
1b283698
KR
675Fri Apr 14 16:03:04 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
676
677 * config.bfd: Add m68*-*-elf*.
678 * elf32-m68k.c: Filled out implementation, except for dynamic
679 linking support.
680 * reloc.c (enum bfd_reloc_code_real): Added *_GOT_PCREL, *_GOTOFF,
681 *_PLT_PCREL, *_PLTOFF, *_68K_* relocations for ELF.
682 * libbfd.h, bfd-in2.h: Regenerated.
683
684Thu Apr 13 14:28:04 1995 Torbjorn Granlund <tege@adder.cygnus.com>
685
686 * coff-m68k.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
687 1 to 2.
688 (bfd_target): Change minimum section alignment from 1 to 2.
689
56e57a6b
KR
690Wed Apr 12 12:40:04 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
691
692 * aoutx.h (machine_type, case bfd_arch_mips): Treat R8000 like
693 R6000 and R4000 for now.
694
695Tue Apr 4 12:28:25 1995 Stan Shebs <shebs@andros.cygnus.com>
696
697 * mpw-config.in: New file, MPW version of configure.in.
698 * mpw-make.in: New file, MPW version of Makefile.in.
699 * hosts/mpw.h: New file, MPW host definitions.
700 * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_in) [MPW_C]:
701 Alternate versions without ECOFF_64 that chokes MPW C.
702 * coffswap.h (coff_swap_scnhdr_out): Add alternative version with
703 partly-expanded macros.
704
705Thu Mar 30 14:56:21 1995 Ian Lance Taylor <ian@cygnus.com>
706
707 * reloc.c (bfd_perform_relocation): Don't bother to check for
708 overflow if the symbol is undefined.
709
e83f7745
ILT
710Thu Mar 30 14:32:26 1995 H.J. Lu (hjl@nynexst.com)
711
712 * config.bfd: Change linux to default to elf. Using
713 i[345]86-*-linuxaout will build a library which defaults to a.out.
714 * config/i386-laout.mt: Rename from old config/i386-linux.mt.
715 * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
716 Comment out EXTRALIBS.
717 * config/i386-lelf.mt: Remove.
718
75afa884
ILT
719Wed Mar 29 12:01:30 1995 Ian Lance Taylor <ian@cygnus.com>
720
21e061e3
ILT
721 * coff-i960.c (coff_i960_relocate): Cache the section symbol in
722 the used_by_bfd field of the section, to avoid looping for each
723 reloc.
724
75afa884
ILT
725 * cpu-h8500.c (arch_info_struct): Change name from "H8/300" to
726 "h8300" for consistency with other cpu-* files.
727
da7bfa91
ILT
728Tue Mar 28 15:14:11 1995 Ian Lance Taylor <ian@cygnus.com>
729
661cf374
ILT
730 * bout.c (b_out_canonicalize_reloc): Handle SEC_CONSTRUCTOR
731 sections.
732 (b_out_get_reloc_upper_bound): Likewise.
733
da7bfa91
ILT
734 * linker.c (generic_link_add_symbol_list): Skip constructor
735 symbols which the main linker code did not do anything with.
736 (_bfd_generic_link_output_symbols): Use udata.p if it is set,
737 rather than looking the symbol up in the hash table. Just pass
738 through constructor symbols for which udata.p is not set. If the
739 linker defined the symbol, clear the constructor flag.
740
0cd908d2
JL
741Tue Mar 21 10:50:32 1995 Jeff Law (law@snake.cs.utah.edu)
742
743 * som.c (som_set_reloc_info): Sign extend constants from
744 R_DATA_OVERRIDE fixups.
745 * libhppa.h (sign_extend): Renamed from sign_ext. Fix.
746 (low_sign_extend): Likewise.
747
da7bfa91
ILT
748Mon Mar 20 22:39:10 1995 Jeff Law (law@snake.cs.utah.edu)
749
750 * som.c (som_slurp_symbol_table): Tighten test to determine
751 what symbols are section symbols.
752
03788f05
ILT
753Sat Mar 18 01:54:45 1995 Ian Lance Taylor <ian@cygnus.com>
754
755 * elfcode.h (elf_bfd_link_add_symbols): An empty archive is OK.
756
757Fri Mar 17 16:29:02 1995 Jeff Law (law@snake.cs.utah.edu)
758
759 * som.c (som_bfd_copy_private_section_data): Just return true when
760 either the input or output section isn't attached to a SOM BFD.
761 (som_bfd_copy_private_bfd_data): Similarly for BFD private data.
762
7fe4ed45
ILT
763Fri Mar 17 11:50:34 1995 Ian Lance Taylor <ian@cygnus.com>
764
765 * elfcode.h (elf_link_add_object_symbols): Check whether a dynamic
766 object has already been included, and ignore it the second time.
767
768Wed Mar 15 11:56:40 1995 Ian Lance Taylor <ian@cygnus.com>
769
770 * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT13 from
771 complain_overflow_bitfield to complain_overflow_signed.
772
773 * libelf.h (bfd_elf32__write_relocs): Don't declare.
774 (bfd_elf64__write_relocs): Don't declare.
775
75236adb
KR
776Tue Mar 14 05:54:33 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
777
778 * stab-syms.c (aout_stab_name): Moved aout_stab_names to be local
779 to this function. Recoded function to stop using table, to
780 improve performance (on i486-netbsd host). Left old version
781 intact under "#if 0" for further performance testing.
782
c4299ed8
ILT
783Mon Mar 13 13:48:49 1995 Ian Lance Taylor <ian@cygnus.com>
784
d0421218
ILT
785 * elfcode.h (write_relocs): Make static. Use PTR argument as a
786 pointer to a boolean variable set to true if something fails.
787 Cast to PTR rather than void *.
788 (sym_is_global): Rewrite for clarity.
789 (map_program_segments): If the program header size is too small,
790 call _bfd_error_handler and return failure rather than aborting.
791 (NAME(bfd_elf,write_object_contents)): Pass boolean variable when
792 calling write_relocs.
793 (elf_symbol_from_bfd_symbol): Use BFD_ASSERT rather than abort.
794 (struct elf_info_failed): Define.
795 (NAME(bfd_elf,size_dynamic_sections)): Declare variables in inner
796 blocks. Pass elf_info_failed structure when calling
797 elf_export_symbol and elf_adjust_dynamic_symbol.
798 (elf_export_symbol): Treat data argument as elf_info_failed rather
799 than bfd_link_info. Set failed field on error.
800 (elf_adjust_dynamic_symbol): Likewise.
801 (struct elf_finfo_failed): Define.
802 (elf_bfd_final_link): Pass elf_finfo_failed structure when calling
803 elf_link_output_extsym. Use BFD_ASSERT rather than abort.
804 (elf_link_output_extsym): Treat data argument as elf_finfo_failed
805 rather than elf_final_link_info. Set failed field on error.
806 (elf_link_input_bfd): Use BFD_ASSERT rather than abort.
807 (elf_reloc_link_order): Likewise.
808
f786a73f
ILT
809 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Only write
810 out PLTRELSZ, PLTREL and JMPREL relocs if there is a .rela.plt
811 section. Solaris 2.4 apparently does not handle empty reloc
812 information correctly.
813
c4299ed8
ILT
814 * archive.c (bsd_write_armap): Cast getuid and getgid results to
815 long, and print with %ld.
816
890b53ef
DE
817start-sanitize-arc
818Sun Mar 12 05:22:10 1995 Doug Evans <dje@chestnut.cygnus.com>
819
820 * elf32-arc.c (elf_arc_howto_table): Relocs with implicit addends
821 don't work too well with zero src_masks. Correct values.
822end-sanitize-arc
823
6a107a28
ILT
824Fri Mar 10 16:41:05 1995 Ian Lance Taylor <ian@cygnus.com>
825
826 * aoutx.h (translate_to_native_sym_flags): Always use the output
827 section if it is not NULL.
828
2f675427
ILT
829Thu Mar 9 15:06:25 1995 Ian Lance Taylor <ian@cygnus.com>
830
99514eec
ILT
831 * coffswap.h (coff_swap_scnhdr_out): If the line number count or
832 the reloc count does not fit, print an error and return 0.
833 * coffcode.h (coff_write_object_contents): Check return value of
834 coff_swap_scnhdr_out.
835 * ecoff.c (_bfd_ecoff_write_object_contents): Check return value
836 of bfd_coff_swap_scnhdr_out.
837
0318ed31
ILT
838 * bfd.c: Include <stdarg.h> or <varargs.h>, depending upon
839 ANSI_PROTOTYPES.
840 (bfd_error_handler_type): New global type.
841 (_bfd_error_program_name): New static variable.
842 (_bfd_default_error_handler): New static function.
843 (_bfd_error_handler): New BFD private global variable.
844 (bfd_set_error_handler): New globally visible function.
845 (bfd_set_error_program_name): New globally visible function.
846 * libbfd-in.h (_bfd_error_handler): Declare.
847 * bfd-in2.h, libbfd.h: Rebuild.
848
2f675427
ILT
849 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter,
850 and use it instead of bfd_get_symcount. Check r_index after
851 setting r_extern based on whether this is a base relative reloc.
852 (NAME(aout,swap_std_reloc_IN)): Add symcount parameter, and use it
853 instead of bfd_get_symcount.
854 (NAME(aout,slurp_reloc_table)): Pass bfd_get_symcount to reloc
855 swap routines.
856 * libaout.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter
857 to declaration.
858 (NAME(aout,swap_std_reloc_in)): Likewise.
859 * sunos.c (sunos_canonicalize_dynamic_reloc): Pass
860 info->dynsym_count to reloc swap routines.
861 * aout-ns32k.c (MY_swap_std_reloc_in): Add symcount parameter.
862 * hp300hpux.c (MY(swap_std_reloc_in)): Likewise.
863 (MY(slurp_reloc_table)): Pass bfd_get_symcount to reloc swap
864 routine.
865 * i386lynx.c (NAME(lynx,swap_ext_reloc_in)): Add symcount
866 parameter.
867 (NAME(lynx,swap_std_reloc_in)): Likewise.
868 (NAME(lynx,slurp_reloc_table)): Pass bfd_get_symcount to reloc
869 swap routines.
870
871Thu Mar 9 12:04:05 1995 Michael Meissner <meissner@tiktok.cygnus.com>
872
873 * bfd.c (bfd_merge_private_bfd_data): New function vector to be
874 called by the linker to merge any private bfd data of the input
875 files and the output file. Used by the PowerPC ELF support to
876 check whether -mrelocatable is used for all modules.
877 (bfd_set_private_flags): New function vector to be called by the
878 assembler to set private flags. Used by the PowerPC ELF support
879 to set that a particular object file was assembled with the
880 -mrelocatable option.
881
882 * targets.c (BFD_JUMP_TABLE_COPY): Add intiialization of the
883 bfd_merge_private_bfd_data and bfd_set_private_flags function
884 vectors.
885
886 * bfd-in2.h, libbfd-in.h: Rebuild with bfd.c and targets.c
887 changes.
888
889 * elf32-ppc.c (ppc_elf_set_private_flags): New function to set the
890 ELF e_flags field.
891 (ppc_elf_copy_private_bfd_data): Copy the e_flags field from the
892 input file to the output file.
893 (ppc_elf_merge_private_bfd_data): Check for a mismatch between the
894 e_flags field of all of the linker input files.
895
896 * libelf.h (elf_obj_tdata): Add ppc_flags_init field so that the
897 PowerPC support can check if compataible e_flags are present.
898
899 * aout-target.h: Add NOP for the bfd_merge_private_bfd_data
900 and bfd_set_private_flags function vectors.
901 * coffcode.h: Ditto.
902 * elf32-target.h: Ditto.
903 * elf64-target.h: Ditto.
904 * libbfd.h: Ditto.
905 * libecoff.h: Ditto.
906 * som.c: Ditto.
907
a48769bf
ILT
908Wed Mar 8 00:53:54 1995 Ian Lance Taylor <ian@cygnus.com>
909
0f6020cb
ILT
910 * cpu-mips.c (arch_info_struct): Add mips:8000 entry.
911
a48769bf
ILT
912 * elfcode.h (swap_out_syms): Mark an undefined BSF_WEAK symbol as
913 STB_WEAK rather than STB_GLOBAL.
914
91766660
DE
915start-sanitize-arc
916Tue Mar 7 20:34:43 1995 Doug Evans <dje@chestnut.cygnus.com>
917
918 * configure.in (SELECT_VECS): Split bfd_elf32_arc_vec into big/little.
919 * targets.c (bfd_target_vector): Likewise.
920 * elf32-arc.c (TARGET_BIG_SYM): Define.
921 (TARGET_BIG_NAME): Define.
922 * config/arc-elf.mt (DEFAULT_VECTOR): Set to bfd_elf32_littlearc_vec.
923 (SELECT_VECS): Add bfd_elf32_bigarc_vec.
924end-sanitize-arc
925
d2117860
ILT
926Tue Mar 7 12:23:47 1995 Ian Lance Taylor <ian@cygnus.com>
927
f135c692
ILT
928 * coffcode.h (bfd_coff_backend_data): Add new field
929 _bfd_coff_adjust_symndx.
930 (bfd_coff_adjust_symndx): Define.
931 (coff_adjust_symndx): Define as NULL if not already defined.
932 (bfd_coff_std_swap_table): Initialize new field to
933 coff_adjust_symndx.
934 * cofflink.c (coff_link_input_bfd): Call coff_adjust_symndx if it
935 is defined.
936 * coff-a29k.c (coff_a29k_adjust_symndx): New static function.
937 (coff_adjust_symndx): Define before including coffcode.h.
938 * libcoff.h: Rebuild.
939
597e3d58
ILT
940 * format.c (bfd_check_format_matches): Skip binary_vec when
941 searching through bfd_target_vector.
942
d2117860
ILT
943 * elfcode.h (elf_sort_hdrs): Check SHT_NOBITS before checking
944 sh_size.
945
df168c35
DE
946Mon Mar 6 23:31:36 1995 Doug Evans <dje@chestnut.cygnus.com>
947
948 * elfcode.h (elf_sort_hdrs): Keep SHT_NOBITS sections after
949 !SHT_NOBITS ones.
950
0f4161dd
JL
951Mon Mar 6 09:53:08 1995 Jeff Law (law@snake.cs.utah.edu)
952
953 * cpu-hppa.c (arch_info_struct): Support both PA1.0 and PA1.1
954 machine types.
955 (bfd_hppa_arch): Link in both PA1.0 and PA1.1 architecture info
956 structures.
957 * libhppa.h (enum pa_arch): New enumeration to describe the
958 different variants of the PA architecture.
959 * som.c (som_object_setup): Use new enumeration to set machine
960 type.
961 (som_finish_writing): If the machine type is PA1.1, then use the
962 PA1.1 machine identifier in the output file.
963
773033d2
ILT
964Thu Mar 2 15:58:24 1995 Ian Lance Taylor <ian@cygnus.com>
965
0f4161dd
JL
966 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Treat the index of a
967 base relative reloc as an index into the symbol table, regardless
968 of the setting of r_extern.
969 (NAME(aout,swap_std_reloc_in)): Likewise.
970
773033d2
ILT
971 * aoutx.h (NAME(aout,set_section_contents)): Double check that the
972 caller is writing to a valid section.
973
c9f92c11
ILT
974Thu Mar 2 14:37:57 1995 Bryan Ford <baford@cs.utah.edu>
975
976 * binary.c: Add support for reading binary files. Loads the raw
977 contents of the file into a data section and wraps some symbols
978 around it. The symbols `_binary_<filename>_start' and
979 `_binary_<filename>_end' indicate the start and end of the data,
980 while `_binary_<filename>_size' is an absolute symbol whose value
981 is the size of the data. <filename> is the name of the binary
982 input file, with all non-alphanumeric characters converted to
983 underscores.
984
985 * archures.c (bfd_arch_get_compatible): Assume users knows what
986 they're doing if one of the architectures is bfd_arch_unknown.
987
35983432
MM
988Wed Mar 1 17:30:46 1995 Michael Meissner <meissner@cygnus.com>
989
990 * elf32-ppc.c (elf_powerpc_howto_table): For relocation
991 R_PPC_GOT16, change complain_on_overflow to be
992 complain_overflow_signed.
993
8760f77c
JM
994Wed Mar 1 11:52:55 1995 Jason Molenda <crash@phydeaux.cygnus.com>
995
996 * configure.host: Recognize powerpc-*-aix*.
997
d842ea0b
ILT
998Wed Mar 1 11:57:39 1995 Ian Lance Taylor <ian@cygnus.com>
999
46cde095
ILT
1000 * coff-i960.c (COFF_PAGE_SIZE): Define.
1001
d842ea0b
ILT
1002 * configure.in: Rewrite output of TDEFAULTS to avoid relying on
1003 semantics of single quotes in parameter substitution.
1004
c47c90f4
ILT
1005Tue Feb 28 12:53:09 1995 Ian Lance Taylor <ian@cygnus.com>
1006
afbc1a16
ILT
1007 * elfcode.h (elf_sort_hdrs): Sort empty sections before non-empty
1008 sections, if they have the same VMA.
1009
c47c90f4
ILT
1010 * config.bfd (i[345]86-*-linuxelf*): New target. Use i386-lelf.
1011 (i[345]86-*-gnuelf*): New target. Use i386-gelf.
1012 * config/i386-lelf.mt: New file.
1013 * config/i386-gelf.mt: New file.
1014
490d89a7
KH
1015Mon Feb 27 12:58:25 1995 Kung Hsu <kung@mexican.cygnus.com>
1016
1017 * config.bfd: add a29k-*-vxworks configuration.
1018
1019Wed Feb 22 14:40:26 1995 Ian Lance Taylor <ian@cygnus.com>
1020
1021 * libaout.h (NAME(aout,slurp_reloc_table)): Change declaration to
1022 use reloc_howto_type rather than const struct reloc_howto_struct.
1023
19a68138
ILT
1024Tue Feb 21 18:19:22 1995 Ian Lance Taylor <ian@cygnus.com>
1025
1026 * bout.c (b_out_slurp_reloc_table): Don't return an error if asked
1027 for relocations for the .bss section.
1028
ee4d24c6
JL
1029Tue Feb 21 15:13:05 1995 Jeff Law (law@snake.cs.utah.edu)
1030
1031 * som.c (som_bfd_ar_write_symbol_stuff): Handle objects with odd
1032 lengths.
1033
eaba5169
MM
1034Fri Feb 17 12:34:36 1995 Michael Meissner <meissner@cygnus.com>
1035
1036 * elf32-ppc.c (ppc_elf_got16_reloc): Make GOT style relocs add
1037 32768, so the GOT pointer can point to 16384 pointers, instead of
1038 8192.
1039
6dc6a81a
ILT
1040Fri Feb 17 11:45:38 1995 Ian Lance Taylor <ian@cygnus.com>
1041
ebb6075d
ILT
1042 * hosts/sysv4.h: Include <unistd.h>, <stdlib.h>, and <time.h>.
1043 Only define SEEK_SET and SEEK_CUR if they are not already defined.
1044 Remove all external function declarations.
1045
cd0456a2
ILT
1046 * syms.c (bfd_decode_symclass): Return 'W' for a weak symbol.
1047
6936966a
ILT
1048 * coffgen.c (coff_real_object_p): Set start address and flags
1049 before calling coff_mkobject_hook. Restore them on failure.
1050 * ecoff.c (_bfd_ecoff_mkobject_hook): If not ECOFF_AOUT_ZMAGIC,
1051 clear D_PAGED.
1052
6dc6a81a
ILT
1053 * coffgen.c: Reindented.
1054
b596295f
DE
1055Thu Feb 16 14:37:23 1995 Doug Evans <dje@cygnus.com>
1056
1057 * reloc.c (bfd_perform_relocation): Don't use bitpos in overflow
1058 calculations.
1059 (bfd_install_relocation): Likewise.
1060
fe46552d
ILT
1061Thu Feb 16 13:22:29 1995 Ian Lance Taylor <ian@cygnus.com>
1062
1063 * hosts/std-host.h: Remove all function declarations which return
1064 int or void, except the one for free.
1065
bcbe2c71
MM
1066Wed Feb 15 14:54:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1067
1068 * elf32-ppc.c (elf_powerpc_howto_table): Use a destination mask of
1069 0xffffffff for R_PPC_REL32, not 0.
1070 (powerpc_reloc_map): Add low 16 bit, high 16 bit, and high 16 bit
1071 adjusted relocations.
1072
1073Tue Feb 14 17:47:17 1995 Ian Lance Taylor <ian@cygnus.com>
1074
1075 * elf32-mips.c (struct mips_elf_find_line): Define.
1076 (mips_elf_find_nearest_line): New static function.
1077 (bfd_elf32_find_nearest_line): Define.
1078 * libelf.h (struct elf_obj_tdata): Add find_line_info field.
1079
1080 * ecoff.c (_bfd_ecoff_swap_tir_in): Move to ecofflink.c.
1081 (_bfd_ecoff_swap_tir_out): Likewise.
1082 (_bfd_ecoff_swap_rndx_in): Likewise.
1083 (_bfd_ecoff_swap_rndx_out): Likewise.
1084 (cmp_fdrtab_entry): Likewise.
1085 (mk_fdrtab): Likewise.
1086 (lookup): Likewise.
1087 (_bfd_ecoff_find_nearest_line): Just call _bfd_ecoff_locate_line
1088 to do most of the work. Allocate find_line_info if necessary.
1089 * ecofflink.c: Include "aout/stab_gnu.h".
1090 (_bfd_ecoff_swap_tir_in): Move in from ecoff.c.
1091 (_bfd_ecoff_swap_tir_out): Likewise.
1092 (_bfd_ecoff_swap_rndx_in): Likewise.
1093 (_bfd_ecoff_swap_rndx_out): Likewise.
1094 (cmp_fdrtab_entry): Likewise. Use PTR instead of void *.
1095 (mk_fdrtab): Move in from ecoff.c. Add debug_info, debug_swap,
1096 and line_info arguments, and use them instead of ecoff_data.
1097 (fdrtab_lookup): Move in from lookup in ecoff.c. Remove abfd
1098 argument, add line_info argument. Use it instead of ecoff_data.
1099 (_bfd_ecoff_locate_line): New function, mostly from the old
1100 _bfd_ecoff_find_nearest_line in ecoff.c.
1101 * libecoff.h (ecoff_data_type): Remove find_buffer, fdrtab_len and
1102 fdrtab fields, replacing them find_line_info field.
1103 (_bfd_ecoff_swap_tir_in): Declare.
1104 (_bfd_ecoff_swap_tir_out): Declare.
1105 (_bfd_ecoff_swap_rndx_in): Declare.
1106 (_bfd_ecoff_swap_rndx_out): Declare.
1107 * libbfd-in.h (_bfd_ecoff_locate_line): Declare.
1108 * libbfd.h: Rebuild.
1109 * configure.in: Don't use ecoff.o for bfd_elf32_bigmips_vec or
1110 bfd_elf32_littlemips_vec.
1111 * Makefile.in: Rebuild dependencies.
1112
8c9bfee3
MM
1113Tue Feb 14 14:04:22 1995 Michael Meissner <meissner@tiktok.cygnus.com>
1114
1115 * libelf.h (elf_backend_data): Add fields elf_machine_alt1 and
1116 elf_machine_alt2 which provide alternate versions of the machine
1117 code.
1118
1119 * elf32-ppc.c (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Define to
1120 recognize old versions of the PowerPC machine code.
1121
1122 * elf32-target.h (elf32_bed): Initialize alternate machine code
1123 fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
1124
1125 * elf64-target.h (elf64_bed): Initialize alternate machine code
1126 fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
1127
1128 * elfcode.h (elf_object_p, elf_core_file_p): In addition to the
1129 main machine code field, check the two alternate machine code
1130 fields.
1131
aed59269
ILT
1132Tue Feb 14 12:46:48 1995 Ian Lance Taylor <ian@cygnus.com>
1133
1134 * aoutf1.h (MACHTYPE_OK): Don't define if already defined. Don't
1135 accept M_SPARC if bfd_arch_sparc is not in the list of supported
1136 architectures, and don't accept a 680x0 machine type if
1137 bfd_arch_m68k is not in the list of supported architectures.
1138 * aout0.c (MACHTYPE_OK): Define.
1139
1f932736
ILT
1140Mon Feb 13 23:25:38 1995 Ian Lance Taylor <ian@cygnus.com>
1141
1142 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Don't return a pointer
1143 to garbage if the symbol index is out of range.
1144 (NAME(aout,swap_std_reloc_in)): Likewise.
1145
866da18e 1146start-sanitize-arc
405affcc
ILT
1147Mon Feb 13 09:35:30 1995 Doug Evans <dje@canuck.cygnus.com>
1148
1149 * elf32-arc.c (reloc_type): New type R_ARC_B26.
1150 (elf_arc_howto_table): Likewise.
1151 * reloc.c (BFD_RELOC_ARC_B26): Likewise.
1152
866da18e
DE
1153Thu Feb 9 17:31:40 1995 Doug Evans <dje@canuck.cygnus.com>
1154
1155 * archures (bfd_mach_arc_base): #define.
1156 (bfd_mach_arc_host, bfd_mach_arc_graphics, bfd_mach_arc_audio): Ditto.
1157 * cpu-arc.c (arch_info_struct): Define entries for each cpu variant.
1158 (bfd_arc_arch): Link each one in.
1159 (arc_get_mach): New function.
1160 * elf32-arc.c (arc_info_to_howto_rel): Renamed from arc_info_to_howto.
1161 (elf_info_to_howto_rel): Update.
1162 (arc_elf_object_p, arc_elf_final_write_processing): New functions.
1163 (elf_backend_object_p): Define.
1164 (elf_backend_final_write_processing): Define.
1165 (USE_REL): Define.
1166end-sanitize-arc
1167
10bf6ddf
KR
1168Thu Feb 9 18:36:52 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
1169
1170 * Makefile.in (BFD32_BACKENDS): Add i386msdos.o.
1171
62e5acdc
ILT
1172Thu Feb 9 12:02:35 1995 Ian Lance Taylor <ian@cygnus.com>
1173
c93e959c
ILT
1174 * i386linux.c (NEEDS_SHRLIB): Define.
1175 (linux_tally_symbols): Crash if a NEEDS_SHRLIB symbol is
1176 undefined. From hjl@nynexst.com (H.J. Lu).
1177
6581a70a
ILT
1178Wed Feb 8 17:26:00 1995 Ian Lance Taylor <ian@cygnus.com>
1179
1180 * linker.c (generic_link_check_archive_element): Allocate common
1181 symbol information structure. Don't bother to check for common
1182 symbol size overflow.
1183 (_bfd_generic_link_add_one_symbol): Likewise.
1184 * aoutx.h (aout_link_check_ar_symbols): Likewise.
1185 * linker.c (generic_link_check_archive_element): Adjust references
1186 to common symbol information for new structure.
1187 (_bfd_generic_link_add_one_symbol): Likewise.
1188 * aoutx.h (aout_link_check_ar_symbols): Likewise.
1189 (aout_link_add_symbols): Likewise.
1190 * ecoff.c (ecoff_link_add_externals): Likewise.
1191 * elfcode.h (elf_link_add_object_symbols): Likewise.
1192 (elf_link_output_extsym): Likewise.
1193 * sunos.c (sunos_add_one_symbol): Likewise.
1194
121a8465
DE
1195Wed Feb 8 09:53:42 1995 Doug Evans <dje@canuck.cygnus.com>
1196
1197 * elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
1198
28860f46
JL
1199Tue Feb 7 16:27:33 1995 Jeff Law (law@snake.cs.utah.edu)
1200
1201 * som.c (som_bfd_find_nearest_line): Just return false, don't
1202 abort.
1203
2559e014
KR
1204Tue Feb 7 14:43:33 1995 Ken Raeburn (raeburn@kr-pc.cygnus.com)
1205
1206 * ecoff.c: Reformatted some comments and brace constructs in
1207 recent changes to GNU style.
1208 (cmp_fdrtab_entry, mk_fdrtab, lookup): Use old-style function
1209 definitions.
1210
95b0f14b
ILT
1211Tue Feb 7 14:21:28 1995 Ian Lance Taylor <ian@cygnus.com>
1212
1213 * ecoffswap.h (ecoff_swap_pdr_in): Zero out intern before setting
1214 any of the fields.
1215
97d5a149
KR
1216Mon Feb 6 20:01:24 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
1217
1218 Sat Feb 4 14:20:24 1995 David Mosberger-Tang <davidm@piston.cs.arizona.edu>
1219
1220 * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_out): added
1221 internalizing/externalizing new "prof" field.
1222
1223 * libecoff.h (ecoff_tdata): added fdrtab.
1224
1225 * ecoff.c (_bfd_ecoff_find_nearest_line): Fixed.
1226
6c97aedf
ILT
1227Mon Feb 6 14:25:24 1995 Ian Lance Taylor <ian@cygnus.com>
1228
59474174
ILT
1229 * libelf.h (struct elf_link_hash_table): Add saw_needed field.
1230 * elfcode.h (elf_link_add_object_symbols): Set saw_needed if
1231 DT_NEEDED seen in .dynamic section.
1232 (elf_link_output_extsym): Warn if an undefined symbol is
1233 only referenced from a dynamic object, and not making a shared
1234 object, and saw_needed is false.
1235 * elf.c (_bfd_elf_link_hash_table_init): Initialize saw_needed.
1236
0bef7f72
ILT
1237 * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define.
1238 * elfcode.h (elf_link_add_object_symbols): Don't clear or set
1239 ELF_LINK_HASH_DEFINED_WEAK.
1240 (elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK.
1241
6c97aedf
ILT
1242 Distinguish a weak defined symbol from a regular defined symbol.
1243 * linker.c (enum link_action): Add DEFW.
1244 (link_action): Add bfd_link_hash_defweak column.
1245 (_bfd_generic_link_add_one_symbol): Add DEFW case. Handle
1246 bfd_link_hash_defweak in a few other cases.
1247 * Many files (bfd_link_hash_undefweak): Renamed from
1248 bfd_link_hash_weak.
1249 * aoutx.h (aout_link_write_symbols): Handle bfd_link_hash_defweak.
1250 (aout_link_write_other_symbol): Likewise.
1251 (aout_link_input_section_std): Likewise.
1252 (aout_link_input_section_ext): Likewise.
1253 * bout.c (get_value): Likewise.
1254 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
1255 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
1256 (alpha_relocate_section): Likewise.
1257 * coff-mips.c (mips_relocate_section): Likewise.
1258 (mips_relax_section): Likewise.
1259 (bfd_mips_ecoff_create_embedded_relocs): Likewise.
1260 * cofflink.c (coff_write_global_sym): Likewise.
1261 (_bfd_coff_generic_relocate_section): Likewise.
1262 * ecoff.c (ecoff_link_add_externals): Likewise.
1263 (ecoff_link_write_external): LIkewise.
1264 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1265 (elf32_hppa_size_stubs): Likewise.
1266 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1267 (elf_i386_relocate_section): Likewise.
1268 (elf_i386_finish_dynamic_symbol): Likewise.
1269 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1270 (mips_elf_relocate_section): Likewise.
1271 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1272 (elf32_sparc_relocate_section): Likewise.
1273 * elfcode.h (elf_link_add_object_symbols): Likewise.
1274 (elf_adjust_dynamic_symbol): Likewise.
1275 (elf_bfd_final_link): Likewise.
1276 (elf_link_output_extsym): Likewise.
1277 * i386linux.c (linux_add_one_symbol): Likewise.
1278 (linux_tally_symbols): Likewise.
1279 (linux_finish_dynamic_link): Likewise.
1280 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1281 (set_symbol_from_hash): Likewise.
1282 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
1283 (bfd_perform_slip): Likewise.
1284 * sunos.c (sunos_add_one_symbol): Likewise.
1285 (sunos_scan_std_relocs): Likewise.
1286 (sunos_scan_ext_relocs): Likewise.
1287 (sunos_scan_dynamic_symbol): Likewise.
1288 (sunos_write_dynamic_symbol): Likewise.
1289
5dc8db48
KR
1290Mon Feb 6 03:20:17 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
1291
1292 Changes from Bryan Ford, baford@schirf.cs.utah.edu:
1293 * config.bfd (i[345]86-*-msdos*): New target.
1294 * configure.in (i386msdos_vec): Handle it.
1295 * i386msdos.c: New file.
1296 * config/i386-msdos.mt: New file.
1297 * bfd.c (enum bfd_error): Added new value bfd_error_file_too_big.
1298 (bfd_errmsgs): Added string to table.
1299 * libaout.h (reloc_type-lookup): Declare it.
1300 * targets.c (enum bfd_flavour): Added bfd_target_msdos_flavour.
1301 (i386msdos_vec): Declare.
1302 (bfd_target_vector): Add it to the list.
1303 * bfd-in2.h: Regenerated.
1304
9ea5de84
JL
1305Wed Feb 1 01:32:14 1995 Jeff Law (law@snake.cs.utah.edu)
1306
5dc8db48
KR
1307 * som.c (som_set_reloc_info, case R_DATA_ONE_SYMBOL): If there's
1308 nothing in R_DATA_OVERRIDE, then try to find the addend in the
1309 section's contents.
312eb91b 1310 (som_write_fixups): Ignore the addend in a R_DATA_ONE_SYMBOL fixup.
5dc8db48 1311
9ea5de84
JL
1312 * som.c (som_object_setup): More heruistics to detect the
1313 braindamaged HP OSF1 linker.
1314 (setup_sections): Don't forget to free subspace_sections if we get
1315 an error.
1316 (som_slurp_string_table): Allocate strings on this bfd's obstack
1317 rather than directly out of the heap.
1318 (som_slurp_symbol_table): Likewise for the saved copy of the
1319 canonical symbols.
1320 (som_slurp_reloc_table): Likewise for the saved copy of the
1321 canonical relocations. Free the native relocations when we're
1322 done with them.
1323
ef6fb95d
DE
1324Tue Jan 31 21:53:28 1995 Doug Evans <dje@canuck.cygnus.com>
1325
1326 * libelf.h (struct elf_obj_tdata): New member program_header_size.
1327 * elfcode.h (get_program_header_size): New parameters sorted_hdrs,
1328 count, and maxpagesize. All callers updated.
1329 If sorted_hdrs is non-NULL, use it to compute the number of segments.
1330 Save result in case called again.
1331 (assign_file_positions_except_relocs): Sort headers before calling
1332 get_program_header_size.
1333
5945db29
ILT
1334Tue Jan 31 15:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
1335
1336 * elfcode.h (map_program_segments): Add sorted_hdrs parameter.
1337 Search through it rather than through unsorted section headers.
1338 (assign_file_positions_except_relocs): Pass sorted_hdrs to
1339 map_program_segments.
1340
3e461107
KR
1341Mon Jan 30 22:04:53 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
1342
1343 * ecoff.c (_bfd_ecoff_find_nearest_line): Fix problems in range
1344 checking. Expect argument OFFSET to be section-relative. From
1345 David Mosberger-Tang, davidm@piston.cs.arizona.edu.
1346
1347Mon Jan 30 11:22:11 1995 Ian Lance Taylor <ian@cygnus.com>
1348
1349 * elfcode.h (NAME(bfd_elf,record_link_assignment)): Don't do
1350 anything if we are not linking an ELF file.
1351 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1352
fede9992
JL
1353Sat Jan 28 12:48:57 1995 Jeff Law (law@snake.cs.utah.edu)
1354
8bc3e02c
JL
1355 * som.c (compare_subspaces): New function to sort subspaces by
1356 their location in the object file.
1357 (setup_sections): When computing the index for each subspace,
1358 handle case where setup_sections reads the subspaces in a
1359 different order that they appear in the object file.
1360 (som_is_space): Also examine the output section for the containing
1361 section.
1362 (som_is_subspace, som_is_container): Likewise.
1363 (som_begin_writing): Don't prepare or write fixups here. When
1364 writing the symbol strings, use the unsorted symbol table.
1365 (som_write_object_contents): Don't write the symbol table here.
1366 (som_finish_writing): Prepare and write the fixups here. Likewise
1367 for the symbol table.
1368 (som_bfd_derive_misc_symbol_info): Undefined symbols always have
1369 type SS_UNSAT regardless of BSF_EXPORT.
1370 (som_set_reloc_info): Unpack and attach argument location
1371 information for R_PCREL_CALL and R_ABS_CALL relocations.
1372
fede9992
JL
1373 * som.c (som_object_setup): New heuristic to determine if the
1374 entry and flags fields are switched in the exec header.
1375
cd9dba7b
ILT
1376Sat Jan 28 00:16:01 1995 Ian Lance Taylor <ian@cygnus.com>
1377
1378 * elfcode.h (elf_link_add_object_symbols): Use *sym_hash instead
1379 of h if we might not be doing an ELF link.
1380
6977046f
ILT
1381Fri Jan 27 16:13:42 1995 Ian Lance Taylor <ian@cygnus.com>
1382
cea133af
ILT
1383 * elf32-mips.c (mips_elf_final_link): If the size of an input
1384 .reginfo section is zero, force it to the correct size, since the
1385 linker emulation code may have clobbered it.
1386
6977046f
ILT
1387 * elfcode.h (elf_sort_hdrs): Correct SHF_ALLOC test.
1388 (assign_file_positions_except_relocs): Free sorted_hdrs.
1389
61a914c9
SC
1390Thu Jan 26 09:00:12 1995 Steve Chamberlain <sac@splat>
1391
7896128d
SC
1392 * srec.c (srec_set_section_contents): Fix off by
1393 one end address calculation.
1394
61a914c9
SC
1395 * config.bfd: (m68*-est-coff): New configuration.
1396
e83e94ef
ILT
1397Thu Jan 26 11:39:21 1995 Ian Lance Taylor <ian@cygnus.com>
1398
4b412ed1
ILT
1399 * elfcode.h (elf_link_add_object_symbols): Only examine weakdef if
1400 we are using an ELF hash table.
1401
e83e94ef
ILT
1402 * aoutx.h (NAME(aout,some_aout_object_p)): Always set EXEC_P if
1403 the start address is in the .text section, even if STAT_FOR_EXEC
1404 is set. Just use STAT_FOR_EXEC as an additional test.
1405
c6d729b3
MM
1406Thu Jan 26 11:12:54 1995 Michael Meissner <meissner@cygnus.com>
1407
1408 * elfcode.h (prep_headers): Use EM_PPC instead of
1409 EM_CYGNUS_POWERPC.
1410
1411 * elf32-ppc.c (reloc_type): Add all System V.4 and eABI
1412 relocations currently defined.
1413 (powerpc_reloc_map): Adjust to new relocation names.
1414 (elf_powerpc_howto_table): Add most of the new relocations.
1415 (ELF_MACHINE_CODE): Use EM_PPC instead of EM_CYGNUS_POWERPC.
1416
1417 * config.bfd: Add support for powerpc-*-eabi.
1418
1419 * config/ppc-elf.mt: Add rs6000 architecture support to the
1420 PowerPC. Also add XCOFF support.
1421
e079cfe8
ILT
1422Wed Jan 25 23:26:13 1995 Ian Lance Taylor <ian@cygnus.com>
1423
1424 * coff-sh.c (CALC_ADDEND): Don't define.
1425 (coff_sh_relocate_section): Remove.
1426 (coff_relocate_section): Use _bfd_coff_generic_relocate_section.
1427
16fe8950
ILT
1428Tue Jan 24 14:22:47 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1429
1430 * elf32-mips.c (mips_elf_output_extsym): Set the value of the
1431 ECOFF symbol from the hash table entry.
1432
c525c3af
SC
1433Mon Jan 23 14:53:35 1995 Steve Chamberlain <sac@splat>
1434
1435 * coff-sh.c (coff_sh_relocate_section): Don't subtract
1436 vma twice.
1437
123bfaa5
ILT
1438Mon Jan 23 13:33:18 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1439
6e3acf74
ILT
1440 * coff-sh.c (sh_reloc): Don't ignore the previous contents of an
1441 R_SH_IMM32 reloc.
1442
6e7f3f07
ILT
1443 * config.bfd (i[345]86-*-gnu*): Set bfd_name to i386-gnu.
1444 * config/i386-gnu.mt: New file. Include ELF support.
1445
123bfaa5
ILT
1446 * opncls.c (bfd_openstreamr): Call bfd_cache_init.
1447
04dc16b7
ILT
1448Fri Jan 20 11:44:45 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1449
1450 * sunos.c (sunos_add_one_symbol): Only set the sunos specific
1451 fields if we are doing a sunos link.
1452
1453Wed Jan 18 12:28:17 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1454
1455 * cpu-h8300.c (h8300_info_struct): Change name from "H8/300" to
1456 "h8300" for consistency with other cpu-* files.
1457 (h8300h_info_struct): Change name from "H8/300H" to "h8300h".
1458 * coff-h8300.c (special): Remove unused variable diff.
1459
6a5848cd
ILT
1460Tue Jan 17 10:52:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1461
d01a0278
ILT
1462 * bfd-in.h (bfd_byte, reloc_howto_type): Define here, not...
1463 * reloc.c (bfd_byte, reloc_howto_type): here.
1464 * Changed all occurrences of ``const struct reloc_howto_struct''
1465 to be ``reloc_howto_type'' instead.
1466 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
1467
8a51b06c
ILT
1468 * opncls.c (bfd_openstreamr): New function.
1469 * bfd-in2.h: Rebuilt.
1470
6a5848cd
ILT
1471 * elf32-mips.c (enum reloc_type): Define new relocs used on Irix.
1472 (elf_mips_howto_table): Add entries for new relocs.
1473 (mips_elf_section_from_shdr): Handle SHT_MIPS_MSYM,
1474 SHT_MIPS_DWARF, and SHT_MIPS_EVENTS.
1475 (mips_elf_fake_sections): Handle sections named .msym, .debug_*
1476 and .MIPS.events.*.
1477
1478 * srec.c (srec_init): Remove unused local variable i.
1479
c21b376f
SC
1480Sat Jan 14 19:09:48 1995 Steve Chamberlain <sac@jonny>
1481
1482 * archures.c, Makefile.in, targets.c, bfd-in2.h, coffcode.h,
1483 config.bfd, configure.in, config/w65.mt: Initial support for the W65.
1484
9560e662
SC
1485Sun Jan 15 13:57:45 1995 Steve Chamberlain <sac@splat>
1486
1487 * opncls.c (bfd_fdopenr): Configure for WIN32.
1488
c3fcc078
KR
1489Thu Jan 12 16:30:47 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
1490
1491 * Makefile.in (diststuff): Include `headers'.
1492
1493 * sunos.c (m68k_plt_first_entry, sparc_plt_first_entry): Now
1494 const.
1495 * tekhex.c (digs): Ditto.
1496 * elf32-i386.c (elf_i386_plt0_entry, elf_i386_plt_entry): Ditto.
1497
1498 * srec.c, tekhex.c: Include libiberty.h. Delete static array
1499 hex_value and replace references to it with references to
1500 hex_init, hex_p, and hex_value.
1501 * Makefile.in: Updated dependencies.
1502
1503 * archures.c (archures_init_table): Now const.
1504 (bfd_arch_init): Adjusted type of local var `ptable'.
1505start-sanitize-rce
1506
1507 * Makefile.in (ALL_MACHINES): Include cpu-rce.o.
1508 (BFD32_BACKENDS): Include aout-rce.o.
1509end-sanitize-rce
1510start-sanitize-arc
1511
1512 * Makefile.in (ALL_MACHINES): Include cpu-arc.o.
1513 (BFD32_BACKENDS): Include elf32-arc.o.
1514end-sanitize-arc
1515
b69fe363
PS
1516Thu Jan 12 09:33:24 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1517
1518 * hosts/symmetry.h: Redefine `shared' to enable compilation
1519 with the native Dynix cc compiler.
1520 * i386dynix.c: Include aoutx.h instead of using routines
1521 from aout32.c.
1522
82b1edf7
KR
1523Wed Jan 11 21:31:41 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
1524
1525 * reloc.c (reloc_howto_type): Make typedef include `const'.
1526 * aout-ns32k.c, aoutx.h, bout.c, cf-m68klynx.c, coff-i386.c,
1527 coff-i960.c, coff-m68k.c, cofflink.c, cpu-ns32k.c, ecoff.c,
1528 elf32-hppa.c, elf32-i386.c, elf32-mips.c, elf32-sparc.c,
1529 elfcode.h, libbfd-in.h, linker.c, mipsbsd.c, nlm32-ppc.c, oasys.c,
1530 reloc.c, som.c: Don't use `const' in combination with
1531 `reloc_howto_type'.
1532start-sanitize-arc
1533 * elf32-arc.c: Ditto.
1534end-sanitize-arc
1535 * bfd-in2.h, libbfd.h: Regenerated.
1536
9c84b228
KR
1537 * ecoff.c (ecoff_type_to_string): Local variable `buffer1' doesn't
1538 need to be static.
1539
040c913e
ILT
1540Wed Jan 11 14:36:41 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1541
788d9436
ILT
1542 * sunos.c (sunos_add_one_symbol): Don't core dump if a multiple
1543 definition of an absolute symbol is encountered.
1544
040c913e
ILT
1545 * linker.c (_bfd_generic_link_add_one_symbol): Ignore
1546 redefinitions of an absolute symbol to the same value.
1547
f78b3963
ILT
1548Mon Jan 9 15:51:32 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1549
1550 * elfcode.h (elf_link_add_object_symbols): It's reasonable for no
1551 flags to be set, so don't insist otherwise.
1552
42cf6d79
ILT
1553Fri Jan 6 16:39:40 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
1554
1555 * elfcode.h (elf_slurp_symbol_table): Don't set BSF_GLOBAL for an
1556 undefined or common symbol.
1557 (elf_link_add_object_symbols): Likewise.
1558
1b567970
JL
1559Wed Jan 4 14:14:05 1995 Jeff Law (law@snake.cs.utah.edu)
1560
eb57c776
JL
1561 * som.c (bfd_section_from_som_symbol): Only return sections which
1562 correspond to subspaces.
1563
1b567970
JL
1564 * som.c (som_begin_writing): Don't forget to bump the
1565 total_subspaces when writing the unloadable subspaces.
1566
c3a18888
JL
1567Wed Dec 28 20:54:47 1994 Jeff Law (law@snake.cs.utah.edu)
1568
1569 * som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identify
1570 bss-like sections.
1571 (som_get_section_contents): Likewise.
1572 (som_set_section_contents): Likewise.
1573
5faa346b
JL
1574Tue Dec 27 14:03:47 1994 Jeff Law (law@snake.cs.utah.edu)
1575
1576 * som.c (setup_sections): Turn off SEC_HAS_CONTENTS for bss-like
1577 sections.
1578
85200ebc
KR
1579Tue Dec 20 15:30:12 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
1580
8675437e
KR
1581 * coffgen.c (bfd_debug_section): Deleted.
1582 (coff_section_from_bfd_index): Return absolute section for debug
1583 symbol.
1584 (coff_write_symbol): Set BSF_DEBUGGING for C_FILE symbols. If
1585 BSF_DEBUGGING is set, set section to N_DEBUG.
1586 (coff_bfd_make_debug_symbol): Use absolute section.
1587
85200ebc
KR
1588 * elfcode.h (assign_file_positions_except_relocs): In assertion,
1589 force all values to the same type.
1590
e7d9ee90
SC
1591Tue Dec 20 11:11:58 1994 Steve Chamberlain (sac@jonny.cygnus.com)
1592
1593 * coff-h8300.c (howto_table): All relocs get a special function.
1594 (special): Never do anything when linking -r.
1595
9b09a015
ILT
1596Tue Dec 20 13:58:01 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1597
f10d31aa
ILT
1598 * i386linux.c (linux_add_one_symbol): Don't do anything Linux
1599 specific if this is not a Linux hash table. From Eric Youngdale
1600 <eric@aib.com>.
1601
182b9e9f
ILT
1602 Patches from kkojima@mix.or.jp (Kazumoto Kojima):
1603 * mipsbsd.c (mips_howto_table_ext): Change sizes of memory relocs
1604 apply to from two bytes to four bytes.
1605 * MY(reloc_howto_type_lookup): Handle BFD_RELOC_CTOR.
1606
9b09a015
ILT
1607 * elf32-i386.c (elf_i386_relocate_section): Correct and expand the
1608 list of cases for which relocation need not be computed.
1609 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1610
1611start-sanitize-arc
1612Tue Dec 20 09:01:01 1994 Doug Evans <dje@canuck.cygnus.com>
1613
1614 * elf32-arc.c (elf_arc_howto_table, R_ARC_B22_PCREL): Value is
1615 right-shifted 2 bits. Fix dst_mask.
1616end-sanitize-arc
1617
5874427f
JL
1618Mon Dec 19 23:09:16 1994 Jeff Law (law@snake.cs.utah.edu)
1619
1620 * elf32-hppa.c (elf32_hppa_read_symext_info): Delete do_locals and
1621 do_globals arguments, always read symbol extension information for
1622 globals and locals. All callers changed.
1623 (elf32_hppa_size_stubs): Rework to only read symbol extension
1624 information once for each input bfd. 10% improvement in linker
1625 performance.
1626
963747b3
ILT
1627Fri Dec 16 12:28:46 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1628
1629 * elfcode.h (elf_section_from_bfd_section): Check
1630 bfd_is_abs_section, etc., only after checking for the section in
1631 the BFD and after calling the backend routine.
1632
f5202354
ILT
1633Wed Dec 14 20:21:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1634
1635 * elfcode.h (elf_map_symbols): Only use section symbols whose
2f19e36d
ILT
1636 value is the start of the section, checking output_offset when
1637 using output_section. When creating a new symbol, set the value
1638 to 0, since BFD symbol values are section relative.
f5202354 1639
1088e148
ILT
1640Tue Dec 13 13:31:06 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1641
1642 * cpu-z8k.c (arch_info_struct): Make z8002 the default
1643 architecture.
1644
aeec67f0
ILT
1645Fri Dec 9 12:43:05 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1646
4c124191
ILT
1647 * elfcode.h (elf_bfd_link_add_symbols): If the first object in the
1648 archive is not an ELF object, pass the archive to the add_symbols
1649 entry point appropriate for the first object. From Eric Youngdale
1650 <eric@aib.com>.
a0020ea1
ILT
1651 * aoutx.h (NAME(aout,link_add_symbols)): Similar change if the
1652 first object is not an a.out object.
4c124191 1653
aeec67f0
ILT
1654 * elf32-i386.c (elf_i386_relocate_section): Don't compute
1655 relocation in cases where we won't use it.
1656 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1657
f8368802
KR
1658Thu Dec 8 14:19:41 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
1659
1660 * pc532-mach.c (NAME): Define to use ns32kaout prefix.
1661 * ns32knetbsd.c (NAME): Ditto.
1662 (ns32kaout_32_get_section_contents): Define to standard aout-32
1663 version.
1664
1665Fri Dec 2 13:56:49 1994 Ian Lance Taylor <ian@rtl.cygnus.com>
1666
1667 * coff-mips.c (mips_read_relocs): New static function, broken out
1668 of mips_relax_section.
1669 (mips_relax_section): Call mips_read_relocs.
1670 (bfd_mips_ecoff_create_embedded_relocs): New function.
1671 * bfd-in.h (bfd_mnips_ecoff_create_embedded_relocs): Declare.
1672 * bfd-in2.h: Rebuild.
1673
72985091
ILT
1674Wed Nov 30 14:12:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1675
1676 * coff-sh.c: Use _bfd_dummy_target instead of no_archive.
1677
05cedcf6
DE
1678start-sanitize-arc
1679Tue Nov 29 17:14:21 1994 Doug Evans <dje@canuck.cygnus.com>
1680
1681 * archures.c: Initial support for the ARC.
1682 * reloc.c, targets.c, config.bfd, configure.in, elfcode.h: Likewise.
1683 * bfd-in2.h: Regenerated.
1684 * libbfd.h: Likewise.
20e58678 1685 * config/arc-elf.mt: New file.
05cedcf6
DE
1686end-sanitize-arc
1687
5b0f1ab5
C
1688Tue Nov 29 14:00:19 1994 J.T. Conklin <jtc@.rtl.cygnus.com>
1689
1690 * config.bfd (i[345]86-*-freebsd*): Use i386-bsd as bfd_name.
1691 * configure.host (i[345]86-*-freebsd*): Use i386bsd as my_host.
1692
382229dc
C
1693Mon Nov 28 15:36:04 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
1694
1695 * config/m68k-nbsd.mt (DEFAULT_VECTOR): set to m68knetbsd_vec.
1696 * Makefile.in: Rebuilt dependancies.
1697 (CFILES): Added m68knetbsd.c.
1698 (HFILES): Added netbsd.h.
1699
7a1d4567
SC
1700Wed Nov 23 19:21:41 1994 Steve Chamberlain (sac@jonny.cygnus.com)
1701
1702 * coff-sh.c (shlcoff_vec): New target vector.
1703 (no_archive): New function.
1704 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle
1705 little endian SH.
1706 * configure.in: Handle shl.
1707 * targets.c (bfd_target_vector): Add shlcoff_vec.
1708 * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
1709
1710Wed Nov 23 10:50:13 1994 Jeff Law (law@snake.cs.utah.edu)
1711
1712 * elfcode.h (write_relocs): Do not subtract the section's vma from
1713 the reloc's offset when writing .o's. Instead add the section's
1714 vma to the reloc's offset when writing an executable or shared
1715 library.
1716
150bd991
JL
1717Tue Nov 22 23:34:37 1994 Jeff Law (law@snake.cs.utah.edu)
1718
1719 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Do not add
1720 input_section->vma to the relocation's offset.
1721
ba3eb9c0
ILT
1722Mon Nov 21 12:37:25 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1723
1724 * srec.c (srec_get_reloc_upper_bound): Define.
1725 (srec_canonicalize_reloc): Define.
1726 (srec_bfd_reloc_type_lookup): Define.
1727 (srec_vec, symbolsrec_vec): Use BFD_JUMP_TABLE_RELOCS (srec).
1728
ae4471f6
PS
1729Sat Nov 19 03:10:51 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1730
1731 * configure.host (i[345]86-*-solaris*): Use solaris2 to
1732 enable extraction of procfs info from core file for GDB.
1733
fca2b81b
KR
1734Thu Nov 17 17:37:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
1735
1736 * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL.
1737 * bfd-in2.h, libbfd.h: Rebuilt.
1738
b68a74d1
JL
1739Thu Nov 17 13:12:08 1994 Jeff Law (law@snake.cs.utah.edu)
1740
1741 * bfd/elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the
1742 vma from the output_section containing $global$ when computing
1743 global_vlaue.
1744
cf9557f5
ILT
1745Thu Nov 17 14:29:13 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1746
1747 * archive.c (_bfd_write_archive_contents): Round up the archive
1748 header size of the extended name table to an even number.
1749
f6f350fe
KR
1750Wed Nov 16 16:08:06 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
1751
1752 * coff-sh.c: Deleted some code that was commented out or inside
1753 "#if 0".
1754 (COFF_LONG_FILENAMES): Define.
1755
1756 * cpu-sh.c (arch_info_struct): Convert name to lowercase, for
1757 consistency with other architectures.
1758
e6fb0df7
ILT
1759Sat Nov 12 23:50:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1760
1761 * elfcode.h (elf_export_symbol): Also export symbols which are
1762 referenced by a regular file.
1763
11bb5591
ILT
1764Fri Nov 11 14:29:31 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1765
1766 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add
1767 export_dynamic argument, and handle it.
1768 (elf_export_symbol): New function.
1769 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1770 (bfd_elf64_size_dynamic_sections): Update declaration.
1771 * bfd-in2.h: Rebuild.
1772
63ba709f
JL
1773Fri Nov 11 10:35:33 1994 Jeff Law (law@snake.cs.utah.edu)
1774
1775 * hpux-core.c (hpux_core_struct): Delete handles for the
1776 data, reg and stack sections. They're never used. Delete
1777 accessor macros.
1778 (make_bfd_asection): Use bfd_make_section_anyway since debugging
1779 cores from dynamic executables may have several sections with the
1780 same logical name.
1781 (hpux_core_core_file_p): Don't save handles to data, reg and
1782 stack sections. Handle CORE_TEXT, CORE_MMF and CORE_SHM.
1783
0631def3
ILT
1784Tue Nov 8 13:03:30 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1785
1786 * bout.c (callj_callback): Add new argument shrinking. Change all
1787 callers. Handle relocs against section symbols correctly. If not
1788 shrinking, don't subtract out dstidx; the subtraction is already
1789 in the object file.
1790
1791Sun Nov 6 12:52:00 1994 Jeff Law (law@snake.cs.utah.edu)
1792
1793 * som.h: Conditionally include <shl.h> and <dl.h>.
1794
2c5cdec2
KR
1795Thu Nov 3 18:19:13 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
1796
1ef625b7
KR
1797 * Makefile.in (ALL_MACHINES): Include m68knetbsd.o.
1798
2c5cdec2
KR
1799 * config/i386linux.mh (EXTRALIBS): Include -lm.
1800
72f2e984
KR
1801 Patches from DJ Delorie:
1802 * coff-go32.c: Replacement file, uses coff-i386.c with minor
1803 changes.
1804 * coff-i386.c (TARGET_UNDERSCORE): allow other files to override
1805 underscore also
1806 * makefile.dos: del ctor.o, add cofflink.o and elf32.o
1807
9e6473f5
KR
1808 * aoutx.h (adjust_o_magic): If user set data section vma, use it
1809 to determine the default bss vma. Patch from Takada Hiroaki,
1810 hiro@is.s.u-tokyo.ac.jp.
1811 (machine_type, case bfd_arch_vax): Set *unknown to false. Patch
1812 from John David Anglin <dave@hiauly1.hia.nrc.ca>.
1813
30d1f88c
KR
1814 * configure.in (tb): Rename ns32knetbsd_vec to pc532netbsd_vec,
1815 since that's what it's called.
1816
9cb8eb5c
ILT
1817Wed Nov 2 15:24:51 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1818
1819 * archive.c (normalize): Change to take a BFD as an argument.
1820 Change VMS version to use bfd_alloc rather than malloc, so that we
1821 don't lose the memory forever.
1822 (_bfd_construct_extended_name_table): Check the name of an archive
1823 entry which is not being extended, and correct it if it is wrong.
1824 This is necessary in case the archive was constructed by another
1825 program which put an entry in the extended name table which we
1826 don't plan to put in ourselves. From jjc@jclark.com (James
1827 Clark).
1828 (bfd_dont_truncate_arname): Check return value of normalize.
1829
2d2d08ed
ILT
1830Mon Oct 31 14:19:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1831
b531cfe9
ILT
1832 * elf32-hppa.c (ELF32_PARISC_SX_SIZE): Define.
1833 (ELF32_PARISC_SX_GET, ELF32_PARISC_SX_PUT): Define.
1834 (symextn_entry): Don't define.
1835 (symext_chain_size): Change type to bfd_size_type.
1836 (symextn_contents): Change type to bfd_byte *.
1837 (elf32_hppa_backend_begin_write_processing): Use
1838 ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).
1839 (elf32_hppa_size_symext): Likewise. Also, change type of sizep to
1840 bfd_size_type *.
1841 (elf_hppa_tc_make_sections): Cast symextn_contents assignment to
1842 bfd_byte *. Use ELF32_PARISC_SX_PUT instead of direct assignment.
1843 (elf32_hppa_backend_symbol_table_processing): Use
1844 ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS). Use
1845 ELF32_PARISC_SX_GET insetad of direct assignment.
1846 (elf32_hppa_read_symext_info): Change type of contents, and its
1847 assignment cast, to bfd_byte *. Use ELF32_PARISC_SX_SIZE instead
1848 of sizeof (symextn_entry). Use symext_entryS instead of
1849 symextn_entry. Use ELF32_PARISC_SX_GET instead of direct
1850 assignment.
1851
da6c4a8b
ILT
1852 * archive.c (bfd_dont_truncate_arname): Add the ar padding
1853 character, if there is room for it, even if the name is the
1854 maximum length.
1855
2d2d08ed
ILT
1856 * elfcode.h (assign_file_positions_except_relocs): Sort the ELF
1857 headers by section address when assigning file positions.
1858 (elf_sort_hdrs): New static function.
1859
197e30e5
ILT
1860Sun Oct 30 18:56:58 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1861
1862 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Create DT_INIT
1863 and DT_FINI dynamic entries based on the existence of _init and
1864 _fini symbols, not on the .init and .fini sections. This is
1865 compatible with some SVR4 linkers.
1866 (elf_bfd_final_link): Corresponding change.
1867
54f16fc4
ILT
1868Sat Oct 29 12:18:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1869
dd421917
ILT
1870 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't move a
1871 symbol with a PLT entry into the .plt section if it is defined in
1872 a regular file.
1873 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1874
54f16fc4
ILT
1875 * linker.c (_bfd_generic_link_add_archive_symbols): It's not an
1876 error if an empty archive has no symbol table.
1877 * ecoff.c (ecoff_link_add_archive_symbols): Likewise.
1878 * elfcode.h (elf_link_add_archive_symbols): Likewise.
1879
ec35a1c2
C
1880Fri Oct 28 10:08:41 1994 J.T. Conklin (jtc@rtl.cygnus.com)
1881
1882 NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
1883 * config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
1884 * configure.in (m68knetbsd_vec): Added.
1885 * targets.c (bfd_m68knetbsd_vec): Added.
1886 * hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
1887 * Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
1888
1889 miscellaneous cleanup required by all netbsd targets, based on work
1890 by Andrew Cagney <cagney@highland.com.au>:
1891 * netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
1892 N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed. Generic a.out
1893 definitions work.
1894 * i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
1895 (MY(write_object_contents)): Use NetBSD's magic numbers
1896
14cac507
ILT
1897Thu Oct 27 16:59:52 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1898
1899 * libelf.h (struct bfd_elf_section_data): Add field dynindx.
1900 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Don't finalize
1901 the .dynsym, .dynstr or .hash sections until after the backend
1902 size_dynamic_sections routine, so that it can add dynamic symbols
1903 if it wants to.
1904 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't define the
1905 symbol to be in the .plt section when generating a shared library
1906 if it is a defined symbol.
1907 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1908 (elf32_sparc_size_dynamic_sections): When generating a shared
1909 library, allocate space for a dynamic symbol for each output
1910 section, storing the index in the dynindx field of the ELF section
1911 data. Adjust the other dynindx fields to account for this.
1912 (elf32_sparc_adjust_dynindx): New static function.
1913 (elf32_sparc_relocate_section): When copying a reloc into a shared
1914 library, use the original addend as appropriate. Convert an
1915 R_SPARC_32 reloc into an R_SPARC_RELATIVE reloc. Use the dynamic
1916 symbol index of the output section, not the normal symbol index.
1917 (elf32_sparc_finish_dynamic_sections): Don't die if a section does
1918 not exist when setting the value of the dynamic tags. Write out
1919 a dynamic symbol for each output section.
1920
875e4716
ILT
1921Wed Oct 26 01:15:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
1922
1923 * aoutx.h (aout_link_input_section): Don't bother to read or write
1924 the relocs if there aren't any.
1925
9c26be63
ILT
1926Tue Oct 25 11:44:38 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1927
875e4716
ILT
1928 * Makefile.in (ALL_MACHINES): Add tekhex.o.
1929 * targets.c (bfd_target_vector): If SELECT_VECS is not defined,
1930 include tekhex_vec.
1931 * tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
1932 (getvalue, getsym, out): Likewise.
1933 (find_chunk): Remove unused variable s.
1934 (first_phase): Remove unused variable s.
1935 (pass_over): Remove unused variable address.
1936 (tekhex_object_p): Remove unused variable section.
1937 (move_section_contents): Change return type from boolean to void.
1938 (tekhex_write_object_contents): Remove unused variables tdata and
1939 list.
1940
9c26be63
ILT
1941 * linker.c (enum link_action): Add CIND.
1942 (link_action): Change COMMON_ROW\indr from MDEF to CREF. Change
1943 INDR_ROW\common from MDEF to CIND.
1944 (_bfd_generic_link_add_one_symbol): In CREF case, handle an
1945 existing symbol which is indirect rather than defined. Add new
1946 CIND case.
1947
a56f23ae
ILT
1948Mon Oct 24 15:33:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1949
fd9a6abc
ILT
1950 Change S-record backend to use multiple sections to handle gaps in
1951 file.
1952 * srec.c (srec_data_list_struct): Move field next from last place
1953 to first. Change type of data to bfd_byte *.
1954 (struct srec_symbol): Define.
1955 (tdata_type): Remove done_symbol_read, count, strings, symbol_idx,
1956 string_size, string_idx. Change type of symbols to struct
1957 srec_symbol *. Add symtail and csymbols.
1958 (low, high): Remove.
1959 (size_symbols, fillup_symbols, size_srec, fillup): Remove.
1960 (white, skipwhite, pass_over, object_p): Remove.
1961 (srec_mkobject): Call srec_init. Adjust tdata initialization for
1962 field changes.
1963 (srec_get_byte, srec_bad_byte): New static functions.
1964 (srec_new_symbol, srec_scan): New static functions.
1965 (srec_object_p): Change type of b to bfd_byte. Explicitly set
1966 wrong_format error. Call srec_mkobject and srec_scan instead of
1967 object_p.
1968 (symbolsrec_object_p): Likewise. Also, change b to be only two
1969 bytes.
1970 (srec_read_section): New static function.
1971 (srec_get_section_contents): Call srec_read_section rather than
1972 pass_over. Handle zero length section correctly.
1973 (set_set_arch_mach): Change from function to macro.
1974 (srec_set_section_contents): Change data to bfd_byte *.
1975 (srec_write_record): Change data, end and src to bfd_byte *.
1976 (srec_write_header): Change buffer and dst to bfd_byte *.
1977 (srec_write_section): Change location to bfd_byte *.
1978 (srec_write_terminator): Change buffer to bfd_byte *.
1979 (srec_get_symtab_upper_bound): Don't call
1980 srec_get_section_contents.
1981 (srec_get_symtab): Rewrite.
1982
a56f23ae
ILT
1983 * ecoff.c (ecoff_set_symbol_info): Set udata.i to 0, not NULL.
1984
32399d32
C
1985Fri Oct 21 16:43:13 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
1986
1987 * libaout.h (machine_type): added M_68K_NETBSD and M_SPARC_NETBSD.
1988 * i386netbsd.c, ns32knetbsd.c, sparcnetbsd.c: removed RCS Id's.
1989 changed how PAGE_SIZE and SEGMENT_SIZE are defined so they are
1990 consistant with each other.
1991 * netbsd.h (N_HEADER_IN_TEXT, TEXT_START_ADDR): NetBSD fits its
1992 header into the start of its text segment.
1993
12662be4
ILT
1994Fri Oct 21 17:13:07 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
1995
cd9782e8
ILT
1996 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case for
1997 _construct_extended_name_table.
1998 (bfd_target): Add _bfd_construct_extended_name_table.
1999 * archive.c (_bfd_archive_bsd_construct_extended_name_table): New
2000 function.
2001 (_bfd_archive_coff_construct_extended_name_table): New function.
2002 (_bfd_construct_extended_name_table): Renamed by adding a leading
2003 underscore, and made externally visible. Added trailing_slash
2004 argument, and used it instead of elf_style. Changed type of
2005 tablen to bfd_size_type *.
2006 (_bfd_write_archive_contents): Use BFD_SEND to call
2007 construct_extended_name_table. Use the returned name.
2008 * libbfd-in.h (_bfd_construct_extended_name_table): Declare.
2009 (_bfd_noarchive_construct_extended_name_table): Define.
2010 (_bfd_archive_bsd_construct_extended_name_table): Declare.
2011 (_bfd_archive_coff_construct_extended_name_table): Declare.
2012 * bfd-in2.h: Rebuild.
2013 * libbfd.h: Rebuild.
2014 * som.c (som_construct_extended_name_table): New static function.
2015 * aout-target.h (MY_construct_extended_name_table): Define.
2016 * coff-rs6000.c (rs6000coff_construct_extended_name_table):
2017 Define.
2018 * ieee.c (ieee_construct_extended_name_table): Define.
2019 * libecoff.h (_bfd_ecoff_construct_extended_name_table): Define.
2020 * oasys.c (oasys_construct_extended_name_table): Define.
2021
12662be4
ILT
2022 Fix the ELF linker to not require an interpreter if no dynamic
2023 objects were seen, even when linking PIC code.
2024 * libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
2025 (struct elf_link_hash_table): Add field dynamic_sections_created.
2026 * elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
2027 doesn't already exist.
2028 (elf_link_add_object_symbols): Create dynamic sections based on
2029 dynamic_sections_created field, not dynobj field. Don't bother to
2030 set dynobj.
2031 (elf_link_create_dynamic_sections): If dynamic sections were
2032 already created, don't do anything. If dynobj is already set, use
2033 it; otherwise, set it to the bfd argument. Don't initialize
2034 dynsymcount. Only create dynstr if it does not exist. Set
2035 dynamic_sections_created to true.
2036 (NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
2037 if no dynamic objects were seen.
2038 (elf_adjust_dynamic_symbol): If a symbol has the
2039 ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
2040 (elf_bfd_final_link): Change most decisions based on dynobj to
2041 check dynamic_sections_created instead.
2042 (elf_link_output_extsym): Only handle dynamic symbols if a dynamic
2043 object was seen.
2044 * elf.c (_bfd_elf_link_hash_table_init): Initialize new field
2045 dynamic_sections_created. Set dynsymcount to 1, not 0.
2046 * elf32-i386.c (elf_i386_create_dynamic_sections): Call
2047 elf_i386_create_got_section rather than creating the .got and
2048 .got.plt sections.
2049 (elf_i386_create_got_section): New static function.
2050 (elf_i386_check_relocs): Just call elf_i386_create_got_section if
2051 a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
2052 Only create the .rel.got section, and only make space for a reloc,
2053 for a global symbol or when generating a shared object. For a
2054 R_386_PLT32 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
2055 (elf_i386_adjust_dynamic_symbol): Rework initial assertion to
2056 permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols. Create a
2057 procedure linkage table entry for such symbols. But, if no
2058 dynamic objects were seen, never create a PLT entry.
2059 (elf_i386_size_dynamic_sections): If no dynamic objects were seen,
2060 skip most of this function, and force the size of the .rel.got
2061 section to zero.
2062 (elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
2063 symbol when no dynamic object was seen, initialize the contents of
2064 the .got section. For a R_386_GOT32 against a local symbol, only
2065 create a R_386_RELATIVE reloc when generating a shared object.
2066 Treat a R_386_PLT32 reloc against a symbol for which we did not
2067 create a PLT entry as a R_386_PC32 reloc.
2068 (elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
2069 entries and the PLT if we saw a dynamic object.
2070 * elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
2071 setting rightshift to 10. Fix R_SPARC_WPLT20 by setting
2072 rightshift to 2, size to 2, bitsize to 30, and dst_mask to
2073 0x3fffffff.
2074 (elf32_sparc_create_dynamic_sections): Don't set the size of the
2075 .plt section. Call elf32_sparc_create_got_section rather than
2076 creating the .got section.
2077 (elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
2078 a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
2079 Only create the .rela.got section, and only make space for a
2080 reloc, for a global symbol or when generating a shared object.
2081 Set the alignment of the .rela.got section to 2. For a
2082 R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
2083 (elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
2084 permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols. Create a
2085 procedure linkage table for such symbols. But, if no dynamic
2086 objects were seen, never create a PLT entry. Initialize the size
2087 of the .plt section.
2088 (elf32_sparc_size_dynamic_sections): If no dynamic objects were
2089 seen, skip most of this function, and force the size of the
2090 .rela.got section to zero. Strip empty reloc sections, and strip
2091 an empty .plt section.
2092 (elf32_sparc_relocate_section): For a GOT reloc against a global
2093 symbol when no dynamic object was seen, initialize the contents of
2094 the .got section. For a GOT reloc against a local symbol, only
2095 create a R_SPARC_RELATIVE reloc when generating a shared object.
2096 Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
2097 create a PLT entry as a R_SPARC_WDISP30 reloc.
2098 (elf32_sparc_finish_dynamic_sections): Only fiddle with the
2099 dynamic entries and the PLT if we saw a dynamic object.
2100
e4a4da62
ILT
2101Thu Oct 20 13:28:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2102
2103 * elfcode.h (elf_map_symbols): Don't worry about section symbols
2104 in a section not owned by any BFD.
2105 (elf_section_from_bfd_section): Separate out loop which calls
2106 backend routine. Check bfd_section and call the backend routine
2107 even for a section not owned by any BFD.
2108 * elf32-mips.c (mips_elf_section_from_bfd_section): Handle
2109 .acommon section.
2110
dab08441
JK
2111Wed Oct 19 13:28:29 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
2112
2113 * coffgen.c (coff_print_symbol): Make names for section number and
2114 storage class slightly more verbose. It's not clear how many
2115 characters I can justify using up, but before this change they
2116 both were abbreviated "sc" which is (IMHO) clearly unacceptable.
2117
74942465
ILT
2118Wed Oct 19 01:26:39 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2119
8b65c393
ILT
2120 * binary.c (binary_set_section_contents): Set the base file
2121 position from the lowest section VMA, not the start address.
2122
74942465
ILT
2123 * aoutx.h (NAME(aout,slurp_symbol_table)): Don't return an error
2124 if there are no symbols.
2125 * coffgen.c (coff_get_normalized_symtab): Likewise.
2126 * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
2127
d4d16683
ILT
2128Tue Oct 18 12:56:43 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2129
c768bd3f
ILT
2130 * aout-target.h (MY_bfd_copy_private_section_data): Only copy
2131 subformat to another bfd_target_aout_flavour file.
2132
2133 * binary.c: New file for raw binary output format.
2134 * Makefile.in (BFD_LIBS): Add binary.o.
2135 (CFILES): Add binary.c.
2136 * targets.c (binary_vec): Declare.
2137 (bfd_target_vector): Include binary_vec.
2138
d4d16683
ILT
2139 * srec.c (tdata_type): Add field tail.
2140 (srec_mkobject): Initialize tail.
2141 (srec_set_section_contents): Sort S record list by address.
2142
5e643795
ILT
2143Mon Oct 17 11:38:16 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2144
b7881f82
ILT
2145 * elfcode.h (elf_map_symbols): Sort the symbols into a new array,
2146 rather than messing with Elf_Sym_Extra. Store the symbol index in
2147 the udata.i field.
2148 (swap_out_syms): Use outbound_syms as a pointer rather than as an
2149 array. Don't worry about elf_sym_num.
2150 * libelf.h (struct elf_sym_extra): Don't define.
2151 (Elf_Sym_Extra): Don't define.
2152 (struct elf_obj_tdata): Remove sym_extra field.
2153 (elf_sym_extra): Don't define.
2154 * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Use
2155 udata.i rather than elf_sym_extra array.
2156
2157 * syms.c (asymbol): Change udata field into a union.
2158 * bfd-in2.h: Rebuild.
2159 * aoutx.h (NAME(aout,translate_symbol_table)): Use udata.p rather
2160 than just udata.
2161 * bout.c (perform_slip): Likewise.
2162 * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
2163 * ieee.c (ieee_slurp_external_symbols): Likewise.
2164 * linker.c (generic_link_add_symbol_list): Likewise.
2165 (default_indirect_link_order): Likewise.
2166 * oasys.c (oasys_slurp_symbol_table): Likewise.
2167 * reloc16.c (bfd_perform_slip): Likewise.
2168 * srec.c (fillup_symbols): Likewise.
2169 * coffcode.h (get_index): Use udata.i rather than just udata.
2170 (coff_slurp_symbol_table): Likewise.
2171 * coffgen.c (set_index): Likewise.
2172 * ecoff.c (ecoff_set_symbol_info): Likewise.
2173 * elfcode.h (elf_symbol_from_bfd_symbol): Likewise.
2174 * libecoff.h (ecoff_get_sym_index, ecoff_set_sym_index): Likewise.
2175 * som.c (compare_syms): Likewise.
2176 (som_prep_for_fixups): Likewise.
2177 (som_write_fixups): Likewise.
2178
eb4267a3
ILT
2179 Use a hash table when writing out ELF symbol names.
2180 * elfcode.h (elf_stringtab_init): New static function.
2181 (bfd_new_strtab, bfd_add_to_strtab, bfd_add_2_to_strtab): Remove.
2182 Change all callers to use elf_stringtab_init or
2183 _bfd_stringtab_add, and get stringtab lengths using
2184 _bfd_stringtab_size.
2185 (elf_fake_sections): Change ignored argument to pointer to
2186 boolean, and set the boolean to true if an error occurs. If an
2187 error has already occurred, don't do anything.
2188 (assign_section_numbers): Just set sh_size, not contents.
2189 (elf_compute_section_file_positions): Pass the address of a
2190 boolean to elf_fake_sections. Pass the address of a
2191 bfd_strtab_hash to swap_out_syms. Write out the .strtab section.
2192 (prep_headers): Change shstrtab to bfd_strtab_hash.
2193 (swap_out_syms): Take a pointer to a bfd_strtab_hash as an
2194 argument. Set it to the symbol names.
2195 (NAME(bfd_elf,write_object_contents)): Write out the section
2196 header names using _bfd_stringtab_emit.
2197 (elf_debug_section): Remove first argument; get the section name
2198 via the bfd_section pointer. Change caller.
2199 (elf_bfd_final_link): Write out the symbol names using
2200 _bfd_stringtab_emit. Likewise for the .dynstr section contents.
2201 Free the symbol names at the end of the function.
2202 (elf_link_input_bfd): Remove the last argument, output_names,
2203 from relocate_section. Save the old symbol contents before
2204 calling elf_link_output_sym, and restore them afterward.
2205 * libelf.h (struct elf_link_hash_table): Change dynstr field to
2206 struct bfd_strtab_hash.
2207 (struct elf_backend_data): Remove last argument, output_names,
2208 from elf_backend_relocate_section field.
2209 (struct strtab): Don't define.
2210 (struct elf_obj_tdata): Change strtab_ptr field to struct
2211 bfd_strtab_hash.
2212 * elf32-hppa.c (elf32_hppa_relocate_section): Remove last
2213 argument, output_names.
2214 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2215 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2216 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2217
cb066aa9
ILT
2218 * libbfd-in.h (DEFAULT_STRING_SPACE_SIZE): Don't define.
2219 (bfd_add_to_string_table): Don't declare.
2220 * libbfd.h: Rebuild.
2221 * libbfd.c (bfd_add_to_string_table): Remove.
2222
a3377a65 2223 * elfcode.h (elf_swap_shdr_in): Use bfd_section, not rawdata.
24f13b03
ILT
2224 Clear contents field.
2225 (bfd_section_from_shdr): In SHT_STRTAB case, check bfd_section,
2226 not rawdata. Don't set rawdata if e_shstrndx. Use bfd_section
2227 rather than rawdata in commented out code. In SHT_REL[A] case,
2228 don't bother to check elf_section_data of section returned by
2229 section_from_elf_index.
2230 (elf_fake_sections): Set bfd_section, not rawdata. Don't set
2231 size.
2232 (elf_map_symbols): Don't set elf_num_section_syms. Don't create
2233 section symbols that already exist.
2234 (assign_file_position_for_section): Use bfd_section, not rawdata.
2235 (section_from_elf_index): Just check bfd_section field.
2236 (elf_section_from_bfd_section): Likewise.
2237 (elf_debug_section): Don't print rawdata, contents, or size.
2238 (elf_link_add_object_symbols): Don't error out if
2239 section_from_elf_index returns NULL.
2240 (elf_bfd_final_link): Check return value from
2241 section_from_elf_index against NULL, not bfd_is_abs_section.
2242 (elf_link_input_bfd): Don't check section_from_elf_index return
2243 value.
2244 * libelf.h (struct elf_obj_tdata): Remove num_section_syms field.
2245 (elf_num_section_syms): Don't define.
2246 * elf.c (elf_get_str_section): Store section contents in contents
2247 field rather than rawdata field.
2248 (elf_string_from_elf_section): Likewise.
2249 (_bfd_elf_make_section_from_shdr): Store BFD section pointer in
2250 bfd_section field rather than rawdata field.
2251 * elf32-hppa.c (elf32_hppa_read_symext_info): Use bfd_section
2252 rather than rawdata.
2253 (elf32_hppa_size_stubs): Likewise.
b7881f82
ILT
2254 (elf32_hppa_backend_symbol_table_processing): Don't set
2255 symextn_hdr->size; just use sh_size.
24f13b03
ILT
2256 * elf32-mips.c (mips_elf_final_write_processing): Use bfd_section
2257 rathern than rawdata.
2258 (mips_elf_section_from_shdr): Likewise.
2259 (mips_elf_section_processing): Likewise.
2260 (mips_elf_section_from_bfd_section): Remove rawdata check.
2261
5e643795
ILT
2262 * srec.c (pass_over): Set the start address for S7, S8 or S9.
2263
f10abb42
KR
2264Fri Oct 14 19:15:46 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
2265
2266 * VERSION: Updated to 2.5.
2267
61c94e5e
ILT
2268Fri Oct 14 11:07:50 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2269
2270 * bfd.c (bfd_scan_vma): Cast end to be non const before passing it
2271 to strtoul.
2272
82735983
ILT
2273Thu Oct 13 14:40:41 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2274
2275 * bfd.c (bfd_scan_vma): Pass end argument on to strtoul.
2276
ef4b8f66
KR
2277Wed Oct 12 16:46:43 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
2278
2279 * opncls.c (bfd_realloc): Deleted, since it's broken and fixing it
2280 would make it slow. Besides, it isn't used much.
2281 * elfcode.h (elf_map_symbols): Always allocate new storage for the
2282 symbol table.
2283
bf42caf3
ILT
2284Wed Oct 12 11:54:37 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2285
82735983
ILT
2286 * ecoff.c (ecoff_set_symbol_info): Mark local stProc, stLabel or
2287 stabs symbols as BSF_DEBUGGING.
7b18561f 2288
17d9e203
ILT
2289 * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Make
2290 str1 and str2 const pointers.
2291
bf42caf3
ILT
2292 * Makefile.in (INSTALL): Use top level install.sh script.
2293 * config/README (INSTALL): Remove.
2294 * config/delta88.mh (INSTALL): Remove.
2295 * config/i386v4.mh (INSTALL): Remove.
2296 * config/irix4.mh (INSTALL): Remove.
2297 * config/irix5.mh (INSTALL): Remove.
2298 * config/ncrt3000.mh (INSTALL): Remove.
2299
b2bcf39c
ILT
2300Tue Oct 11 13:57:56 1994 Eric Youngdale (eric@andante.aib.com)
2301
2302 * elf32-i386.c (elf_i386_check_relocs): Make sure that a symbol
2303 with a global offset table entry or a procedure linkage table
2304 entry is added to the dynamic symbol table.
2305 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2306 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): If a symbol has
2307 already gotten a procedure linkage table entry, change the
2308 definition to the PLT entry.
2309 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
2310
9a406d86
ILT
2311Tue Oct 11 17:12:00 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2312
2313 * lynx-core.c (lynx_core_file_p): SPARC Lynx appears to start
2314 dumping the .data section in a core file at a page boundary.
2315
4fbc96ad
KR
2316Mon Oct 10 16:24:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
2317
4c032270
KR
2318 * cofflink.c (_bfd_coff_final_link): Cast argument to bfd_h_put_32
2319 to correct type.
2320 (coff_read_string_table): Cast argument to bfd_h_get_32 to correct
2321 type.
2322 * elfcode.h (elf_link_output_extsym): Cast argument to
2323 bfd_elf_hash to correct type.
2324
4fbc96ad
KR
2325 * elf32-sparc.c (elf_sparc_howto_table): The PC10, PC22, and
2326 WPLT30 relocations are PC-relative.
2327
2328Thu Oct 6 12:57:26 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
2329
2330 * aoutx.h (adjust_o_magic): Correctly initialize vma if the vma of
2331 the text section was user-defined.
2332
66e4e649
ILT
2333Wed Oct 5 14:42:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2334
2335 * archive.c (bfd_construct_extended_name_table): SVR4 uses slash
2336 newline at the end of the file name, not just newline.
2337
dfaf9ef6
ILT
2338Tue Oct 4 11:23:12 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2339
ea4849d5
ILT
2340 * ecoff.c (_bfd_ecoff_new_section_hook): Default section alignment
2341 power to 4, rather than using align_power_min.
2342
28d19d03
ILT
2343 * coffcode.h (coff_new_section_hook): Don't use align_power_min;
2344 use COFF_DEFAULT_SECTION_ALIGNMENT_POWER instead. Force the .stab
2345 and .stabstr sections to be aligned to no more than 2. Remove
2346 COFF_SPARC special cases.
2347 * coff-a29k.c: Define COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
2348 * coff-apollo.c, coff-go32.c, coff-h8300.c: Likewise.
2349 * coff-h8500.c, coff-i386.c, coff-i960.c, coff-m68k.c: Likewise.
2350 * coff-m88k.c, coff-rs6000.c, coff-sh.c, coff-sparc.c: Likewise.
2351 * coff-we32k.c, coff-z8k.c: Likewise.
2352
995b0d3f
ILT
2353 * configure.in: Use ${config_shell} when running config.bfd.
2354
a297d42c
ILT
2355 * cofflink.c (coff_link_input_bfd): Don't try to convert a long
2356 filename if the offset field is zero.
2357
dfaf9ef6
ILT
2358 * elfcode.h (swap_out_syms): If the alignment of a common symbol
2359 was not set, use a sensible default rather than zero.
2360
995b0d3f 2361Mon Oct 3 16:04:29 1994 H.J. Lu (hjl@nynexst.com)
dfaf9ef6
ILT
2362
2363 * opncls.c (bfd_close): Honor umask when setting execution bits.
2364 (bfd_close_all_done): Likewise.
2365
7a6c910e
PS
2366Mon Oct 3 04:41:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2367
2368 * rs6000-core.c (rs6000coff_core_p): Set SEC_HAS_CONTENTS flag
2369 for .stack and .ldinfo sections. Cast coredata.c_tab to a
2370 file_ptr to avoid warnings from gcc.
2371
fb562be0
ILT
2372Fri Sep 30 13:11:38 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
2373
2374 * elfcode.h (elf_bfd_final_link): Remove assertion when a non
2375 SEC_IN_MEMORY section is found in dynobj. This can happen when
2376 linking PIC compiled code.
2377
9afa408e
KR
2378Thu Sep 29 15:21:44 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
2379
12cf5d98 2380 * reloc.c (bfd_install_relocation): Change type of "data" to
85f34090
KR
2381 bfd_byte *, to go along with yesterday's change.
2382
64e21e0f
KR
2383 * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol
2384 in elfcode.h. (case bfd_print_symbol_all): Print symbol's size
2385 field, except for common symbols; print their alignment.
2386 * elfcode.h (elf_print_symbol): Deleted.
2387 * libelf.h (bfd_elf_print_symbol): Declare.
2388 (bfd_elf{32,64}_print_symbol): Replace declarations with macros.
2389
9afa408e
KR
2390 * syms.c (bfd_print_symbol_vandf): Show BSF_LOCAL and BSF_GLOBAL
2391 in one column. Use the column freed up to show BSF_FUNCTION and
2392 BSF_FILE.
2393
ec591fcf
ILT
2394Thu Sep 29 12:29:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2395
2396 * syms.c (stt): Add .rdata and .rodata.
2397
094e8be3
ILT
2398Wed Sep 28 13:35:05 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2399
2400 * reloc.c (bfd_install_relocation): Cast data_start to bfd_byte *
2401 before trying to add values to it.
2402
2403Tue Sep 27 16:47:58 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
2404
2405 * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Cast
2406 return value from elf_sym_extra.
2407 (elf32_hppa_build_stubs): Cast return value from bfd_zalloc.
12cf5d98 2408 (elf32_hppa_size_stubs): Cast return value from malloc.
094e8be3
ILT
2409
2410 * gen-aout.c (main): Declare and initialize "arch".
2411
2412 * cofflink.c (coff_link_add_symbols): Cast return value of
2413 bfd_hash_allocate.
2414
2415 * riscix.c (riscix_callback): Use PARAMS macro in prototype.
2416
2417 * reloc.c (bfd_install_relocation): New function, mostly copied
2418 from bfd_perform_relocation, adjusted for the assembler's needs.
2419 * bfd-in2.h: Regenerated.
2420
d80ebaac
ILT
2421Mon Sep 26 11:00:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2422
5ea90891
ILT
2423 * elfcode.h (assign_file_positions_except_relocs): Align the
2424 section VMA and the file position even if D_PAGED is not set.
2425
d80ebaac
ILT
2426 * bfd-in.h (bfd_seek): Change declaration to not mark fp const.
2427 * bfd-in2.h: Rebuild.
2428 * libbfd.c (bfd_seek): Don't mark parameters const, to avoid
2429 conflicts with declaration.
2430
57b40081
ILT
2431Fri Sep 23 15:15:31 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2432
2433 * elfcode.h (map_program_segments): Don't abort if we allocated
2434 too much space for the program header, only if we allocated too
2435 little.
d80ebaac 2436 (assign_file_positions_except_relocs): Similar change.
57b40081 2437
237402b4
C
2438Tue Sep 20 13:17:07 1994 J.T. Conklin (jtc@phishhead.cygnus.com)
2439
2440 * libaout.h: Fix comment.
2441 * ns32knbsd.h: Changed M_NS32K_NETBSD to M_532_NETBSD to match
2442 libaout.h.
2443
f90a2cdc
ILT
2444Tue Sep 20 15:23:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2445
57b40081
ILT
2446 * Makefile.in: Rebuilt dependencies.
2447 (BFD32_BACKENDS): Add sparcnetbsd.o.
2448 (CFILES): Add ns32knetbsd.c and sparcnetbsd.c.
2449 * targets.c: ns32knetbsd_vec was renamed to pc532netbsd_vec.
2450
f90a2cdc
ILT
2451 * coff-sh.c (rtype2howto): Remove; unused.
2452 (coff_sh_relocate_section): Remove unused local variable rstat.
2453 (reloc_processing): Comment out; unused.
2454
fb9a2192
ILT
2455Fri Sep 16 12:12:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2456
2457 * aoutx.h (aout_link_write_other_symbol): If h->indx is -2, then
2458 always write it out even if it would normally be stripped.
2459 (aout_link_input_section_std): If we find a reloc against a
2460 stripped global symbol, force it to be written out rather than
2461 merely calling unattached_reloc.
2462 (aout_link_input_section_ext): Likewise.
2463 (aout_link_reloc_link_order): Likewise.
2464
8a2cdc62
JL
2465Wed Sep 14 15:37:19 1994 Jeff Law (law@snake.cs.utah.edu)
2466
a8d08664
JL
2467 * som.h (struct somdata): New field sorted_syms.
2468 (obj_som_sorted_syms): Accessor macro.
2469 * som.c (som_object_setup): Initialize sorted_syms to NULL.
2470 (som_prep_for_fixups): Sort a copy of the BFD's symbol table;
2471 store the sorted symbol table in sorted_syms.
2472 (som_write_fixups): Initalize tmp_reloc to NULL to make GCC happy.
2473 (som_begin_writing): Similarly for exec_header. Pass the sorted
2474 symbol table to som_write_symbol_strings.
2475 (som_build_and_write_symbol_table): Use the sorted symbols rather
2476 than the canonical symbol table.
2477
8a2cdc62
JL
2478 * som.h (som_symbol_type): Add "stringtab_offset" field.
2479 * som.c (som_write_symbol_strings): Use "stringtab_offset"
2480 rather than destroying the "name" field in the BFD symbol.
2481 (som_build_and_write_symbol_table): Likewise.
2482
8c62064a
ILT
2483Wed Sep 14 15:06:55 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2484
ab0434c2
ILT
2485 * aoutx.h (aout_link_write_symbols): Rename skip_indirect to
2486 skip_next. If we find an N_WARNING symbol which has already been
2487 written out, set skip_next.
2488
9be909ae
ILT
2489 * libecoff.h (struct ecoff_tdata): Add field find_buffer.
2490 * ecoff.c: Include aout/stab_gnu.h.
2491 (ecoff_find_nearest_line): Handle stabs debugging information.
2492
8c62064a
ILT
2493 * elfcode.h (elf_link_output_extsym): Keep a symbol marked as weak
2494 even if it is referenced by another object.
2495
a0b4aa62
JL
2496Tue Sep 13 17:57:00 1994 Jeff Law (law@snake.cs.utah.edu)
2497
ae880afc
JL
2498 * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both
2499 'T' and 'U' to grab all the unwind information.
2500 (som_set_reloc_info): Make 'U' unwind bits persist across
2501 multiple SOM relocations. Set the addend field of an R_ENTRY
2502 relocation to the value in 'T'; set the addend field on an
2503 R_EXIT relocation to the value in 'U'.
2504
e10639db
JL
2505 * som.h (som_symbol_type): Delete unwind field.
2506
2507 * som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
2508 unwind information from the addend field of the R_ENTRY, get the
2509 other 32bits from the addend field of the R_EXIT.
2510 (bfd_som_attach_unwind_info): Delete function and all references.
2511
39836432
JL
2512 * som.h (som_symbol_type): Delete unused a.out-related fields.
2513
2514 * som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
2515 instead of &bfd_abs_section.
2516
a0b4aa62
JL
2517 * som.c (som_object_setup): Handle exec_entry and exec_flags being
2518 switched in executables created by the OSF1 linker.
2519 (som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL
2520 fixups. Support R_ALT_ENTRY (handle just like R_EXIT).
2521
cf345e36
SC
2522Tue Sep 13 16:04:07 1994 Steve Chamberlain (sac@jonny.cygnus.com)
2523
2524 * cofflink.c (coff_link_input_bfd): syment_base is unsigned
2525 so can't compare -ve numbers with it.
2526
2527Mon Sep 12 20:31:17 1994 Steve Chamberlain (sac@jonny.cygnus.com)
2528
2529 * configure.in (shcoff_vec): Use cofflink.o now.
2530 * coff-sh.c: Rewritten to use new fast coff backend.
2531
204ba9e3
ILT
2532Tue Sep 13 16:23:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2533
2534 * aoutx.h (NAME(aout,final_link)): Don't assume that all the input
2535 files are a.out.
2536
a3f7a777
C
2537Tue Sep 13 11:09:39 1994 J.T. Conklin (jtc@rtl.cygnus.com)
2538
2539 * configure.host (sparc-*-netbsd): use sparcnbsd.
2540 (ns32k-*-netbsd): use ns32knbsd.
2541
2542 * hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
2543 host support.
2544
2545 * sparcnetbsd.c: New file, adds support for NetBSD/sparc.
2546 * config/sparc-nbsd.mt: Likewise.
2547
2548 * netbsd.h: New file, definitions common to all netbsd ports.
2549 * i386netbsd.c: Use it.
2550 * ns32knetbsd.c: Use it.
2551
2552 * Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
2553 config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
2554 file/variable naming conventions.
2555 * i386netbsd.c: New file, renamed from netbsd386.c.
2556 * ns32knetbsd.c: New file, renamed from netbsd532.c.
2557
c7ca67cb
JL
2558Mon Sep 12 21:56:20 1994 Jeff Law (law@snake.cs.utah.edu)
2559
2560 * som.c (som_reloc_skip): Correct off-by-one error for 4-byte
2561 R_NO_RELOCATION fixups.
2562 (bfd_section_from_som_symbol): Return the absolute section if the
2563 symbol isn't contained in any section in the output file.
2564 (som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are
2565 not function symbols (they are magic code labels which *can* be the
2566 targets of cross space branches). $START$ is not a section symbol.
2567
3cd942de
ILT
2568Mon Sep 12 11:43:08 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2569
3c9832f8
ILT
2570 * coff-alpha.c (ecoffalpha_little_vec): Add SEC_CODE and SEC_DATA
2571 to section_flags.
2572 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
2573
2574 * elfcode.h (swap_out_syms): Set the type of an undefined symbol
2575 to STT_FUNC if the BSF_FUNCTION flag is set.
2576
2a895595
ILT
2577 * cofflink.c (coff_link_input_bfd): If r_symndx is -1, don't
2578 change it.
2579 (_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an
2580 absolute reloc. Don't dump core using r_symndx as an array index.
2581 * cf-m68klynx.c (coff_bfd_link_add_symbols): Define.
2582 (lynx_link_add_symbols): New static function (copy of function in
2583 coff-i386.c).
2584 (coff_m68k_lynxrtype_to_howto): sym argument may be NULL.
2585 * coff-i386.c (coff_i386_rtype_to_howto): Likewise.
2586 * coff-a29k.c (coff_a29k_relocate_section): Handle an r_symndx
2587 value of -1, meaning an absolute reloc.
2588
3cd942de
ILT
2589 * ctor.c: Remove; obsolete.
2590 * Makefile.in: Rebuild dependencies.
2591 (BFD_LIBS): Remove ctor.o.
2592 (CFILES): Remove ctor.c.
2593 * libbfd.h: Rebuild.
2594
27ebd952
JL
2595Mon Sep 12 01:58:47 1994 Jeff Law (law@snake.cs.utah.edu)
2596
2597 * elf32-hppa.c (elf32_hppa_relocate_section): If there was a link
2598 error of some sort (for example, undefined symbols), then do not
2599 apply any relocs, just notify the user of the errors.
2600 (elf32_hppa_backend_begin_write_processing): Do not build a symbol
2601 extension section for an executable (it's useless).
2602 (elf32_hppa_link_output_symbol_hook): Do nothing if there was a
2603 link error of some sort (for example, undefined symbols).
2604 (elf32_hppa_read_symext_info): Kludge. Turn off SEC_HAS_CONTENTS
2605 for all the input symbol extension sections to keep the generic
2606 BFD code happy. Temporarily turn it on to read the contents of
2607 the symbol extension section.
2608
95bc714e
JL
2609Sun Sep 11 21:58:59 1994 Jeff Law (law@snake.cs.utah.edu)
2610
2611 * config/hppaosf.mh (RANLIB): Do not set.
2612 * config/hppabsd.mh (RANLIB): Likewise.
2613
5b89e1a0
ILT
2614Sun Sep 11 22:50:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
2615
2616 * cf-i386lynx.c: Remove #if 0 code.
2617 (i386_lynxos_coff_object_p): Remove unused function.
2618 (coff_bfd_link_add_symbols): Define.
2619 (lynx_link_add_symbols): New static function.
2620 * coffcode.h (coff_bfd_link_hash_table_create): If
2621 coff_relocate_section is defined, only define this if not already
2622 defined.
2623 (coff_bfd_link_add_symbols, coff_bfd_final_link): Likewise.
2624
2625 * linker.c (_bfd_generic_final_link): Handle
2626 bfd_indirect_link_order explicitly, rather than via
2627 _bfd_default_link_order.
2628 (set_symbol_from_hash): New static function, broken out of
2629 _bfd_generic_link_write_global_symbol.
2630 (_bfd_generic_link_write_global_symbol): Symbol setting code moved
2631 to set_symbol_from_hash; call it.
2632 (default_indirect_link_order): Add generic_linker argument.
2633 Change all callers. If false, set the generic symbols based on
2634 the hash table entries.
2635
bd23b552
ILT
2636Fri Sep 9 11:51:49 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2637
67ff4a56
ILT
2638 * coffgen.c (coff_get_symtab): Reindented. Removed commented out
2639 call to bfd_constructor_entry.
2640
bd23b552
ILT
2641 Convert m68k COFF to use new COFF backend linker.
2642 * coff-m68k.c (coff_relocate_section): Define.
2643 * cf-m68klynx.c (coff_rtype_to_howto): Define.
2644 (coff_m68k_lynx_rtype_to_howto): New static function.
2645 * configure.in (m68kcoff_vec): Build cofflink.o.
2646 (m68kcoffun_vec, m68klynx_coff_vec): Likewise.
2647
2546fb27
SC
2648Thu Sep 8 16:20:38 1994 Steve Chamberlain (sac@jonny.cygnus.com)
2649
bd23b552
ILT
2650 * coff-h8300.c (h8300_reloc16_extra_cases, case RELBYTE): Flag
2651 overflows correctly.
2546fb27 2652
dc5fff10
ILT
2653Wed Sep 7 19:01:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2654
2546fb27
SC
2655 * libelf.h (struct elf_backend_data): Change second argument of
2656 elf_backend_final_write_processing hook to boolean.
2657 (struct elf_obj_tdata): Add linker field.
2658 * elfcode.h (NAME(bfd_elf,write_object_contents)): Pass value of
2659 tdata linker field to final_write_processing, rather than NULL.
2660 (elf_bfd_final_link): Don't call final_write_processing hook. Set
2661 tdata linker field to true.
2662 * elf32-mips.c (mips_elf_final_write_processing): Change type of
2663 second argument to boolean.
2664 * elf32-hppa.c (elf32_hppa_backend_final_write_processing):
2665 Likewise.
2666
dc5fff10
ILT
2667 * coff-go32.c (RTYPE2HOWTO): Fully parenthesize arguments.
2668 * coff-i960.c (RTYPE2HOWTO): Likewise.
2669 * coff-m88k.c (RTYPE2HOWTO): Likewise.
2670 * coff-we32k.c (RTYPE2HOWTO): Likewise.
2671
2672 Make i386 COFF use new COFF backend linker.
2673 * coff-i386.c (RTYPE2HOWTO): Fully parenthesize arguments.
2674 (coff_relocate_section): Define.
2675 (coff_i386_rtype_to_howto): New function.
2676 * configure.in (i386coff_vec): Use cofflink.o.
2677 (i386lynx_coff_vec): Likewise.
2678
2679 * coffcode.h (bfd_coff_backend_data): Add new field
2680 _bfd_coff_rtype_to_howto.
2681 (bfd_coff_rtype_to_howto): Define.
2682 (coff_rtype_to_howto): Define to use RTYPE2HOWTO, if not already
2683 defined.
2684 (bfd_coff_std_swap_table): Initialize new field.
2685 * cofflink.c (_bfd_coff_final_link): Allocate section_count + 1
2686 section_info structures, since the target_index is 1 based.
2687 (coff_link_input_bfd): Set *secpp to bfd_com_section_ptr for a
2688 common symbol. Adjust rel_hash by the output reloc count.
2689 (_bfd_coff_generic_relocate_section): New function.
2690 * libcoff-in.h (_bfd_coff_generic_relocate_section): Declare.
2691 * libcoff.h: Rebuild.
2692 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2693 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2694
3b50c900
JL
2695Tue Sep 6 23:28:52 1994 Jeff Law (law@snake.cs.utah.edu)
2696
2697 * som.c (som_bfd_derive_misc_symbol_info): Treat undefined code
2698 symbols and undefined symbols which no type in the same manner
2699 if the associated BFD symbol has BSF_FUNCTION set. For a defined
2700 symbol which no type, select a SOM type based on the flags of the
2701 section containing the symbol.
2702 (som_slurp_symbol_type): Set BSF_FUNCTION for undefined ST_STUB
2703 or ST_CODE symbols (importing a non-function code symbol is
2704 meaningless in SOM).
2705 (som_set_reloc_info): Don't set "offset" to the section's vma; it
2706 should always start at zero.
2707
69645d10
ILT
2708Tue Sep 6 14:51:11 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2709
2710 Add new style linker support to COFF backend. a29k only for now.
2711 * cofflink.c: New file.
2712 * libcoff-in.h: Include bfdlink.h.
2713 (obj_coff_external_syms, obj_coff_strings): Define accessor macro.
2714 (obj_coff_sym_hashes): Define accessor macro.
2715 (struct coff_tdata): Add fields external_syms, strings, and
2716 sym_hashes.
2717 (struct coff_link_hash_entry): Define.
2718 (struct coff_link_hash_table): Define.
2719 (coff_link_hash_lookup, coff_link_hash_traverse): Define.
2720 (coff_hash_table): Define.
2721 (_bfd_coff_link_hash_table_create): Declare.
2722 (_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare.
2723 * coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz,
2724 _bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global,
2725 _bfd_coff_compute_section_file_positions,
2726 _bfd_coff_relocate_section.
2727 (bfd_coff_relsz, bfd_coff_swap_reloc_in): Define.
2728 (bfd_coff_sym_is_global): Define.
2729 (bfd_coff_compute_section_file_positions): Define.
2730 (bfd_coff_relocate_section): Define.
2731 (coff_mkobject_hook): Initialize obj_raw_syment_count and
2732 obj_conv_table_size.
2733 (coff_compute_section_file_positions): Set target_index of all
2734 sections. Set output_has_begun field.
2735 (coff_write_object_contents): Don't set target_index; now done by
2736 coff_compute_section_file_positions. Remove obsolete handling of
2737 scn_base and data_base. Don't bother to check that target_index
2738 is positive, since it always is. Remove use of pad, which is
2739 always zero. Check obj_raw_syment_count, not bfd_get_symcount,
2740 for the number of symbols, but only write them out if
6ceff8e7
ILT
2741 bfd_get_symcount is non-zero. Don't check obj_raw_syment_count
2742 until after coff_write_symbols is called.
69645d10
ILT
2743 (coff_slurp_symbol_table): Use obj_raw_syment_count, not
2744 bfd_get_symcount for the number of symbols. Don't set
2745 obj_conv_table_size.
2746 (coff_sym_is_global): New static function or macro.
2747 (coff_slurp_reloc_table): Call coff_swap_reloc_in, not
2748 bfd_swap_reloc_in.
2749 (coff_bfd_link_hash_table_create): If coff_relocate_section is
2750 defined, define as _bfd_coff_link_hash_table_create.
2751 (coff_bfd_link_add_symbols): Similar change.
2752 (coff_bfd_final_link): Similar change.
2753 (coff_relocate_section): Define as NULL if not defined.
2754 (bfd_coff_std_swap_table): Initialize new fields.
2755 * coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count
2756 and obj_conv_table_size here.
2757 (coff_count_linenumbers): Reindent. If bfd_get_symcount is zero,
2758 add up the line numbers from the sections.
6ceff8e7
ILT
2759 (coff_write_symbols): Set obj_raw_syment_count, not
2760 bfd_get_symcount.
69645d10
ILT
2761 (coff_pointerize_aux): Don't pointerize a nonpositive x_endndx
2762 field.
2763 (coff_get_normalized_symtab): Use obj_raw_syment_count, not
2764 bfd_get_symcount.
2765 (coff_print_symbol): If auxp->fix_end, print x_endndx value.
2766 * coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in.
2767 Reindent. Change argument type to PTR.
2768 * coff-a29k.c (coff_a29k_relocate_section): New static function.
2769 (coff_relocate_section): Define.
2770 * configure.in (a29kcoff_big_vec): Compile cofflink.o.
2771 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields.
2772 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2773 * libcoff.h: Rebuilt.
2774 * Makefile.in: Rebuilt dependencies.
2775 (BFD32_BACKENDS): Add cofflink.o.
2776 (CFILES): Add cofflink.c.
2777
358710a7
KR
2778Tue Sep 6 14:00:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2779
de733a0e
KR
2780 * coffgen.c (coff_print_symbol, case bfd_symbol_print_all): Check
2781 for section symbol, and print its aux fields with appropriate
2782 labels.
2783
358710a7
KR
2784 * Makefile.in (ALL_MACHINES): Added cpu-arm.o.
2785
e1728bee 2786Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
318b02b6
KR
2787
2788 * aoutx.h (NAME(aout,machine_type)): Recognize the ARM processor.
2789 * archures.c, config.bfd, configure.host, libaout.h, reloc.c,
2790 targets.c: Add support for the ARM.
2791 * cpu-arm.c, riscix.c, config/riscix.mh, config/riscix.mt: New files.
2792
e1728bee 2793 * aoutx.h (add_to_stringtable): Check that str isn't a NULL pointer.
318b02b6 2794
0443af31
KR
2795Fri Sep 2 14:10:30 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
2796
2797 * reloc.c (enum bfd_reloc_code_real): Rewrote definition to use
2798 new "chew" commands for simultaneous definition of enumerator and
2799 enumerator name table.
2800 (bfd_get_reloc_code_name): New function, for retrieving a symbolic
2801 name associated with an enumerator.
2802 * libbfd.h, bfd-in2.h: Regenerated.
2803
b905bde1
JL
2804Tue Aug 30 21:24:54 1994 Jeff Law (law@snake.cs.utah.edu)
2805
2806 * som.c (som_write_fixups, case R_ENTRY): Handle case where no
2807 unwind descriptor information is available.
2808
0822b56d
ILT
2809Tue Aug 30 11:43:30 1994 Eric Youngdale (ericy@cais.cais.com)
2810
2811 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname
2812 argument, and use it to set DT_SONAME dynamic entry.
2813 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
2814 (bfd_elf64_size_dynamic_sections): Update prototype.
2815 * bfd-in2.h: Rebuilt.
2816
b8520cf3
ILT
2817Fri Aug 26 15:47:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2818
2819 * coffgen.c (coff_real_object_p): Set obj_raw_syment_count.
2820 (coff_get_normalized_symtab): Verify obj_raw_syment_count, rather
2821 than setting it.
2822
715cde57
ILT
2823Thu Aug 25 10:44:53 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2824
fc10f31e
ILT
2825 * archive.c (bsd_write_armap): Remove host dependencies.
2826
435b470e
ILT
2827 * aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
2828 before adding BYTES_IN_WORD.
2829
6d04c6d4
ILT
2830 * coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
2831 not merely the first.
2832
715cde57
ILT
2833 * coffgen.c (coff_write_alien_symbol): If we are not using the
2834 symbol, clear the name so that it is not put in the string table.
2835 From Antti.Miettinen@ntc.nokia.com.
2836
1afd2380
ILT
2837Wed Aug 24 11:49:19 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2838
5a53b1c1
ILT
2839 * coffgen.c (coff_print_symbol): Cast pointer different to long
2840 and use %ld to print it.
2841 * osf-core.c (osf_core_core_file_p): Remove unused variable
2842 dseccnt.
2843 * ecoffswap.h (ecoff_swap_ext_out): If ECOFF_64, clear remaining
2844 bytes in bits2.
2845
073e795f 2846 * configure.host, config.bfd: Change i[34]86 to i[345]86.
a74d1517
ILT
2847 * coffgen.c (coff_real_object_p): Set obj_conv_table_size here,
2848 rather than waiting until coff_slurp_symbol_table.
2849 (coff_write_alien_symbol): Just ignore BSF_DEBUGGING symbols.
2850 From Antti.Miettinen@ntc.nokia.com.
2851
d3700222
ILT
2852 * section.c (bfd_make_section_anyway): Fix failure check of
2853 bfd_make_empty_symbol. From Antti.Miettinen@ntc.nokia.com.
2854
1afd2380
ILT
2855 * aoutx.h (translate_to_native_sym_flags): Use the output_section
2856 (and output_offset) if there is one.
2857
2858 * aoutx.h (aout_link_check_archive_element): Discard the symbols
2859 if the archive element was not needed.
2860
2861 * aoutx.h (aout_get_external_symbols): Ensure that a zero string
2862 index yields an empty string.
2863 (aout_link_write_symbols): If info->keep_memory is false, use name
2864 from original hash table entry, not from entry in *sym_hash.
2865
2866 * aoutx.h (struct aout_final_link_info): Add fields contents,
2867 relocs, symbol_map and output_syms.
2868 (NAME(aout,final_link)): Work out the largest section size, reloc
2869 size, and number of symbols. Use them to preallocate buffers that
2870 are large enough for all cases.
2871 (aout_link_input_bfd): Use preallocated symbol_map.
2872 (aout_link_write_symbols): Remove symbol_map argument; use
2873 preallocated symbol_map instead. Change all callers. Use
2874 preallocated output_syms.
2875 (aout_link_input_section): Remove symbol_map argument. Change all
2876 callers. Use preallocated contents and relocs.
2877 (aout_link_input_section_std): Remove symbol_map argument; use
2878 preallocated symbol_map instead. Change all callers.
2879 (aout_link_input_section_ext): Likewise.
2880
2881Tue Aug 23 10:51:09 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2882
2883 * archive.c (_bfd_write_archive_contents): Don't update the
2884 symbol map timestamp if there is no symbol map. From
2885 schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
2886
e914ed52
ILT
2887Mon Aug 22 12:26:42 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2888
81eb52b3
ILT
2889 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add _update_armap_timestamp.
2890 (bfd_target): Add field _bfd_update_armap_timestamp.
2891 * bfd.c (bfd_update_armap_timestamp): Define.
2892 * bfd-in2.h: Rebuilt.
2893 * libbfd-in.h (_bfd_noarchive_update_armap_timestamp): Define.
2894 (_bfd_archive_bsd_update_armap_timestamp): Declare.
2895 (_bfd_archive_coff_update_armap_timestamp): Define.
2896 * libbfd.h: Rebuilt.
2897 * archive.c (_bfd_write_archive_contents): Call
2898 bfd_update_armap_timestamp instead of checking for a BSD archive
2899 and calling bsd_update_armap_timestamp.
2900 (_bfd_archive_bsd_update_armap_timestamp): Rename from
2901 _bsd_update_armap_timestamp. Don't assume that armap_datepos is
2902 already set.
2903 * aout-target.h (MY_update_armap_timestamp): Define if not already
2904 defined.
2905 * coff-rs6000.c (rs6000coff_update_armap_timestamp): Define.
2906 * ieee.c (ieee_update_armap_timestamp): Define.
2907 * libecoff.h (_bfd_ecoff_update_armap_timestamp): Define.
2908 * oasys.c (oasys_update_armap_timestamp): Define.
2909 * som.c (som_update_armap_timestamp): Define.
2910
e914ed52
ILT
2911 * hash.c: Copy string hash functions from aoutx.h.
2912 * aoutx.h: String hash functions moved to hash.c. Retain
2913 simplified versions of add_to_stringtab and emit_stringtab.
2914 Change all callers to use new function and structure names.
2915 * libbfd-in.h (_bfd_stringtab_init, _bfd_stringtab_free): Declare.
2916 (_bfd_stringtab_size, _bfd_stringtab_add): Declare.
2917 (_bfd_stringtab_emit): Declare.
2918 * libbfd.h: Rebuilt.
2919
0ff4ca1e
ILT
2920Mon Aug 22 10:49:37 1994 Eric Youngdale (ericy@cais.cais.com)
2921
2922 * i386linux.c (linux_add_one_symbol): Create a fixup for any
2923 defined absolute symbol, not just GOT or PLT symbols.
2924 (linux_tally_symbols): Correct handling of references to defined
2925 symbols.
2926
32c76553
ILT
2927Thu Aug 18 16:29:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2928
f4945271
ILT
2929 Get ld -x -r to handle a.out set symbols correctly.
2930 * aoutx.h (adjust_o_magic): If the .bss VMA was set outside of
2931 BFD, pad the .data section up to the VMA of the .bss section.
2932 (aout_link_add_symbols): If a set symbol does not get modified,
2933 treat it as a local symbol.
2934 (aout_link_write_symbols): Set the value of set symbols
2935 correctly. Don't discard set symbols even if discarding local
2936 symbols.
2937 (aout_link_write_other_symbol): Don't abort on bfd_link_hash_new,
2938 since it can now happen for set symbols.
2939
32c76553
ILT
2940 * elfcode.h (elf_fake_sections): Just check for ".rela" and
2941 ".rel", not ".rela." and ".rel."; make this work by checking
2942 use_rela_p.
2943 * elf32-i386.c (elf_i386_check_relocs): Just check for ".rel", not
2944 ".rel."
2945 (elf_i386_size_dynamic_sections): Likewise.
2946 (elf_i386_relocate_section): Likewise.
2947 * elf32-sparc.c (elf32_sparc_check_relocs): Just check for
2948 ".rela", not ".rela."
2949 (elf32_sparc_size_dynamic_sections): Likewise.
2950 (elf32_sparc_relocate_section): Likewise.
2951
7cc5cc22
ILT
2952Wed Aug 17 16:54:18 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2953
2954 * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
2955 PASS to the old value + 1.
d83689d4
ILT
2956
2957 * coffgen.c (coff_get_normalized_symtab): If a C_FILE symbol has
2958 no aux entries, use the symbol name as the file name.
2959 (coff_find_nearest_line): Look for the right C_FILE symbol, rather
2960 than always using the first one. If there is a debugging symbol
2961 after a function symbol, skip it. Add the section VMA to the line
2962 offset, since it was subtracted out in coff_slurp_line_table.
2963
fde543b5
JL
2964Tue Aug 16 16:53:00 1994 Jeff Law (law@snake.cs.utah.edu)
2965
2966 * som.c (som_prep_headers): If writing some form of an executable,
2967 allocate and attach an exec header to the BFD private data.
2968 (som_begin_writing): Don't fill fields of the exec header based
2969 on BFD private data here (like the exec flags). Do not write
2970 the exec header here.
2971 (som_write_headers): Instead do it here.
2972 * som.h (struct somdata): New field "exec_hdr" for the executable
2973 file header.
2974 (obj_som_exec_hdr): New accessor macro.
2975
969ceea0
ILT
2976Tue Aug 16 00:12:31 1994 Eric Youngdale (ericy@cais.cais.com)
2977
2978 * i386linux.c (linux_link_create_dynamic_sections): Create section
2979 named .linux-dynamic, not .dynamic.
2980 (linux_add_one_symbol): Use .linux-dynamic, not .dynamic.
2981 (bfd_linux_size_dynamic_sections): Likewise.
2982 (linux_finish_dynamic_link): Likewise.
2983
e8fbe6d9
ILT
2984Mon Aug 15 12:16:56 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
2985
9fbe895a
ILT
2986 * coffgen.c (STRING_SIZE_SIZE): Define.
2987 (coff_fix_symbol_name): Use STRING_SIZE_SIZE, not 4.
2988 (coff_write_symbols, build_string_table): Likewise.
2989 (coff_get_normalized_symtab): Likewise.
2990
f07bb971
ILT
2991 * libcoff-in.h (obj_symbol_slew): Don't define.
2992 (struct coff_tdata): Remove unused fields index_slew, raw_linenos,
2993 and flags.
2994 * libcoff.h: Rebuilt.
2995 * coffcode.h (coff_mkobject): Don't initialize raw_linenos.
2996 (coff_mkobject_hook): Don't initialize flags.
2997
a932d0ff
ILT
2998 * aout-target.h (MY_zmagic_contiguous): Define as 0 if not already
2999 defined.
3000 (MY(backend_data)): Use MY_zmagic_contiguous, not hardcoded 0.
3001 * i386linux.c (MY_zmagic_contiguous): Define.
3002
823609fe
ILT
3003 * elfcode.h (bfd_section_from_shdr): If a SHT_SYMTAB section in a
3004 shared object has SHF_ALLOC set, create a BFD section for it.
3005 (elf_section_from_bfd_section): There may be a BFD section for a
3006 SHT_SYMTAB section.
3007
e8fbe6d9
ILT
3008 * coffcode.h (styp_to_sec_flags): Add name argument. If no flags
3009 are recognized, chose section flags based on the name.
3010 (bfd_coff_backend_data): _bfd_styp_to_sec_flags_hook field: Add
3011 name argument.
3012 (bfd_coff_styp_to_sec_flags_hook): Add name argument.
3013 (coff_compute_section_file_positions): Don't adjust the section
3014 position by COFF_PAGE_SIZE unless SEC_ALLOC is set.
3015 * libcoff.h: Rebuilt.
3016 * coffgen.c (make_a_section_from_file): Pass section name to
3017 bfd_coff_styp_to_sec_flags_hook.
3018 * ecoff.c (_bfd_ecoff_styp_to_sec_flags): Add unused name
3019 argument.
3020 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Add name argument to
3021 prototype.
3022
1c640609
ILT
3023Fri Aug 12 11:22:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3024
e9227b42
ILT
3025 * elfcode.h (section_from_elf_index): Correct check for invalid
3026 section index.
3027
1c640609
ILT
3028 * elfcode.h (elf_link_add_object_symbols): If there is no symbol
3029 table, try using the dynamic symbol table. From Eric Youngdale
3030 <ericy@cais.cais.com>.
3031
3032 * configure.host (sparc-*-solaris2*): Use solaris2, not sysv4.
3033 The linker depends upon configuring for solaris2.
3034 * hosts/solaris2.h: New file; include hosts/sysv4.h.
3035 * config/solaris2.mh: New file; copy of config/sysv4.mh.
3036
e1f99f60
ILT
3037Wed Aug 10 13:09:38 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3038
3039 * aoutx.h (adjust_z_magic): Make sure data section is padded to
3040 page boundary when the VMA is set by the calling program. From
3041 Eric Youngdale <ericy@cais.cais.com>.
3042
fb49a801
SS
3043Mon Aug 8 17:18:49 1994 Stan Shebs (shebs@andros.cygnus.com)
3044
3045 Update to ns32k support, from Ian Dall (dall@hfrd.dsto.gov.au).
3046 * aout-ns32k.c: Add declarations that were in aout-ns32k.h, change
3047 declarations to traditional form.
3048 (MY_reloc_howto, MY_put_reloc): Change from macro to function.
3049 (ns32k_relocate_contents): New function.
3050 * aout-ns32k.h: Remove.
3051 * cpu-ns32k.c: Add declarations that were in aout-ns32k.h, change
3052 declarations to traditional form.
3053 (ns32k_final_link_relocate): Call ns32k_relocate_contents.
3054 * netbsd532.c: Reformat to standards, add copyright notice.
3055 (ARCH): Don't define.
3056 (aout-ns32k.h): Don't include.
3057 * pc532-mach.c: Ditto.
3058
3059Mon Aug 8 17:55:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3060
3061 * coff-i960.c (coff_i960_relocate): Don't try to convert relocs
3062 against common symbols.
3063
f20860cd
PS
3064Sat Aug 6 22:27:30 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3065
3066 * irix-core.c (irix_core_core_file_p): Ignore sections that
3067 are not contained in the core file.
3068
203778ce
JMD
3069Thu Aug 4 11:32:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3070
74329939 3071 * coff-m68k.c (m68k_reloc_type_lookup): New function.
8337ee9d 3072 (coff_bfd_reloc_type_lookup): Define.
74329939 3073 * cf-m68klynx.c (_bfd_m68kcoff_reloc_type_lookup): Define.
8337ee9d 3074
203778ce
JMD
3075 * elfcode.h (elf_bfd_final_link): Force the vma of sections which
3076 do not have SEC_ALLOC set to be 0. This is needed to handle
3077 relocs against debugging sections.
3078
1b8a11d4
JMD
3079Wed Aug 3 16:45:41 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3080
3081 * coff-i960.c (coff_i960_relocate): Rewrote to change relocs
3082 against locally defined symbols into relocs against section
3083 symbols, for VxWorks 5.1.
3084
e696f6a9
JMD
3085Wed Aug 3 10:34:37 1994 Eric Youngdale (ericy@cais.cais.com)
3086
3087 * i386linux.c (linux_add_one_symbol): Only handle
3088 SHARABLE_CONFLICTS specially if BSF_CONSTRUCTOR is set. Set hashp
3089 for a GOT or PLT symbol. Set jump field of fixup for a PLT symbol.
3090 (linux_tally_symbols): Check section of real symbol. When looking
3091 for a builtin fixup, check builtin and jump flags. Create no more
3092 than one fixup, and always create one if the real symbol is in the
3093 absolute section. Only strip absolute symbols.
3094
756b40d5
DHW
3095Wed Aug 3 05:08:24 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
3096
3097 * coffcode.h (coff_write_object_contents): set internal_a.magic to
3098 LYNXCOFFMAGIC whenever 68k, SPARC or i386 LynxOS
3099 (yes, they have the same magic number!)
3100
e0566e19
JMD
3101Tue Aug 2 10:43:21 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3102
b2ea35c7
JMD
3103 * hp300hpux.c (BMAGIC): Define as HPUX_DOT_O_MAGIC, to make test
3104 in aoutx.h work correctly.
3105
5e694c29
JMD
3106 * coff-i960.c (coff_i960_relocate): New function.
3107 (howto_rellong, howto_iprmed): Use it as special_function.
3108
e0566e19
JMD
3109 * libbfd-in.h: Move declarations of bfd_read, bfd_write, bfd_seek,
3110 bfd_tell, bfd_flush, and bfd_stat from here...
3111 * bfd-in.h: ...to here, to make them visible to programs which
3112 know more about the object file format than BFD does.
3113 * libbfd.h, bfd-in2.h: Rebuilt.
3114
287e3ce2
JMD
3115Mon Aug 1 17:55:53 1994 Fred Fish (fnf@cygnus.com)
3116
3117 * ptrace-core.c (ptrace_unix_core_file_p): Convert zalloc usage
3118 to bfd_zalloc.
3119
abc61566 3120Mon Aug 1 12:04:40 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
d510fd89 3121
4ab1f947
JMD
3122 * elf64-sparc.c (ELF_MAXPAGESIZE): Define.
3123
99dd7754
JMD
3124 ELF linker patches from Eric Youngdale <ericy@cais.cais.com>.
3125 * elfcode.h (elf_link_create_dynamic_sections): Set type of
3126 _DYNAMIC to STT_OBJECT.
3127 (NAME(bfd_elf,record_link_assignment)): Always create hash table
3128 entry. Set type to STT_OBJECT.
3129 (elf_link_output_extsym): Don't set type of weak defined symbol to
3130 STB_WEAK if symbol was referenced.
e2167917
JMD
3131 (map_program_segments): Check DYNAMIC as well as EXEC_P.
3132 (assign_file_positions_except_relocs): Likewise.
99dd7754
JMD
3133 * elf32-i386.c (elf_i386_create_dynamic_sections): Set type of
3134 _GLOBAL_OFFSET_TABLE to STT_OBJECT.
3135 (elf_i386_check_relocs): Ignore local PLT32 relocs.
3136 (elf_i386_relocate_section): Treat local PLT32 relocs as PC32.
3137
30e5ad97
ILT
3138 * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbol
3139 handling again.
3140
d510fd89
ILT
3141 * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocs
3142 if there aren't any.
abc61566
ILT
3143
3144 * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
3145 * hosts/solaris2.h: Remove.
3146 * config/solaris2.mh: Remove.
3147
58bbba79
JL
3148Sun Jul 31 14:27:04 1994 Jeff Law (law@snake.cs.utah.edu)
3149
3150 * elf32-hppa.c, elf32-hppa.h: Update comment reflecting which
3151 HPPA ELF spec the code implements.
3152
b5b056fc
KR
3153Tue Jul 26 17:38:01 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3154
3155 * cpu-i960.c (MAX_ARCH): New macro.
3156 (compatible): Use it in computing array bounds. Put comma after
3157 last entry in array, for regularity.
3158 (arch_info_struct): Adjust spacing for easier reading.
3159
3160 * coff-i960.c (howto_rellong, howto_iprmed, howto_optcall): Use
3161 HOWTO macro.
3162
3163 start-sanitize-i960xl
3164 * cpu-i960.c (XL): Define as bfd_mach_i960_xl.
3165 (scan_960_mach): Recognize xl machine.
3166 (MAX_ARCH): Define to be XL.
3167 (compatible): Add XL row to array.
3168 (arch_info_struct): Add XL entry.
3169
3170 * archures.c (bfd_mach_i960_xl): New macro.
3171 * bfd-in2.h: Regenerated.
3172
3173 * coffcode.h (coff_set_arch_mach_hook): For F_I960XL, set machine
3174 to bfd_mach_i960_xl.
3175 (coff_set_flags): For bfd_mach_i960_xl, set F_I960XL.
3176 end-sanitize-i960xl
3177
374d2ef9
ILT
3178Tue Jul 26 11:04:00 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3179
9a402d7a
ILT
3180 * elfcode.h (elf_adjust_dynamic_symbol): When handling a weak
3181 symbol, correct check to see whether the equivalent normal symbol
3182 was referenced.
3183
374d2ef9
ILT
3184 Add support for creating shared libraries under i386 ELF and SPARC
3185 ELF. Based on patches by Eric Youngdale <ericy@cais.cais.com>.
3186 * libelf.h (struct elf_link_hash_entry): Remove copy_offset field.
3187 Add got_offset and plt_offset fields.
3188 (ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define.
3189 (ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define.
3190 (ELF_LINK_HASH_NEEDS_COPY): Define.
3191 (struct elf_backend_data): Add check_relocs field.
3192 (struct bfd_elf_section_data): Change relocs from PTR to
3193 Elf_Internal_Rela *.
3194 (struct elf_obj_tdata): Add local_got_offsets field.
3195 (elf_local_got_offsets): Define accessor macro.
3196 (bfd_elf32_link_create_dynamic_sections): Declare.
3197 (bfd_elf32_link_record_dynamic_symbol): Declare.
3198 (bfd_elf64_link_create_dynamic_sections): Declare.
3199 (bfd_elf64_link_record_dynamic_symbol): Declare.
3200 * elfcode.h (elf_slurp_reloc_table): Don't use the section data
3201 relocs field.
3202 (elf_link_record_dynamic_symbol): Make globally visible. Use
3203 macro to rename to NAME(bfd_elf,link_record_dynamic_symbol).
3204 (elf_link_add_object_symbols): If creating a shared library, put
3205 make all local symbols dynamic. Don't bother with the
3206 DYNAMIC_MULTIPLE flags. Call the check_relocs backend function if
3207 it is defined.
3208 (elf_link_create_dynamic_sections): Make globally visible. Use
3209 macro to rename to NAME(bfd_elf,link_create_dynamic_sections). If
3210 creating a shared library, make sure that _DYNAMIC is added as a
3211 dynamic symbol.
3212 (elf_link_read_relocs): New function.
3213 (NAME(bfd_elf,record_link_assignment)): If creating a shared
3214 library, always create symbols, and always make them dynamic.
3215 (elf_bfd_final_link): Permit creation of shared libraries.
3216 (elf_link_input_bfd): Use elf_link_read_relocs to get the relocs.
3217 * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize
3218 copy_offset. Initialize got_offset and plt_offset.
3219 * elf32-target.h (elf_backend_check_relocs): Define as 0 if not
3220 defined.
3221 (elf32_bed): Initialize check_relocs field.
3222 * elf64-target.h (elf_backend_check_relocs): Define as 0 if not
3223 defined.
3224 (elf64_bed): Initialize check_relocs field.
3225 * elf32-i386.c (elf_howto_table): Change R_386_PLT32 and
3226 R_386_GOTPC to be pc_relative and pcrel_offset.
3227 (elf_i386_pic_plt0_entry): Define.
3228 (elf_i386_pic_plt_entry): Define.
3229 (elf_i386_create_dynamic_sections): Create a .got.plt section, and
3230 define _GLOBAL_OFFSET_TABLE_ at the start of it. If creating a
3231 shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
3232 dynamic symbol. Don't create .rel.bss if creating a shared
3233 library.
3234 (elf_i386_check_relocs): New function.
3235 (elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the
3236 symbol already has one. When making a PLT entry, set plt_offset.
3237 Don't create a copy reloc when creating a shared library. Don't
3238 set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
3239 (elf_i386_allocate_dynamic_section): Remove.
3240 (elf_i386_size_dynamic_sections): Look through all the sections
3241 rather than assuming we know their names. Remove any empty reloc
3242 or plt sections. Only add a DT_DEBUG entry if not creating a
3243 shared library. Only add a DT_PLTGOT entry if there is a PLT.
3244 Add a DT_TEXTREL entry if required.
3245 (elf_i386_relocate_section): Permit undefined symbols when
3246 creating a shared library. Handle the special relocation types
3247 specially.
3248 (elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset
3249 is set. If creating a shared library, produce a PIC PLT entry.
3250 Only mark a PLT symbol as undefined if it was not defined by a
3251 regular object file. Create a GOT entry if got_offset is set.
3252 Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
3253 (elf_i386_finish_dynamic_sections): Change the handling of
3254 DT_RELSZ to simply subtract out the size of .rel.plt. If creating
3255 a shared library, produce PIC PLT code.
3256 (elf_backend_check_relocs): Define.
3257 * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10,
3258 R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow.
3259 (elf32_sparc_create_dynamic_sections): If creating a shared
3260 library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
3261 dynamic symbol, and set the type to STT_OBJECT. Likewise for
3262 _PROCEDURE_LINKAGE_TABLE_. Don't create .rel.bss if creating a
3263 shared library.
3264 (elf32_sparc_check_relocs): New function.
3265 (elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the
3266 symbol already has one. When making a PLT entry, set plt_offset.
3267 Don't create a copy reloc when creating a shared library. Don't
3268 set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
3269 (elf32_sparc_allocate_dynamic_section): Remove.
3270 (elf32_sparc_size_dynamic_sections): Look through all the sections
3271 rather than assuming we know their names. Only add a DT_DEBUG
3272 entry if not creating a shared library. Add a DT_TEXTREL entry if
3273 required.
3274 (elf32_sparc_relocate_section): Permit undefined symbols when
3275 creating a shared library. Handle the special relocation types
3276 specially.
3277 (elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset
3278 is set. Only mark a PLT symbol as undefined if it was not defined
3279 by a regular object file. Create a GOT entry if got_offset is
3280 set. Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
3281 (elf32_sparc_finish_dynamic_sections): Store dynobj in a local
3282 variable.
3283 (elf_backend_check_relocs): Define.
3284
caede515
SS
3285Mon Jul 25 12:21:07 1994 Stan Shebs (shebs@andros.cygnus.com)
3286
3287 * configure.in (pc532mach_vec): Change to pc532machaout_vec.
3288 * config.bfd (ns32k-*-netbsd*): Use ns32k-nbsd as bfd_name.
3289 * Makefile.in (ALL_MACHINES): Add cpu-ns32k.o.
3290 (BFD32_BACKENDS): Add aout-ns32k.o, netbsd532.o, m88kmach3.o,
3291 pc532-mach.o.
3292 * targets.c (pc532machaout_vec): Use instead of pc532mach_vec.
3293 * config/pc532-mach.mt (DEFAULT_VECTOR): Ditto.
3294 (SELECT_VECS): Remove.
3295 * config/ns32k-nbsd.mt: New file, was ns32k-netbsd.mt.
3296 * config/ns32k-netbsd.mt: Remove, name too long.
3297
2aaaab7c
ILT
3298Fri Jul 22 11:07:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3299
f2c2e75c
ILT
3300 * linker.c (generic_link_check_archive_element): When changing a
3301 symbol to common, set the alignment.
3302 (_bfd_generic_link_add_one_symbol): When creating a common symbol,
3303 set the alignment.
3304 * aoutx.h (aout_link_check_ar_symbols): When changing a symbol to
3305 common, set the alignment.
3306 (aout_link_add_symbols): Restrict the alignment of a common symbol
3307 to the alignment power given by the architecture.
3308 * libelf.h (struct elf_link_hash_entry): Remove align field. Add
3309 copy_offset field.
3310 * elfcode.h (elf_link_add_object_symbols): Store alignment in
3311 new bfd_link_hash_entry field, not in elf_link_hash_entry field.
3312 (elf_link_output_extsym): Similar change when getting alignment.
3313 * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align. Do
3314 initialize copy_offset.
3315 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset
3316 field rather than align field. Get alignment using bfd_log2
3317 rather than switch.
3318 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
3319 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset,
3320 not align.
3321 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
3322
2aaaab7c
ILT
3323 * aoutx.h (NAME(aout,some_aout_object_p)): Just check
3324 STAT_FOR_EXEC, don't check MACH.
3325 * m88kmach3.c (MACH): Don't define.
3326 * config/i386-mach3.mt (TDEFINES): Define STAT_FOR_EXEC.
3327 * config/m88k-mach3.mt (TDEFINES): Likewise.
3328 * config/mips-mach3.mt (TDEFINES): Likewise.
3329
bb99a732
SS
3330Thu Jul 21 17:24:31 1994 Stan Shebs (shebs@andros.cygnus.com)
3331
3332 * i386mach3.c: Reverted to version from before Jul 5 1994 changes.
3333
f42fe159
ILT
3334Thu Jul 21 12:26:01 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3335
3336 * reloc.c (struct reloc_howto_struct): Remove special_function1.
3337 It's the wrong way to do things.
3338 (HOWTO): Change accordingly.
3339 (HOWTO2): Remove.
3340 (_bfd_final_link_relocate): Remove references to
3341 special_function1.
3342 * bfd-in2.h: Rebuilt.
3343 * aoutx.h (aout_link_input_section_std): Remove references to
3344 special_function1.
3345 (aout_link_reloc_link_order): Likewise.
3346
3347Wed Jul 20 15:46:44 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3348
3349 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add rpath
3350 argument. If it is not NULL, use it to set DT_RPATH.
3351 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
3352 (bfd_elf64_size_dynamic_sections): Likewise.
3353 * bfd-in2.h: Rebuilt.
3354
ea617174
ILT
3355Sat Jul 16 21:10:39 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3356
f42fe159
ILT
3357 * elfcode.h (elf_get_dynamic_symtab_upper_bound): If there is no
3358 dynamic symtab, return error.
3359
bf73e4f3
ILT
3360 * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.
3361 * elfcode.h (elf_link_add_object_symbols): If symbol is defined as
3362 weak, set ELF_LINK_HASH_DEFINED_WEAK.
3363 (elf_link_output_extsym): If symbol is defined as weak, mark it
3364 STB_WEAK.
3365
ea617174
ILT
3366 * libelf.h (struct bfd_elf_section_data): Add relocs field.
3367 (shdr_name): Remove; unused.
3368 * elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
3369 and RELA relocs. Free up the unswapped relocs. Permit the relocs
3370 to be cached in the section_data. Correct the reloc address.
3371 (elf_slurp_reloca_table): Remove.
3372 (elf_canonicalize_reloc): Rewrote.
3373 (elf_link_input_bfd): Permit the relocs to be cached in the
3374 section data.
3375
ef8b133d
SS
3376Sat Jul 16 13:55:38 1994 Stan Shebs (shebs@andros.cygnus.com)
3377
d9840ab7
SS
3378 * config.bfd (m88*-harris-cxux*): Recognize.
3379 * hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
3380
ef8b133d
SS
3381 * configure.host (m68*-atari-sysv4*): New host.
3382 (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
3383 * hosts/amix.h: Remove.
3384 * hosts/m68kv4.h: New file, was amix.h.
3385
1fb83be6
KR
3386Thu Jul 14 15:12:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3387
3388 * reloc.c (enum bfd_reloc_code_real, bfd_type, struct
3389 reloc_howto_struct, reloc_howto_type, HOWTO, HOWTO2): Copied
3390 changes over from bfd-in2.h so they get generated properly next
3391 time someone runs "make headers".
3392 * bfd-in2.h: Rebuilt.
3393
3394 * targets.c (netbsd532_vec, pc532mach_vec): Declare const.
3395 (m88kmach3_vec): Restore deleted declaration.
3396
3397 * configure.in: Alphabetize target vector names.
3398
3399 * config/pc532mach.mh: New file.
3400 (HDEPFILES, HDEFINES): Define here.
3401 * config/pc532-mach.mt (HDEPFILES, HDEFINES): Deleted.
3402 * config/ns32k-netbsd.mt (HDEPFILES, HDEFINES): Deleted.
3403
3404 Sun Jul 10 00:04:20 1994 Ian Dall (dall@hfrd.dsto.gov.au)
3405
3406 * pc532-mach.c: New File. pc532-mach a.out format.
3407
3408 * netbsd532.c: New file. pc532-netbsd532 a.out format.
3409
3410 * hosts/pc532mach.h: New file. pc532-mach host support.
3411
3412 * cpu-ns32k.c: New file. ns32k support cpu specific code rather
3413 than format specific code.
3414
3415 * config/pc532-mach.mt: New file. Support for pc532-mach target.
3416
3417 * config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
3418
3419 * aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
3420 ns32k series.
3421
3422 * targets.c: Add netbsd532_vec and pc532machaout_vec into
3423 bfd_target_vector array. Move netbsd386_vec to alphabetic order
3424 location.
3425
3426 * reloc.c (_bfd_final_link_relocate) Add support for
3427 special_function1 in howto.
3428
3429 * libaout.h: add M_NS32032, M_NS32532, M_532_NETBSD entries in
3430 machine_type enum.
3431
3432 * configure.in: add pc532mach_vec and netbsd532_vec entries.
3433
3434 * config.bfd: add pc532mach host entries. Use for both
3435 ns32k-pc532-mach and ns32k-pc532-netbsd.
3436
3437 * config.bfd: it doesn't work to use i386-mach3 for ns32k*-*-mach.
3438 add ns32k-pc532-mach* and ns32k-*-netbsd* entries.
3439
3440 * bfd-in2.h: Add ns32k specific relocations to bfd_reloc_code_real
3441 enum.
3442
3443 * bfd-in2.h: Add special_function1 to struct howto. Change HOWTO
3444 and NEWHOWTO macros to make special_function1 NULL. Neww HOWTO2
3445 macro.
3446
3447 * bfd-in2.h: Split definition of struct reloc_howto_struct
3448 and corresponding typedef into two statements.
3449
3450 * bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
3451
3452 * archures.c: Add bfd_ns32k_arch prototype, and entry in
3453 archures_init_table.
3454
3455 * aoutx.h (aout_link_reloc_link_order): Allow for target dependent
3456 MY_put_reloc macro. Allow for target dependent special_function1
3457 to apply the relocation.
3458
3459 * aoutx.h (aout_link_input_section_std): Allow for target
3460 dependent determination of reloc howto. Allow for target dependent
3461 special_function1 to apply the relocation.
3462
3463 * aoutx.h (get_reloc_upper_bound): Detect bss and return 0.
3464
3465 * aoutx.h (slurp_reloc_table): Detect bss and succesfully read
3466 zero reloc entries.
3467
3468 * aoutx.h (machine_type): Add bfd_arch_ns32k case.
3469
3470 * aoutx.h: Stat to determine executable status if STAT_FOR_EXEC
3471 is defined (not just MACH). Use fstat instead of stat and check
3472 for fstat error.
3473
3474 * aoutx.h: Allow target dependent swap_std_reloc_{in,out}.
3475
3476 * aoutx.h: Allow CTORS reloc info to be in target dependent reloc
3477 table.
3478
3479 * aout-target.h: Apply SWAP_MAGIC (if defined) after
3480 swap_exec_header_in, otherwise we have magic in the wrong order.
3481
a307efdf
SS
3482Thu Jul 14 11:47:27 1994 Stan Shebs (shebs@andros.cygnus.com)
3483
3484 * coff-sparc.c (sparccoff_vec): Have leading underscores.
3485
57a814a9
PS
3486Tue Jul 12 12:08:10 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3487
3488 * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
3489 hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
3490 rs6000-core.c, trad-core.c: Remove SEC_ALLOC flag from .reg
3491 sections, .reg sections are not allocated and contain debug
3492 information only.
3493 * osf-core.c (make_bfd_asection, osf_core_core_file_p): Use
3494 bfd_make_section_anyway instead of building unique section names.
3495
42ec46c3
ILT
3496Tue Jul 12 11:41:22 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3497
840846da
ILT
3498 * libelf.h (bfd_elf32_swap_symbol_in): Declare.
3499 (bfd_elf32_swap_symbol_out): Declare.
3500 (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
3501 * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
3502
42ec46c3
ILT
3503 * aout-encap.c (ARCH): Don't define. Obsolete.
3504 * aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
3505 * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
3506 * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
3507 * newsos3.c, sparclynx.c, sunos.c: Likewise.
3508
18938e4d
ILT
3509Mon Jul 11 20:08:23 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3510
3511 * section.c (STD_SECTION): Make the sixth argument boolean, not
3512 the seventh. From gary@tuva.pacsemi.oz.au (gary kopff).
3513
4852416e
DHW
3514Sun Jul 10 09:12:02 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
3515
3516 * aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
3517 in order not to collide with LynxOS's definition of FREE in
3518 /usr/include/sys/proc.h
3519
3520Thu Jul 7 14:18:06 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3521
3522 * reloc.c (bfd_perform_relocation): Don't clobber the relocation
3523 value for coff-Intel-little or coff-Intel-big. Hack upon hack.
3524
fd4913f1
PS
3525Thu Jul 7 10:10:34 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3526
3527 * aoutx.h (howto_table_std): Add entry for GOT relocations
3528 which are present in sun3 shared libraries, to avoid assertions
3529 when reading the dynamic relocations.
3530
48530c25
JL
3531Thu Jul 7 10:19:20 1994 Jeff Law (law@snake.cs.utah.edu)
3532
3533 * som.h (R_HPPA_COMPLEX): Fix dumb typo.
3534
874a4327
ILT
3535Wed Jul 6 19:21:57 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3536
3537 * hosts/sysv4.h (qsort, strtol): Don't declare.
3538
3539 * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
3540 if it is NULL.
3541
3542 * elf32-mips.c (mips_elf_final_write_processing): Add ignored info
3543 argument to correspond to recent libelf.h change.
3544
5fb54939
PS
3545Wed Jul 6 00:48:57 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3546
3547 * coff-alpha.c (alpha_ecoff_mkobject_hook): New hook to
3548 additionally copy object type information from the alpha file
3549 header to the BFD flags.
3550 (alpha_ecoff_backend_data): Use it.
3551 (ecoffalpha_little_vec): Add DYNAMIC to object_flags.
3552 * aout64.c: Fix typo in conditional QMAGIC definition.
3553
2c0f3abc
JL
3554Wed Jul 6 00:13:17 1994 Jeff Law (law@snake.cs.utah.edu)
3555
3556 * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
3557 value of clicksz to help weed out non HPPA BSD core files.
3558
11676adc
SS
3559Tue Jul 5 13:26:02 1994 Stan Shebs (shebs@andros.cygnus.com)
3560
3561 Mach 3 support.
3562 * config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
3563 New targets.
3564 * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
3565 "mach3" instead of "mach".
3566 (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
3567 * targets.c (m88kmach3_vec): New target vector.
3568 (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
3569 inside #if 0.
3570 * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
3571 checking for execute permission, instead of looking at entry
3572 point.
3573 * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
3574 N_SHARED_LIB, don't include aout/*.h files, etc.
3575 * m88kmach3.c: New file, m88k Mach 3 target.
3576 * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target
3577 makefile fragments.
3578 * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
3579 New files, host makefile fragments.
3580 * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
3581
71edd06d
ILT
3582Tue Jul 5 13:56:52 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3583
3584 * elfcode.h (swap_out_syms): Get alignment of common symbol from
3585 st_value field of saved ELF symbol information, if there is any.
3586
edf7c1e4
JL
3587Mon Jul 4 19:13:32 1994 Jeff Law (law@snake.cs.utah.edu)
3588
3589 * som.h (R_HPPA_COMPLEX): Define.
3590 * elf32-hppa.h (R_HPPA_COMPLEX): Define.
3591 (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
3592
3593Fri Jul 1 12:07:41 1994 Jeff Law (law@snake.cs.utah.edu)
3594
3595 * Support code for enabling the new style linker for PA ELF.
3596 * elfcode.h (swap_symbol_in, swap_symbol_out): Externalize.
3597 (elf_compute_section_file_positions): Pass link_info to
3598 the begin_write_processing hook.
3599 (bfd_elf_write_object_contents): Pass NULL for new link_info
3600 argument to final_write_processing hook.
3601 (elf_link_output_sym): Accept new "input_section" argument for
3602 the symbols's input section. All callers changed. Call the
3603 link_output_symbol_hook if it's defined.
3604 (elf_bfd_final_link): Call the final_write_processing hook if
3605 it's defined.
3606 * libelf.h (elf_backend_link_output_symbol_hook): Declare.
3607 (elf_backend_begin_write_processing): Add new "info" argument.
3608 (elf_backend_final_write_processing): Likewise.
3609 * elf32-target.h (elf_backend_link_output_symbol_hook): Provide
3610 a default definition.
3611 (elf32_bed): Add elf_backend_link_output_symbol_hook.
3612 * elf64-target.h: Likewise.
3613
3614 * Major rework of the PA ELF code. Uses the new style BFD
3615 linker, major cleanups.
3616 * hppa_stubs.h: Rewrite from scratch. Much smaller and simpler.
3617 * elf32-hppa.h: Delete all symbol extension related code.
3618 (hppa_look_for_stubs_in_section): Delete decl.
3619 (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls.
3620 * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h
3621 into elf32-hppa.c. Do not include aout64.h.
3622 (typdef hppa_stub_type): Delete.
3623 (elf32_hppa_stub_name_list_struct): Delete.
3624 (elf32_hppa_stub_description_struct): Delete.
3625 (arg_reloc_type): Use simpler enumerations. All references changed.
3626 (arg_location, arg_reloc_relocation): Likewise.
3627 (elf32_hppa_symextn_map_struct): Delete.
3628 (get_symbol_value): Delete.
3629 (elf32_hppa_get_sym_extn): Delete.
3630 (find_stubs, new_stubs, type_of_mismatch): Delete.
3631 (find_stub_by_name, add_stub_by_name): Delete.
3632 (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete.
3633 (hppa_elf_arg_reloc_needed): Renamed. Simplify.
3634 (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete.
3635 (hppa_elf_long_branch_needed_p): Delete.
3636 (hppa_look_for_stubs_in_section): Delete.
3637 (hppa_elf_get_section_contents): Delete.
3638 (elf32_hppa_backend_symbol_processing): Delete.
3639 (elf32_hppa_backend_section_processing): Delete.
3640 (elf32_hppa_backend_section_from_shdr): Delete.
3641 (elf32_hppa_backend_fake_sections): Delete.
3642 (elf32_hppa_backend_section_from_bfd_section): Delete.
3643 (NEW_INSTRUCTION): Delete.
3644 (CURRENT_STUB_OFFSET): Delete.
3645 (elf32_hppa_relocate_section): New function.
3646 (elf32_hppa_bfd_final_link_relocate): New function.
3647 (elf32_hppa_size_symext): New function.
3648 (elf32_hppa_link_output_symbol_hook): New function.
3649 (elf32_hppa_read_symext_info): New function.
3650 (elf32_hppa_add_symbol_hook): New function.
3651 (elf32_hppa_name_of_stub): New function.
3652 (elf32_hppa_size_of_stub): New function.
3653 (elf32_hppa_build_one_sub): New function.
3654 (elf32_hppa_build_stubs): New function.
3655 (elf32_hppa_size_stubs): New function.
3656 (linker, stub and argument hash tables): Add appropriate
3657 structures, definitions and functions to implement all three
3658 hash tables.
3659 (hppa_elf_relocate_insn): Don't need argument location information
3660 in this function.
3661 (add_entry_to_symext_chain): Accept a symbol's argument location
3662 information rather than the symbol itself. All callers changed.
3663 (hppa_elf_gen_reloc_type): Simplify.
3664 (hppa_elf_set_section_contents): Stub section is no longer special.
3665 (hppa_elf_reloc): Greatly simplify.
3666 (elf32_hppa_begin_write_processing): Accept link_info argument.
3667 Handle being called from the BFD backend linker.
3668 (elf32_hppa_final_write_processing): Likewise.
3669 (elf_hppa_tc_make_sections): No longer call stub_finish.
3670
eeaed195
SC
3671Mon Jun 27 18:07:06 1994 Steve Chamberlain (sac@cirdan.cygnus.com)
3672
3673 * section.c (bfd_get_section_contents): Put in parens to get
3674 precedence right.
3675
3676Sun Jun 26 18:08:29 1994 Jeff Law (law@snake.cs.utah.edu)
3677
3678 * libelf.h (relocate_section): New argument "output_names" added
3679 to prototype.
3680 * elfcode.h (elf_link_input_bfd): New argument "output_names"
3681 added to prototype of relocate_section. Pass the output symbol
3682 names to relocate_section.
3683 * elf32-i386.c (elf_i386_relocate_section): Use "output_names" to
3684 determine the name of a local symbol.
3685 * elf32-mips.c (mips_elf_relocate_section): Likewise.
3686 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3687
5e16521a
PS
3688Fri Jun 24 08:15:42 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
3689
3690 Add Solaris BCP (the part of Solaris which allows it to run
3691 SunOS4 a.out files) core file handling.
3692 * aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
3693 New structure and its swap in function.
3694 (internal_sunos_core): New member c_data_addr, to receive the
3695 start address of the data section in the core file.
3696 (swapcore_sun3, swapcore_sparc, sunos4_core_file_p): Use it.
3697 (sunos4_core_file_p): Recognize Solaris BCP core file.
3698 (sunos4_core_file_matches_executable_p): Always indicate match
3699 for Solaris BCP core files.
3700
51fc377b
ILT
3701Thu Jun 23 15:31:28 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3702
8af74670
ILT
3703 Preliminary support for generating shared libraries, from Eric
3704 Youngdale <ericy@cais.cais.com>.
3705 * elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
3706 (elf_link_add_object_symbols): If generating a shared library,
3707 create dynamic sections for first input BFD with the right format.
3708 (elf_link_create_dynamic_sections): Don't create .interp section
3709 if creating a shared library.
3710 (elf_link_input_bfd): Skip dynamic sections in input file.
3711 (elf_bfd_final_link): If creating a shared library, it's OK for
3712 dynobj to have sections which are not SEC_IN_MEMORY.
3713 * elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
3714 section if not creating a shared library.
3715 * elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
3716
51fc377b
ILT
3717 * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
3718 is an SHT_DYNAMIC section.
3719
3720 * cf-i386lynx.c (i386coff_vec): Don't include DYNAMIC in
3721 object_flags.
3722 * coff-sparc.c (sparccoff_vec): Likewise.
3723 * hppabsd-core.c (hppabsd_core_vec): Likewise.
3724
3725 * aoutx.h (NAME(aout,some_aout_object_p)): Don't set SEC_RELOC
3726 just because DYNAMIC is set.
3727
1f8b3b57
DM
3728Thu Jun 23 12:53:41 1994 David J. Mackenzie (djm@rtl.cygnus.com)
3729
3730 * configure.in: Change --with-targets to --enable-targets and
3731 --with-64-bit-bfd to --enable-64-bit-bfd.
3732 * Makefile.in, mpw-make.in, targets.c: Change comments.
3733
3bf36e67
KR
3734Wed Jun 22 17:59:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3735
3736 * config.bfd (powerpc-*-elf*): New target, just like
3737 powerpc-*-sysv4*.
3738
2e66a627
KR
3739 * linker.c (FAIL): Undefine macro before defining as enum.
3740
4587b578
ILT
3741Wed Jun 22 10:52:47 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3742
135a6815
ILT
3743 * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
3744 pass from abfd->archive_pass, and save it there as well.
3745
a537cb21
ILT
3746 * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
3747 obstack_alloc returns NULL unless the size is non-zero.
3748
3749 * linker.c (archive_hash_allocate): Define.
3750 (_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
3751 rather than obstack_alloc, for clarity.
3752
66f2c66f
ILT
3753 * elfcode.h (elf_get_reloc_upper_bound): Correct.
3754
d81843e8
ILT
3755 * aout64.c (BMAGIC, QMAGIC): Define if not already defined. From
3756 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>.
3757
0630aba5
ILT
3758 Linux ZMAGIC support from Eric Youngdale <ericy@cais.cais.com>.
3759 * libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
3760 * aout-target.h (MY(callback)): Only set alignment according to
3761 architecture if the section sizes are aligned to that alignment,
3762 for backward compatibility.
3763 (MY(set_sizes)): Initialize zmagic_disk_block_size field.
3764 * aoutx.h (adjust_z_magic): Set ztih if using q_magic_format. Set
3765 text section filepos to zmagic_disk_block_size if not ztih. Use a
3766 different padding algorithm if not ztih.
3767 * i386linux.c (MY_text_includes_header): Don't define.
3768
4587b578
ILT
3769 * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
3770 symbols; don't look them up in the hash table. From
3771 ralphc@pyramid.com (Ralph Campbell).
3772
badd23e3
ILT
3773Tue Jun 21 11:47:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3774
4587b578
ILT
3775 * coff-go32.c (go32coff_archive_p): Remove unused function.
3776
badd23e3
ILT
3777 * section.c (bfd_abs_section): Make const.
3778 (bfd_abs_section_ptr, bfd_is_abs_section): Define.
3779 (bfd_und_section): Make const.
3780 (bfd_und_section_ptr, bfd_is_und_section): Define.
3781 (bfd_com_section): Make const.
3782 (bfd_com_section_ptr): Define.
3783 (bfd_ind_section): Make const.
3784 (bfd_ind_section_ptr, bfd_is_ind_section): Define.
3785 (bfd_abs_symbol, bfd_com_symbol): Make const.
3786 (bfd_und_symbol, bfd_ind_symbol): Likewise.
3787 (global_syms): Cast initialization of section field.
3788 (STD_SECTION): Define as const, and cast initializations.
3789 * bfd-in2.h: Rebuilt.
3790 * Many files: Change uses of bfd_abs_section, etc., to use
3791 bfd_abs_section_ptr or bfd_is_abs_section, etc.
3792
263a3f17
ILT
3793Mon Jun 20 11:06:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
3794
2f3508ad
ILT
3795 * Many files: change all bfd_target vectors to be const. Change
3796 all uses of bfd_target * to be const bfd_target *. Change
3797 bfd_target_vector and bfd_default_vector arrays to be const
3798 bfd_target * const *.
3799
75f3ef7a
ILT
3800 * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
3801 elf32-mips.c: Renamed all externally visible ECOFF routines which
3802 are local to BFD to start with _bfd_ecoff instead of just ecoff.
3803
aac6b32f
ILT
3804 * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
3805 (ecoff_swap_tir_out): Likewise.
3806 (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
3807 (ecoff_slurp_symbolic_info): Add new arguments to correspond to
3808 read_debug_info entry point in ecoff_debug_swap structure.
3809 Change all calls.
3810 * libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
3811 * ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
3812 (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
3813 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new
3814 ecoff_debug_swap fields.
3815 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3816 * elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
3817 (mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
3818 fields.
3819 * configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
3820 ecofflink.o.
3821 (bfd_elf32_littlemips_vec): Likewise.
3822 (ecoff_big_vec, ecoff_little_vec): Likewise.
3823 (ecoffalpha_little_vec): Likewise.
3824 * Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
3825 (BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
3826
6c8fa8e6
ILT
3827 * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
3828 when computing reloc sizes. From Eric Youngdale
3829 <ericy@cais.cais.com>.
3830 * elfcode.h (elf_bfd_final_link): Don't try to compute maximum
3831 reloc count or size for a non-ELF file.
3832
6fea0659
ILT
3833 * mipsbsd.c (MY_final_link_callback): Define to avoid warning.
3834
263a3f17
ILT
3835 * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
3836 (BMAGIC, QMAGIC): Define; used by aoutx.h.
3837 (MY(slurp_symbol_table)): Change translate_from_native_sym_flags
3838 calls to use new parameters.
3839
785e2b52
ILT
3840Fri Jun 17 14:45:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3841
3842 * aout-target.h (MY(callback)): Set the alignments of the text,
3843 data and bss sections after determining the architecture.
3844
3845 * sunos.c (sunos_add_one_symbol): Treat a common symbol from a
3846 dynamic object as being in the .bss section of the object, rather
3847 than as being undefined.
3848
83b69190
JL
3849Fri Jun 17 11:16:50 1994 Jeff Law (law@snake.cs.utah.edu)
3850
9fefc1be
JL
3851 * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
3852
83b69190
JL
3853 * elf32-hppa.h (elf_hppa_final_processing): Delete decl.
3854
c46b8ed7
JL
3855Thu Jun 16 23:36:23 1994 Jeff Law (law@snake.cs.utah.edu)
3856
3857 * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
3858 if there aren't any in the input file.
3859
04003b57
ILT
3860Thu Jun 16 14:25:22 1994 Eric Youngdale (ericy@cais.cais.com)
3861
3862 * i386linux.c: Many new functions and definitions for linker
3863 support for Linux shared libraries.
3864 * bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
3865 * bfd-in2.h: Rebuild.
3866
3867Thu Jun 16 14:23:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3868
e3400040
ILT
3869 * config.bfd: If second argument is ``_'', then, instead of
3870 echoing config file name, echo whether target uses leading
3871 underscores on symbol names. Add appropriate settings to
3872 different cases. Used by binutils/configure.in to set default for
3873 c++filt.
3874
0ff5d3a6
ILT
3875 * elfcode.h (elf_bfd_final_link): If trying to generate a shared
3876 object, warn and return false.
3877
04003b57
ILT
3878 * aoutx.h (NAME(aout,some_aout_object_p)): Accept BMAGIC objects
3879 and treat them as OMAGIC.
3880
485dc654
KR
3881Wed Jun 15 18:02:21 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
3882
3883 Enable sparc v9 support for release. Note that this is still a
3884 work in progress, pending release of an ABI specification.
3885 * config.bfd, configure.in: Include sparc v9 elf config.
3886 * elfcode.h (prep_headers): Handle sparc v9 (64 bit).
3887 * reloc.c (bfd_reloc_code_real): New reloc types.
3888 * elf64-sparc.c: Implement elf64-sparc target.
3889 * Makefile.in, targets.c: Updated.
3890
d17fc4c9
ILT
3891Wed Jun 15 01:34:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3892
c1f84521
ILT
3893 * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
3894 (elf_dt_needed_name): New accessor macro.
3895 * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
3896 is set, use that instead of the filename for the DT_NEEDED dynamic
3897 entry.
3898 * elf.c (bfd_elf_set_dt_needed_name): New function.
3899 * bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
3900 * bfd-in2.h: Rebuilt.
3901
7c726b66
ILT
3902 * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add sinterpptr
3903 argument, and set it to the .interp section.
3904 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
3905 (bfd_elf64_size_dynamic_sections): Likewise.
3906 * bfd-in2.h: Rebuilt.
3907
f1d42c04
ILT
3908 * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
3909 field of the reloc rather than letting it be garbage.
3910
aeef32f0
ILT
3911 * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as
3912 __.SYMDEF; the former was used in old Linux archives. From
3913 jrs@world.std.com (Rick Sladkey).
3914
f7d2fa44
ILT
3915 * i386linux.c (i386linux_write_object_contents): Define; like
3916 MY(write_object_contents) in aout-target.h, but set MACHTYPE to
3917 M_386. From jrs@world.std.com (Rick Sladkey).
3918 (MY_write_object_contents): Define.
3919
2cd086e3
ILT
3920 * aoutx.h (translate_from_native_sym_flags): Treat N_SETV symbols
3921 as N_DATA symbols.
3922 (aout_link_add_symbols): Likewise.
3923
d17fc4c9
ILT
3924 * aoutx.h: Rewrite symbol duplicate elimination to use BFD hash
3925 tables.
3926 (struct stringtab_entry, struct stringtab_data): Remove.
3927 (HASHMAXLEN, HASH_CHAR, hash, compare, log2, emit_strtab): Remove.
3928 (struct strtab_hash_entry, struct strtab_hash): Define.
3929 (strtab_hash_newfunc, strtab_hash_lookup): Define.
3930 (stringtab_free, emit_stringtab): Define.
3931 (stringtab_init, add_to_stringtab): Rewrite.
3932 (NAME(aout,write_syms)): Use new stringtab code.
3933 (struct aout_final_link_info, NAME(aout,final_link)): Likewise.
3934 (aout_link_write_symbols, aout_link_write_other_symbol): Likewise.
3935
3936 * bfd-in.h (BFD_TRADITIONAL_FORMAT): Define new BFD flag to
3937 request BFD to write object in the traditional format, whatever
3938 that means for the particular backend.
3939 * bfd-in2.h: Rebuilt.
3940
3941 * hash.c (bfd_hash_allocate): If obstack_alloc fails, set
3942 bfd_error_no_memory.
3943
ac9ed096
ILT
3944Tue Jun 14 13:00:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3945
f5419a59
ILT
3946 * libaout.h (struct aoutdata): Add q_magic_format to subformat
3947 enum.
3948 * aout-target.h (MY_bfd_copy_private_bfd_data): Define as function
3949 if not already defined. Copy subformat information.
3950 (MY_text_includes_header): Define as 0 if not already defined.
3951 (MY(backend_data)): Use MY_text_includes_header rather than 0.
3952 (MY_final_link_callback): Rename from final_link_callback, and
3953 define only if MY_final_link_callback is not already defined.
3954 (MY_bfd_final_link): Rename use of final_link_callback to
3955 MY_final_link_callback.
3956 * aoutx.h (NAME(aout,some_aout_object_p)): Handle QMAGIC like
3957 ZMAGIC, but set the subformat to q_magic_format. Abort if the
3958 magic number if not recognized.
3959 (adjust_z_magic): Use QMAGIC if q_magic_format.
3960 * i386linux.c (MY_text_includes_header): Define as 1.
3961 (i386linux_bfd_final_link): New static function.
3962 (MY_bfd_final_link): Define as i386linux_bfd_final_link.
3963
3964 * aoutx.h (translate_to_native_sym_flags): Check both section and
3965 output_section against sections of abfd.
3966
ac9ed096
ILT
3967 * libecoff.h (struct ecoff_link_hash_entry): Change type of
3968 written from boolean to char. Add new field small.
3969 * ecoff.c (ecoff_link_hash_newfunc): Initialize written to 0
3970 rather than false. Initialize small to 0.
3971 (ecoff_link_add_externals): If ECOFF type is scSUndefined, set
3972 small. If small is set, and hash table type is common, force the
3973 symbol into a section named SCOMMON and change the ECOFF type from
3974 scCommon to scSCommon.
3975 (ecoff_link_write_external): Set written to 1 rather than true.
3976 * coff-mips.c (mips_relocate_section): Correct JMPADDR reloc
3977 overflow check to consider section VMA of input file.
3978
9ae74960
ILT
3979Mon Jun 13 14:20:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
3980
3981 * aoutf1.h (aout_32_sunos4_write_object_contents): Handle a
3982 machine type of 68000.
3983 * aoutx.h (NAME(aout,machine_type)): Add new argument unknown.
3984 Set *unknown to true if machine type is really unknown, as opposed
3985 to M_UNKNOWN for the 68000.
3986 (NAME(aout,set_arch_mach)): Change NAME(aout,machine_type) call
3987 accordingly.
3988 * libaout.h (NAME(aout,machine_type)): Add new argument to
3989 prototype.
3990
8117e1ea
JL
3991Sun Jun 12 20:21:03 1994 Jeff Law (law@snake.cs.utah.edu)
3992
3993 * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID
3994 or HIUX_AUX_ID.
3995 (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
3996 (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note
3997 som.c is careful to always define CPU_PA_RISC1_0.
3998
4298e311
ILT
3999Sat Jun 11 16:32:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4000
4001 Add weak symbols as an extension to a.out.
4002 * aoutx.h (sym_in_text_section): Don't define.
4003 (sym_in_data_section, sym_in_bss_section): Likewise.
4004 (sym_is_undefined, sym_is_global_defn): Likewise.
4005 (sym_is_debugger_info, sym_is_fortrancommon): Likewise.
4006 (sym_is_absolute, sym_is_indirect): Likewise.
4007 (translate_from_native_sym_flags): Rewrite for clarity. Rearrange
4008 arguments and change caller. Handle weak symbols.
4009 (translate_to_native_sym_flags): Likewise.
4010 (aout_link_check_ar_symbols): Don't ignore weak symbols. Pull
4011 object in from archive if a weak defintion is found for an
4012 existing undefined symbol.
4013 (aout_link_add_symbols): Put all cases in switch. Set flags of an
4014 undefined symbol to 0. Handle weak symbols.
4015 (aout_link_write_symbols): Handle weak symbols.
4016 (aout_link_write_other_symbol): Likewise.
4017 (aout_link_input_section_std): Likewise.
4018 (aout_link_input_section_ext): Likewise.
4019 * sunos.c (sunos_write_dynamic_symbol): Likewise.
4020
22aabad5
ILT
4021Fri Jun 10 13:25:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4022
4f019d04
ILT
4023 * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
4024 (NAME(aout,get_reloc_upper_bound)): Likewise.
4025
22aabad5
ILT
4026 * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
4027 * linker.c (_bfd_generic_link_write_global_symbol): Don't assume
4028 the section of a common symbol is not NULL.
4029
4030Wed Jun 8 23:15:53 1994 Stu Grossman (grossman@cygnus.com)
4031
4032 * nlmcode.h (nlm_object_p): Set EXEC_P and start address for GDB.
4033
1b88cd18
ILT
4034Wed Jun 8 23:57:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4035
4036 * aoutx.h (aout_get_external_symbols): Don't try to read the
4037 strings if there are no symbols.
4038 (aout_link_write_other_symbol): Use the output section when
4039 working out the type.
4040
d38eee51
ILT
4041Tue Jun 7 13:25:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4042
b9ac0a53
ILT
4043 * elfcode.h (assign_section_numbers): Put shstrtab, symtab and
4044 strtab sections at end of file. Avoids bug in some versions of
4045 SVR4 strip. From Eric Youngdale <eric@tantalus.nrl.navy.mil>.
4046
d38eee51
ILT
4047 * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
4048 set SEC_DEBUGGING for STYP_INFO sections.
4049 (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
4050 defined, and D_PAGED is set, set the file position equal to the
4051 section VMA modulo COFF_PAGE_SIZE.
4052 * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
4053 * coff-i386.c: Set D_PAGED in BFD target.
4054 (COFF_PAGE_SIZE): Define.
4055 * coff-m68k.c, coff-sparc.c: Likewise.
4056
d8d67d66
ILT
4057Mon Jun 6 10:57:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4058
e6667b2b
ILT
4059 * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
4060 into a BFD section just because SHF_ALLOC is set; require that it
4061 not use the normal symbol table.
4062 (elf_section_from_bfd_section): Corresponding change.
4063
118e8d1c
ILT
4064 Better indirect and warning symbol handling inspired by Stuart
4065 Quick <stuck@cs.man.ac.uk>.
4066 * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
4067 (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
4068 to REF. Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
4069 REFC. Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
4070 Change DEFW_ROW/indr from CYCLE to NOACT. Change INDR_ROW/indr
4071 from MDEF to MIND. Change INDR_ROW/warn from WARNC to CYCLE.
4072 Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN. Change
4073 WARN_ROW/com from MWARN to WARN. Change WARN_ROW/warn from NOACT
4074 to CYCLE. Change SET_ROW/warn from WARNC to CYCLE>
4075 (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
4076 REFC. If a new indirect symbol has been referenced, push the
4077 reference down to the symbol it points to. FIx handling of WARN.
4078 * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
4079 clobber e_type of next symbol.
4080 (translate_to_native_sym_flags): Likewise.
4081 (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
4082 as bfd_link_hash_indirect.
4083
35fee729
ILT
4084 * libaout.h (struct aout_link_hash_entry): New field written.
4085 * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
4086 (aout_link_write_symbols): Use written, not root.written.
4087 (aout_link_write_other_symbol): Likewise.
4088 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
4089 * libecoff.h (struct ecoff_link_hash_entry): New field written.
4090 * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
4091 (ecoff_link_write_external): use written, not root.written.
4092 * genlink.h (struct generic_link_hash_entry): New field written.
4093 * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
4094 (generic_link_hash_newfunc): Initialize written.
4095 (_bfd_generic_link_output_symbols): Use written, not root.written.
4096 (_bfd_generic_link_write_global_symbol): Likewise.
4097 (_bfd_generic_reloc_link_order): Likewise.
4098
469984d1
ILT
4099 * libecoff.h (ecoff_data_type): Add linker field.
4100 * ecoff.c (ecoff_write_object_contents): Check new tdata linker
4101 field, rather than outsymbols being non-NULL, to decide whether to
4102 output the symbols and relocs.
4103 (ecoff_bfd_final_link): Set new tdata linker field to true.
4104
30f34d07
ILT
4105 * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
4106 data to a non-ECOFF file.
4107
d8d67d66
ILT
4108 * libbfd-in.h: Add warning that libbfd.h is a generated file.
4109 * libbfd.h: Rebuilt.
4110
a04e14b6
ILT
4111Sun Jun 5 15:02:30 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4112
fa15568a
ILT
4113 Changes to support ELF strip and objcopy on dynamically linked
4114 files.
4115 * elfcode.h (elf_fake_sections): Add prototype.
4116 (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
4117 section, and from an SHT_DYNSYM section, and from the dynamic
4118 string table section.
4119 (elf_object_p): Set D_PAGED if there is a program header.
4120 (elf_make_sections): Remove.
4121 (fix_up_strtabs): Remove.
4122 (elf_fake_sections): Rewrite. Now sets sh_entsize.
4123 (assign_section_numbers): Rewrite. Now sets sh_link and sh_info
4124 for all sections.
4125 (elf_compute_section_file_positions): Don't call obsolete
4126 functions elf_make_sections or fix_up_strtabs.
4127 (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
4128 (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
4129 objects.
4130 (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
4131 sections. If an SHT_REL or SHT_RELA section is allocated or uses
4132 an unusual symbol table, permit a BFD section to map to it.
4133 Permit most SHT_STRTAB sections to have a BFD section mapped to
4134 them.
4135 (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
4136 fields of dynamic sections here; do it in assign_section_numbers.
4137 * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
4138 flags.
4139
a04e14b6
ILT
4140 * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
4141 SEC_LOAD is set, rather than checking SEC_ALLOC.
4142
4143 * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
4144
4ee3b9be
JL
4145Fri Jun 3 10:58:02 1994 Jeff Law (law@snake.cs.utah.edu)
4146
99fa5510
JL
4147 * som.c (som_write_object_contents): Don't compute the file header's
4148 checksum here.
4149 (som_write_headers): Instead do it here.
4150
4ee3b9be
JL
4151 * libbfd.h (bfd_realloc): Change last arg to "size_t size".
4152
e85e8bfe
ILT
4153Thu Jun 2 17:39:22 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4154
2855b89f
ILT
4155 * hosts/sun3.h: Include <stdlib.h>. Don't declare free, exit or
4156 getenv.
4157
e85e8bfe
ILT
4158 Add linker support for SunOS shared libraries.
4159 * sunos.c: Include bfdlink.h. Add many new functions and
4160 definitions for SunOS shared library support.
4161 * bfd-in.h (bfd_sunos_record_link_assignment): Declare.
4162 (bfd_sunos_size_dynamic_sections): Declare.
4163 * bfd-in2.h: Rebuilt.
4164 * aoutx.h (struct aout_link_hash_entry): Move to libaout.h.
4165 (struct aout_link_hash_table): Likewise.
4166 (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
4167 (aout_hash_table): Likewise.
4168 (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc
4169 and make externally visible.
4170 (NAME(aout,link_hash_table_init)): New function.
4171 (NAME(aout,link_hash_table_create)): Call
4172 NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init.
4173 (aout_link_add_symbols): Don't fail if no symbols. If it exists,
4174 call add_dynamic_symbols backend entry point for dynamic objects.
4175 Use add_one_symbol backend entry point if it exists.
4176 (NAME(aout,final_link)): Call finish_dynamic_link backend entry
4177 point, if it exists.
4178 (aout_link_input_bfd): For a dynamic object, call
4179 link_dynamic_object backend entry point, if it exists.
4180 (aout_link_write_other_symbol): Call write_dynamic_symbol backend
4181 entry point, if it exists.
4182 (aout_link_input_section): Don't read the relocs if they have
4183 already been read.
4184 (aout_link_input_section_std): When doing a final link, for a
4185 reloc against an external symbol, call check_dynamic_reloc backend
4186 entry point, if it exists.
4187 (aout_link_input_section_ext): Likewise.
4188 * libaout.h: Protect against multiple inclusion. Include
4189 bfdlink.h.
4190 (struct aout_link_hash_entry): Move in from aoutx.h.
4191 (struct aout_link_hash_table): Likewise.
4192 (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
4193 (aout_hash_table): Likewise.
4194 (struct aout_backend_data): Add fields add_dynamic_symbols,
4195 add_one_symbol, link_dynamic_object, write_dynamic_symbol,
4196 check_dynamic_reloc, and finish_dynamic_link.
4197 (struct aout_section_data_struct): Define new structure.
4198 (aout_section_data): Define new accessor macro.
4199 (NAME(aout,link_hash_newfunc)): Declare.
4200 (NAME(aout,link_hash_table_init)): Declare.
4201 * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data
4202 fields.
4203 * aout-target.h (MY(backend_data)): Likewise.
4204 * i386aout.c (MY(backend_data)): Likewise.
4205 * i386mach3.c (MY(backend_data)): Likewise.
4206 * mipsbsd.c (MY(backend_data)): Likewise.
4207 * sparclynx.c (sparclynx_aout_backend): Likewise.
4208
4209 * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
4210 until we know it is non-NULL.
4211 (aout_link_write_symbols): Don't skip a warning symbol even if it
4212 has already been written out. If skipping an indirect symbol,
4213 skip the next symbol as well.
4214
220642fd
ILT
4215Wed Jun 1 14:37:50 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4216
4217 * hosts/sun3.h: Don't declare qsort, malloc or realloc.
4218
c06e55d9
KR
4219Thu May 26 13:56:03 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4220
4221 * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
4222 to char pointer to avoid compiler warnings.
4223
4224 * dep-in.sed: Remove spaces before colons.
4225
4226 Merged changes back in from FSF gas release 2.3:
4227
4228 * Makefile.in (stmp-bfd.h): Wrap `if' block around grep
4229 invocation, to avoid a bug in BSD 4.4 make.
4230
4231 From Ralph Campbell:
4232 * mipsbsd.c (mips_fix_jmp_addr): If symbol is undefined, return an
4233 error.
4234 (mips_fix_hi16_s): Ditto.
4235
4236 Fri May 13 21:21:00 1994 DJ Delorie (dj@ctron.com)
4237
4238 * makefile.dos: define a default target, or archives won't work
4239 due to multiple matches.
4240
4241 Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
4242
4243 * configure.bat: update for latest files
4244 * makefile.dos: update for correct targets and sources
4245 * coff-go32.c: [new] go32's COFF format (i386coff with underscores)
4246 * targets.c: add go32coff target
4247 * makefile.in: add coff-go32.c support
4248
ada45a2a
JL
4249Thu May 26 10:10:21 1994 Jeff Law (law@snake.cs.utah.edu)
4250
4251 * som.c (som_prep_headers): Do not set the system_id here, private
4252 bfd data has not been copied yet.
4253 (som_write_headers): Instead do it here.
4254
5315c428
ILT
4255Tue May 24 16:17:18 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4256
4257 Make MIPS ELF use new ELF backend linker. No shared library
4258 support yet.
4259 * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
4260 (bfd_mips_elf32_swap_gptab_out): New function.
4261 (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
4262 (mips_elf_final_write_processing): Set sh_info field for .gptab.*
4263 sections.
4264 (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
4265 (mips_elf_read_ecoff_info): Read and free external symbols last,
4266 not first, for clarity.
4267 (struct mips_elf_link_hash_entry): Define new structure.
4268 (struct mips_elf_link_hash_table): Define new structure.
4269 (mips_elf_link_hash_lookup): Define new macro.
4270 (mips_elf_link_hash_traverse): Define new macro.
4271 (mips_elf_hash_table): Define new macro.
4272 (mips_elf_link_hash_newfunc): New static function.
4273 (mips_elf_link_hash_table_create): New static function.
4274 (mips_elf_add_symbol_hook): New static function.
4275 (struct extsym_info): Define new structure.
4276 (mips_elf_get_extr, mips_elf_set_index): Remove.
4277 (mips_elf_output_extsym): New static function.
4278 (gptab_compare): New static function.
4279 (mips_elf_final_link): Rewrite to use ELF backend linker, and to
4280 merge gptab information in input files.
4281 (mips_elf_relocate_hi16): New static function.
4282 (mips_elf_relocate_section): New static function.
4283 (bfd_elf32_bfd_link_hash_table_create): Define as macro before
4284 including elf32-target.h.
4285 (elf_backend_relocate_section): Likewise.
4286 (elf_backend_add_symbol_hook): Likewise.
4287 * elf.c (_bfd_elf_link_hash_newfunc): Rename from
4288 elf_link_hash_newfunc and make globally visible. Change caller.
4289 (_bfd_elf_link_hash_table_init): New function, broken out of
4290 _bfd_elf_link_hash_table_create.
4291 (_bfd_elf_link_hash_table_create): Use
4292 _bfd_elf_link_hash_table_init.
4293 * libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
4294 (elf_bad_symtab): Define new accessor macro.
4295 (_bfd_elf_link_hash_newfunc): Declare.
4296 (_bew_elf_link_hash_table_init): Declare.
4297 * elfcode.h (elf_object_p): Call backend object_p hook after
4298 swapping in all the section headers.
4299 (map_program_segments): Correct typo: Internal for External.
4300 (elf_link_add_object_symbols): If elf_bad_symtab is set, read all
4301 the symbols. Skip STB_LOCAL symbols rather than giving an error.
4302 (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
4303 all symbols, not just locals.
4304 (elf_link_output_extsym): Only skip a symbol not mentioned by a
4305 regular file if it is mentioned by a dynamic object.
4306 (elf_link_input_bfd): If elf_bad_symtab is set, read all the
4307 symbols.
4308
88bbe402
JL
4309Fri May 20 13:38:23 1994 Jeff Law (law@snake.cs.utah.edu)
4310
4311 * som.c (som_set_reloc_info): Do not set any relocation info
4312 for SOM fixups which are never passed to BFD.
4313
497c5434
ILT
4314Fri May 20 11:57:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4315
c8588f2f
ILT
4316 * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
4317 checking.
4318
95b77361
ILT
4319 * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
4320 the dynamic linking information for the benefit of the debugger.
4321 From Peter Schauer.
4322 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4323
497c5434
ILT
4324 * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
4325 code repeated three times in bfd_section_from_shdr in elfcode.h.
4326 * libelf.h (_bfd_elf_make_section_from_shdr): Declare.
4327 * elfcode.h (bfd_section_from_shdr): Use new function
4328 _bfd_elf_make_section_from_shdr to create BFD sections. If a
4329 reloc section does not use the main symbol table, or it is part of
4330 the process image, treat it as a normal section, not relocs.
4331 * elf32-mips.c (mips_elf_section_from_shdr): Use new function
4332 _bfd_elf_make_section_from_shdr.
4333
013dec1a
ILT
4334Thu May 19 11:37:11 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4335
7a0c782d
ILT
4336 * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
4337 15 to 14 to match SVR4 ar.
4338
013dec1a
ILT
4339 Add support for ELF shared libraries. Loosely based on work by
4340 Eric Youngdale <ericy@cais.com>.
4341 * libelf.h (struct elf_backend_data): Add new fields for dynamic
4342 linking: elf_backend_create_dynamic_sections,
4343 elf_backend_adjust_dynamic_symbol,
4344 elf_backend_size_dynamic_sections,
4345 elf_backend_finish_dynamic_symbol,
4346 elf_backend_finish_dynamic_sections.
4347 (struct elf_link_hash_entry): Change type of align field to
4348 bfd_size_type. Add fields dynindx, dynstr_index, weakdef,
4349 elf_link_hash_flags.
4350 (struct elf_link_hash_table): Add fields dynobj, dynsymcount,
4351 dynstr, bucketcount.
4352 (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
4353 (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
4354 (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
4355 (bfd_elf32_add_dynamic_entry): Declare.
4356 (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
4357 (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
4358 (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
4359 (bfd_elf64_add_dynamic_entry): Declare.
4360 * elfcode.h (Elf_External_Dyn): Define.
4361 (elf_swap_reloc_in): Define as macro using NAME. Make externally
4362 visible.
4363 (elf_swap_reloc_out): Likewise.
4364 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
4365 (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
4366 and as new externally visible function.
4367 (elf_fake_sections): Set section type of dynamic sections based on
4368 section names.
4369 (elf_write_phdrs): Remove.
4370 (assign_file_position_for_section): Add new align argument.
4371 Change all callers.
4372 (get_program_header_size): New static function.
4373 (struct seg_info): Remove.
4374 (map_program_segments): Completely rewrite.
4375 (assign_file_positions_except_relocs): Completely rewrite.
4376 (assign_file_positions_for_relocs): Don't set a file position for
4377 sections which already have one. Don't bother to align the file
4378 position here.
4379 (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
4380 section types.
4381 (elf_section_from_bfd_section): Likewise.
4382 (elf_slurp_symbol_table): If section_from_elf_index fails, just
4383 use bfd_abs_section rather than returning an error.
4384 (elf_sizeof_headers): Make useful.
4385 (elf_link_record_dynamic_symbol): New static function.
4386 (elf_link_add_object_symbols): Handle dynamic objects.
4387 (elf_link_create_dynamic_sections): New static function.
4388 (elf_add_dynamic_entry): Define as macro using NAME and as new
4389 externally visible function.
4390 (NAME(bfd_elf,record_link_assignment)): New function.
4391 (elf_buckets): New static variable.
4392 (NAME(bfd_elf,size_dynamic_sections)): New function.
4393 (struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
4394 (elf_bfd_final_link): Handle dynamic linking. Create a section
4395 symbol for all ELF sections, not all BFD sections. Store section
4396 symbol index in target_index field, not index field. Traverse
4397 over global symbols even if stripping.
4398 (elf_link_output_extsym): Output dynamic symbols. Mark symbols
4399 defined by dynamic objects as undefined.
4400 (elf_link_input_bfd): Ignore dynamic objects. Use target_index
4401 field for section relocs, and make sure it is set.
4402 (elf_reloc_link_order): Use target_index field for section relocs,
4403 and make sure it is set.
4404 * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
4405 weakdef and elf_link_hash_flags fields.
4406 (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
4407 dynstr and bucketcount fields.
4408 * elf32-target.h: Initialize new dynamic linking fields.
4409 * elf64-target.h: Likewise.
4410 * elf32-i386.c: New functions for dynamic linking support.
4411 * elf32-sparc.c: Likewise.
4412 * bfd-in.h (bfd_elf32_record_link_assignment): Declare.
4413 (bfd_elf64_record_link_assignment): Declare.
4414 (bfd_elf32_size_dynamic_sections): Declare.
4415 (bfd_elf64_size_dynamic_sections): Declare.
4416 * bfd-in2.h: Rebuilt.
4417
82492ca1
ILT
4418Wed May 18 08:29:04 1994 Ian Lance Taylor (ian@cygnus.com)
4419
4420 * som.c: Don't include <sys/dir.h> or <sys/user.h>.
4421 (som_reloc_queue_find): Call memcmp instead of bcmp.
4422 (som_bfd_reloc_type_lookup): Change first argument to bfd *.
4423 (compare_syms): Change types of arguments to const void *.
4424 (bfd_section_from_som_symbol): Removed unused local found.
4425 (som_write_armap): Add elength, map, orl_count and int arguments.
4426 (som_write_armap): Use %ld and cast to long for getuid result.
4427
673aceca
JL
4428Wed May 18 09:09:32 1994 Jeff Law (law@snake.cs.utah.edu)
4429
4430 * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
4431 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
4432
4433 * som.h (R_HPPA_ABS_CALL): Define.
4434 * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
4435
0f62bdc0
KR
4436Tue May 17 19:33:12 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4437
4438 * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading
4439 underscore, for compatibility with Intel tool chain (gnu960v2).
4440
c3cb04b4
JL
4441Mon May 16 10:09:22 1994 Jeff Law (law@snake.cs.utah.edu)
4442
459ae909
JL
4443 * bfd-in2.h: Rebuilt.
4444
4445 * elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
4446 likewise for other PA specific sections.
4447 (hppa_elf_relocate_unwind_table): Delete unused
4448 function.
4449 (elf_hppa_howto_table): Completely new table based on 94-02-02
4450 draft PA ELF spec. Change relocation tags appropriately
4451 throughout elf32-hppa.c
4452 (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
4453 spec.
4454 (hppa_elf_reloc): Likewise.
4455 (hppa_look_for_stubs_in_section): Likewise
4456 (ELF_MACHINE_CODE): Change to EM_PARISC.
4457 * elf32-hppa.h: Include "elf/hppa.h". Change relocation tags
4458 appropriately throughout elf32-hppa.h.
4459 (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
4460 spec.
4461 (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
4462 * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
4463 * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
4464 * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.
4465
c3cb04b4
JL
4466 * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
4467 the final value twice for LR and RR field selectors.
4468
cb9461ff
JK
4469Sat May 14 09:09:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
4470
4471 * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert. This
4472 avoids __eprintf troubles.
4473
8db528c8
ILT
4474Fri May 13 10:51:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4475
0d898d03
ILT
4476 * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.
4477
8db528c8
ILT
4478 * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
4479 ecoff_little_vec since Irix 5 supports ECOFF executables.
4480
666f5925
ILT
4481Wed May 11 00:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4482
4fa4476b
ILT
4483 * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
4484 correctly.
4485
666f5925
ILT
4486 * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
4487 make to invoke the shell.
4488
c16313f0
ILT
4489Tue May 10 14:23:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4490
4491 * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
4492 SEC_SHARED_LIBRARY for clarity. Changed all uses.
4493 * bfd-in2.h: Rebuilt.
4494 * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
4495 set, set STYP_NOLOAD.
4496 * coffgen.c (coff_section_from_bfd_index): Don't get an assertion
4497 failure because of a bad shared library.
4498
eeb8c187
BC
4499Mon May 9 18:53:40 1994 Bill Cox (bill@rtl.cygnus.com)
4500
4501 * linker.c: Add missing comment terminator.
4502
6ec3bb6a
ILT
4503Mon May 9 11:53:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4504
8e5090ce
ILT
4505 * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
4506 are not NULL, assume the caller has already looked up the symbol
4507 in the hash table and has stored the entry in *hashp.
4508 (generic_link_add_symbol_list): Set h to NULL before calling
4509 _bfd_generic_link_add_one_symbol.
4510 * ecoff.c (ecoff_link_add_externals): Likewise.
4511
4512 * elfcode.h (assign_file_positions_except_relocs): Don't require
4513 page shared between .data and .bss segments to contain zeroes.
4514
6ec3bb6a
ILT
4515 * elfcode.h: Include bfdlink.h. Added several new functions to do
4516 linking.
4517 (ELF_R_TYPE): Define.
4518 (bfd_add_to_strtab): Return unsigned long. Change check for
4519 realloc failure.
4520 (elf_fake_sections): Check return value of bfd_add_to_strtab.
4521 (elf_compute_section_file_positions): Add link_info argument.
4522 Call elf_backend_begin_write_processing hook and prep_headers
4523 here. Only call swap_out_syms if link_info is NULL. Set up
4524 .shstrtab section here. Pass dosyms argument to
4525 assign_file_positions_except_relocs. Set output_has_begun flag.
4526 (assign_file_positions_for_symtab_and_strtabs): Add dosyms
4527 argument, and use it to control setting .symtab and .strtab file
4528 positions.
4529 (assign_file_positions_except_relocs): Add dosyms argument, and
4530 pass it on.
4531 (prep_headers): Check return value of bfd_add_to_strtab.
4532 (swap_out_syms): Likewise. Also, don't set up .shstrtab here.
4533 (NAME(bfd_elf,write_object_contents)): Some calls moved into
4534 elf_compute_section_file_positions.
4535 (elf_set_section_contents): Likewise.
4536 (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
4537 * libelf.h: Include bfdlink.h.
4538 (struct elf_backend_data): Add fields collect,
4539 elf_add_symbol_hook, elf_backend_relocate_section.
4540 (struct bfd_elf_section_data): Add field rel_hashes.
4541 (struct elf_obj_tdata): Remove fields internal_syms and symbols.
4542 Add field sym_hashes.
4543 (obj_symbols, obj_internal_syms): Remove definitions.
4544 (elf_sym_hashes): Define.
4545 (struct elf_link_hash_entry): Define.
4546 (struct elf_link_hash_table): Define.
4547 (elf_link_hash_lookup): Define.
4548 (elf_link_hash_traverse): Define.
4549 (elf_hash_table): Define.
4550 (_bfd_elf_link_hash_table_create): Declare.
4551 (bfd_elf32_bfd_link_add_symbols): Declare.
4552 (bfd_elf32_bfd_final_link): Declare.
4553 (bfd_elf64_bfd_link_add_symbols): Declare.
4554 (bfd_elf64_bfd_final_link): Declare.
4555 * elf.c: Include bfdlink.h.
4556 (elf_link_hash_newfunc): New function.
4557 (_bfd_elf_link_hash_table_create): New function.
4558 * elf32-target.h (elf_backend_relocate_section): If not defined,
4559 define as 0 and use generic linker. Otherwise, use ELF backend
4560 linker.
4561 (elf_backend_collect): If not defined, define as false.
4562 (elf_backend_add_symbol_hook): If not defined, define as 0.
4563 (elf32_bed): Initialize new fields.
4564 * elf64-target.h: Same changes as elf32-target.h.
4565 * elf32-i386.c: Include bfdlink.h.
4566 (elf_i386_relocate_section): New function.
4567 (elf_backend_relocate_section): Define.
4568 * elf32-sparc.c: Include bfdlink.h.
4569 (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
4570 to Elf_Internal_Rela (they're the same type anyhow).
4571 (elf_sparc_relocate_section): New function.
4572 (elf_backend_relocate_section): Define.
4573 * elf32-mips.c (elf_backend_collect): Define.
4574
4575 * Makefile.in (stmp-bfd.h): Avoid useless make error message in a
4576 different way; touch takes a numeric argument on some systems.
4577
4578Fri May 6 13:34:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4579
4580 * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
4581 handling for latest suggested format.
4582 (nlm_swap_auxiliary_headers_out): Likewise.
4583 (nlm_compute_section_file_positions): Likewise.
4584
4585Fri May 6 11:11:50 1994 D. V. Henkel-Wallace (gumby@rtl.cygnus.com)
4586
4587 * config.bfd: handle erricsson config (for OSE).
4588
4589Thu May 5 15:40:47 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4590
4591 Patches from Ralph Campbell:
4592 * mipsbsd.c (mips_fix_jmp_addr): New function.
4593 (mips_fix_hi16_s): Use bfd_is_com_section.
4594 (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
4595
d66da742
SC
4596Fri May 6 11:48:55 1994 Steve Chamberlain (sac@cygnus.com)
4597
4598 * config/go32.mh: XX support.
4599
4600 From bill
4601 * Makefile.in: Build sysdep.h without causing worrying but
4602 harmless error message.
4603
77d11284
ILT
4604Wed May 4 11:09:53 1994 Ian Lance Taylor (ian@cygnus.com)
4605
4606 Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
4607 * aout0.c: New file.
4608 * targets.c (aout0_big_vec): Declare.
4609 (bfd_target_vector): Add aout0_big_vec.
4610 * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
4611 * config/m68k-aout.mt (SELECT_VECS): Removed.
4612 * config/m68k-0aout.mt: New file.
4613 * configure.in (aout0_big_vec): New target vector: use aout0.o,
4614 aout32.o and stab-syms.o.
4615 * Makefile.in: Rebuilt dependencies.
4616 (BFD32_BACKENDS): Add aout0.o.
4617 (CFILES): Add aout0.c.
4618
4619 * libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
4620 * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
4621 MY(backend_data): Initialize exec_hdr_flags field.
4622 * aoutf1.h (sunos_32_set_arch_mach): Make static.
4623 (aout32_sunos4_write_object_contents): Set flags from backend
4624 info.
4625 (MY_exec_hdr_flags): If not defined, define as 1.
4626 (sunos4_aout_backend): Initialize exec_hdr_flags field.
4627 * aout-encap.c (encap_write_object_contents): Set flags from
4628 backend info.
4629 (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
4630 * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
4631 (MY(write_object_contents)): Set flags from backend info.
4632 * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
4633 * i386mach3.c (MY(backend_data)): Likewise.
4634 * mipsbsd.c (MY(backend_data)): Likewise.
4635 * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
4636 flags from backend info.
4637 (sparclynx_aout_backend): Initialize exec_hdr_flags field.
4638
127f8e91
KR
4639Wed May 4 02:56:00 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
4640
4641 * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
4642 (m68*-apollo-*): Treat all Apollo configs the same, don't handle
4643 BSD specially.
4644
92400edb
ILT
4645Tue May 3 19:43:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4646
4647 * cache.c: Rewrote to work correctly.
4648 * libbfd.h: Rebuilt.
4649 * opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
4650 (bfd_fdopenr): Check return value of bfd_cache_init.
4651
e3361fc3
ILT
4652Fri Apr 29 15:08:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4653
4654 * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
4655 enumerating them, since the reloc type can not serve as an index
4656 into the m68k COFF howto_table.
4657
7c6ba201
SC
4658Fri Apr 29 09:42:39 1994 Steve Chamberlain (sac@cygnus.com)
4659
dbf13547 4660 * config.bfd (*-go32): Changed to coff.
7c6ba201 4661 * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
dbf13547
SC
4662 * srec.c (srec_write_symbols): Write out the correct number of
4663 symbols and don't stick in extra nulls.
7c6ba201 4664
380c60b1
SS
4665Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)
4666
4667 * cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
4668 * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
4669 (COFF_SPARC): Define.
4670 * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
4671 power of data and bss sections to 3.
4672 * hosts/lynx.h (__LYNXOS): Define.
4673
6c101bcf
JL
4674Tue Apr 26 15:04:26 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4675
4676 * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
4677 against section symbols to avoid losing during ld -r.
4678
4679Tue Apr 26 12:16:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4680
4681 * elfcode.h (shstrtab_length_fixed): Remove useless static
4682 variable.
4683 (struct elf_sect_data): Remove unused structure.
4684 (elf_object_p): Free memory if error occurs. Check return value
4685 of bfd_default_set_arch_mach. If elf_get_str_section fails,
4686 preserve error code rather than setting wrong_format.
4687 (null_shdr): Remove static variable.
4688 (assign_section_numbers): Remove shstrtab_length_fixed assignment.
4689 Allocate first section header on BFD obstack rather than using
4690 null_shdr.
4691 (bfd_prpsinfo): Remove unused local variable newsect.
4692
2e03ce18
ILT
4693Mon Apr 25 15:31:04 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4694
ba436e33
ILT
4695 * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.
4696
2e03ce18
ILT
4697 * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
4698 to create sections. Check return value of recursive calls.
4699 (bfd_section_from_phdr): Check return value of bfd_make_section.
4700 (elf_symbol_from_bfd_symbol): Likewise.
4701 (elf_object_p): Check return value of bfd_section_from_shdr.
4702 (section_from_elf_index): Likewise.
4703 (elf_slurp_symbol_table): Check return value of
4704 section_from_elf_index.
4705 (bfd_prstatus): Return boolean value. Check return value of
4706 bfd_make_section.
4707 (bfd_fpregset): Likewise.
4708 (bfd_prpsinfo): Return boolean value.
4709 (elf_corefile_note): Check return values of bfd_prstatus,
4710 bfd_fpregset, and bfd_prpsinfo.
4711 (elf_core_file_p): Check return value of elf_corefile_note.
4712
79167def
ILT
4713Fri Apr 22 11:08:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4714
cc71e155
ILT
4715 Get rid of the ECOFF .reginfo section hack.
4716 * ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
4717 (ecoff_new_section_hook): Don't handle the .reginfo section.
4718 (ecoff_sizeof_headers): Likewise.
4719 (ecoff_get_section_contents): Likewise.
4720 (ecoff_compute_section_file_positions): Likewise.
4721 (ecoff_compute_reloc_file_positions): Likewise.
4722 (ecoff_set_section_contents): Likewise.
4723 (ecoff_write_object_contents): Likewise.
4724 (ecoff_bfd_final_link): Likewise.
4725 (ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
4726 register masks.
4727 (bfd_ecoff_get_gp_value): New function.
4728 (bfd_ecoff_set_gp_value): New function.
4729 (bfd_ecoff_set_regmasks): New function.
4730 * bfd-in.h (bfd_ecoff_get_gp_value): Declare.
4731 (bfd_ecoff_set_gp_value): Declare.
4732 (bfd_ecoff_set_regmasks): Declare.
4733 * bfd-in2.h: Rebuilt.
4734
1bb42b1f
ILT
4735 Fix ECOFF objcopy to actually copy debugging information.
4736 * ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
4737 (ecoff_get_extr): Assume that any ECOFF symbol with local clear is
4738 an external symbol, rather than checking the symbol flags. Only
4739 check the flags for non-ECOFF symbols.
4740 * ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
4741 output_section field of the symbol section is NULL.
4742 * libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
4743 function rather than defining as macro.
4744
d290d8da
ILT
4745 * ieee.c (ieee_object_p): Set bfd_error_got_wrong_format if
4746 appropriate.
4747
4748 * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec.
4749
80a903c9
ILT
4750 * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
4751 bfd_default_set_arch_mach. Accept bfd_arch_m68k as well as
4752 bfd_arch_unknown.
4753 * coffcode.h (coff_set_arch_mach): Check return value of
4754 bfd_default_set_arch_mach.
4755 * elfcode.h (elf_set_arch_mach): Don't check a list of ELF
4756 architectures, just see if the desired architecture matches what
4757 the ELF backend permits.
4758
4759 * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to
4760 SH_ARCH_MAGIC to match change in coff/sh.h.
4761 (coff_set_flags): Likewise.
4762
79167def
ILT
4763 Follow convention in which each NLM header has an 8 byte stamp
4764 followed by a four byte length.
4765 * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
4766 to nlm_cygnus_ext_header, and change type to
4767 Nlm_Internal_Cygnus_Ext_Header.
4768 (nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
4769 * nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
4770 of CyGnUsSeCs. Rename from cygnus_section to cygnus_ext. Require
4771 length word to be 8.
4772 (nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
4773 cygnus_ext. Set length word to 8.
4774 (nlm_compute_section_file_positions): Rename from cygnus_section
4775 to cygnus_ext.
4776
7f772644
SG
4777Thu Apr 21 22:54:22 1994 Stu Grossman (grossman at cygnus.com)
4778
4779 * nlmcode.h (nlm_swap_auxiliary_headers_in): Keep section table
4780 (from CyGnUsSeCs) in more permanent memory to keep section names
4781 from getting trashed.
4782
cb71adf1
PS
4783Thu Apr 21 09:29:37 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4784
4785 * libelf.h (elf_obj_tdata): Add members for dynamic symbol table
4786 handling.
4787 * elfcode.h (bfd_section_from_shdr): Handle dynamic symbol table.
4788 * elfcode.h (elf_slurp_symbol_table): Take additional parameter
4789 to select static or dynamic symbol table and return number of
4790 symbols slurped or -1 on error.
4791 * elfcode.h (elf_get_symtab): Set bfd symcount from
4792 elf_slurp_symbol_table result.
4793 * elfcode.h (elf_get_dynamic_symtab_upper_bound,
4794 elf_canonicalize_dynamic_symtab): New functions to handle dynamic
4795 symbol table.
4796 * elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
4797 Change to handle dynamic symbol table, provide default definitions
4798 for dynamic relocs.
4799 * aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
4800 NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
4801 aout_link_reloc_link_order): Handle r_jmptable and r_relative
4802 relocations.
4803
6c534df0
ILT
4804Thu Apr 21 11:58:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4805
1eff2af3
ILT
4806 Clean up uses of _bfd_dummy_target (from Peter Schauer).
4807 * libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
4808 * nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
4809 NULL.
4810 * srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
4811 _bfd_check_format.
4812 (symbolsrec_vec): Likewise.
4813 * tekhex.c (tekhex_vec): Likewise.
4814
6c534df0
ILT
4815 * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
4816 field.
4817 (nlm_cygnus_section_header): New accessor macro.
4818 * nlmcode.h (nlm_object_p): Free new tdata structure if failure.
4819 Add fixed sections before swapping in auxiliary headers. After
4820 adding sections, treat errors as real, not as wrong format.
4821 (nlm_swap_auxiliary_headers_in): Swap in the sections header; add
4822 sections to the BFD for each section it describes.
4823 (nlm_swap_auxiliary_headers_out): Swap out the sections header.
4824 (nlm_compute_section_file_positions): Account for the size of the
4825 sections header.
4826
71363c41
KR
4827Wed Apr 20 16:45:51 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
4828
4a5bfdbc
KR
4829 * coff-sparc.c (sparccoff_vec): Change minimum alignment power to
4830 2, so that stab sections can be multiples of 4 bytes only.
4831
71363c41
KR
4832 * hosts/i386aix.h: Changes to avoid prototypes conflicts with the
4833 ones defined in stdlib.h. (From Minh Tran-Le.)
4834
476d01f0 4835Wed Apr 20 14:15:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
476d01f0
ILT
4836
4837 * nlm32-ppc.c: Complete rewrite for new version of PowerPC
4838 NetWare. Old code still present, but ifdeffed out.
476d01f0
ILT
4839
4840 * nlmcode.h (nlm_swap_auxiliary_headers_in): Don't assume a
4841 particular format for the customer header. Allocate a block of
4842 memory and read it into that.
4843 (nlm_swap_auxiliary_headers_out): Write out the block of memory.
4844 (nlm_compute_section_file_positions): Include length of customer
4845 header when computing its size.
4846
69478700
JL
4847Mon Apr 18 14:27:17 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4848
4849 * som.c (som_prep_headers): Get the space's number from the
4850 backend private section data rather than target_index.
4851 (bfd_som_set_section_attributes): Store the space's number
4852 in the backend private section data rather than target_index.
4853
4854 * som.h (som_copyable_section_data_struct): Add space_number.
4855
2ec2e6a9
ILT
4856Fri Apr 15 12:22:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4857
09ed3666
ILT
4858 * coff-a29k.c (reloc_processing): Always set the address of a
4859 R_IHCONST reloc to that of the immediately preceding R_IHIHALF.
4860 gas does this anyhow, but some other assemblers seem to leave
4861 garbage in the R_IHCONST address field.
4862
97ea252e
ILT
4863 * bfd/archive.c: Consistently use ARFMAG; from
4864 schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
4865 (_bfd_write_archive_contents): Use ARFMAG rather than '`' and
4866 '\012'.
4867 (bsd_write_armap): Likewise.
4868 (coff_write_armap): Likewise.
4869
ef79dba3
ILT
4870 * coff-mips.c (mips_relocate_section): When relaxing, adjust local
4871 relocs against the .text section as required.
4872 * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust
4873 PDR addresses as required.
4874
2ec2e6a9
ILT
4875 * ecoff.c (ecoff_emit_aggregate): Take fdr argument. Map fdr
4876 index through rfd map if it exists. Check for a couple of cases
4877 which gdb handles specially. Change all callers.
4878 (ecoff_type_to_string): Take fdr argument rather than aux_ptr and
4879 bigendian argument. Change all callers.
4880 (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
4881
4f996613
ILT
4882Thu Apr 14 13:05:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4883
4884 * coff-mips.c (mips_howto_table): Add dummy entries to account for
4885 numbering changes in include/coff/mips.h. Add entries for
4886 MIPS_R_RELHI and MIPS_R_RELLO.
4887 (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type
4888 when little endian. Treat internal MIPS_R_RELLO or MIPS_R_RELHI
4889 relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32
4890 bits.
4891 (mips_ecoff_swap_reloc_out): Likewise.
4892 (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or
4893 MIPS_R_RELHI relocs like MIPS_R_SWITCH.
4894 (mips_adjust_reloc_out): Likewise.
4895 (mips_relhi_addr, mips_relhi_addend): New static variables.
4896 (mips_relhi_reloc, mips_rello_reloc): New functions.
4897 (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into
4898 MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO.
4899 (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel
4900 argument. Changed all callers.
4901 (mips_relocate_section): Rename got_reflo to got_lo and
4902 reflo_int_rel to lo_int_rel. Handle MIPS_R_RELLO and MIPS_R_RELHI
4903 relocs.
4904 (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when
4905 expanding a PC relative call.
4906
4907 * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_S
4908 and BFD_RELOC_PCREL_LO16.
4909 * bfd-in2.h: Rebuilt.
4910
1a000744
SS
4911Wed Apr 13 11:50:07 1994 Stan Shebs (shebs@andros.cygnus.com)
4912
4913 * coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
4914
41194a4a
JL
4915Tue Apr 12 13:36:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4916
4917 * som.c (som_write_fixups): Always emit at least
4918 one relocation for any non-bss section.
4919
bf08d1e2
ILT
4920Mon Apr 11 14:41:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4921
4922 * elfcode.h (assign_file_positions_except_relocs): Don't require
4923 the file alignment to correspond to the page size when linking
4924 with -N.
4925
9a5334e5
JL
4926Sun Apr 10 01:02:24 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4927
4928 * elfcode.h (write_relocs): For rela relocations, adjust the
4929 addend for relocations involving section symbols to account
4930 for the lossage of 1:1 mapping from input section symbols to
4931 output section symbols.
4932
e48f985c
ILT
4933Fri Apr 8 12:22:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4934
ec6b18c4
ILT
4935 * aoutx.h (NAME(aout,make_sections)): New function.
4936 (NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
4937 rather than making sections inline.
4938 (NAME(aout,mkobject)): Don't make any sections.
4939 (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
4940 (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
4941 obj_datasec (abfd) if they are NULL.
4942 * libaout.h (NAME(aout,make_sections)): Declare.
4943 * bout.c (b_out_mkobject): Don't make any sections.
4944 (b_out_write_object_contents): Call aout_32_make_sections.
4945 (b_out_set_section_contents): Likewise.
4946 * i386os9k.c (os9k_mkobject): Don't make any sections.
4947 (os9k_write_object_contents): Call aout_32_make_sections.
4948 (os9k_set_section_contents): Likewise.
4949
e48f985c
ILT
4950 * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
4951 index.
4952
06863047
PS
4953Wed Apr 6 20:44:56 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4954
4955 * config.bfd, configure.host: Add mips-*-sysv4* support.
4956
dabf906e
ILT
4957Thu Apr 7 14:23:05 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
4958
4959 * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
4960 (mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
4961 r_offset and set r_symndx to RELOC_SECTION_TEXT.
4962 (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
4963 value from the r_offset field.
4964 (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
4965 For MIPS_R_SWITCH, copy the r_offset field into the addend field.
4966 (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
4967 into the r_offset field.
4968 (mips_switch_reloc): New function.
4969 (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
4970 MIPS_R_SWITCH.
4971 (mips_relocate_section): Handle MIPS_R_SWITCH.
4972 (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
4973
99a6c761
JL
4974Thu Apr 7 11:10:51 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
4975
4976 * elfcode.h (elf_set_section_contents): Support calling the backend
4977 function elf_backend_begin_write_processing when just beginning to
4978 write an object file.
4979
4980 * libelf.h (elf_backend_begin_write_processing): Declare.
4981
4982 * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
4983 a default definition.
4984 (elf{32,64}_bed): Add elf_backend_begin_write_processing.
4985
4986 * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
4987 (elf_hppa_tc_make_sections): Likewise.
4988
4989 * elf32-hppa.c (symext_chain_built): Delete.
4990 (symext_chain_size): Renamed from symextn_contents_real_size.
4991 (elf32_hppa_backend_{begin,final}_write_processing): New functions.
4992 (add_entry_to_symext_chain): New function.
4993 (hppa_elf_set_section_contents): Ignore writes to the symbol extension
4994 section until it's been rebuilt internally.
4995 (hppa_elf_get_section_contents): Symbol extension section is no
4996 longer special.
4997 (elf_backend_{begin,final}_write_processing): Define.
4998 (elf_hppa_tc_make_sections): Simplify now that much code has
4999 migrated into elf32_hppa_backend_{being,final}_write_processing.
5000
6812b607
ILT
5001Wed Apr 6 17:24:14 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5002
dfc1c006
ILT
5003 Add new target vectors to read the dynamic symbols and dynamic
5004 relocs. Change a.out to use these rather than reading the dynamic
5005 symbols and relocs along with the normal symbols and relocs.
5006 * targets.c (bfd_target): Add fields
5007 _bfd_get_dynamic_symtab_upper_bound,
5008 _bfd_canonicalize_dynamic_symtab,
5009 _bfd_get_dynamic_reloc_upper_bound,
5010 _bfd_canonicalize_dynamic_reloc.
5011 (BFD_JUMP_TABLE_DYNAMIC): Define.
5012 * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
5013 Define.
5014 (_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
5015 (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
5016 (_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
5017 * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
5018 (bfd_canonicalize_dynamic_symtab): Define.
5019 (bfd_get_dynamic_reloc_upper_bound): Define.
5020 (bfd_canonicalize_dynamic_reloc): Define.
5021 * sunos.c (MY_read_dynamic_symbols): Don't define.
5022 (MY_read_dynamic_relocs): Don't define.
5023 (MY_get_dynamic_symtab_upper_bound): Define.
5024 (MY_canonicalize_dynamic_symtab): Define.
5025 (MY_get_dynamic_reloc_upper_bound): Define.
5026 (MY_canonicalize_dynamic_reloc): Define.
5027 (struct sunos_dynamic_info): Change type of dynsym_count and
5028 dynrel_count to long. Add fields canonical_dynsym and
5029 canonical_dynrel.
5030 (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
5031 Clear info->canonical_dynsym and info->canonical_dynrel.
5032 (MY(read_dynamic_symbols)): Removed.
5033 (MY(read_dynamic_relocs)): Removed.
5034 (sunos_get_dynamic_symtab_upper_bound): New function.
5035 (sunos_canonicalize_dynamic_symtab): New function.
5036 (sunos_get_dynamic_reloc_upper_bound): New function.
5037 (sunos_canonicalize_dynamic_reloc): New function.
5038 * libaout.h: Declare struct reloc_ext_external and
5039 reloc_std_external to avoid prototype problems.
5040 (struct aout_backend_data): Remove fields read_dynamic_symbols and
5041 read_dynamic_relocs.
5042 (NAME(aout,translate_symbol_table)): Declare.
5043 (NAME(aout,swap_ext_reloc_in)): Declare.
5044 (NAME(aout,swap_std_reloc_in)): Declare.
5045 * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
5046 translate_symbol_table and made non-static. Changed all callers.
5047 (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
5048 (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
5049 (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
5050 * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
5051 remove dynamic symbols and relocs. They will no longer be
5052 present.
5053 (MY_read_dynamic_symbols): Don't define.
5054 (MY_read_dynamic_relocs): Don't define.
5055 (sunos4_aout_backend): Don't initialize dynamic entry points.
5056 * aout-target.h (MY_read_dynamic_symbols): Don't define.
5057 (MY_read_dynamic_relocs): Don't define.
5058 (MY(backend_data)): Don't initialize dynamic entry points.
5059 (MY_get_dynamic_symtab_upper_bound): If not defined, define to
5060 _bfd_nodynamic version.
5061 (MY_canonicalize_dynamic_symtab): Likewise.
5062 (MY_get_dynamic_reloc_upper_bound): Likewise.
5063 (MY_canonicalize_dynamic_reloc): Likewise.
5064 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
5065 * bfd-in2.h: Rebuilt.
5066 * libbfd.h: Rebuilt.
5067
5068 * cf-m68klynx.c: Include sysdep.h.
5069
5070 * hp300hpux.c: Removed some spaces in uses of NAME to avoid
5071 problems with traditional C compilers.
5072
6812b607
ILT
5073 * targets.c (bfd_target): Rearranged fields in target vector.
5074 Removed _bfd_debug_info_start, _bfd_debug_info_end and
5075 _bfd_debug_info_accumulate, which were never used.
5076 (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
5077 (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
5078 (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
5079 (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
5080 * All backends: Changed to use the new BFD_JUMP_TABLE_* macros
5081 rather than the single JUMP_TABLE macro. Removed many of the
5082 weird macro definitions needed to support the monolithic
5083 JUMP_TABLE.
5084 * bfd-in.h (JUMP_TABLE): Removed.
5085 * libbfd-in.h: Define a bunch of macros, and declare a few
5086 functions, for use with the new BFD_JUMP_TABLE_* macros.
5087 * libbfd.c (_bfd_dummy_new_section_hook): Removed.
5088 (bfd_false): Set bfd_error_invalid_operation.
5089 (bfd_nullvoidptr): Likewise.
5090 (bfd_n1): New function.
5091 (_bfd_nocore_core_file_matches_executable_p): Renamed from
5092 _bfd_dummy_core_file_matches_executable_p.
5093 (_bfd_nocore_core_file_failing_command): Similar rename. Set
5094 bfd_error_invalid_operation.
5095 (_bfd_nocore_core_file_failing_signal): Likewise.
5096 (_bfd_generic_get_section_contents): Renamed from
5097 bfd_generic_get_section_contents. Changed all callers.
5098 (_bfd_generic_set_section_contents): Similar rename.
5099 * ieee.c: #if 0 out ieee_bfd_debug_info_start,
5100 ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They
5101 were never called.
5102 * bfd-in2.h: Rebuilt.
5103 * libbfd.h: Rebuilt.
5104
65b1ef49
JL
5105Tue Apr 5 22:10:04 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5106
5107 * Crude support for examining dynamic libraries.
5108 * som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
5109 DL_MAGIC objects.
5110 (som_prep_headers): Preserve the system_id for DYNAMIC objects.
5111 Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
5112 Write exec headers for DYNAMIC objects.
5113 (som_begin_writing): DYNAMIC objects have the same alignment
5114 restrictions as D_PAGED objects.
5115 (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
5116 objects.
5117 (object_flags): Add DYNAMIC.
5118
08a43162
SS
5119Tue Apr 5 17:48:52 1994 Stan Shebs (shebs@andros.cygnus.com)
5120
5121 * i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
5122 macro uses, confuses some non-ANSI compilers.
5123
b2452d39
JL
5124Tue Apr 5 15:50:01 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5125
5126 * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
5127 Don't free anything if we don't have a bfd_object.
5128 (som_close_and_cleanup): Call som_bfd_free_cached_info.
5129
b3cee0a9
ILT
5130Tue Apr 5 11:22:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5131
856613c4
ILT
5132 * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
5133 It turns out not to be required on Irix 5, and it causes problems
5134 if the sections happen to contain symbols.
5135
5136 * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.
5137
b3cee0a9
ILT
5138 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
5139 section->relocation is NULL; malloc might have returned NULL when
5140 given a zero size if there were no relocations.
5141 * bout.c (b_out_canonicalize_reloc): Likewise.
5142 * coffcode.h (coff_canonicalize_reloc): Likewise.
5143 * ecoff.c (ecoff_canonicalize_reloc): Likewise.
5144 * elfcode.h (elf_canonicalize_reloc): Likewise.
5145 * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
5146 * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
5147 * nlmcode.h (nlm_canonicalize_reloc): Likewise.
5148 * som.c (som_canonicalize_reloc): Likewise.
5149 * hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc
5150 returns NULL, don't report an error if we asked for zero bytes.
5151 * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
5152 NULL, don't report an error if we asked for zero bytes.
5153 * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
5154
f3a14a9e
ILT
5155Mon Apr 4 15:30:49 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5156
c4dd531f
ILT
5157 * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
5158 if we don't have a bfd_object.
5159
4002f18a
ILT
5160 Made sure that every call to bfd_read, bfd_write, and bfd_seek
5161 checks the return value and handled bfd_error correctly. These
5162 changes are not itemised. Also:
5163 * aoutx.h (emit_strtab): Change return type to boolean, and return
5164 errors.
5165 (NAME(aout,write_syms)): Check emit_strtab return value.
5166 (NAME(aout,final_link)): Likewise.
5167 * coffcode.h (coff_write_relocs): Change return type to boolean,
5168 and return errors.
5169 (coff_write_object_contents): Check coff_write_relocs return
5170 value.
5171 * i386os9k.c (os9k_swap_exec_header_in): Change return type to
5172 boolean.
5173 (os9k_object_p): Check os9k_swap_exec_header_in return value.
5174 * oasys.c (oasys_read_record): Change return type to boolean.
5175 (oasys_slurp_symbol_table: Check oasys_read_record return value.
5176 (oasys_object_p, oasys_slurp_section_data): Likewise.
5177 (oasys_write_record): Change return type to boolean.
5178 (oasys_write_syms): Likewise. Also, check oasys_write_record
5179 return value.
5180 (oasys_write_sections): Check oasys_write_record return value.
5181 (oasys_write_header): Change return type to boolean. Check
5182 oasys_write_record return value.
5183 (oasys_write_end, oasys_write_data): Likewise.
5184 (oasys_write_object_contents): Check return values of
5185 oasys_write_header, oasys_write_syms, oasys_write_data, and
5186 oasys_write_end.
5187 * srec.c (srec_write_record): Change return type to boolean.
5188 (srec_write_header): Likewise. Also, check srec_write_record
5189 return value.
5190 (srec_write_section, srec_write_terminator): Likewise.
5191 (srec_write_symbols): Change return type to boolean.
5192 (internal_srec_write_object_contents): Check return value of
5193 srec_write_symbols, srec_write_header, srec_write_section, and
5194 srec_write_terminator.
5195
f3a14a9e
ILT
5196 * Makefile.in: Rebuilt dependencies.
5197
3e2993b6
PS
5198Mon Apr 4 10:56:45 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5199
5200 * aix386-core.c (aix386_bfd_is_local_label): Correct cast from
5201 asection to asymbol.
5202 * ptrace-core.c (ptrace_unix_bfd_is_local_label): Correct cast from
5203 bfd to asymbol.
5204 * trad-core.c (trad_unix_bfd_is_local_label): Correct cast from
5205 asection to asymbol.
5206
1f46bba3
JL
5207Sun Apr 3 18:27:29 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5208
5209 * som.c (som_slurp_string_table): Use malloc to allocate space
5210 for the cached copy of the native string table.
5211 (som_slurp_symbol_table): Likewise for the native symbol table.
5212 (som_slurp_reloc_table): Likewise for the native and generic
5213 relocation tables.
5214 (som_bfd_free_cached_info): Free the cached native strings,
5215 symbols, and relocations. Also free the canonical cached
5216 relocations.
5217
9deaaaf1
ILT
5218Fri Apr 1 12:40:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5219
d6d6b18a
ILT
5220 * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
5221 sure the symbol name is stored in permanent memory before adding
5222 it to the string table.
5223
dfe09c49
ILT
5224 * archive.c (_bfd_write_archive_contents): Once we've found an
5225 object, don't bother to look for more when deciding whether to
5226 build a map.
5227 (compute_and_write_armap): After adding the symbols for a BFD,
5228 call bfd_free_cached_info on it.
5229
5230 Add bfd_free_cached_info support to a.out backends.
5231 * aoutx.h (aout_get_external_symbols): Renamed from
5232 aout_link_get_symbols. Read strings even if symbols have been
5233 read. Store string size in obj_aout_string_size.
5234 (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
5235 read the symbols. Allocate the cached symbols with malloc, not
5236 bfd_alloc.
5237 (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
5238 malloc, not bfd_alloc.
5239 (NAME(aout,bfd_free_cached_info)): New function; free cached
5240 symbols and relocs.
5241 * libaout.h (struct aoutdata): Add external_string_size field.
5242 (obj_aout_external_string_size): New accessor macro.
5243 (NAME(aout,close_and_cleanup)): Don't declare.
5244 (NAME(aout,bfd_free_cached_info)): Declare.
5245 (aout_32_close_and_cleanup): Don't define.
5246 (aout_64_close_and_cleanup): Don't define.
5247 * aout-target.h (MY_bfd_free_cached_info): If not already defined,
5248 define as NAME(aout,free_cached_info).
5249 (MY_close_and_cleanup): If not already defined, define as
5250 MY_bfd_free_cached_info.
5251 * aout-adobe.c (aout_32_close_and_cleanup): Define.
5252 (aout_32_bfd_free_cached_info): Don't define.
5253 * bout.c (aout_32_close_and_cleanup): Define.
5254 (aout_32_bfd_free_cached_info): Don't define.
5255 * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
5256 (MY_close_and_cleanup): Don't define.
5257 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
5258 relocs with malloc, not bfd_alloc.
5259 * i386os9k.c (aout_32_close_and_cleanup): Define.
5260 (aout_32_bfd_free_cached_info): Don't define.
5261
5262 Add a new entry point to free memory cached by a BFD.
9deaaaf1
ILT
5263 * targets.c (bfd_target): Add _bfd_free_cached_info field.
5264 * bfd.c (bfd_free_cached_info): Define.
5265 * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
5266 * bfd-in2.h: Rebuilt.
5267 * All backends: Initialize bfd_free_cached_info entry point to
5268 bfd_true.
5269
5270 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
5271 first, unused, argument.
5272 (hppa_elf_is_local_label): Declare instead of
5273 som_bfd_is_local_label.
5274
5275 * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
5276 absolute R_IREL reloc.
5277
bfe8224f
ILT
5278Thu Mar 31 11:52:15 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5279
f8ee1ebb
ILT
5280 Added some support for Irix 4 shared libraries.
5281 * ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
5282 .lib section.
5283 (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
5284 STYP_ECOFF_LIB bit is set.
5285 (ecoff_compute_section_file_positions): Round the contents of a
5286 .lib section up to the next page boundary.
5287 (ecoff_set_section_contents): If we see a .lib section, increment
5288 the vma by one to count the number of shared libraries we have.
5289 (ecoff_write_object_contents): Don't crash if we see a
5290 STYP_ECOFF_LIB section, and don't adjust text_start or data_start
5291 or bss_size either.
5292
492d52cc
ILT
5293 * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
5294 from original BFD, rather than using value of current BFD symbol.
5295 Needed for new linker.
5296 * coff-sparc.c (CALC_ADDEND): Likewise.
5297
1788b1bd
ILT
5298 * ecoff.c (ecoff_write_object_contents): Set the text_start and
5299 data_start entries in the optional header correctly even if a text
5300 or data section starts at location zero.
5301
e9c6595d
ILT
5302 * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_26 (from sef
5303 and raeburn).
5304 * bfd-in2.h: Rebuilt.
5305
3af0f479
ILT
5306 * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
5307 name.
5308 * nlm32-alpha.c (nlm_alpha_read_import): Likewise.
5309 * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
5310
bfe8224f
ILT
5311 * coffgen.c (coff_write_symbol): Reindented. Changed to return
5312 boolean, and changed written to unsigned int *. Check error
5313 returns from called functions.
5314 (coff_write_alien_symbol): Likewise.
5315 (coff_write_native_symbol): Likewise.
5316 (coff_write_symbols): Likewise. Reworked checks on whether to
5317 write symbol name to string table for clarity and to avoid core
5318 dumping when given a non COFF symbol.
5319 * libcoff-in.h (coff_write_symbols): Declare as returning boolean.
5320 * libcoff.h: Rebuilt.
5321 * coffcode.h (coff_write_object_contents): Check return value of
5322 coff_write_symbols.
5323
326e32d7
ILT
5324Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5325
5326 Changes to let BFD return an error indication from
5327 get_symtab_upper_bound, bfd_canonicalize_symtab,
5328 bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now
5329 return long instead of unsigned int, and use -1 to indicate an
5330 error. Along the way, rename get_symtab_upper_bound to
5331 bfd_get_symtab_upper_bound.
5332 * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
5333 errors.
5334 (bfd_canonicalize_reloc): Likewise.
5335 * syms.c (bfd_get_symtab_upper_bound): Renamed from
5336 get_symtab_upper_bound.
5337 * targets.c (bfd_target): Renamed _get_symtab_upper_bound to
5338 _bfd_get_symtab_upper_bound, and changed it and
5339 _bfd_canonicalize_symtab and _get_reloc_upper_bound and
5340 _bfd_canonicalize_reloc to all return long.
5341 * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
5342 (NAME(aout,canonicalize_reloc)): Likewise.
5343 (NAME(aout,get_reloc_upper_bound)): Likewise.
5344 (NAME(aout,get_symtab_upper_bound)): Likewise.
5345 * bout.c (b_out_canonicalize_reloc): Likewise.
5346 (b_out_get_reloc_upper_bound): Likewise.
5347 * coffcode.h (coff_canonicalize_reloc): Likewise.
5348 * coffgen.c (coff_get_symtab_upper_bound): Likewise.
5349 (coff_get_symtab): Likewise.
5350 (coff_get_reloc_upper_bound): Likewise.
5351 * ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
5352 (ecoff_get_symtab): Likewise.
5353 (ecoff_canonicalize_reloc): Likewise.
5354 * elfcode.h (elf_get_symtab_upper_bound): Likewise.
5355 (elf_get_reloc_upper_bound): Likewise.
5356 (elf_canonicalize_reloc): Likewise.
5357 (elf_get_symtab): Likewise.
5358 * hp300hpux.c (MY(get_symtab)): Likewise.
5359 (MY(get_symtab_upper_bound)): Likewise.
5360 (MY(canonicalize_reloc)): Likewise.
5361 * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
5362 * ieee.c (ieee_slurp_external_symbols): Change return type to
5363 boolean. Check for errors from get_symbol.
5364 (ieee_slurp_symbol_table): Change return type to boolean. Check
5365 for errors from ieee_slurp_external_symbols.
5366 (ieee_get_symtab_upper_bound): Return long, and -1 on errors.
5367 (ieee_get_symtab): Likewise.
5368 (ieee_get_reloc_upper_bound): Likewise.
5369 (ieee_canonicalize_reloc): Likewise.
5370 * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
5371 * nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
5372 (nlm_get_symtab): Likewise.
5373 (nlm_get_reloc_upper_bound): Likewise.
5374 (nlm_canonicalize_reloc): Likewise.
5375 * oasys.c (oasys_get_symtab_upper_bound): Likewise.
5376 (oasys_get_symtab): Likewise.
5377 (oasys_get_reloc_upper_bound): Likewise.
5378 (oasys_canonicalize_reloc): Likewise.
5379 * som.c (som_get_symtab_upper_bound): Likewise.
5380 (som_get_symtab): Likewise.
5381 (som_get_reloc_upper_bound): Likewise.
5382 (som_canonicalize_reloc): Likewise.
5383 * srec.c (srec_get_symtab_upper_bound): Likewise.
5384 (srec_get_symtab): Likewise.
5385 (srec_get_reloc_upper_bound): Define as bfd_0l.
5386 (srec_canonicalize_reloc): Likewise.
5387 * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
5388 (tekhex_get_symtab_upper_bound): Likewise.
5389 (tekhex_get_reloc_upper_bound): Define as bfd_0l.
5390 (tekhex_canonicalize_reloc): Likewise.
5391 * libaout.h (NAME(aout,get_symtab_upper_bound)): Change
5392 declaration to return long.
5393 (NAME(aout,get_symtab)): Likewise.
5394 (NAME(aout,canonicalize_reloc)): Likewise.
5395 (NAME(aout,get_reloc_upper_bound)): Likewise.
5396 * libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
5397 (coff_get_symtab): Likewise.
5398 (coff_get_reloc_upper_bound): Likewise.
5399 * libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
5400 (ecoff_get_symtab): Likewise.
5401 (ecoff_canonicalize_reloc): Likewise.
5402 * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
5403 (bfd_elf32_get_symtab): Likewise.
5404 (bfd_elf32_get_reloc_upper_bound): Likewise.
5405 (bfd_elf32_canonicalize_reloc): Likewise.
5406 (bfd_elf64_get_symtab_upper_bound): Likewise.
5407 (bfd_elf64_get_symtab): Likewise.
5408 (bfd_elf64_get_reloc_upper_bound): Likewise.
5409 (bfd_elf64_canonicalize_reloc): Likewise.
5410 * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
5411 (nlmNAME(get_symtab)): Likewise.
5412 (nlmNAME(get_reloc_upper_bound)): Likewise.
5413 (nlmNAME(canonicalize_reloc)): Likewise.
5414 * archive.c (compute_and_write_armap): Use error_return and
5415 no_memory_return labels rather than freeing information in various
5416 places. Change storage, symcount and src_count to long. Check
5417 errors from bfd_get_symtab_upper_bound and
5418 bfd_canonicalize_symtab.
5419 * bout.c (b_out_relax_section): Change reloc_size to long. Check
5420 for errors from bfd_get_reloc_upper_bound and
5421 bfd_canonicalize_reloc.
5422 (b_out_get_relocated_section_contents): Likewise.
5423 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
5424 Likewise.
5425 * elf32-mips.c: Likewise.
5426 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
5427 (hppa_look_for_stubs_in_section): Check for errors from
5428 bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
5429 bfd_canonicalize_reloc.
5430 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
5431 from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
5432 * linker.c (generic_link_read_symbols): Likewise.
5433 (_bfd_generic_final_link): Check for errors from
5434 bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
5435 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5436 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
5437 (bfd_coff_reloc16_get_relocated_section_contents): Likewise.
5438 * libbfd.c (bfd_0l): New function.
5439 * libbfd-in.h (bfd_0l): Declare.
5440 * aix386-core.c: Change get_symtab_upper_bound, get_symtab,
5441 get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
5442 than bfd_0u.
5443 * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
5444 * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
5445 * bfd-in2.h: Rebuilt.
5446 * libbfd.h: Rebuilt.
5447 * libcoff.h: Rebuilt.
5448
5449 * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
5450 temp and name.
5451
c2c818bc
JK
5452Wed Mar 30 08:33:04 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5453
5454 * hosts/dpx2.h: Define POSIX_UTIME.
5455
bdf1b511
PS
5456Wed Mar 30 00:31:49 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5457
5458 * i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
5459 variant of a.out.
5460 * configure.in, config.bfd: Use them for Dynix.
5461 * Makefile.in: Add dependencies for i386dynix.o.
5462 * targets.c: Add definition for i386dynix_vec.
5463 * hosts/symmetry.h: Do not define TRAD_CORE_USER_OFFSET for Dynix.
5464 Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
5465 for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
5466 i386dynix.c
5467
a8a916c8
ILT
5468Mon Mar 28 12:53:27 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5469
9f37f56a
ILT
5470 * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
5471
09a28207
ILT
5472 * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
5473 bfd_arch_rs6000.
5474
ce8f1f60 5475 * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.
34632537
ILT
5476 * config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
5477
a8a916c8
ILT
5478 * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flag
5479 for generated constructor section.
5480
06e6eb0e
JL
5481Sun Mar 27 16:25:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5482
5483 * som.c (som_begin_writing): New approach at dealing with holes
5484 in executables left by the HP linker. Does not rely on subspace
5485 alignments as subspaces are *NOT* guaranteed to be properly
5486 aligned in an executable (can you believe that!).
5487
25057836
JL
5488Sat Mar 26 10:25:43 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5489
f977e865
JL
5490 * som.c (som_get_section_contents): New function. Do not try
5491 to actually read data from a section that doesn't have either
5492 SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
5493
25057836
JL
5494 * libbfd.c (bfd_read): Set bfd_error as appropriate for a short
5495 read. (bfd_error_system_call or bfd_error_file_truncated).
5496
5497 * som.c: Do not blindly set bfd_error_system_call after a
5498 failing bfd_read, bfd_write, or bfd_seek. In a few places
5499 (like som_object_p) override the error status set by bfd_read.
5500
5501 * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
5502 * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
5503 * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
5504 * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
5505
5506 * som.c: Check return values from several bfd_{seek,read,write}
5507 calls that we just assumed were not failing.
5508
471c3c3f
JK
5509Fri Mar 25 11:44:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5510
5511 * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
5512 * config/sysv4.mh: Add comment.
5513 * config/symmetry.mh: Change comment.
5514 * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
5515
ec099b4b
ILT
5516Fri Mar 25 17:10:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5517
a3a33af3 5518 Changes to support linker relaxing of embedded MIPS PIC code to
471c3c3f 5519 use a five instruction sequence for function calls which are out of
a3a33af3
ILT
5520 range of the bal instruction.
5521 * libecoff.h (struct ecoff_section_tdata): Define.
5522 (ecoff_section_data): Define.
5523 (ecoff_bfd_relax_section): Don't define.
5524 * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
5525 the debugging information if it has already been read.
5526 (ecoff_indirect_link_order): Handle _cooked_size being different
5527 from _raw_size. Don't reread the contents or the relocs if they
5528 have already been read in.
5529 * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
5530 18 to 16.
5531 (PCREL16_EXPANSION_ADJUSTMENT): Define.
5532 (mips_relocate_refhi): Take adjust argument.
5533 (mips_relocate_section): Handle reloc offsets stored in section
5534 used_by_bfd field. Call mips_relax_pcrel16 to handle details of
5535 expanding an out of range PCREL16. Keep trace of adjustments
5536 required by expansions. Set s and unset h when converting a reloc
5537 from undefined to section. Change handling of PC relative relocs:
5538 if against a section, they are correct in the object file, if
5539 against an external symbol they are pcrel_offset.
5540 (mips_relax_section): New function.
5541 (mips_relax_pcrel16): New function.
5542 (ecoff_bfd_relax_section): Define.
5543 * coff-alpha.c (ecoff_bfd_relax_section): Define.
5544 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
5545 built by mips_relax_section when writing out addresses.
5546 * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
5547
ec099b4b
ILT
5548 * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
5549 functionname_ptr to be set to a symbol name, so prepend
5550 symbol_leading_char.
5551
47e70c54
SC
5552Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)
5553
5554 * coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
5555 for 16bit relative branches.
5556 * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
5557 overflow.
5558
9d7f682f
JL
5559Thu Mar 24 09:21:13 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5560
5561 * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
5562 (som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
5563
5564Wed Mar 23 14:29:31 1994 David J. Mackenzie (djm@rtl.cygnus.com)
5565
5566 * netbsd386.c (N_SET_FLAGS): Delete the old definition.
5567
456961d1
ILT
5568Wed Mar 23 14:58:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5569
5570 Clean up the relaxing code for the new linker.
5571 * targets.c (_bfd_relax_section): Take boolean *again argument
5572 rather than asymbol list.
5573 * bfd.c (bfd_relax_section): Change name of fourth argument from
5574 symbols to again.
5575 * reloc.c (bfd_generic_relax_section): Take boolean *again
5576 argument rather than asymbol list. Always return true.
5577 * bout.c: Include genlink.h.
5578 (aligncode, perform_slip): Declare.
5579 (perform_slip): Take BFD argument rather than asymbol list.
5580 Changed all callers. Get the symbols from the BFD. Change the
5581 hash table entry value as well as the symbol value.
5582 (abs32code): Take BFD argument rather than asymbol list. Changed
5583 all callers.
5584 (aligncode): Likewise.
5585 (b_out_relax_section): Take boolean *again argument rather than
5586 asymbol list. Only return false if an error occurred. Set *again
5587 to false. Get symbols from BFD.
5588 * reloc16.c: Include genlink.h.
5589 (bfd_perform_slip): Take BFD argument rather than asymbol list.
5590 Get the symbols from the BFD. Change the hash table entry value
5591 as well as the symbol value.
5592 (bfd_coff_reloc16_relax_section): Take boolean *again argument
5593 rather than asymbol list. Only return false if an error occurred.
5594 Set *again to false. Get symbols from BFD.
5595 * coffcode.h (bfd_coff_backend_data): Change
5596 _bfd_coff_reloc16_estimate to take BFD argument rather than
5597 asymbol list.
5598 (bfd_coff_reloc16_estimate): Corresponding change.
5599 (dummy_reloc16_estimate): Corresponding change.
5600 * libcoff-in.h (bfd_coff_reloc16_relax_section): Change
5601 declaration to take boolean * rather than asymbol list.
5602 (bfd_perform_slip): Change declaration to take BFD rather than
5603 asymbol list.
5604 * coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
5605 than asymbol list. Changed calls to bfd_perform_slip.
5606 * bfd-in2.h: Rebuilt.
5607 * libbfd.h: Rebuilt.
5608 * libcoff.h: Rebuilt.
5609 * Makefile.in: Rebuilt dependencies.
5610
5611 * genlink.h (_bfd_generic_link_get_symbols): Define.
5612 (_bfd_generic_link_get_symcount): Define.
5613 * linker.c (generic_link_read_symbols): New function.
5614 (generic_link_add_object_symbols): Use it. Use
5615 _bfd_generic_link_get_symbols and _bfd_generic_link_get_symcount
5616 to get the symbols from the BFD.
5617 (generic_link_check_archive_element): Likewise.
5618 (_bfd_generic_final_link): Likewise.
5619 (_bfd_generic_link_output_symbols): Likewise.
5620 (default_indirect_link_order): Likewise.
5621 (generic_link_add_symbol_list): Store pointer to hash table entry
5622 in asymbol udata field.
5623
4335ce64
ILT
5624Tue Mar 22 13:09:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5625
c031ba0b
ILT
5626 * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
5627 reloc, used in embedded PIC code.
5628 (mips_adjust_reloc_in): Change sanity check to permit new reloc.
5629 (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
5630 MIPS_R_PCREL16.
5631
4335ce64
ILT
5632 * elf32-mips.c (mips_elf_final_link): Account for link_order
5633 relocs when allocating space for relocations. Set SEC_RELOC flag
5634 for any section which has relocs. Handle link_order relocs in
5635 link_order loop. Use _bfd_generic_link_add_symbols_collect for
5636 add_symbls entry point.
5637
5638 * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
5639 counting relocs. Set SEC_RELOC flag for any section which has
5640 relocs.
5641
5642 * linker.c (_bfd_default_link_order): Handle bfd_data_link_order.
5643
5644 * linker.c (_bfd_generic_link_add_symbols): Just call
5645 generic_link_add_symbols.
5646 (_bfd_generic_link_add_symbols_collect): New function, like
5647 _bfd_generic_link_add_symbols but also collect constructors and
5648 destructors by name as collect2 does.
5649 (generic_link_add_symbols): New function, like old
5650 _bfd_generic_link_add_symbols but with collect argument.
5651 (generic_link_add_object_symbols): Take collect argument.
5652 (generic_link_check_archive_element_no_collect): New function.
5653 (generic_link_check_archive_element_collect): New function.
5654 (generic_link_check_archive_element): Take collect argument.
5655 (generic_link_add_symbol_list): Take collect argument.
5656 (_bfd_generic_link_add_one_symbol): Rename constructor argument to
5657 collect.
5658 * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
5659 * libbfd.h: Rebuilt.
5660
9d92fe0a
JL
5661Tue Mar 22 10:04:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5662
5663 * archive.c (bfd_construct_extended_name_table): Use ar_padchar
5664 for first character in an extended name.
5665 (_bfd_write_archive_contents): If ar_padchar == '/', then use
5666 "//" as the name of the special archive member holding the
5667 extended name table.
5668
f1cca647
ILT
5669Mon Mar 21 12:28:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5670
5671 Support for link_order types which generate relocs in order to
5672 support -Ur in the linker.
5673 * linker.c (generic_link_add_symbol_list): Remove bitsize argument
5674 from call to _bfd_generic_link_add_one_symbol.
5675 (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
5676 Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR
5677 instead of bitsize to add_to_set call back.
5678 (_bfd_generic_final_link): Account for link_order relocs when
5679 allocating space for relocations. Handle them in link_order loop.
5680 (_bfd_generic_reloc_link_order): New function.
5681 (_bfd_default_link_order): If a reloc_link_order is seen here,
5682 abort.
5683 (_bfd_count_link_order_relocs): New function.
5684 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
5685 argument from declaration.
5686 (_bfd_generic_reloc_link_order): Declare.
5687 (_bfd_count_link_order_relocs): Declare.
5688 * libbfd.h: Rebuilt.
5689 * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
5690 call to _bfd_generic_link_add_one_symbol.
5691 (NAME(aout,final_link)): Account for link_order relocs when
5692 allocating space for relocations. Handle them after handling all
5693 input BFDs.
5694 (aout_link_reloc_link_order): New function.
5695 * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
5696 call to _bfd_generic_link_add_one_symbol.
5697 (ecoff_bfd_final_link): Account for link_order relocs when
5698 allocating space for relocations. Handle them in link_order loop.
5699 (ecoff_link_write_external): Set the storage class of a defined
5700 linker created symbol based on the section it is in. Correct
5701 bfd_link_hash_weak case to use .sc rather than .st.
5702 (ecoff_reloc_link_order): New function.
5703 * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
5704 BFD_RELOC_CTOR.
5705 * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
5706
5707 * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
5708 and buf.
5709
5710 * cisco-core.c (cisco_core_file_p): Only pass one argument to
5711 bfd_zmalloc. Free a pointer, not a union.
5712 (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
5713
142f59f4
JL
5714Sun Mar 20 09:24:36 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5715
17e64ad3
JL
5716 * bfd/som.c (som_begin_writing): Fix thinko (off by one error).
5717
c2e1207b
JL
5718 * som.c (bfd_section_from_som_symbol): Only to do the value
5719 comparison for function symbols within executables.
5720
c05d2d43
JL
5721 * som.c (bfd_section_from_som_symbol): Renamed from
5722 som_section_from_subspace_index. Pass in a native SOM symbol.
5723 For executables, iterate through the sections to find out
5724 which contains the symbol's address rather than using the
5725 symbol_info field. (symbol_info has a different meaning for
5726 dynamicly linked executables.)
5727
61bcbf40
JL
5728 * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
5729 bfd_zmalloc.
5730
517a6af6
JL
5731 * som.c (som_begin_writing): Fix braino (one call to align
5732 space/subspace data was done unconditionally rather than
5733 just for executables.)
5734
142f59f4
JL
5735 * som.c (som_begin_writing): Align text in all executables to
5736 make HPUX kernel happy. Fixes strip/objcopy for shared
5737 executables.
5738
00806436
JL
5739Sat Mar 19 07:06:59 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5740
5741 * som.c (som_begin_writing): Account for alignment needs of
5742 subspaces too when writing executables. Never request a negative
5743 bss size. Fixes some problems with demand paged executables,
5744 still having problems with pure executables and shared executables.
5745
f3f29240
JK
5746Fri Mar 18 19:12:47 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5747
5748 * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
5749 bfd_zalloc for rawptr, because later on we may call free, not
5750 bfd_release, on it.
5751
5752 * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
5753 * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
5754 * cisco-core.c: New file.
47dc9b52
JK
5755 * Makefile.in: Change accordingly.
5756 * configure.in: Recognize cisco_core_vec.
5757 * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
5758 * targets.c: Add cisco_core_vec.
f3f29240
JK
5759 * bfd-in2.h: Rebuilt.
5760
3b499495
JL
5761Fri Mar 18 18:13:49 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5762
15766917
JL
5763 * som.h (som_copyable_section_data_struct): New structure
5764 containing all the private section information which needs
5765 to be copied from input section to output section during
5766 objcopy or strip.
5767 (som_section_data_struct): Remove several fields now in
5768 som_copyable_section_data_struct. Make the space and
5769 subspace dictionaries be pointers (to save space when
5770 only reading objects).
5771
5772 * som.c (bfd_som_set_section_attributes): Now returns a boolean;
5773 some references changed. Allocate a copyable data stucture if
5774 none exists. Store info into the copyable data structure.
5775 (bfd_som_set_subsection_attributes): Likewise.
5776 (som_is_space, som_is_subspace, som_is_container): New functions.
5777 Use these instead of directly accessing private data.
5778 (som_prep_headers): Allocate space and subspace headers here.
5779 Fill in some fields in the space/subspace headers from the
5780 copyable data.
5781 (som_bfd_copy_private_section_data): Only copy the stuff
5782 that we really need to make objcopy and strip work. Allocate
5783 the copy_data structure for the output bfd before copying.
5784
4359a7ef
JL
5785 * som.h (struct som_exec_data): New structure to hold exec
5786 info that must be preserved when running objcopy/strip.
5787 (struct somdata): Add new "exec_data" field and accessor
5788 macro. Add some comments on how the various fields are used.
5789 (som_section_data_struct): Make is_space and is_subspace bitfields.
5790 Delete unused subspace_index. All references now use the
5791 target_index field within the section structure itself.
5792
5793 * som.c (make_unique_section): Delete unused declaration.
5794 (som_bfd_copy_private_bfd_data): New function.
5795 (som_object_setup): Allocate space for and save exec information
5796 that needs to be copied during objcopy/strip.
5797 (som_mkobject): Do not allocate space for a file header here.
5798 It is not used when only reading SOM objects.
5799 (som_prep_headers): Allocate space for and attach a file header
5800 to the output bfd. For executables, use the saved system_id
5801 value rather than trying to guess the right value. Do not abort
5802 wwhen setting file_hdr->entry* for executables.
5803 (som_begin_writing): For executables, set the exec_entry and
5804 exec_flags fields.
5805 (som_copy_private_backend_section_data): Always return a value.
5806
08b3c4f9
JL
5807 * libhppa.h (PA_PAGESIZE): Define.
5808
5809 * som.c (SOM_ALIGN): Define.
5810 (som_begin_writing): If writing an executable, initialize all
5811 fields in the exec header to zero. Update fields in the exec
5812 header as sizes of loadable subspaces are computed. Carefully
5813 preserve alignments when building executables. Actually write the
5814 exec after all the fields are filled in.
5815
3b499495
JL
5816 * Better long-filename handling. Reads SOM ABI compliant extended
5817 names, but doesn't quite write compliant extended names yet.
5818 * som.c (som_slurp_extended_name_table): Delete function. The
5819 generic code will handle things correctly.
5820 (som_slurp_armap): Seek to the beginning of the next member.
5821 (normalize): New function.
5822 (som_bfd_ar_write_symbol_stuff): Take the size of the extended
5823 name table into account when computing the file offsets in the
5824 SOM dictionary. Make sure to align to an even boundary.
5825 (som_write_armap): Initialize the checksum to zero.
5826 (ar_maxchars): Fix. Opps.
5827
ff978570
KR
5828Fri Mar 18 20:35:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5829
5830 * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
5831 machine. Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
5832
6f4aac6c
KR
5833Thu Mar 17 18:26:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
5834
5a66538b
KR
5835 * bfd-in.h (BFD_VERSION): Use @VERSION@.
5836 * Makefile.in (bfd.h): Replace it with contents of VERSION file.
5837 * bfd-in2.h: Regenerated.
5838
6f4aac6c
KR
5839 * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
5840 this was also named trad_unix_bfd_copy_private_bfd_data.
5841
8eb5d4be
JK
5842Thu Mar 17 10:37:07 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5843
5844 * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
5845 elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
5846 returns NULL, it is not an error. It's possible that some of
5847 these checks are not necessary (because the size can never be
5848 zero), but putting in the checks is the conservative thing to do
5849 in light of the fact that some of these malloc calls replaced
5850 unchecked alloca calls, in which a zero argument would work fine.
5851
1c6042ee
ILT
5852Thu Mar 17 11:44:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5853
7838792b
ILT
5854 * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
5855 duplicate definition.
5856 (osf_core_bfd_is_local_label): Define.
5857
4bbf7a49
ILT
5858 * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
5859 if malloc (0) fails. bfd_canonicalize_reloc returning 0 is not a
5860 failure indication, it merely means there are no relocs.
5861
1c6042ee
ILT
5862 * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
5863 after NAME, since SunOS /bin/cc can't handle it.
5864
ae6710bc
DM
5865Wed Mar 16 16:43:33 1994 David J. Mackenzie (djm@thepub.cygnus.com)
5866
5867 * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
5868 From sukes@glue.umd.edu (Tasuki Hirata).
5869
5870Wed Mar 16 07:55:54 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5871
5872 * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
5873 all that convoluted stuff with NAME, CAT3, etc. The convoluted
5874 stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
5875
35ac8aac
JL
5876Wed Mar 16 00:02:05 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5877
5878 * som.c (som_prep_for_fixups): Detect section symbols based
5879 on either the lack of private data or the symbol flags. Do not
5880 munge section symbol names anymore -- they no longer confuse GDB.
5881 (som_begin_writing): Leave space for an exec header if writing
5882 an executable.
5883 (som_slurp_symbol_table): Recognize both forms of section symbol
5884 names "L$0\002" and "$<FOO>$". Change the name of "L$0\002"
5885 section symbols to be the name of the section they represent.
5886 Debugging symbols begin with "L$0\001", not just "L$".
5887
5b3577cb
JL
5888Tue Mar 15 22:58:28 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5889
5890 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
5891
5892 * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
5893 for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
5894 and bfd_is_local_label.
5895
5896 * targets.c: Add new entries to the bfd_target structure.
5897
5898 * bfd.c (bfd_copy_private_bfd_data): New definition.
5899
5900 * section.c (bfd_copy_private_section_data): New definition.
5901
5902 * syms.c (bfd_is_local_label): New definition.
5903
5904 * libbfd-in.h (bfd_generic_is_local_label): Declare.
5905
5906 * libbfd.c (bfd_generic_is_local_label): New function.
5907
5908 * *-core.c: Provide default definitions for new functions in
5909 the target vector which all point to bfd_false.
5910
5911 * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
5912 libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
5913 Default new vectors for copying private backend data to bfd_true.
5914 Default new vector for determining if a symbol is a local label
5915 to bfd_generic_is_local_label.
5916
5917 * som.c (som_bfd_copy_private_section_data): New function.
5918 (som_bfd_is_local_label): New function.
5919 (som_bfd_copy_private_bfd_data): For now default to bfd_true.
5920
5921 * elf32-hppa.c (hppa_elf_is_local_label): New function.
5922
0069bd06
ILT
5923Tue Mar 15 23:55:47 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5924
5925 * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
5926
57a1867e
DM
5927Tue Mar 15 04:41:13 1994 David J. Mackenzie (djm@rtl.cygnus.com)
5928
5929 * Most files:
5930 Replace DEFUN and DEFUN_VOID with K&R-style function definition.
5931 Indent some of them to GNU standards.
5932
5933 * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
5934 cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
5935 elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
5936 libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
5937 Update copyright years.
5938
ec743cef
JL
5939Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
5940
baef2065
JL
5941 * som.c (som_prep_for_fixups): A relocation involving the section
5942 symbol for the *ABS* section is really a relocation involving
5943 no symbol.
5944 (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
5945 undefined symbols. Correctly distinguish between debugger symbols
5946 and section symbols.
5947
b486fb13
JL
5948 * som (setup_sections): Set SEC_DEBUGGING and the section attributes
5949 for spaces and subspaces.
5950
4c9db344
JL
5951 * som.c (som_bfd_count_ar_symbols): Fix typo.
5952
ec743cef
JL
5953 * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
5954 HAS_RELOC based on the object's magic number.
5955 (make_unique_section): Delete function. BFD and its users are
5956 prepared to handle multiple sections with the same name.
5957 (setup_sections): Allocate space on the BFD's obstack to hold
5958 section names. Use bfd_make_setion_anyway rather than the
5959 obsolete make_unique_section.
5960 (som_prep_headers): Choose the correct SOM magic number based
5961 on the BFD's flags.
5962 (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
5963
45ccfd58
ILT
5964Sat Mar 12 09:46:09 1994 Ian Lance Taylor (ian@cygnus.com)
5965
5966 * elf32-ppc.c: Renamed from elf32-powerpc.c.
45ccfd58 5967 * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
45ccfd58
ILT
5968 * Makefile.in, configure.in: Corresponding changes.
5969
92177c52
ILT
5970Fri Mar 11 22:27:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
5971
5972 * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
5973
3e0b5554
PS
5974Fri Mar 11 00:34:59 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
5975
5976 * sunos.c (sunos_read_dynamic_info): Assume that dynamic info
5977 is always located at the start of the data section to allow
5978 recovery of the dynamic info from a stripped executable.
5979 * ecoff.c (ecoff_styp_to_sec_flags): Handle STYP_PDATA, STYP_XDATA
5980 and STYP_COMMENT.
5981
80425e6c
JK
5982Wed Mar 9 17:17:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
5983
5984 * libbfd-in.h: Remove alloca cruft. It was missing some necessary
5985 cruft (like the #pragma alloca for AIX).
5986 In addition to that problem, the C alloca calls xmalloc, which
5987 means checking for being out of memory can't work right. The
5988 following changes remove all uses of alloca from BFD.
5989 * hosts/solaris2.h: Remove alloca cruft.
5990 * som.c: Replace alloca with a fixed size auto array.
5991 * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
d7fb4531
JK
5992 ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
5993 sunos.c: Replace alloca with malloc and appropriate error checking and
80425e6c
JK
5994 freeing.
5995 * linker.c: Replace alloca with obstack_alloc.
5996 * libbfd.h: Rebuilt.
5997
1404c365
ILT
5998Tue Mar 8 12:10:38 1994 Ian Lance Taylor (ian@cygnus.com)
5999
6000 * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
6001 MIPS_R_GPREL.
6002
25677b5b
PS
6003Sat Mar 5 14:08:54 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6004
6005 * elf32-hppa.h, elfcode.h: Replace uses of Elf*_Half, Elf*_Word,
6006 Elf*_Off typedefs by their expansion, the typedefs have been
6007 removed from include/elf/internal.h.
802f4fe2
PS
6008 * elfcode.h (bfd_section_from_shdr): Handle SHT_DYNAMIC section like
6009 SHT_PROGBITS section.
25677b5b 6010
7b5f6e48
JL
6011Thu Mar 3 20:03:39 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6012
6013 * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
6014
baf200d4
JK
6015Wed Mar 2 13:28:06 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
6016
6017 * configure.host: Recognize i[34]86-sequent-*.
6018
6019 * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
6020 return from bfd_seek indicates an error.
6021 New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
6022 TRAD_CORE_STACK_OFFSET.
6023 * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
6024 TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
6025
44fd6622
JL
6026Wed Mar 2 11:57:03 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6027
4e64845c
JL
6028 * som.[ch]: Do not include libhppa.h in som.c, instead include
6029 it in som.h.
6030
6031 * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
6032 include it in elf32-hppa.h.
6033
98ecc945
JL
6034 * som.c (log2): Return -1 on error rather than aborting.
6035 (setup_sections): Bubble up an error from log2.
6036
44fd6622
JL
6037 * Changes to make HP C compiler happy in both traditional
6038 and ANSI mode.
6039 * som.c (hppa_som_gen_reloc_type): Use correct enum type for
6040 field parameter.
6041 (bfd_som_set_section_attributes): Use unsigned int rather than
6042 unsigned char to avoid GNU-C extensions.
6043 (bfd_som_attach_aux_hdr): Return a boolean to indicate success
6044 or failure rather than aborting on failure.
6045
6046 * som.h (bfd_som_set_section_attributes): Fix prototype to match
6047 som.c changes.
6048 (bfd_som_attach_aux_hdr): Add prototype.
6049 (hppa_som-gen_reloc_type): Likewise.
6050
6051 * elf32-hppa.c: Add a couple casts to make HP compiler happy.
6052 (hppa_look_for_stubs_in_section): Do not return false on failure
6053 until rest of code is ready to handle it. Abort for now.
6054
d1f8b181
JK
6055Tue Mar 1 18:33:59 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
6056
6057 * bfd-in2.h: Rebuilt.
6058
85cc33c7
KH
6059Tue Mar 1 13:06:53 1994 Kung Hsu (kung@mexican.cygnus.com)
6060
bb37e716
KH
6061 * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
6062 * Makefile.in: delete an extra blank.
85cc33c7
KH
6063 * configure.in : Add i396os9k_vec.
6064
2f88343d
KH
6065Mon Feb 28 15:41:01 1994 Kung Hsu (kung@mexican.cygnus.com)
6066
5143c305
KH
6067 * config.bfd : Add i386-os9k.
6068 * config/i386-os9k.mt : Newly add os9k target makefile.
6069
2f88343d
KH
6070 * i386os9k.c : new file to handle os9k format bfd.
6071 * Makefile.in : Handle new file i386os9k.c
2f88343d
KH
6072 * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
6073 * cache.c : Initialize cache_sentinel to 0.
6074
6e58a4e5
JL
6075Sun Feb 27 16:30:55 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6076
f3b477be
JL
6077 * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
6078 action in case where caller specified no argument relocation.
6079 (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
6080 right in the original relocation and the stub's relocation.
6081
6e58a4e5
JL
6082 * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo. Delete
6083 unused symbols argument.
6084
6085 * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
6086 than asymbol * for original target symbol. All callers changed.
6087 Set reloc->sym_ptr_ptr appropriately.
6088 (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
6089 (hppa_elf_look_for_stubs_in_section): No longer need symbols
6090 argument. Use the output symbols when canonicalizing the relocs,
6091 creating them if necessary.
6092
6093 * linker.c (_bfd_generic_link_output_symbols): Do not
6094 rebuild/clobber the output symbols if they already exist.
6095
4c8d6c9f
SS
6096Sun Feb 27 15:22:36 1994 Stan Shebs (shebs@andros.cygnus.com)
6097
fdfe2d14
SS
6098 * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
6099 check all the pointer dereferences. Enabled via DEBUG_BFD_SEND.
6100 * bfd-in2.h: Rebuilt.
6101
4c8d6c9f
SS
6102 * srec.c (hex_value): Always set to a size of 256 bytes.
6103 (srec_init): Cosmetic changes.
6104
e08b9ad7
JL
6105Sun Feb 27 11:18:47 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6106
6107 * elf32-hppa.c: Second half of major cleanup. More comments,
6108 PARAMize and staticize rest of functions. Delete unused
6109 functions. Delete unused/unnecessary arguments to some functions.
6110 Group static vars together. Abort for bad errors until we have
6111 error code propogation working. Work on spacing and indention.
6112 Add FIXMEs for unresolved problems. Use enums rather than
6113 #defines for lots of things. Merge two functions which build
6114 linker stubs into a single function (so they can easily share a
6115 ton of common code).
6116
68241b2b
ILT
6117Sat Feb 26 10:00:45 1994 Ian Lance Taylor (ian@cygnus.com)
6118
6119 * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
6120 avoid depending upon right shifts of signed numbers, and to
6121 correct handling of src_mask with lower bits zero.
6122
6123 * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
6124 * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
6125 * elf32-i386.c: Likewise.
6126 * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
6127 #if 0 code.
6128 (elf_write_phdrs): Make i unsigned.
6129 (map_program_segments): Make i and n_left unsigned.
6130 (assign_file_positions_except_relocs): Make i unsigned.
6131 (write_shdrs_and_ehdr): Make count unsigned.
6132 (assign_file_positions_for_relocs): Make i unsigned.
6133 (NAME(bfd,elf_write_object_contents)): Make count unsigned.
6134 (section_from_elf_index): Make index argument unsigned.
6135
96db3187
ILT
6136Fri Feb 25 21:34:58 1994 Ian Lance Taylor (ian@cygnus.com)
6137
6138 * elfcode.h: Don't include assert.h.
6139 (swap_out_syms): Use BFD_ASSERT rather than assert.
6140
6141 * linker.c (_bfd_generic_link_write_global_symbol): Add missing
6142 break in switch.
6143
6144 * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
6145 declarations.
6146
d6439785
JL
6147Fri Feb 25 16:35:57 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6148
f5bfdacd
JL
6149 * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
6150
6151 * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
6152 (elf_hppa_tc_make_sections): Likewise.
6153 (elf_hppa_final_processing): Add extern decl.
6154
6155 * elf32-hppa.c: First half of major cleanup. Add/cleanup lots of
6156 comments. PARAMize some static functions. Delete unused functions.
6157 Delete unused/unnecessary arguments to many functions. Group
6158 static vars together. Collapse common case statements together
6159 in many places. Use default case when possible instead of listing
6160 each case separately. Abort for bad errors until we get error
6161 code propogation working. Work on spacing and indention problems.
6162 Add FIXMEs for some unresolved problems. Delete hopelessly broken
6163 COMPLEX relocation support (it's never used anyway).
6164 (hppa_elf_rebuild_insn): Delete. Moved into libhppa.h.
6165 (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
6166 (elf_hppa_tc_make_sections): Likewise.
6167
43ebdfcf
JL
6168 * format.c (bfd_check_format_matches): Initialize matching_vector
6169 to keep gcc -Wall quiet.
6170
6171 * elfcode.h (elf_slurp_reloca_table): Fix typo.
6172
d6439785
JL
6173 * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
6174 not "sizeof (som_symbol_type *)".
6175
6176 * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
6177 not "sizeof (asymbol"). Opps.
6178
fbb8fe5c
ILT
6179Fri Feb 25 13:19:04 1994 Ted Lemon (mellon@pepper.ncd.com)
6180
6181 * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
6182 (bfd_set_gp_size): Can't set gp value on an archive.
6183
5e808126
SC
6184Fri Feb 25 12:57:00 1994 Steve Chamberlain (sac@jonny.cygnus.com)
6185
6186 * srec.c (pass_over): Don't skip too many characters when
6187 end of line seen.
6188
626f883f
ILT
6189Fri Feb 25 11:41:57 1994 Ian Lance Taylor (ian@cygnus.com)
6190
6191 * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
6192 boundary.
6193
6194Thu Feb 24 07:13:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6195
6196 * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
6197 field for absolute symbols in the same manner as undefined
6198 and common symbols.
6199
a69b39f0
PS
6200Thu Feb 24 04:29:19 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6201
6202 * elfcode.h (elf_core_file_p): Check for core file e_machine match
6203 like in elf_object_p.
6204
2e7b92cf
JL
6205Wed Feb 23 18:28:37 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6206
6207 * elfcode.h (alloca): Delete declaration.
4f42757e
JL
6208
6209 * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
6210 number rather than HP9000S800_ID. Note som.c is careful
6211 to make sure CPU_PA_RISC1_0 is always defined.
6212
891dc727
SS
6213Mon Feb 21 10:12:02 1994 Stan Shebs (shebs@andros.cygnus.com)
6214
6215 * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
6216 flags to explicit compile actions.
6217
22a71fef
ILT
6218Mon Feb 21 09:50:06 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
6219
2f0deb19
ILT
6220 * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
6221 * ecoff.c (ecoff_write_object_contents): Make sure .bss section
6222 ends on a page boundary if there is no symbol table.
6223 (ecoff_bfd_final_link): Don't set symhdr->magic here.
6224
aaca79a8
ILT
6225 * hosts/hp300.h: Include <stdlib.h>; don't declare free.
6226
2ab0b7f3
ILT
6227 * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
6228 rather than an array of variable size.
6229 (som_bfd_fill_in_ar_symbols): Likewise.
6230 (som_bfd_ar_write_symbol_stuff): Likewise.
6231
22a71fef
ILT
6232 * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
6233 operation to avoid OSF 1.3 cc bug.
6234 * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
6235 and bss_size bfd_size_type instead of unsigned long. Make
6236 text_start and data_start bfd_vma instead of unsigned long.
6237 * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
6238 value.
6239
037ce95a
ILT
6240Sun Feb 20 16:06:54 1994 Ian Lance Taylor (ian@lisa.cygnus.com)
6241
6242 * linker.c (_bfd_generic_link_add_archive_symbols): Consider
6243 symbols in the order they appear in the archive map.
6244
3a1de3cc
PS
6245Sat Feb 19 03:17:32 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6246
6247 * coff-alpha.c (reloc_nil): Add forward declaration, add missing
6248 error_message argument.
6249 * coff-sparc.c (bfd_coff_generic_reloc): Add forward declaration,
6250 add missing error_message argument.
6251 * mipsbsd.c (mips_fix_hi16_s): Add forward declaration, add missing
6252 error_message argument.
6253
99ec1f66
ILT
6254Fri Feb 18 11:41:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6255
99ec1f66 6256 Support for PowerPC NetWare.
92177c52 6257 * nlm32-powerpc.c: New file.
99ec1f66
ILT
6258 * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
6259 * config/ppc-nlm.mt: New file.
6260 * configure.in (nlm32_powerpc_vec): New target vector; use
6261 nlm32-powerpc.o, nlm32.o, nlm.o.
6262 * targets.c (nlm32_powerpc_vec): Declare.
6263 * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
7ce8b9d1 6264 (CFILES): Add nlm32-powerpc.c.
99ec1f66
ILT
6265
6266 Initial support for PowerPC ELF. Done without an ABI, and
6267 probably to be changed when I get an ABI.
6268 * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
6269 * config/ppc-elf.mt: New file.
6270 * configure.in (bfd_elf32_powerpc_vec): New target vector; use
6271 elf32-powerpc.o, elf32.o, elf.o.
6272 * elf32-powerpc.c: New file.
6273 * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
6274 (elf_set_arch_mach): Likewise.
6275 * targets.c (bfd_elf32_powerpc_vec): Declare.
6276 * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
6277 (CFILES): Add elf32-powerpc.c.
6278 Rebuilt dependencies.
6279
42f62ead
ILT
6280Thu Feb 17 15:29:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6281
6282 * coffgen.c (coff_write_linenumbers): Always return a value.
6283
6284 * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
6285 reasonably. Allocate x_symp using alloca.
6286
6287 * elfcode.h (map_program_segments): ELF program header entries
6288 must be sorted by load address. This used to generate the entries
6289 in reverse order.
6290
6291 * section.c (SEC_IN_MEMORY): Define.
6292 (asection): Rename unused field otheruserdata to contents, and
6293 make it char *.
6294 (bfd_make_section_anyway): Initialize contents field to NULL.
6295 (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
6296 contents from contents field rather than from file.
6297 * bfd-in2.h: Rebuilt.
6298
d1ad85a6
DM
6299Thu Feb 17 08:30:53 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6300
6301 * bfd.c (bfd_get_error, bfd_set_error): New functions.
6302 (bfd_error): Make static.
6303 (bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to
6304 all values.
6305 * bfd-in2.h: Regenerated.
6306 * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
6307 aoutf1.h, aoutx.h, archive.c, archures.c,
6308 bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
6309 coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
6310 ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
6311 elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
6312 i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
6313 lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
6314 nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
6315 ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
6316 srec.c, sunos.c, syms.c, targets.c, tekhex.c,
6317 trad-core.c: Change callers.
6318
7430a991
JL
6319Tue Feb 15 22:27:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6320
6321 * som.c: Remove FIXMEs for things which have been dealt with.
6322
54196ea1
KR
6323Tue Feb 15 19:39:24 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
6324
6325 * section.c (bfd_get_section_contents): Since this function reads
6326 unrelocated contents, the section's raw size is always the one to
6327 use for bounds checking.
6328
6329 * linker.c (default_indirect_link_order): In assertion, compare
6330 link_order size field against cooked size, not raw size, of input
6331 section.
6332
6333 * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
6334 return 0.
6335 (aligncode): When shrinking, the addend should be set to the
6336 current offset in the section plus the number of bytes of padding
6337 that will actually be retained.
6338 (b_out_relax_section): If a section contains no relocations, don't
6339 bother processing them.
6340 (b_out_get_relocated_section_contents): Set reloc_done. Assert
6341 that bfd_get_section_contents returns true. Check that relocs are
6342 properly ordered.
6343 (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
6344 that reloc->addend falls between the current source offset and the
6345 raw size of the input section.
6346
6347 * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
6348 bout. Default with no version number is still bout. Support
6349 explicit i960-coff target too.
6350
6351 * bout.c: Changed some indentation, deleted trailing whitespace,
6352 fixed some comments, removed some "#if 1" lines.
6353 (output_addr): New macro.
6354 (calljx_callback, callj_callback, get_value, abs32code, aligncode,
6355 b_out_get_relocated_section_contents): Use it for readability.
6356
c6cdb69a
JL
6357Tue Feb 15 09:00:16 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6358
6359 * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
6360 symbols, not the BFD symbols.
6361 (som_bfd_ar_write_symbol_stuff): Likewise.
6362
6e033f86
JL
6363Mon Feb 14 22:55:20 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6364
24a1f6a0
JL
6365 * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
6366 have any symbols.
6367
6e033f86
JL
6368 * Finish basic read-write support for SOM archive libraries. Bugs
6369 surely remain as this hasn't been tested all that much.
6370 * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
6371 (struct som_misc_symbol_info): New structure to hold info necessary
6372 to build both normal and library symbol tables.
6373 (som_derive_misc_symbol_info): New function to derive info necessary
6374 to build both normal and library symbol tables.
6375 (som_build_and_write_symbol_table): Use new function to derive misc
6376 symbol information.
6377 (som_slurp_symbol_table): Update backend private data for symbols
6378 appropriately.
6379 (som_bfd_prep_for_ar_write): New function.
6380 (som_bfd_ar_symbol_hash): New function.
6381 (som_bfd_ar_write_symbol_stuff): New function.
6382 (som_write_armap): Flesh out.
6383 (som_vec): Fix ar padding character.
6384
6385 * som.c: Consistently use memset rather than bzero.
6386
8b8ddedb
SG
6387Mon Feb 14 17:02:28 1994 Stu Grossman (grossman at cygnus.com)
6388
6389 * coff-rs6000.c: Add Lynx core file support, use HOST_AIX, where
6390 appropriate.
6391 * rs6000-core.c: Use HOST_AIX instead of COREFILES_PLEASE.
6392 * config/rs6000.mh: Remove defs of ARCHIVES_PLEASE and
6393 COREFILES_PLEASE.
6394 * config/rs6000lynx.mh: Turn on Lynx core file support.
6395 * hosts/rs6000.h: #define HOST_AIX.
5cf354ef 6396 * hosts/rs6000lynx.h: Create this to enable Lynx host support.
8b8ddedb 6397
6863eb4b
JL
6398Sun Feb 13 14:30:00 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6399
50c5c4ad
JL
6400 * som.h (som_symbol_data): Safely access backend private data
6401 for BFD symbols. All callers changed.
6402
6e033f86 6403 * Read-only SOM archive support.
3c37f9ca
JL
6404 * som.c (som_bfd_count_ar_symbols): New helper function.
6405 (som_bfd_fill_in_ar_symbols): New helper function.
6406 (som_slurp_armap): New function to read a SOM LST.
6407
6863eb4b
JL
6408 * som.h: Include <lst.h> and <ar.h>.
6409
5e829a34
JL
6410Sat Feb 12 22:34:14 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6411
6412 * elfcode.h (elf_map_symbols): Fix typo.
6413 (write_object_contents): Check return values from prep_headers and
6414 elf_compute_section_file_positions.
6415 (set_section_contents): Likewise.
6416
a15691a5
DM
6417Fri Feb 11 16:56:50 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6418
6419 * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
6420 (bfd_construct_extended_name_table): Check result of normalize.
6421
9783e04a
DM
6422Tue Feb 8 08:57:31 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6423
6424 Make all callers of malloc or realloc (including via obstacks)
6425 check the result for NULL. Most set bfd_error to no_memory and
6426 return in that case; a few are harder to fix, and are marked
6427 with "FIXME <return type>".
6428
6429 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
6430 hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return.
6431 * linker.c (_bfd_generic_link_output_symbols
6432 _bfd_generic_link_write_global_symbol): Ditto
6433 * section.c (bfd_make_section_anyway): Ditto.
6434
6435 * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
6436 (first_phase): Ditto. FIXME void
6437 (tekhex_make_empty_symbol): Check bfd_zalloc.
6438
6439 * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
6440 (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
6441
6442 * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
6443
6444 * srec.c: Indent.
6445 (fillup_symbols): Check bfd_alloc. FIXME void
6446 (srec_mkobject srec_get_section_contents
6447 srec_set_section_contents): Check bfd_alloc.
6448 (srec_make_empty_symbol): Check bfd_zalloc.
6449
6450 * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
6451 (make_unique_section): Check bfd_alloc.
6452 (som_new_section_hook): Check bfd_zalloc.
6453 (bfd_som_attach_aux_hdr): Ditto. FIXME void
6454
6455 * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
6456
6457 * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
6458 (osf_core_core_file_p): Check bfd_alloc.
6459
6460 * oasys.c (oasys_slurp_symbol_table oasys_archive_p
6461 oasys_mkobject oasys_object_p oasys_new_section_hook
6462 oasys_set_section_contents): Check bfd_alloc.
6463 (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
6464 (oasys_make_empty_symbol): Check bfd_zalloc.
6465
6466 * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
6467 (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
6468
6469 * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
6470
6471 * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
6472
6473 * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
6474
6475 * linker.c (_bfd_link_hash_newfunc
6476 (generic_link_hash_newfunc
6477 (archive_hash_newfunc
6478 (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
6479 (_bfd_generic_final_link
6480 (_bfd_generic_link_output_symbols
6481 (default_indirect_link_order): Check bfd_alloc.
6482 (bfd_new_link_order): Check bfd_alloc_by_size_t.
6483
6484 * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
6485
6486 * ieee.c: Indent.
6487 (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
6488 ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
6489 (do_one): Check bfd_alloc. Return a boolean.
6490 (ieee_slurp_section_data): Check it.
6491 (init_for_output): Check bfd_alloc. Return a boolean.
6492 (ieee_set_section_contents): Check it.
6493 (do_with_relocs): Check bfd_alloc. Return a boolean.
6494 (ieee_bfd_debug_info_accumulate): Ditto. FIXME void.
6495 (ieee_mkobject): Check bfd_zalloc.
6496 (ieee_make_empty_symbol): Check bfd_zmalloc.
6497
6498 * hpux-core.c (hpux_core_make_empty_symbol): Check
6499 bfd_zalloc.
6500
6501 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
6502 bfd_zalloc.
6503 (hppabsd_core_core_file_p): Check bfd_zalloc.
6504
6505 * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
6506
6507 * elfcode.h (elf_new_section_hook): Check bfd_alloc.
6508 (bfd_section_from_phdr): Ditto.
6509 (write_relocs): Ditto. FIXME void
6510 (elf_map_symbols assign_section_numbers map_program_segments):
6511 Ditto. Return a boolean.
6512 (swap_out_syms): Ditto. Check elf_map_symbols.
6513 (elf_slurp_symbol_table): Check bfd_zalloc.
6514 (elf_slurp_reloca_table): Check bfd_alloc.
6515 (elf_slurp_reloc_table): Ditto.
6516 (elf_compute_section_file_positions): Check assign_section_numbers.
6517 (assign_file_positions_except_relocs): Return a boolean.
6518 Check map_program_segments.
6519 (elf_compute_section_file_positions): Check it.
6520
6521 * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
6522
6523 * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
6524 realloc.
6525 (hppa_elf_stub_reloc): Ditto.
6526 (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
6527 (hppa_elf_build_long_branch_stub): Ditto.
6528 (elf32_hppa_backend_symbol_table_processing): Ditto.
6529
6530 * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean.
6531 (ecoff_slurp_symbol_table): Check it.
6532 (ecoff_slurp_armap): Check bfd_alloc.
6533 (ecoff_write_armap): Check bfd_zalloc.
6534 (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
6535 _bfd_link_hash_newfunc.
6536 (ecoff_link_add_externals): Check bfd_alloc.
6537
6538 * ctor.c (bfd_constructor_entry): Check bfd_alloc.
6539
6540 * coffgen.c (coff_real_object_p): Check bfd_alloc.
6541 (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean.
6542 (coff_write_symbol): Check bfd_alloc. FIXME int
6543 (coff_write_linenumbers): Check bfd_alloc. Return a boolean.
6544 (coff_section_symbol): Check bfd_alloc_by_size_t.
6545 (coff_get_normalized_symtab): Check bfd_alloc.
6546 (coff_bfd_make_debug_symbol): Check bfd_zalloc.
6547 * libcoff-in.h: Change decls of coff_renumber_symbols,
6548 coff_write_linenumbers.
6549 * libcoff.h: Rebuilt.
6550 * coffcode.h (coff_write_object_contents): Check
6551 coff_renumber_symbols, coff_write_linenumbers.
6552
6553 * coffcode.h: Indent.
6554 (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a
6555 boolean.
6556 (coff_write_object_contents): Check it.
6557
6558 * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
6559 * coff-mips.c (mips_relocate_section): Ditto.
6560
6561 * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
6562 (do_slurp_bsd_armap): Ditto.
6563 (compute_and_write_armap): Check bfd_realloc value.
6564
6565 * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
6566 return value. Return boolean value.
6567 (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
6568 (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
6569 return value.
6570 (add_to_stringtab): Ditto. FIXME void
6571 (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
6572 (aout_link_add_symbols): Check bfd_alloc value.
6573 (translate_symbol_table): Check translate_from_native_sym_flags.
6574 * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
6575 * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
6576
6577 * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
6578
6579 * opncls.c (obstack_chunk_alloc): Define as malloc, not
6580 bfd_xmalloc_by_size_t.
6581 (_bfd_new_bfd): Check obstack_begin for 0 return.
6582
6583 * ieee.c (obstack_chunk_alloc): Define as malloc, not
6584 bfd_xmalloc_by_size_t.
6585 (ieee_archive_p): Check obstack_begin for 0 return and
6586 obstack_finish for NULL return.
6587
6588 * hash.c (obstack_chunk_alloc): Define as malloc, not
6589 bfd_xmalloc_by_size_t.
6590 (bfd_hash_table_init_n): Check obstack_begin for 0 return and
6591 obstack_finish for NULL return.
6592 (bfd_hash_lookup): Check obstack_alloc for NULL return.
6593
6594 * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
6595 bfd_xmalloc_by_size_t.
6596 bfd_ecoff_debug_accumulate
6597 bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
6598 (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
6599 NULL return. Return boolean, not void.
6600 (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
6601 (bfd_ecoff_debug_accumulate): Check add_file_shuffle
6602 and add_memory_shuffle return.
6603 (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
6604 (bfd_ecoff_debug_accumulate): Check bfd_alloc.
6605 (ecoff_add_string): Check add_memory_shuffle return.
6606
6607 * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
6608 Remove decls.
6609 * libbfd.h: Rebuilt.
6610
30e441ca
SG
6611Fri Feb 11 15:35:32 1994 Stu Grossman (grossman at cygnus.com)
6612
6613 * configure.host: Add Lynx/rs6000 support.
6614 * config/i386-nlm.mt: Enable a.out file support.
6615 * config/rs6000lynx.mh: Lynx/rs6000 host support.
6616
5ee3886b
ILT
6617Fri Feb 11 17:25:58 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6618
6619 * archive.c (compute_and_write_armap): Rewrite somewhat to improve
6620 memory usage.
6621
9a793780
SS
6622Fri Feb 11 13:10:42 1994 Stan Shebs (shebs@andros.cygnus.com)
6623
6624 * archive.c: Change all references to '\n' in archive magic
6625 to '\012', for greater portability.
6626 * ecoff.c (ecoff_write_armap): Ditto.
6627
6628Thu Feb 10 12:58:48 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6629
6630 * aoutx.h (aout_link_write_other_symbol): Check strip settings to
6631 see whether symbol should be output.
6632 * genlink.h (struct generic_write_global_symbol_info): Added info
6633 field.
6634 * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
6635 (_bfd_generic_link_write_global_symbol): Check strip settings to
6636 see whether symbol should be output.
6637 * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
6638
a62dd44f
JL
6639Wed Feb 9 21:34:58 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6640
9a793780
SS
6641 * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
6642
a62dd44f
JL
6643 * som.c: Cast return values from BFD memory allocation routines to
6644 avoid warnings from the HP compiler.
6645
945f125b
ILT
6646Wed Feb 9 12:55:02 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6647
0d634116
ILT
6648 * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
6649 reloc on an "ldl" instruction too.
6650
945f125b
ILT
6651 * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
6652 when passing them to sprintf. Use %ld instead of %d.
6653
6654 * coff-rs6000.c (rs6000coff_mkarchive): Return false.
6655 (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
6656 Also removed unused variable namelen.
6657 (rs6000coff_write_armap): Declare orl_count and stridx parameters.
6658
6659Tue Feb 8 18:00:34 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6660
6661 * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
6662 conflicts.
6663 * libbfd.h: Rebuilt.
6664
fa965415
KR
6665Tue Feb 8 15:55:50 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
6666
6667 * coff-alpha.c (reloc_nil): New function.
6668 (alpha_howto_table): Use it as special_function to prevent certain
6669 relocs from being adjusted by bfd_perform_relocation. IGNORE
6670 reloc should be partial_inplace.
6671 (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
6672 reloc on an "ldl" instruction too.
6673
7c202d37
PS
6674Tue Feb 8 00:32:28 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6675
6676 * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
6677 hppa_elf_build_long_branch_stub): Cast to char * instead of int
6678 before performing pointer arithmetic.
6679
9ed21f0e
JL
6680Mon Feb 7 20:56:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
6681
6682 * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
6683 configuration.
6684 (hppa*-*-*elf*): This configuration used hppa-elf now.
6685
6686 * som.c: This file is also used for HOST_HPPAOSF.
6687
6688 * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
6689
6690 * hosts/hppaosf.h: New host configuration file.
6691
6692 * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
6693 BSD handles both SOM and ELF object files.
6694
6695 * config/hppaosf.mh (HDEFINES): Delete. No longer needed.
6696 (RANLIB): Doesn't do anything, define it to be "echo".
6697
6698 * config/hppaosf.mt: New target makefile fragment for a PA running
6699 OSF1.
6700
bf969135
ILT
6701Mon Feb 7 15:02:06 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6702
66f1cff5
ILT
6703 * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
6704 (archures_init_table): If SELECT_ARCHITECTURES is not defined,
6705 added bfd_powerpc_arch.
6706 * bfd-in2.h: Rebuilt.
6707 * cpu-powerpc.c: New file.
6708 * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
6709 Rebuilt dependencies.
6710
bf969135
ILT
6711 * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
6712 of an SHT_STRTAB section from sh_addr and sh_addralign, rather
6713 than just setting them to zero.
6714
b9d5cdf0
DM
6715Sun Feb 6 20:04:10 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6716
6717 * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
6718 from bfd_new_strtab.
6719 (elf_compute_section_file_positions): Check for false return from
6720 swap_out_syms.
6721
6722 * linker.c (default_indirect_link_order): Check for NULL return
6723 from bfd_get_relocated_section_contents.
6724
6725 * syms.c: Make example application in doc call xmalloc, not
6726 bfd_xmalloc.
6727
6728 * aoutx.h (NAME(aout,slurp_symbol_table),
6729 aout_link_get_symbols, NAME(aout,link_hash_table_create)):
6730 * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
6731 * ecoff.c (ecoff_bfd_link_hash_table_create):
6732 * ecofflink.c (bfd_ecoff_debug_init):
6733 * format.c (bfd_check_format_matches):
6734 * linker.c (_bfd_generic_link_hash_table_create):
6735 (_bfd_generic_final_link):
6736 * reloc16.c (bfd_coff_reloc16_relax_section):
6737 (bfd_coff_reloc16_get_relocated_section_contents):
6738 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
6739 * elf32-mips.c (mips_elf_final_link):
6740 * elfcode.h (bfd_new_strtab):
6741 (bfd_add_2_to_strtab):
6742 (elf_slurp_symbol_table):
6743 (elf_corefile_note):
6744 * libbfd.c (bfd_zmalloc):
6745 Use malloc and check the result, instead of bfd_xmalloc.
6746
6b054519
JK
6747Sat Feb 5 12:39:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
6748
6749 * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
6750
bf430317
PS
6751Sat Feb 5 05:32:44 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
6752
6753 * srec.c (srec_write_record): Put CONST keyword for "src" before
6754 "unsigned", some compilers don't like it after "unsigned".
6755 * libcoff.h, libcoff-in.h (bfd_perform_slip): Rename "value" to
6756 "val" in prototype declaration because some compilers don't like
6757 arguments whose names are the same as types.
6758
9b39ed6b
ILT
6759Sat Feb 5 01:14:38 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6760
6761 * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
6762 object file defines symbol. Also, if skipping a symbol, skip the
6763 second symbol of a N_WARNING or N_INDR symbol as well.
6764
d352be4f
ILT
6765Fri Feb 4 23:55:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6766
6767 Add basic support for writing RS/6000 XCOFF files.
6768 * coff-rs6000.c (dummy_reloc): Removed.
6769 (rs6000coff_howto_table): Defined XCOFF relocs.
6770 (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
6771 (rs6000coff_rtype2howto): New function.
6772 (coff_bfd_reloc_type_lookup): Defined to use
6773 rs6000coff_reloc_type_lookup.
6774 (rs6000coff_reloc_type_lookup): New function.
6775 (SELECT_RELOC): Defined to set r_type and r_size fields.
6776 (COFF_LONG_FILENAMES): Defined.
6777 * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
6778 fields to bitfields. Added fields fix_value and fix_scnlen.
6779 (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
6780 STYP_INFO for the type of a section named .debug.
6781 (coff_add_missing_symbols): Don't define if RS6000COFF_C.
6782 (coff_write_object_contents): If RS6000COFF_C, don't call
6783 coff_add_missing_symbols.
6784 (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
6785 entry has type STY_LD change the x_scnlen into a pointer to a
6786 symbol and set fix_scnlen. Also, for a C_BSTAT symbol, change the
6787 value into a pointer to a symbol and set fix_value.
6788 * libcoff.h: Rebuilt.
6789 * coffgen.c (coff_mangle_symbols): Reindent. If fix_value is set,
6790 get the symbol offset. Likewise for fix_scnlen.
6791 (string_size): Change type to bfd_size_type.
6792 (debug_string_size, debug_string_section): New static variables.
6793 (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
6794 write the symbol name into the .debug section; assume that the
6795 section has already been created with the right size.
6796 (coff_write_symbols): Initialize debug_string_size to 0. If
6797 bfd_coff_symname_in_debug returns true, don't put symbol name in
6798 usual string table. After writing out all symbols, if
6799 debug_string_size is not 0, check that it matches the size of the
6800 .debug section.
6801 (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
6802 fields. If the string offset is 0, always use an empty string as
6803 the name.
6804 (coff_make_empty_symbol): Zero out the symbol structure.
6805 * reloc.c (bfd_perform_relocation): Work around one gross hack
6806 with another: actually look at the target name to avoid the broken
6807 COFF check.
6808 (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
6809 BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
6810 * bfd-in2.h: Rebuilt.
6811
0ee34272
DM
6812Fri Feb 4 17:28:32 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6813
6814 * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
6815 (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
6816 * libbfd-in.h: Define them as macros calling xmalloc and declare
6817 xmalloc.
6818 * libbfd.h: Rebuilt.
0ee34272 6819
fa2302b8
ILT
6820Thu Feb 3 16:49:35 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6821
cbc174e7
ILT
6822 * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
6823 symbol has a value in the ECOFF symbol but not in the BFD symbol,
6824 keep the value in the ECOFF symbol. This helps gas.
6825
5072b8e5
ILT
6826 * linker.c (_bfd_generic_link_output_symbols,
6827 _bfd_generic_link_write_global_symbol): Don't require that all
6828 references to a common symbol be themselves common symbols.
6829
fa2302b8
ILT
6830 * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
6831
96ad107b
JK
6832Wed Feb 2 20:37:19 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
6833
6834 * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
6835 sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
0324156c 6836 * bfd-in2.h: Rebuilt.
96ad107b 6837
192d8ee8
ILT
6838Wed Feb 2 12:30:13 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6839
38e1f0ce
ILT
6840 * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
6841 and size correctly.
6842 (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
6843 x_csect.x_scnlen.l to match change in coff/internal.h.
6844 (coff_swap_aux_out): Likewise.
6845
ebf3b4cd
ILT
6846 * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
6847 (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
6848 fields to match yesterday's changes.
6849
192d8ee8
ILT
6850 * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
6851 in the internal_reloc itself, not the type.
6852 * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
6853 coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
6854 definition of SELECT_RELOC accordingly.
6855
330595d0
ILT
6856Tue Feb 1 12:05:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6857
6858 * coffcode.h (bfd_coff_backend_data): Added new arguments to
6859 _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
6860 and number of aux entries.
6861 (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
6862 accordingly.
6863 * libcoff.h: Rebuilt.
6864 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
6865 arguments. If RS6000COFF_C, only treat C_EXT and C_HIDEXT
6866 specially if this is the last aux entry.
6867 * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
6868 new arguments to swap_aux functions.
6869
4e810849
KR
6870Sun Jan 30 15:14:36 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
6871
6872 * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
6873 (only testing for m68k and vax at the moment); do verify that the
6874 preprocessor didn't trash the arch name inside the string version.
6875 Don't print out "pagesize =" line that prevents output from
6876 compiling. Derive BYTES_IN_WORD and ARCH values from sizeof
6877 results.
6878 * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
26b572e4
KR
6879 (check, installcheck): Identify directory in "no testsuites"
6880 message.
4e810849 6881
2edc8357
ILT
6882Sun Jan 30 13:25:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6883
6884 * aoutx.h (aout_link_write_symbols): Write out correct value for
6885 object file symbol.
6886
098630a0
KR
6887Fri Jan 28 18:34:05 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
6888
6889 * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
6890 KERNBASE, so hard-code 0x80000000 instead.
6891
c3156966
ILT
6892Thu Jan 27 13:54:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6893
6894 * linker.c (generic_link_add_symbol_list): If symbol is common,
6895 set the BSF_OLD_COMMON flag.
6896
d6d4e4c3
DM
6897Wed Jan 26 13:47:15 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6898
6899 * format.c (bfd_check_format_matches): Put the new entry in the
6900 correct element of matching_vector.
6901
09f70549
JK
6902Tue Jan 25 11:43:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
6903
6904 * som.c, som.h (bfd_som_set_section_attributes,
6905 bfd_som_set_subsection_attributes): Change parameters from char
6906 to int. Following a prototype with an old-style function definition
6907 in the presence of widened parameters is a GCC-ism not supported
6908 by the HP compiler in ANSI mode.
6909
a927c32d
ILT
6910Tue Jan 25 11:46:46 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6911
8638431e
ILT
6912 * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
6913
3b490cdd
ILT
6914 * hp300hpux.c (MY(write_object_contents)): Write out the symbols
6915 before writing out the relocs, so that the right symbol indices
6916 are used.
6917
71d58b59
ILT
6918 * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
6919 try to overlay the internal carsyms on the external symdefs. That
6920 can not work if the size of a host pointer is larger than 4 bytes.
6921
6922 * format.c (bfd_check_format_matches): Cast result of
6923 bfd_xmalloc_by_size_t.
6924 * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
6925
a927c32d
ILT
6926 * archive.c: Reindented to GNU standards.
6927
aabda2da
DM
6928Mon Jan 24 14:41:23 1994 David J. Mackenzie (djm@thepub.cygnus.com)
6929
f4bd7a8f
DM
6930 * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
6931 "_bfd_" to function names.
6932 * archive.c (_bfd_create_empty_archive_element_shell),
6933 libbfd-in.h: Change callers.
6934
6935 * libbfd.c (bfd_zmalloc): Renamed from zalloc.
6936 * libbfd.c (bfd_add_to_string_table),
6937 trad-core.c (trad_unix_core_file_p),
6938 targets.c (bfd_target_list),
6939 ptrace-core.c (ptrace_unix_core_file_p),
6940 opncls.c (new_bfd), libbfd-in.h,
6941 ieee.c (ieee_make_empty_symbol),
6942 elf32-hppa.c (hppa_elf_stub_branch_reloc),
6943 (hppa_elf_stub_reloc): Change callers.
6944 * libbfd.h: Regenerated.
6945
6946 * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
6947 (_bfd_get_elt_at_filepos),
6948 coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
6949 Change callers.
6950
6951 * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
6952 elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
6953 and default_vector to bfd_default_vector.
6954 * libbfd.h: Regenerated.
6955
aabda2da
DM
6956 * format.c (bfd_check_format_matches): New function.
6957 (bfd_check_format): Call it.
6958 (bfd_matching_formats): Function removed.
6959 * targets.c: Replace the vector added on Jan 21 with a count of
6960 entries in default_vector.
6961 * bfd-in2.h: Regenerated.
6962
ca1c6bec
ILT
6963Mon Jan 24 12:38:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
6964
3f048f7f
ILT
6965 * coff-alpha.c (alpha_ecoff_object_p): New function. Set size of
6966 .pdata section based on lnnoptr field, not section header.
6967 (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
6968 since it is unsigned.
6969 (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
6970 coff_object_p.
6971 * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
6972 .pdata section to 3.
6973 (ecoff_compute_section_file_positions): Save the size of the
6974 .pdata section in the line_filepos field, and actually align the
6975 .pdata section to an alignment power of 4.
6976 (ecoff_compute_reloc_file_positions): Set output_has_begun after
6977 calling ecoff_compute_section_file_positions.
6978 (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
6979 section from the line_filepos field. Set vstamp for the optional
6980 header from the vstamp of the symbolic header.
6981 (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
6982 vstamp used by the first object file in the link.
6983
6984 * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
6985
a20bdb43
ILT
6986 * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
6987 for a created common section.
6988 (_bfd_generic_link_add_one_symbol): Likewise.
6989
6990 * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
6991 get the index of a common section, rather than always using
6992 SHN_COMMON (MIPS has multiple common sections).
6993
7a60ed8c
ILT
6994 * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
6995
4991ebb9
ILT
6996 * bfd/aoutx.h (aout_link_input_section_std,
6997 aout_link_input_section_ext): Pass additional arguments to
6998 reloc_overflow callback.
6999 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
7000 alpha_relocat_section): Likewise.
7001 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
7002 * coff-h8500.c (extra_case): Likewise.
7003 * coff-mips.c (mips_relocate_section): Likewise.
7004 * coff-z8k.c (extra_case): Likewise.
7005 * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
7006 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7007
1cedfe03
ILT
7008 * bout.c (calljx_callback, callj_callback): Use get_value to get
7009 the symbol value and check for undefined symbols.
7010 (get_value): If the symbol is undefined, look it up in the linker
7011 hash table.
7012 (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
7013 use get_value to get the symbol value and check for undefined
7014 symbols.
7015 * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
7016 undefined, look it up in the linker hash table.
7017
ca1c6bec
ILT
7018 * aoutx.h (translate_symbol_table): The string index 0 has a
7019 special meaning for normal symbols, but not for dynamic symbols.
7020
3f2255e7
SG
7021Sat Jan 22 12:26:01 1994 Stu Grossman (grossman at cygnus.com)
7022
7023 * sparclynx.c: Setup appropriate macros to enable core file
7024 support.
7025
0f8f509c
DM
7026Fri Jan 21 16:25:35 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7027
3b31740c
DM
7028 * targets.c: Add a vector of matching format names.
7029 * format.c (bfd_matching_formats): New function to return it.
7030 (bfd_check_format): Set it.
7031 * bfd-in2.h: Regenerated.
7032
0f8f509c
DM
7033 * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
7034 Remove decl of type symclass; wasn't used.
7035 * bfd.c: Document error handling, including code fragments
7036 containing the error decls that were in bfd-in.h.
7037 Remove DEFUNs.
7038 * bfd-in2.h: Regenerated.
7039
27814aa6 7040Fri Jan 21 14:11:16 1994 Sean Fagan (sef@cygnus.com)
4733517b
JK
7041
7042 * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
7043 The sparc (and possibly other?) NLM format requires a different
7044 way to write exports, so add a write_export field to the backend
7045 data (and set it to NULL for everything but the sparc).
e7cc9a2e 7046
3f40d101
DM
7047Fri Jan 21 14:11:16 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
7048
e7cc9a2e
JK
7049 * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
7050 not (struct external_nlist *) NULL. info->dynrel is a PTR, not
7051 a struct external_nlist *.
7052
6de49562
DM
7053Fri Jan 21 09:29:01 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7054
74788cf0 7055 * bfd.c: Remove error strings for errors removed below.
6de49562
DM
7056 * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
7057 oasys.c (oasys_write_sections): Rename
7058 bfd_error_nonrepresentable_section to nonrepresentable_section.
7059 None of the other bfd error names start with "bfd_error".
7060 Remove errors symbol_not_found and no_relocation_info, which seem
7061 to be unused.
7062 * bfd-in2.h: Regenerated.
7063
0ee75d02
ILT
7064Fri Jan 21 01:11:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7065
fcc41f68
ILT
7066 * bfd.c (bfd_get_gp_size): Added support for ELF.
7067
0ee75d02
ILT
7068 * syms.c (BSF_DYNAMIC): New symbol flag.
7069 (bfd_print_symbol_vandf): Print it.
7070 * bfd-in2.h: Rebuilt.
7071 * libaout.h (struct aout_backend_data): New read_dynamic_symbols
7072 and read_dynamic_relocs fields.
7073 (struct aoutdata): New dynamic_info field.
7074 (obj_aout_dynamic_info): New accessor macro.
7075 * sunos.c (struct sunos_dynamic_info): New structure.
7076 (sunos_read_dynamic_info, MY(read_dynamic_symbols),
7077 MY(read_dynamic_relocs)): New functions to read dynamic symbols
7078 and relocs.
7079 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
7080 dynamically linked, set SEC_RELOC for both the .text and .data
7081 sections.
7082 (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
7083 undefined symbol.
7084 (translate_symbol_table): New function, split out of
7085 slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
7086 (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
7087 (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
7088 (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
7089 return value.
7090 * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
7091 out dynamic symbols or relocs against reloc symbols, since they
7092 are already in the .text section and we wouldn't know where to
7093 write them anyhow.
7094 (sunos4_aout_backend): Initialize read_dynamic_symbols and
7095 read_dynamic_relocs fields.
7096 * aout-target.h (MY(backend_data)): Initialize
7097 read_dynamic_symbols and read_dynamic_relocs fields.
7098
dc3da58f
KR
7099Thu Jan 20 20:57:27 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
7100
7101 * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
7102 typedefs, since HOST_64_BIT will take care of defining them in
7103 bfd.h.
7104
7e7fb4a8
KR
7105Wed Jan 19 17:28:59 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
7106
7107 * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
7108 that's dealt with elsewhere.
7109 * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
7110 (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
7111 they get copied to bfd.h.
7112
7113 * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
7114 types. Reorganized some of the existing ones.
7115 * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
7116 values in case of compilation on a 32-bit machine. Fix pcrel
7117 fields of some reloc types.
7118 (alpha_bfd_reloc_type_lookup): Handle more relocation types.
7119
7120 * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
7121 definitions when not defined, regardless of whether uint64_type is
7122 a defined macro or not.
7123 (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
7124 already defined.
7125
d7e34f67
ILT
7126Wed Jan 19 00:02:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7127
7128 * aoutx.h (translate_to_native_sym_flags): Set the type of a
7129 BSF_WARNING symbol to N_WARNING.
7130
53155af1
ILT
7131Tue Jan 18 16:43:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7132
7133 * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
7134 for an indirect or warning symbol.
7135 (aout_link_write_symbols): Update sym_hash with the target of an
3a5b50f4
ILT
7136 indirect or warning symbol. If an indirect symbol is defined,
7137 output the calculated value and don't output the target symbol.
53155af1 7138
0c205af2
DM
7139Tue Jan 18 03:54:59 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7140
7141 * aoutx.h (translate_from_native_sym_flags): Give warning symbols
7142 an (unused) nonzero section value, needed for check below.
7143
964affdc
DM
7144Mon Jan 17 15:12:07 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7145
7146 * aoutx.h (translate_from_native_sym_flags,
7147 aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
7148 N_SET[ABDT].
7149
38a5f510
ILT
7150Fri Jan 14 16:45:43 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7151
7152 * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
7153 the DYNAMIC flag for the BFD.
7154 (NAME(bfd_elf,write_object_contents)): Don't try to write out a
7155 BFD with the DYNAMIC flag set, since we don't generate the program
7156 header table correctly.
7157
7158Fri Jan 14 01:04:36 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
7159
7160 * elfcode.h (elf_slurp_symbol_table): Free x_symp at the end
7161 of the function to avoid storage leak.
7162
75919b3b
ILT
7163Thu Jan 13 23:07:32 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7164
7165 * ecoff.c (ecoff_link_write_external): An ifd can be -1.
7166
39961154
JL
7167Thu Jan 13 12:33:27 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
7168
9558d13f
JL
7169 * som.c (som_set_reloc_info): Provide a default symbol for
7170 relocations which don't actually have an associated symbol.
7171
39961154
JL
7172 * som.c (hppa_som_reloc): Add new "error message" argument.
7173
32476597
PS
7174Wed Jan 12 13:36:43 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
7175
7176 Enable gdb to write to core files on more core file readers.
7177 * libbfd.c (bfd_generic_set_section_contents): Remove range check
7178 for section size, it is already done in bfd_set_section_contents
7179 with bfd_get_section_size_now.
7180 * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
7181 osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
7182 Use bfd_generic_set_section_contents instead of bfd_false.
7183
92f345b9
ILT
7184Wed Jan 12 15:31:57 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7185
39961154
JL
7186 * linker.c: Added initial documentation.
7187
92f345b9
ILT
7188 * linker.c (default_indirect_link_order): Don't expect space for
7189 output relocations if there aren't any input relocations.
7190
fed872d3
ILT
7191Tue Jan 11 14:37:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7192
c5481a5e
ILT
7193 * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
7194 file offsets.
7195
fed872d3
ILT
7196 * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
7197 STT_NOTYPE.
7198
b36b8a6e
JK
7199Tue Jan 11 09:10:56 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
7200
7201 * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
7202 Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
7203
cf286547
ILT
7204Tue Jan 11 00:07:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7205
7206 * ecofflink.c: Extensive changes to compress and merge debugging
7207 information, and to write some of out directly rather than saving
7208 it in memory. Several new functions and structures, and new
7209 arguments to existing functions.
7210 * ecoff.c (ecoff_compute_reloc_file_positions): Compute
7211 sym_filepos as well.
7212 (ecoff_get_extr): Use ifdmap instead of ifdbase.
7213 (ecoff_write_object_contents): Don't compute sym_filepos here.
7214 Only output symbols if outsymbols is not NULL.
7215 (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
7216 bfd_ecoff_debug functions. Write out debugging information here.
7217 (ecoff_final_link_debug_accumulate): Adjust for changes in
7218 bfd_ecoff_debug functions.
7219 (ecoff_link_write_external): Use ifdmap rather than ifdbase.
7220 * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
7221 first, to put them in the first memory buffer. Clear fdr field.
7222 (mips_elf_get_extr): Use pointer to unswapped external symbol.
7223 (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
7224 Preserve .text, .data and .bss even if they are empty. Save
7225 pointer to unswapped external symbol rather than copying it.
7226 Don't free up the external symbols.
7227 * libelf.h (elf_symbol_type): Change mips_extr to PTR.
7228 * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
7229 (bfd_ecoff_debug_accumulate): Update declaration.
7230 (bfd_ecoff_debug_accumulate_other): Rename declaration from
7231 bfd_ecoff_debug_link_other and update.
7232 (bfd_ecoff_write_accumulated_debug): Declare.
7233 * bfd-in2.h: Rebuilt.
7234 * Makefile.in: Rebuilt dependencies.
7235
2c96ba79
JK
7236Mon Jan 10 20:46:53 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
7237
7238 * Makefile.in (install): Remove "@" which follows a backslash. In
7239 this position it just causes errors, not suppresses echoes.
7240
2304e1e8
JL
7241Mon Jan 10 09:06:21 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
7242
7243 * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
7244 field selectors.
7245
fb4cf140
KR
7246Sun Jan 9 04:32:25 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com)
7247
7248 * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
7249
d44b2ddb
DM
7250Fri Jan 7 10:27:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
7251
5330499f
DM
7252 * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
7253 end of data if they are not contiguous.
7254
d44b2ddb
DM
7255 * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
7256
a5a835ff
ILT
7257Fri Jan 7 15:40:16 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7258
7259 * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
7260 for .reginfo section here.
7261 (ecoff_new_section_hook): Set it here instead.
7262
442da995
SS
7263Fri Jan 7 10:29:27 1994 Stan Shebs (shebs@andros.cygnus.com)
7264
7265 * bfd-in.h: (bfd_boolean): Add workaround for systems that also
7266 define true and false as enums.
7267 (ALMOST_STDC): Add as alternative to __STDC__.
7268 * bfd-in2.h: Rebuilt.
7269 * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
7270
6f56c941
DM
7271Thu Jan 6 14:24:44 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7272
7273 * aoutx.h (translate_to_native_sym_flags): Catch the case where
7274 there is no output section.
7275
2f84ec0d
ILT
7276Thu Jan 6 14:37:42 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7277
90d58284
ILT
7278 * nlmcode.h (nlm_object_p): If we can't read the fixed header,
7279 count it as a wrong format error, not a system call error, since
7280 the object file might simply be too small.
7281
7282 * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
7283 BFD64.
7284 * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
7285 (BFD64_BACKENDS): Add nlm32-alpha.o. It depends on 64 bit
7286 support, even though it is for an Alpha in 32 bit mode.
7287 * configure.in (nlm32_alpha_vec): Set target64 to true.
7288
7289 * nlm32-gen.c, nlm64-gen.c: Removed. All nlm targets are
7290 different, so there is no point to providing a generic one.
7291 * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
7292 in the backend accessor macros; that should no longer be possible.
7293 * targets.c (target_vector): Removed nlm32_big_generic_vec,
7294 nlm64_big_generic_vec, nlm64_little_generic_vec.
7295 * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
7296 nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
7297 * Makefile.in: Rebuilt dependencies, and
7298 (BFD32_BACKENDS): Removed nlm32-gen.o.
7299 (BFD64_BACKENDS): Removed nlm64-gen.o.
7300 (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
7301
559d5074
ILT
7302 * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
7303
2f84ec0d
ILT
7304 * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
7305 bitsize arguments. Changed all callers (aoutx.h).
7306 * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
7307 and bitsize arguments to declaration.
7308 * libbfd.h: Rebuilt.
7309
7310 * ecoff.c: First cut at new style of linker backend for
7311 ECOFF--added a bunch of functions. Also:
7312 (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
7313 (ecoff_slurp_symbolic_header): New function.
7314 (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
7315 (ecoff_compute_reloc_file_positions): New function.
7316 (ecoff_set_section_contents): Get out quickly if count is zero.
7317 Check errors better.
7318 (ecoff_write_object_contents): Put .xdata section in data segment.
7319 Call ecoff_compute_reloc_file_positions. Don't output relocs or
7320 external symbols if outsymbols is NULL.
7321 (ecoff_bfd_final_link): Completely rewritten.
7322 * libecoff.h: Include bfdlink.h.
7323 (struct ecoff_backend_data): Add relocate_section field.
7324 (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
7325 (struct ecoff_link_hash_entry): Define.
7326 (struct ecoff_link_hash_table): Define.
7327 (ecoff_bfd_link_add_symbols): Declare as function, not macro.
7328 (ecoff_bfd_link_hash_table_create): Likewise.
7329 * ecofflink.c (bfd_ecoff_debug_one_external): New function.
7330 (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
7331 * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
7332 * bfd-in2.h: Rebuilt.
7333 * coff-alpha.c (alpha_howto_table): Mark BRADDR as
7334 partial_inplace, and set the src_mask to 0x1fffff.
7335 (alpha_ecoff_get_relocated_section_contents): Remove unused
7336 variable gp_warned.
7337 (alpha_convert_external_reloc): New static function.
7338 (alpha_relocate_section): New static function.
7339 (alpha_ecoff_backend_data): Initialize relocate_section field.
7340 * coff-mips.c (mips_relocate_refhi): New static function.
7341 (mips_relocate_section): New static function.
7342 (mips_ecoff_backend_data): Initialize relocate_section field.
7343
7344 * reloc.c (_bfd_relocate_contents): Corrected signed overflow
7345 checking when there is an addend.
7346
7347 * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
7348 a non a.out file, just pass it to _bfd_default_link_order.
7349 (aout_link_input_section_std): When doing a final PC relative link
7350 against a section symbol, subtract the VMA of the input section.
7351 (aout_link_input_section_ext): Likewise.
7352
7353 * linker.c (default_indirect_link_order): Renamed from
7354 _bfd_generic_indirect_link_order and made static.
7355 (_bfd_generic_final_link): Don't switch on link_order type, just
7356 call _bfd_default_link_order.
7357 (_bfd_default_link_order): Handle bfd_indirect_link_order type.
7358 * genlink.h: Removed declaration of
7359 _bfd_generic_indirect_link_order.
7360 * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
7361 type, just call _bfd_default_link_order.
7362
7363Tue Jan 4 21:23:37 1994 Ian Lance Taylor (ian@cygnus.com)
7364
7365 * linker.c (generic_link_check_archive_element): Base the name of
7366 the created common section on the name of the section the symbol
7367 came from.
7368 (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
7369 must have a section, so don't bother to create one.
7370
83acd9a2
DM
7371Mon Jan 3 15:32:16 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7372
7373 * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
7374 * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
7375 If the DYNAMIC flag is set, set it in the exec header.
7376 * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
7377 dynamically linked, set the DYNAMIC flag in the BFD.
7378 * libaout.h (N_SET_DYNAMIC): New macro.
7379 (N_DYNAMIC): Add missing 0 in mask.
7380
031534b0
ILT
7381Mon Jan 3 11:41:45 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7382
2f84ec0d
ILT
7383 * ecoff.c (ecoff_get_extr): Don't output section symbols as
7384 external symbols.
7385
85d73944
ILT
7386 * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
7387 to unsigned int, because size_t may not be defined in bfd.h.
7388 * bfd-in2.h: Rebuilt.
7389
8120aa8f
ILT
7390 * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
7391 be a const pointer.
7392 * bfd-in2.h: Rebuilt.
7393 * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
7394 be a const pointer.
7395 * targets.c (bfd_target): Change swap function pointers
7396 accordingly.
7397 * archive.c (do_slurp_coff_armap): Change swap accordingly.
7398 * aix386-core.c: Change NO_GET and NO_GETS accordingly.
7399 * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
7400 ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
7401 accordingly.
7402
b59f0276
ILT
7403 * libbfd-in.h (struct artdata): Added tdata field.
7404 (_bfd_add_bfd_to_archive_cache): Declare.
2af2b7c4 7405 (_bfd_get_elt_at_filepos): Declare.
b59f0276
ILT
7406 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
7407 * libbfd.h: Rebuilt.
7408 * archive.c: Cleaned up some more.
7409 (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
7410 pointer elements of artdata.
7411 (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
7412 (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
2af2b7c4
ILT
7413 (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
7414 (get_extended_arelt_filename, bfd_construct_extended_name_table,
7415 bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
b59f0276
ILT
7416 * ecoff.c: Some comment changes.
7417 (ecoff_slurp_armap): Handle rename of snarf_ar_hdr. Set
7418 ardata->tdata to raw_armap.
7419 (ecoff_archive_p): Initialize pointer elements of artdata.
7420 * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
7421 add_bfd_to_cache.
7422
031534b0
ILT
7423 * hash.c: Added some documentation.
7424
3f99570e
JK
7425Mon Jan 3 11:09:28 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
7426
7427 * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
7428 and do the swapping here rather than calling ntohl from the N_*
7429 macros. This cleans up assumptions about the size of a host long,
7430 the existence to ntohl, etc.
7431
e38bcbdb
RS
7432Sat Jan 1 13:50:05 1994 Rob Savoye (rob@darkstar.cygnus.com)
7433
7434 * config.bfd: Add support for VSTa micro-kernel. It currently uses
7435 i386-aout.
7436
f4d7c848
DM
7437Sat Jan 1 10:18:54 1994 David J. Mackenzie (djm@thepub.cygnus.com)
7438
00fe3f53 7439 * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
f4d7c848
DM
7440 * i386mach3.c (SEGMENT_SIZE): Fix value.
7441
728472f1
ILT
7442Fri Dec 31 16:23:43 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7443
7444 Minor cleanups suggested by CodeCenter.
7445 * aoutx.h, coffgen.c, ecoff.c, ecofflink.c, elf.c, libbfd.c,
7446 linker.c, reloc.c, section.c, srec.c: Added /*ARGSUSED*/ as
7447 appropriate.
7448 * aoutx.h (struct external_exec): Removed unnecessary declaration.
7449 (NAME(aout,some_aout_object_p)): Set some tdata pointers to NULL.
7450 (adjust_z_magic): Removed useless variable data_vma.
7451 (stringtab_init): Initialize hash_zero.
7452 (add_to_stringtab): Removed unused fourth argument.
7453 (NAME(aout,swap_std_reloc_out)): Removed useless variable
7454 r_addend.
7455 (aout_link_input_section): Added some casts.
7456 * archive.c (get_extended_arelt_filename, do_slurp_coff_armap,
7457 bfd_ar_hdr_from_filesystem, bsd_write_armap, coff_write_armap):
7458 Minor code rewriting to make it more C like.
7459 (do_slurp_bsd_armap): Added some casts.
7460 * ecoff.c (ecoff_write_object_contents): Removed useless variable
7461 scn_base.
7462 (ecoff_write_armap): Added some casts. Use "" rather than "\0".
7463 * ecofflink.c (bfd_ecoff_write_debug): Added a cast.
7464 * libaout.h (struct internal_exec): Removed unnecessary
7465 declaration.
7466 * linker.c (_bfd_generic_indirect_link_order): Added a cast.
7467 * opncls.c (new_bfd): Removed a cast.
7468 * reloc.c (bfd_generic_get_relocated_section_contents): Added
7469 some casts.
7470 * srec.c (internal_srec_write_object_contents): Removed useless
7471 variable bytes_written.
7472
696df58f
DM
7473Fri Dec 31 11:46:13 1993 David J. Mackenzie (djm@thepub.cygnus.com)
7474
7475 * i386mach3.c (N_TXTADDR): Don't define after all.
7476 (TEXT_START_ADDR): Don't include exec header size in value.
7477
e450eb45
DM
7478Thu Dec 30 15:47:54 1993 David J. Mackenzie (djm@thepub.cygnus.com)
7479
7480 * i386mach3.c (N_TXTADDR): Define.
7481
4c3721d5
ILT
7482Thu Dec 30 13:37:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7483
7484 Extensive changes to move the bulk of the linker into BFD so that
7485 more efficient backend code can be written for specific object
7486 files. Only existing efficient backend is a.out.
7487 * seclet.c, seclet.h: Removed.
7488 * hash.c, linker.c, genlink.h: New files.
7489 * bfd-in.h: Removed bfd_error_vector. Declared hash table
7490 structures and functions.
7491 (JUMP_TABLE): Removed bfd_seclet_link, added
7492 bfd_link_hash_table_create, bfd_link_add_symbols and
7493 bfd_final_link.
7494 * All backends: Changed accordingly.
7495 * bfd-in2.h: Rebuilt.
7496 * bfd.c (struct _bfd): Added link_next and archive_pass fields.
7497 Removed ld_symbols field.
7498 (bfd_nonrepresentable_section, bfd_undefined_symbol,
7499 bfd_reloc_value_truncated, bfd_reloc_is_dangerous,
7500 bfd_error_vector): Removed.
7501 (bfd_default_error_trap, bfd_error_trap,
7502 bfd_error_nonrepresentabltrap): Removed.
7503 (bfd_get_relocated_section_contents): Pass link_info. Pass
7504 link_order instead of seclet. Pass symbols.
7505 (bfd_relax_section): Pass link_info.
7506 (bfd_seclet_link): Removed.
7507 (bfd_link_hash_table_create, bfd_link_add_symbols,
7508 bfd_final_link): New macros.
7509 * libbfd-in.h: If __GNUC__ is defined and alloca is not, define
7510 alloca as __builtin_alloca. Declare internal linking functions.
7511 * libbfd.h: Rebuilt.
7512 * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked
7513 for months.
7514 * reloc.c (reloc_howto_type): Added error_message argument to
7515 special_function field. Changed all callers and all definitions.
7516 (bfd_get_reloc_size): Make argument a const pointer.
7517 (bfd_perform_relocation): Add error_message argument to hold
7518 string set if return value if bfd_reloc_dangerous. Changed all
7519 callers.
7520 (_bfd_final_link_relocate, _bfd_relocate_contents): New functions.
7521 * section.c (asection): Renamed seclets_head and seclets_tail to
7522 link_order_head and link_order_tail.
7523 * targets.c (bfd_target): Replaced seclet argument with link_info
7524 and link_order and symbols arguments in
7525 bfd_get_relocated_section_contents. Added symbols argument to
7526 bfd_relax_section. Removed bfd_seclet_link. Added
7527 bfd_link_hash_table_create, bfd_link_add_symbols and
7528 bfd_final_link.
7529 * libaout.h (struct aoutdata): Added external_syms,
7530 external_sym_count, external_strings, sym_hashes fields.
7531 (obj_aout_external_syms, obj_aout_external_sym_count,
7532 obj_aout_external_strings, obj_aout_sym_hashes): New accessor
7533 macros.
7534 (WRITE_HEADERS): Only output symbols if outsymbols is not NULL.
7535 * aoutx.h: Wrote new back end linker routines.
7536 (translate_to_native_sym_flags): Return boolean value. Don't use
7537 bfd_error_vector.
7538 (NAME(aout,write_syms)): Return boolean value. Check return value
7539 of translate_to_native_sym_flags and bfd_write.
7540 * aout-target.h (final_link_callback): New function.
7541 (MY_bfd_final_link): New function.
7542 * aout-adobe.c (aout_adobe_write_object_contents): Check return
7543 value of aout_32_write_syms.
7544 * hp300hpux.c (MY(write_object_contents)): Likewise.
7545 * i386lynx.c (WRITE_HEADERS): Likewise.
7546 * libaout.h (WRITE_HEADERS): Likewise.
7547 * bout.c: Changed functions to use link_info->callbacks rather
7548 than bfd_error_vector, and link_orders rather than seclets.
7549 * coff-alpha.c: Likewise.
7550 * coff-h8300.c: Likewise.
7551 * coff-h8500.c: Likewise.
7552 * coff-sh.c: Likewise.
7553 * coff-z8k.c: Likewise.
7554 * elf32-hppa.c: Likewise.
7555 * reloc16.c: Likewise.
7556 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look
7557 up _gp in the hash table rather than in outsymbols.
7558 * coff-a29k.c (a29k_reloc): Pass errors back in new error_message
7559 argument rather than printing them.
7560 * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and
7561 link_order arguments rather than seclet. Changed all uses and
7562 definitions.
7563 (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed
7564 all uses and definitions.
7565 * libcoff.h: Rebuilt.
7566 * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but
7567 not by ECOFF, make it scAbs.
7568 (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and
7569 rewritten.
7570 * elf32-mips.c (mips_elf_final_link): Renamed from
7571 mips_elf_seclet_link and rewritten.
7572 * elf32-hppa.c (elf32_hppa_stub_description): Added link_info
7573 field.
7574 (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub,
7575 hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section):
7576 Added link_info arguments. Changed all callers.
7577 * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is
7578 not NULL.
7579 * oasys.c (oasys_write_sections): Return boolean value rather than
7580 using bfd_error_vector.
7581 (oasys_write_object_contents): Check return value of
7582 oasys_write_sections.
7583 * hosts/std-host.h: Don't declare qsort or strtol.
7584 * Makefile.in: Rebuild dependencies.
7585 (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o.
7586 (CFILES): Removed seclet.c. Added hash.c and linker.c.
7587 (HFILES): Removed seclet.h. Added genlink.h.
7588
1adbf662
PS
7589Thu Dec 30 07:41:36 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
7590
7591 * section.c (bfd_get_section_contents): Return zero filled buffer
7592 if section has no contents.
7593
d1b44e83
ILT
7594Tue Dec 28 12:43:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7595
7596 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,
7597 then skip bfd_perform_relocation even if the addend is non-zero.
7598
a2805287
KR
7599Tue Dec 21 09:22:19 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
7600
7601 * coffcode.h (coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy
7602 addend to r_offset field.
7603
7604 * Makefile.in (CFILES): Added coff-sparc.c. Rebuild dependencies.
7605
7606 * coff-sparc.c (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET,
7607 CALC_ADDEND): Define.
7608
7609 * aix386-core.c (aix386_core_file_p): Use cd_regs[0] for computing
7610 the offsetof because AIX /bin/cc does not like to take the address
7611 of an array. (From Minh Tran-Le.)
7612
277b2d2b
JL
7613Thu Dec 16 13:06:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7614
a2805287
KR
7615 * Thu Dec 16 15:41:06 1993 Peter Hoogenboom (hoogen@cs.utah.edu)
7616
7617 * elf32-hppa.c (hppa_elf_build_arg_reloc_stub): Make sure to copy
7618 the return pointer into %r2 if no jump-in-call-delay-slot
7619 optimization was done.
7620
277b2d2b
JL
7621 * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.
7622
f8af9b40
DM
7623Wed Dec 15 08:04:16 1993 David J. Mackenzie (djm@thepub.cygnus.com)
7624
7625 * hosts/std-host.h: (time): Don't declare; conflicts on Mach3.
7626
7627 * hosts/i386mach3.h (HOST_PAGE_SIZE): Set to 1 to avoid padding.
7628 (HOST_SEGMENT_SIZE): Set to 0 for same reason.
7629
7630 * i386mach3.c (PAGE_SIZE, SEGMENT_SIZE): Same changes as above.
7631 (TEXT_START_ADDR): Correct.
7632 (MY_backend_data): Define.
7633
7634 * aoutx.h (adjust_o_magic, adjust_z_magic, adjust_n_magic):
7635 New functions; code moved from aout_<size>_adjust_sizes_and_vmas.
7636
c97ae6e4
JL
7637Tue Dec 14 21:48:33 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7638
7639 * som.c (som_begin_writing): Fix thinkos in auxiliary header
7640 support.
7641 (bfd_som_attach_aux_hdr): Likewise.
7642
a36b6f1d
JL
7643Mon Dec 13 23:34:48 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7644
7645 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' field
7646 selectors for PIC code.
7647
7648 * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors.
7649 (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL
7650 relocations needed by PIC.
7651
9e6f2498
SG
7652Tue Dec 7 15:47:51 1993 Stu Grossman (grossman at cygnus.com)
7653
7654 * nlmcode.h: Fixes to avoid compiler warnings...
7655
900e6d96
ILT
7656Tue Dec 7 15:10:54 1993 Ian Lance Taylor (ian@cygnus.com)
7657
7658 * libnlm.h (nlm_backend_data): Removed macro definition.
7659 (nlm_alpha_backend_data): Adjusted accordingly.
7660
017a52d7
JL
7661Sun Dec 5 19:32:08 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7662
f6c2300b
JL
7663 * som.c (som_begin_writing): Flesh out code for handling simple
7664 auxiliary headers.
7665 (bfd_som_attach_aux_hdr): New function.
7666
7667 * som.h (struct somdata): Add fields for attaching version and
7668 copyright headers. Add accessor macros.
7669
744069b8
JL
7670 * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protected
7671 definitions for old versions of HPUX which fail to define them.
7672 (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT
7673 now that they're safe. Delete bogus R_STATEMENT relocations.
7674
017a52d7
JL
7675 * som.c (som_hppa_howto_table): Add missing R_END_TRY. Delete
7676 extra R_DATA_OVERRIDE.
7677 (hppa_som_gen_reloc_type): Generate a relocation for the rounding
7678 mode selector if needed.
7679 (som_write_fixups): Handle requests for a change in the default
7680 rounding mode. Rounding modes do not consume input bytes, but
7681 are just markers much like R_ENTRY and R_EXIT.
7682
48eb5281
JL
7683Sat Dec 4 19:40:32 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7684
7685 Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)
7686
017a52d7
JL
7687 * elf32-hppa.c: (hppa_elf_reloc): Do not do code reordering when
7688 the branch instruction as originally been nullified.
7689 hppa_elf_reloc): Avoid useless call to bfd_put_32 () in the
7690 case of no code reordering due to an LDO instruction in the
7691 delay slot of the branch. Make sure to relocate the correct
7692 instruction. Do not perform instruction reordering for millicode
7693 calls.
7694 (hppa_elf_build_arg_reloc_stub): Change the relocation type
7695 to R_HPPA_STUB_CALL_17 when special processing might be needed.
7696 (hppa_elf_build_long_branch_stub): Prevent code reordering on
7697 a call from a linker stub to another linker stub and for millicode
7698 calls. Do not trash the return register for calls from one linker
7699 stub to a second linker stub.
7700
4861ac76
JL
7701 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLT
7702 relocations are not pc-relative.
7703
48eb5281
JL
7704 * hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in
7705 linker stub code.
7706 (COPY_2_31): Likewise.
7707
ecb2d887
ILT
7708Fri Dec 3 18:40:58 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7709
7710 * config/solaris2.mh (HDEFINES): Remove -Dconst=
7711 * hosts/solaris.h: If not __GNUC__, define const as empty.
7712
800748cd
ILT
7713Thu Dec 2 15:43:32 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7714
4919d3ab
ILT
7715 * ecoff.c: Added various casts for 32/64 bit cross targeting.
7716 (ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo
7717 section so that the linker ignores it.
7718 * ecofflink.c: Added various casts for 32/64 bit cross targeting.
7719 (ecoff_add_bytes): Changed need argument to size_t.
7720 (bfd_ecoff_debug_link_other): Check return value of
7721 ecoff_add_string.
7722
7723 * libbfd-in.h (new_bfd): Use void rather than an empty parameter
7724 list.
7725 * libbfd.h: Rebuilt.
7726
800748cd
ILT
7727 * libnlm.h (struct nlm_obj_tdata): New field backend_data.
7728 (nlm_backend_data, nlm_alpha_backend_data): New accessor macros.
7729 (struct nlm_backend_data): New field no_uninitialized_data.
7730 (nlm_no_uninitialized_data): New accessor macro.
7731 * nlmcode.h (nlm_compute_section_file_positions): Handle
7732 no_uninitialized_data.
7733 (nlm_external_reloc_compare): Sort relocs by address for a
7734 particular symbol, to make the sort more stable.
7735 (nlm_write_object_contents): Cast the arguments to qsort. Get the
7736 value of a debugging symbol the same way we get the value of a
7737 normal symbol.
7738 * nlm32-alpha.c: Various changes. Write out GP and .lita relocs.
7739 Set no_uninitialized_data to true.
7740 * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c
7741 (nlm32_sparc_backend): Set no_uninitialized_data field false.
7742 * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination
7743 before filling it in.
7744
a7f6a456
JL
7745Wed Dec 1 21:47:58 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7746
7747 * som.c (som_section_type, som_decode_symcalss): New functions.
7748 (som_get_symbol_info): Use them.
7749 (som_slurp_symbol_table): Set the section of common and undefined
7750 symbols correctly.
7751
848ace96
KR
7752Wed Dec 1 14:15:10 1993 Ken Raeburn (raeburn@cygnus.com)
7753
7754 * elfcode.h (write_relocs): Initialize local var LAST_SYM_IDX, to
7755 make gcc happy.
7756
7757 * mipsbsd.c: Changes from Ralph Campbell:
7758 (mips_howto_table_ext): MIPS_RELOC_LO16 should use
7759 complain_overflow_dont.
7760 (aout_mips_*_vec): Make name use "a.out" instead of "aout", to
7761 make gdb happy.
7762
7763 * bfd.c (bfd_errmsgs): Reword invalid-target message.
7764
7765 * config.bfd: For sparc*-*-coff, use sparc-coff.
7766 * configure.in: Handle sparccoff_vec.
7767 * targets.c (sparccoff_vec): Declare.
7768
7769 * reloc.c (bfd_get_reloc_size): New function.
7770 (struct reloc_howto_type): Update documentation of size field.
7771
2f555d79
ILT
7772Wed Dec 1 14:39:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7773
68eaffda
ILT
7774 * nlm32-alpha.c: New file; preliminary Alpha NetWare support.
7775 * config.bfd (alpha-*-netware*): New target; use alpha-nlm.
7776 * config/alpha-nlm.mt: New file.
7777 * configure.in (nlm32_alpha_vec): New vector; use nlm32-alpha.o,
7778 nlm32.o, and nlm.o.
7779 * Makefile.in (BFD32_BACKENDS): Added nlm32-alpha.o.
7780 (CFILES): Added nlm32-alpha.c.
7781 Rebuilt dependencies.
7782 * targets.c (nlm32_alpha_vec): Declare.
7783
7784 * libnlm.h (struct nlm_backend_data): New fields
7785 optional_prefix_size, nlm_backend_object_p, nlm_write_prefix,
7786 nlm_set_public_section, nlm_get_public_offset. Removed unused
7787 nlm_write_reloc field. Changed nlm_write_import to remove
7788 unnecessary symbol argument. Renamed nlm_write_externals to
7789 nlm_write_external, and changed cound argument from bfd_vma to
7790 bfd_size_type.
7791 (nlm_optional_prefix_size, nlm_backend_object_p_func,
7792 nlm_write_prefix_func, nlm_set_public_section_func,
7793 nlm_get_public_offset_func): New accessor macros.
7794 (nlm_write_reloc_func): Removed.
7795 (nlm_write_external_func): Adjusted for field renaming.
7796 * nlm32-i386.c (nlm_i386_write_import): Renamed from
7797 nlm_i386_write_reloc. Removed old nlm_i386_write_import which
7798 just called old nlm_i386_write_reloc.
7799 (nlm_i386_write_external): Renamed from nlm_i386_write_externals.
7800 Declared. Changed second argument from bfd_vma to bfd_size_type.
7801 (nlm32_i386_backend): Adjusted for changes to fields and names.
7802 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused,
7803 ifdeffed out code.
7804 (nlm_sparc_write_import): Removed second argument.
7805 (nlm_sparc_write_external): Renamed from
7806 nlm_sparc_write_externals. Changed second argument from bfd_vma
7807 to bfd_size_type.
7808 (nlm32_sparc_backend): Adjusted for changes to fields and names.
7809 * nlmcode.h: Removed some unused code.
7810 (nlm_object_p): Don't destroy tdata pointer. Call
7811 backend_object_p function if it exists.
7812 (nlm_slurp_symbol_table): Removed unused variable rcount. Call
7813 set_public_section_func if it exists instead of checking
7814 NLM_HIBIT.
7815 (nlm_compute_section_file_positions): Account for
7816 optional_prefix_size.
7817 (nlm_write_object_contents): Account for optional_prefix_size.
7818 Removed useless variable write_reloc_func. Changed declaration
7819 and call of write_import_func. Call write_prefix_func if it
7820 exists. Removed unused variables len and temp. Call
7821 get_public_offset_func if it exists rather than setting NLM_HIBIT.
7822 * nlmswap.h: Declare functions.
7823
2f555d79
ILT
7824 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesize
7825 for clarity.
7826 (fprintf_vma, sprintf_vma): Use %lx, not %x.
7827 * bfd-in2.h: Rebuilt.
7828 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast results
7829 to unsigned long.
7830
7831 * config.bfd: Don't set target64 here, as the setting is ignored.
7832 * configure.in (ecoffalpha_little_vec): Set target64.
7833
7834 * config/alphaosf.mt (TDEFINES): Removed; setting host parameters
7835 in TDEFINES is wrong.
7836
7837 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
7838 Remove unused variable output_section.
7839
7cd39d69
ILT
7840Tue Nov 30 16:45:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7841
7842 * irix-core.c: New file for Irix 4 and Irix 5 core support.
7843 Functions taken out of coff-mips.c. Handle vmap type VMAPFILE.
7844 * coff-mips.c: Irix 4 core file support moved to irix-core.c.
7845 * targets.c: If IRIX_CORE defined, include irix_core_vec in
7846 target_vector.
7847 * config/irix4.mh (HDEFINES): Add -DIRIX_CORE.
7848 (HDEPFILES): Define to be irix-core.o.
7849 * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE.
7850 (HDEPFILES): Define to be irix-core.o.
7851 * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed
7852 sco-core.o, which no longer exists.
7853 (CFILES): Added all *-core.c files.
7854 Rebuilt dependencies.
7855
8d12f138
ILT
7856Wed Nov 24 02:02:41 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7857
6c35a16d
ILT
7858 * elfcode.h (map_program_segments): Restore check of file_size !=
7859 mem_size, but only if SHT_PROGBITS.
7860
8d12f138
ILT
7861 * ecofflink.c: New file to hold ECOFF debug information linking
7862 routines.
7863 * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet,
7864 ecoff_add_string, ecoff_get_debug): Removed. Functionality now in
7865 ecofflink.c.
7866 (ecoff_get_extr, ecoff_set_index): New functions.
7867 (ecoff_slurp_symbolic_info): Don't save raw_size.
7868 (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions.
7869 (ecoff_compute_section_file_positions): Don't set EXEC_P just
7870 because there is a start address.
7871 (ecoff_write_object_contents): Handle external symbols here. Use
7872 ecofflink.c functions to write out debugging information.
7873 * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr,
7874 mips_elf_set_index): New functions.
7875 (mips_elf_seclet_link): Discard empty sections, the .options
7876 section and .gptab sections. Handle linking .mdebug section.
7877 * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase.
7878 * libelf.h (elf_symbol_type): Added mips_extr to tc_data union.
7879 * bfd-in.h: Added prototypes for routines in ecofflink.c (some are
7880 called by gas, so they are public).
7881 * bfd-in2.h: Rebuilt.
7882 * Makefile.in (BFD_LIBS): Added ecofflink.o.
7883 (CFILES): Added ecofflink.c.
7884 (ecofflink.o): New target. Rebuilt dependencies.
7885
abb324b2
JL
7886Mon Nov 22 22:26:42 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7887
7888 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX as
7889 a valid magic number if it's been defined.
7890
8f45f604
ILT
7891Mon Nov 22 14:17:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7892
7893 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linker
7894 no longer requires it.
7895 (ecoff_bfd_seclet_link, ecoff_sizeof_headers,
7896 ecoff_write_object_contents): Don't treat .scommon section
7897 specially.
7898
c236d8b3
FF
7899Mon Nov 22 10:54:27 1993 Fred Fish (fnf@cygnus.com)
7900
7901 Merged changes from kev@spuds.geg.mot.com (Kevin A. Buettner):
7902 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
7903 * bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
7904 * bfd/ptrace-core.c: New file for dealing with core files with
7905 start with the ptrace_user structure found on BCS compliant systems.
7906 * bfd/targets.c (ptrace_core_vec): New vector.
7907
36456a67
JL
7908Mon Nov 22 02:33:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
7909
7910 * Minimal support for reading SOM fixup streams. Allows
7911 objdump -r to do something reasonable.
7912 * som.c (som_get_reloc_upper_bound): Implement.
7913 (som_canonicalize_reloc): Implement.
7914 (som_set_reloc_info, som_slurp_reloc_table): New functions.
7915
8d12f138
ILT
7916Sun Nov 21 13:46:55 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
7917
7918 * hosts/lynx.h (FPRINTF_ALREADY_DECLARED): Define.
7919 * hosts/sparclynx.h: Include lynx.h instead of duplicating it.
7920
a1bff336
ILT
7921Fri Nov 19 14:34:04 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7922
533af031
ILT
7923 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shift
7924 signed_value before sign extending it. Don't subtract out
7925 reloc_entry->address. This makes it compatible with what gas is
7926 generating.
7927
a1bff336
ILT
7928 * elfcode.h (elf_fake_sections): Accept .sbss as the name for a
7929 SHT_NOBITS sections.
7930 (map_program_segments): Don't leave the loop after the first
7931 SHT_NOBITS section.
7932 (assign_file_positions_except_relocs): Only force sh_offset and
7933 sh_addr to match modulo maxpagesize for a section which is not
7934 SHT_NOBITS. Changed the method used to force page alignment after
7935 a SHT_NOBITS section to only do it for the last such consecutive
7936 section, and to really force page alignment.
7937
96be1f52
KR
7938Fri Nov 19 04:02:01 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
7939
4c01d9b5
KR
7940 * coffcode.h (coff_slurp_symbol_table): Print more verbose message
7941 in the case of an unknown (or unhandled) storage class.
7942
96be1f52
KR
7943 * config/i386-lynx.mt (TDEFINES): FPRINTF_ALREADY_DECLARED should
7944 not be defined here, since it is a host attribute, not a target
7945 one.
7946 * config/m68k-lynx.mt, config/sparc-lynx.mt: Ditto.
7947
7948 * coffcode.h (coff_bfd_reloc_type_lookup): Don't define if already
7949 defined.
7950
7951 * coff-sparc.c: Define some relocations, based on ELF relocations.
7952 (enum reloc_type, bfd_coff_generic_reloc, coff_sparc_howto_table,
7953 struct coff_reloc_map, sparc_reloc_map,
7954 coff_sparc_reloc_type_lookup): Borrowed from elf32-sparc.c and
7955 elf.c, renamed.
7956 (coff_bfd_reloc_type_lookup): Define to be coff_sparc_reloc_....
7957 (rtype2howto): Index into coff_sparc_howto_table using
7958 dst->r_type.
7959
f8944f84
ILT
7960Thu Nov 18 11:45:39 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
7961
7962 * config.bfd (mips*-*-irix5*): New target; use mipsbelf.
7963 * configure.host (mips-sgi-irix5*) New host; use irix5 (no
7964 hosts/irix5.h created; just use std-host.h).
7965 * config/irix5.mh: New file; like irix4.mh, but don't use -G or
7966 -lmalloc.
7967 * Makefile.in: Rebuilt dependencies.
7968
7969 * ecoffswap.h: Changed type of internal pointers for swap out
7970 functions to const *.
7971
7972 * elf32-mips.c (mips_elf_got16_reloc): New function. Handle GOT16
7973 correctly for assembler, but linker support not implemented.
7974 (elf_mips_howto_table): Use mips_elf_got16_reloc for GOT16.
7975 (mips_elf_sym_is_global): New function; at least on Irix 5, all
7976 non section symbols are considered global.
7977 (elf_backend_sym_is_global): Define.
7978 (mips_elf_final_write_processing): New function. Set the MIPS
7979 architecture level correctly.
7980 (elf_backend_final_write_processing): Define.
7981 (mips_elf_section_from_shdr): Handle SHT_MIPS_OPTIONS.
7982 (mips_elf_fake_sections): Set entsize of .mdebug or .reginfo
7983 section to 1. Handle .options section.
7984 (mips_elf_acom_section, mips_elf_acom_symbol,
7985 mips_elf_acom_symbol_ptr): New static variables, used to build a
7986 generic .acommon section to hold SHN_MIPS_ACOMMON symbols.
7987 (mips_elf_symbol_processing): Handle SHN_MIPS_ACOMMON symbols by
7988 putting them all in a global .acommon section.
7989
7990 * elfcode.h (bfd_section_from_shdr): Don't dump core if target
7991 section has no ELF section data.
7992 (elf_make_sections): Set addralign of reloc section to 4.
7993 (elf_fake_sections): Likewise.
7994 (map_program_segments): Don't consider section 0.
7995 (assign_file_positions_except_relocs): Don't consider section 0.
7996 In the main loop, skip the symtab and strtab sections, since their
7997 positions are set elsewhere.
7998 (swap_out_syms): Set addralign of symtab section to 4. Set
7999 addralign of strtab sections to 1.
8000 (assign_file_positions_for_relocs): Don't consider section 0.
8001 (write_object_contents): Don't write out section 0.
8002
8003 * libelf.h (struct elf_backend_data): Added fields
8004 elf_backend_sym_is_global and elf_backend_final_write_processing.
8005 * elf32-target.h (elf32_bed): Added corresponding initializers.
8006 * elf64-target.h (elf64_bed): Likewise.
8007 * elfcode.h (sym_is_global): Take abfd argument. Call
8008 elf_backend_sym_is_global if it is not NULL.
8009 (elf_map_symbols): Pass abfd to sym_is_global.
8010 (write_object_contents): Call elf_backend_final_write_processing
8011 if it is defined.
8012
c9668c58
ILT
8013Wed Nov 17 18:43:28 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
8014
8015 * libecoff.h: Include coff/ecoff.h.
8016 (struct ecoff_backend_data): Move external debugging information
8017 fields into a single field pointing to an ecoff_debug_swap
8018 structure.
8019 (ecoff_data_type): Move debugging information fields into a single
8020 field pointing to an ecoff_debug_info structure.
8021 * coff-alpha.c, coff-mips.c, ecoff.c: Corresponding changes.
8022
2f555d79
ILT
8023Wed Nov 17 17:38:58 1993 Sean Eric Fagan (sef@cygnus.com)
8024
8025 * nlmswap.h: New file to swap fixed header. Included by NLM
8026 backends.
8027 * libnlm.h (struct reloc_and_sec): Define.
8028 (struct nlm_backend_data): Add fields fixed_header_size,
8029 nlm_read_import, nlm_write_import, nlm_swap_fhdr_in,
8030 nlm_swap_fhdr_out.
8031 (nlm_fixed_header_size, nlm_read_import_func,
8032 nlm_write_import_func, nlm_swap_fixed_header_in_func,
8033 nlm_swap_fixed_header_out_func, nlm_write_external_func): New
8034 accessor macros.
8035 * nlmcode.h: Use new functions.
8036 * nlm32-i386.c: Provide new functions.
8037 * nlm32-sparc.c: New file; SPARC NLM backend.
8038
55ff7aef
SS
8039Wed Nov 17 13:56:10 1993 Stan Shebs (shebs@rtl.cygnus.com)
8040
8041 * i386lynx.c (swap_std_reloc_in, swap_ext_reloc_in): Ignore
8042 garbage bits appearing in the upper end of symbolnums.
8043
8044 * config/sparc-lynx.mt (TDEFINES): Add -DFPRINTF_ALREADY_DECLARED.
8045
343c1a96
SG
8046Tue Nov 16 17:03:41 1993 Stu Grossman (grossman at cygnus.com)
8047
8048 * lynx-core.c (lynx_core_file_p): Change bfd_zalloc to bfd_alloc.
8049 * m68klynx.c: Define core file macros.
8050 * hosts/i386lynx.h, hosts/m68klynx.h, hosts/lynx.h: Move all
8051 non-architecture specific stuff into lynx.h.
8052
794057a7
JK
8053Tue Nov 16 15:45:54 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
8054
8055 * i386linux.c: Define new macro ZMAGIC_DISK_BLOCK_SIZE to 1024, and
8056 change PAGE_SIZE to 4096.
8057
8058Mon Nov 15 11:48:08 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
8059
8060 * Makefile.in (diststuff): New target.
8061
8062 * VERSION: Updated.
8063
09796011
JL
8064Sun Nov 14 23:33:01 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
8065
3be54498
JL
8066 * som.c (som_object_setup): Do not create dummy ".text", ".data",
8067 and ".bss" sections.
8068 (setup_sections): Do not set SEC_HAS_CONTENTS if a section's size
8069 is zero. Recognize BSS type sections and turn off SEC_LOAD and
8070 SEC_DATA (so binutils/size works). Set the correct value for
8071 a section's _raw_size.
8072 (som_slurp_symbol_table): Program entry points, and millicode are
8073 also functions. Mark them as such. Also mark L$* symbols as
8074 debugging symbols.
8075
09796011
JL
8076 * bfd-in2.h: Rebuilt.
8077
aff97790
JL
8078Sat Nov 13 15:27:15 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
8079
91c0bcbb
JL
8080 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. Returns
8081 a pointer to constant data. Delete bogus #define which made the
8082 function useless.
8083
aff97790 8084 * som.c (som_prep_for_fixups): New function.
9d0dea6f 8085 (som_write_fixups): New function.
0b35f7ec 8086 (som_write_space_strings): New function.
6eb64408
JL
8087 (som_write_symbol_strings): New function.
8088 (som_begin_writing): New function.
aff97790 8089
40249bfb
JL
8090Fri Nov 12 15:29:36 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
8091
980bac64
JL
8092 * som.c (som_write_object_contents): Do not abort. Flesh out.
8093 (som_set_section_contents): Do not abort. Flesh out.
8094
efc0df7c
JL
8095 * som.c (som_write_headers): New function.
8096 (som_prep_headers): New function.
713de7ec 8097 (som_build_and_write_symbol_table): New function.
7057b78f 8098
2212ff92
JL
8099 * som.c (som_sizeof_headers): Add missing prototype.
8100 (som_set_arch_mach): Do not abort.
8101
5532fc5a
JL
8102 * som.c (som_count_spaces): New function.
8103 (som_count_subspaces): New function.
8104 (compare_syms): New function.
8105 (som_compute_checksum): New function.
8106
32619c58
JL
8107 * som.c (hppa_som_gen_reloc_type): New function.
8108 (som_bfd_reloc_type_lookup): New function.
8109
54bbfd37
JL
8110 * som.c (try_prev_fixup): New function.
8111 (som_reloc_skip): New function.
8112 (som_reloc_addend): New function.
efc0df7c 8113 (som_reloc_call): New function.
54bbfd37 8114
d125665c
JL
8115 * som.c (som_initialize_reloc_queue): New function.
8116 (som_reloc_queue_insert): Likewise.
8117 (som_reloc_queue_fix): Likewise.
8118 (som_reloc_queue_find): Likewise.
8119
fcb0c846
JL
8120 * som.c (som_hppa_howto_table): SOM howto relocation table.
8121 (hppa_som_reloc): New function.
8122
4fdb66cd
JL
8123 * som.c (struct reloc_queue): New structure to keep track of
8124 the last four multibyte relocations emitted.
8125 (enum pa_symbol_type): Type to fully describe the symbol types
8126 associated with .import/.export assembler directives.
8127
70f1d738
JL
8128 * som.c: Include libhppa.h
8129
40249bfb
JL
8130 * som.c (bfd_som_set_section_attributes): New function.
8131 (bfd_som_set_subsection_attributes): Likewise.
8132 (bfd_som_set_symboL_type): Likewise.
8133 (bfd_som_attach_unwind_info): Likewise.
8134 * som.h: Declare new exported functions.
8135
8136 * som.h (struct som_symbol): Add new fields to hold additional
8137 information needed to build/write symbol tables and fixup streams.
8138 (struct som_section_data_struct): Add new fields to hold additional
8139 information needed to build/write space and subspace headers.
8140 (som_symbol_data): New accessor macro for SOM symbol information.
8141 (R_HPPA_*): Basic relocation types to be used by the assembler.
8142
115f7430
JK
8143Fri Nov 12 11:00:28 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
8144
8145 * trad-core.c (trad_unix_core_file_p): If new hook
8146 TRAD_CORE_ALLOW_ANY_EXTRA_SIZE defined, then skip the check for the
8147 corefile being too big.
8148 * hosts/i386sco.h: Define it.
8149
3e80841e
JL
8150Thu Nov 11 15:16:28 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
8151
8a71bf96
JL
8152 * bfd.c (struct _bfd): Add hppabsd_core_data.
8153 * targets.c (target_vector): Add hppabsd_core_vec.
8154 * hpux-core.c (hpux_core_core_file_p): Fail if an unknown core
8155 section is encountered during core section scanning.
8156 * hppabsd-core.c: New file.
8157 * config/hppabsd.mh: Enable HPPA BSD core files.
8158
3e80841e
JL
8159 * elf32-hppa.c (hppa_elf_reloc): Remove DEFUN crud. Remove code
8160 which is either commented out or ifdef'd out. Add, update and
8161 clean comments. Fix various indention and spacing problems. Handle
8162 problems related to using "ble" to jump to a stub rather than "bl"
8163 (%r31 is trashed by "ble", but not by "bl").
8164 (NEW_INSTRUCTION): Put inside curly braces.
8165 (CURRENT_STUB_OFFSET): Fix indention problems.
8166 (hppa_elf_build_arg_reloc_stub): Fix indention and spacing problems.
8167 Add, update and clean comments. Handle "ble" %r31 lossage problems.
8168 (hppa_elf_build_long_branch_stub): Likewise.
8169 (hppa_look_for_stubs_in_section): Likewise.
8170 (hppa_elf_stub_check): Remove obsolete function.
8171
8172 * hppa_stubs.h: Add new instructions to deal with %r31 lossage
8173 problems. Delete unused instructions.
8174
0f5bc783
SS
8175Tue Nov 9 11:40:27 1993 Stan Shebs (shebs@rtl.cygnus.com)
8176
8177 * m68klynx.c (TARGET_IS_BIG_ENDIAN_P): Define.
8178
95469b02
ILT
8179Tue Nov 9 11:26:05 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
8180
346f0414
ILT
8181 * elfcode.h (elf_object_p): Rather than looking through an array
8182 of architectures, get the ELF EM_xxx code from the backend
8183 information. Let the generic ELF target match any EM_xxx code not
8184 matched by another ELF target. Call elf_backend_object_p to let
8185 the backend do more checks and set global information.
8186 * libelf.h (struct elf_backend_data): Added elf_machine_code and
8187 elf_backend_object_p fields.
8188 (struct bfd_elf_arch_map): Removed.
8189 (bfd_elf_arch_map, bfd_elf_arch_map_size): Don't declare.
8190 * elf32-target.h, elf64-target.h: Initialize elf_machine_code
8191 field with ELF_MACHINE_CODE. Initialize elf_backend_object_p
8192 field with elf_backend_object_p (if it is defined).
8193 * elf32-gen.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c,
8194 elf32-m68k.c, elf32-m88k.c, elf32-mips.c, elf32-sparc.c,
8195 elf64-gen.c (ELF_MACHINE_CODE): Defined.
8196 * elf32-mips.c: Include ecoffswap.h to get ECOFF swapping
8197 routines.
8198 (mips_elf_object_p): Set the right machine number.
8199 (mips_elf_ecoff_debug_swap): Defined.
8200 (elf_backend_object_p): Defined to be mips_elf_object_p.
8201 (elf_backend_ecoff_debug_swap): Defined to be
8202 mips_elf_ecoff_debug_swap.
8203 * elf.c (bfd_elf_arch_map, bfd_elf_arch_map_size): Removed.
8204
8205 * libbfd-in.h (target_vector, default_vector): Declare.
8206 * libbfd.h: Rebuilt.
8207 * format.c (target_vector, default_vector): Don't declare.
8208
8209 * elf32-mips.c (elf_mips_howto_table): Don't complain on overflow
8210 for R_MIPS_26. Correct overflow detection requires matching the
8211 upper four bits of the destination against the PC. From Ted Lemon
8212 <mellon@pepper.ncd.com>.
8213
8214 * bout.c (b_out_reloc_type_lookup): Return type should point to
8215 const data.
8216 * coff-i960.c (coff_i960_reloc_type_lookup): Likewise.
8217 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Likewise.
8218 * mipsbsd.c (MY(reloc_howto_type_lookup)): Likewise.
8219 * coff-i386.c (coff_i386_reloc): Made howto const.
8220 * oasys.c (oasys_write_data): Made how const.
8221
95469b02
ILT
8222 * libelf.h: Added some comments.
8223 (struct elf_backend_data): Added elf_backend_ecoff_debug_swap
8224 field. Removed unused write_relocs field.
8225 * elf32-target.h: Adjusted elf_backend_data initialization
8226 accordingly.
8227 * elf64-target.h: Corrected elf_backend_data initialization to
8228 fill in all fields and to set elf_64_p to 1.
8229
e2756048
ILT
8230Mon Nov 8 18:13:14 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
8231
7b8106b4
ILT
8232 * elfcode.h (bfd_section_from_shdr): Remove duplicate assignment
8233 to filepos in SHT_STRTAB case.
8234 (assign_file_position_for_section): Set BFD section filepos as
8235 well as ELF section sh_offset.
8236
e2756048
ILT
8237 * reloc.c: Use const instead of CONST.
8238 (bfd_perform_relocation): Make variable howto a const pointer.
8239 * bfd-in2.h, libbfd.h: Rebuilt.
8240
8241Mon Nov 8 12:19:15 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
8242
8243 * Makefile.in (realclean): Don't remove generated headers. Reverts
8244 change of 2 Jul 1993.
8245
007455de
DHW
8246Mon Nov 8 06:08:31 1993 D. V. Henkel-Wallace (gumby@cirdan.cygnus.com)
8247
8248 * configure.bfd: make unixware equivalent to sysv4.
8249
8250 * config/i386-nlm.mt: bring in elf config; make it the default.
8251
1d3e8847
JL
8252Sun Nov 7 20:21:38 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
8253
8254 * libbfd.c (bfd_put_8): Add parens around reference to "val"
8255 argument.
8256
2ccb88c0
DM
8257Fri Nov 5 21:45:09 1993 David J. Mackenzie (djm@thepub.cygnus.com)
8258
8259 * hosts/i386mach3.h (HOST_SEGMENT_SIZE),
8260 i386mach3.c (SEGMENT_SIZE, TEXT_START_ADDR): Correct values (?).
8261
0f396d2a
ILT
8262Fri Nov 5 15:17:57 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
8263
8264 * coffcode.h (coff_write_object_contents): Zero out internal_a.
8265
c188b0be
DM
8266Fri Nov 5 10:41:07 1993 David J. Mackenzie (djm@thepub.cygnus.com)
8267
8268 * aoutx.h, archive.c, archures.c, bfd.c, cache.c, coffcode.h,
8269 core.c, ctor.c, format.c, init.c, libbfd.c, opncls.c, reloc.c,
8270 section.c, syms.c, targets.c:
8271 Doc cleanup (spelling, punctuation, grammar, formatting).
8272 * bfd-in2.h, libbfd.h: Rebuild.
c188b0be 8273
baf205c4
JG
8274Thu Nov 4 14:46:14 1993 John Gilmore (gnu@rtl.cygnus.com)
8275
8276 * bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.
8277 * bfd.c, opncls.c: Improve comments on file descriptor cacheing.
8278
fa8e8648
JL
8279Thu Nov 4 08:54:30 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
8280
8281 * From Pete Hoogenboom (hoogen@cs.utah.edu)
8282 * elf32-hppa.c (hppa_elf_get_section_contents): Fix logic error
8283 in last change. Always rebuild symbol extension section the first
8284 time though if output sections exist (fixes ld -r problems).
8285
d5d53b0a
JW
8286Thu Nov 04 08:08:46 1993 Jeffrey Wheat (cassidy@cygnus.com)
8287
8288 * Makefile.in: Add .PHONY for check and installcheck rules.
8289
8290Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
8291
8292 * libbfd-in.h (artdata): Use long, not time_t for portability, at
8293 least to HPUX. File below is a derived file.
8294
31eb3ead
BC
8295Tue Nov 2 14:42:27 1993 Bill Cox (bill@tarkas.cygnus.com)
8296
8297 * libbfd.h (artdata): Use long, not time_t for portability, at
8298 least to HPUX.
8299
242f60e2
JK
8300Tue Nov 2 09:32:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
8301
8302 * config.bfd: Use bigmips for mips*-*-bsd*.
8303
55d5b62d
ILT
8304Mon Nov 1 14:30:09 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
8305
f2e945df
ILT
8306 * elfcode.h (elf_slurp_reloca_table, elf_slurp_reloc_table):
8307 Handle symbol number of zero.
8308
7386c3b7
ILT
8309 * reloc.c (enum bfd_reloc_code_real): Added
8310 BFD_RELOC_MIPS_LITERAL, BFD_RELOC_MIPS_GOT16,
8311 BFD_RELOC_MIPS_CALL16, BFD_RELOC_MIPS_GPREL32.
8312 * bfd-in2.h: Rebuilt.
8313 * coff-mips.c (mips_bfd_reloc_type_lookup): Handle
8314 BFD_RELOC_MIPS_LITERAL.
8315 * elf32-mips.c (mips_reloc_map): Handle new relocs.
8316 (mips_elf_hi16_reloc, mips_elf_lo16_reloc): Rearrange _gp_disp
8317 checks slightly.
8318
55d5b62d
ILT
8319 * aout-target.h (MY_bfd_debug_info_start, MY_bfd_debug_info_end,
8320 MY_bfd_debug_info_accumulat [sic]): Remove unused definitions.
8321 (MY_bfd_get_relocated_section_contents, MY_bfd_relax_section,
8322 MY_bfd_seclet_link): Define.
8323 (MY_bfd_reloc_type_lookup): Rename from
8324 MY_reloc_howto_type_lookup.
8325 (MY_bfd_make_debug_symbol): Rename from MY_make_debug_symbol.
8326 (MY(vec)): Use JUMP_TABLE rather than listing functions.
8327 * hp300hpux.c (MY_get_symtab, MY_get_symtab_upper_bound,
8328 MY_canonicalize_reloc, MY_write_object_contents): Don't define in
8329 terms of MY, because that causes a recusive invocation of CAT when
8330 expanded within JUMP_TABLE, and ANSI compilers don't expand
8331 recursive macros.
8332 * mipsbsd.c (MY_bfd_reloc_type_lookup): Rename from
8333 MY_reloc_howto_type_lookup, and don't define in terms of MY.
8334 (MY_canonicalize_reloc): Don't define in terms of MY.
8335 (aout_mips_little_vec, aout_mips_big_vec): Use JUMP_TABLE rather
8336 than listing functions.
8337
6198b7a1
JK
8338Mon Nov 1 09:12:25 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
8339
8340 * config.bfd: Use m68k-elf for m68*-*-sysv4*.
8341
ceeca31c 8342See file ChangeLog.1
e6d739eb 8343
41126f15
JK
8344\f
8345Local Variables:
8346mode: indented-text
8347left-margin: 8
6ec3bb6a
ILT
8348fill-column: 74
8349version-control: never
8350End:
This page took 0.49152 seconds and 4 git commands to generate.