* elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
0a7b8735
ILT
1Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
2
3 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
4 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
5 its sanity check.
6
3ebefb07
DE
7start-sanitize-m32r
8Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
9
10 * reloc.c: Add m32r relocs.
11 * bfd-in2.h, libbfd.h: Rebuilt.
6cb9c903 12 * cpu-m32r.c,elf32-m32r.c: New files.
3ebefb07
DE
13end-sanitize-m32r
14
cacfb845
ILT
15Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
16
17 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
18
d7775b43
ILT
19Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
20
e461da9b
ILT
21 * tekhex.c (first_phase): Change type parameter from char to int.
22 (out): Likewise.
23 (pass_over): Change func to expect int, not char.
24
d7775b43
ILT
25 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
26 rather than SEC_LOAD when aligning the file offset for the first
27 section in a segment.
28
ea3f0585
FF
29Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
30
31 * syms.c (coff_section_type): Make arg const.
32 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
33 to make_bfd_asection().
34 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
35 * elfcode.h (bfd_section_from_phdr): Remove prototype.
36 (_bfd_elf_stringtab_init): Remove prototype.
37
38 * netbsd-core.c (swap_abort): Add prototype.
39 * aix386-core.c (swap_abort): Ditto & make static
40 * hpux-core.c (swap_abort): Ditto & make static.
41 * irix-core.c (swap_abort): Ditto & make static.
42 * ptrace-core.c (swap_abort): Ditto & make static.
43 * trad-core.c (swap_abort): Ditto & make static.
44 * coffswap.h (coff_swap_reloc_in): Ditto.
45 (coff_swap_reloc_out): Ditto.
46 (coff_swap_filehdr_in): Ditto.
47 (coff_swap_filehdr_out): Ditto.
48 (coff_swap_sym_in): Ditto.
49 (coff_swap_sym_out): Ditto.
50 (coff_swap_aux_in): Ditto.
51 (coff_swap_aux_out): Ditto.
52 (coff_swap_lineno_in): Ditto.
53 (coff_swap_lineno_out): Ditto.
54 (coff_swap_aouthdr_in): Ditto.
55 (coff_swap_aouthdr_out): Ditto.
56 (coff_swap_scnhdr_in): Ditto.
57 (coff_swap_scnhdr_out): Ditto.
58 * ihex.c (ihex_sizeof_headers): Ditto.
59 * tekhex.c (getsym): Ditto.
60 (find_chunk): Ditto & make static.
61 (insert_byte): Ditto.
62 (first_phase): Ditto.
63 (pass_over): Ditto.
64 (tekhex_get_symtab): Ditto & make static.
65 (tekhex_get_symtab_upper_bound): Ditto & make static.
66 (tekhex_mkobject): Ditto.
67 (tekhex_object_p): Ditto.
68 (move_section_contents): Ditto.
69 (tekhex_get_section_contents): Ditto.
70 (tekhex_set_arch_mach): Ditto & make static.
71 (tekhex_set_section_contents): Ditto.
72 (writevalue): Ditto.
73 (writesym): Ditto.
74 (out): Ditto.
75 (tekhex_write_object_contents): Ditto.
76 (tekhex_sizeof_headers): Ditto.
77 (tekhex_make_empty_symbol): Ditto.
78 (tekhex_get_symbol_info): Ditto.
79 (tekhex_print_symbol): Ditto.
80 * irix-core.c (make_bfd_asection): Ditto.
81 (irix_core_core_file_p): Ditto.
82 (irix_core_core_file_failing_command): Ditto.
83 (irix_core_core_file_failing_signal): Ditto.
84 (irix_core_core_file_matches_executable_p): Ditto.
85 (irix_core_make_empty_symbol): Ditto.
86 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
87 * srec.c (srec_new_symbol): Ditto.
88 (srec_get_section_contents): Ditto.
89 (srec_set_arch_mach): Ditto.
90 (srec_set_section_contents): Ditto.
91 (internal_srec_write_object_contents): Ditto.
92 (srec_write_object_contents): Ditto.
93 (symbolsrec_write_object_contents): Ditto.
94 (srec_sizeof_headers): Ditto.
95 (srec_make_empty_symbol): Ditto.
96 (srec_get_symtab_upper_bound): Ditto.
97 (srec_get_symtab): Ditto.
98 (srec_print_symbol): Ditto and make static.
99 * elf.c (elf_read): Ditto
100 (assign_section_numbers): Ditto.
101 (elf_fake_sections): Ditto.
102 (sym_is_global): Ditto.
103 (elf_map_symbols): Ditto.
104 (get_program_header_size): Ditto.
105 * coffgen.c (make_a_section_from_file): Ditto.
106 (coff_real_object_p): Ditto.
107 (fixup_symbol_value): Ditto.
108 (build_debug_section): Ditto.
109 (copy_name): Ditto.
110 * syms.c (coff_section_type): Ditto.
111
3ebefb07 112start-sanitize-m32r
00d7a64b
JL
113Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
114
115 * bfd-in2.h: Rebuilt after m32r changes.
116
117end-sanitize-m32r
71d7d44f
DE
118Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
119
66e4c229
DE
120start-sanitize-m32r
121 * config.bfd,configure.in,configure: Add m32r support.
f0c12b73 122 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
66e4c229 123end-sanitize-m32r
71d7d44f
DE
124 * config.bfd: Keep target list alphabetically sorted.
125
629f776a
JL
126start-sanitize-v850
127Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
128
129 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
130 to add in the constant part found in the instruction itself.
131 (case R_V850_HI16_S): Likewise.
132
133end-sanitize-v850
9c85b19d
MH
134start-sanitize-d10v
135Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
136
137 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
138 and R_D10V_18 to be 1 (word).
139
140end-sanitize-d10v
4be2140e
ILT
141Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
142
143 * stabs.c (_bfd_link_section_stabs): If the output_section field
144 of either section is bfd_abs_section, then the linker is
145 discarding the section and we should not optimize it.
146
0cd98b92
DE
147Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
148
149 * Makefile.in (aout-sparcle.o): New target.
150 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
151 * config.bfd (sparclet-*-aout*): Add case.
152 * configure.in (sparcle_aout_vec): Add case.
153 * configure: Regenerated.
0cd98b92
DE
154 * targets.c (sparcle_aout_vec): Declare.
155 (bfd_target_vector): Add sparcle_aout_vec.
156 * aout-sparcle.c: New file.
157
b5ef63c4 158start-sanitize-v850
7b0af209 159Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
b5ef63c4 160
e73b6ae6
JL
161 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
162 low order sign bit propogation for R_V850_HI16_S.
163
164 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
7b0af209
JL
165 handling V850 specific relocs.
166 (elf_v850_howto_table): Use the new function for some
167 relocations. Twiddle masks & shifts for some relocs.
168 Set partial_inplace where needed.
169
170end-sanitize-v850
171Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
172
173 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
174 default architecture to a machine number of 0.
175 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
176 for E_MIPS_ARCH_1.
177 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
178 the output BFD is the default, set it from the first input BFD.
179
180start-sanitize-v850
181Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
182
183 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
184 insert at bitpos zero. The HI16 relocs are shifted right
185 by 16 bits. Fix src_mask for all relocs.
186 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
187 little endian!
188 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
189 endian!
b5ef63c4
MA
190
191end-sanitize-v850
bde9d875
ILT
192Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
193
194 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
195 Rewrite to use BFD file read routines and to avoid using a fixed
196 length for the file name.
197
01b49cb3 198start-sanitize-v850
237b5c4c
JL
199Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
200
201 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
202 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
203 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
204 to R_V850_{32,16,8}.
205
01b49cb3
C
206Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
207
208 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
209 (elf_v850_howto_table): Add info for HI16_S reloc.
210 (v850_reloc_map): Add HI_16_S reloc.
211 * reloc.c: Define BFD_RELOC_V850_* relocs.
212
213end-sanitize-v850
492cfc71
ILT
214Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
215
c86158e5
ILT
216 Add SH ELF support.
217 * elf32-sh.c: New file.
218 * elf.c (prep_headers): Handle bfd_arch_sh.
219 * elfcode.h (write_relocs): Handle absolute symbol.
220 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
221 (_bfd_elf64_link_read_relocs): Declare.
222 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
223 elf_link_read_relocs. Make globally visible. Change all
224 callers.
225 (elf_link_input_bfd): Get external symbols from cache in
226 symtab_hdr->contents. Get contents from cache in
227 elf_section_data.
228 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
229 already defined.
230 * reloc.c: Define BFD_RELOC_SH_* relocs.
231 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
232 * coff-sh.c (sh_insns_conflict): Fix a return value.
233 (_bfd_sh_align_load_span): New globally visible function, broken
234 out of sh_align_load.
235 (sh_align_load): Call _bfd_sh_align_load_span.
236 (sh_swap_insns): Change relocs parameter to PTR.
237 * bfd-in2.h, libbfd.h: Rebuild.
238 * targets.c (bfd_elf32_sh_vec): Declare.
239 (bfd_elf32_shl_vec): Declare.
240 * config.bfd (sh-*-elf*): New target.
241 * configure.in (bfd_elf32_sh_vec): New target vector.
242 (bfd_elf32_shl_vec): New target vector.
243 * configure: Rebuild.
244 * Makefile.in: Rebuild dependencies.
245 (BFD32_BACKENDS): Add elf32-sh.o.
246 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
247
248 * elf.c (map_sections_to_segments): Check that LMA does not skip a
249 page before checking D_PAGED.
250
492cfc71
ILT
251 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
252 (ihex_write_object_contents): Remove extbase; always use segbase
253 instead.
254
f7954d86
MM
255Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
256
257 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
258 * configure.host (i[345]86-*-*): Ditto.
259 * config.bfd (i[345]86-*-*): Ditto.
260 * configure: Regenerate.
261
262 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
263 elf.
264
265Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
266
267 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
268 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
269 * som.c (hppa_som_gen_reloc_type): Add new argument. If
270 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
271 will have an ST_CODE type, change the symbol's type to ST_DATA.
272 * som.c (hppa_som_gen_reloc_type): Update prototype.
273
4da624dd
ILT
274Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
275
276 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
277 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
278 (mips_elf_size_dynamic_sections): Don't require .got to exist.
279 (mips_elf_finish_dynamic_sections): Likewise.
280
9461513b
ILT
281Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
282
1c952df6
ILT
283 * configure.host (HLDENV): New variable to set. Set it for
284 *-*-sysv4*, since those linkers may not support -R but they always
285 support LD_RUN_PATH.
286
9461513b
ILT
287 * libieee.h (NSECTIONS): Don't define.
288 (ieee_data_struct): Change section_table to asection **. Add
289 section_table_size.
290 * ieee.c (get_section_entry): If the table isn't big enough, make
291 it bigger.
292 (ieee_slurp_sections): Remove assertion about number of sections.
293 (ieee_object_p): Adjust initialization of ieee to match changes to
294 the structure.
295
296 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
297 symbols merely because we are generating a shared library.
298 (xcoff_build_ldsyms): Don't set up global linkage code for an
299 undefined symbol merely because we are generating a shared
300 library.
301
0c1d95c7
C
302start-sanitize-v850
303Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
304
305 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
306 (BFD32_BACKENDS) Add elf32-v850.o.
307 * archures.c: Add bfd_v850_arch.
308 * bfd-in2.h: Add bfd_v850_arch.
309 * config.bfd (v850-*-*): New target.
310 * configure: (bfd_elf32_v850_vec) New vector.
311 * configure.in: (bfd_elf32_v850_vec) New vector.
312 * cpu-v850.c: New file.
313 * elf.c (prep_headers): Added case bfd_arch_v850.
314 * elf32-v850.c: New file.
315 * targets.c (bfd_elf32_v850_vec): New vector.
316
317end-sanitize-v850
318Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
319
320 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
321 a function code symbol for an XMC_XO symbol.
322
22edd547
SS
323Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
324
325 * mpw-config.in: Update editing of autoconf vars to reflect
326 Jul 18 configure.in change.
327 * mpw-make.sed: Update editing of include pathnames to be
328 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
329
330Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
331
332 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
333 which to offset to get the .plt entry address is ".plt".
334
53ef6e60
JSC
335Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
336
337 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
338 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
339 Added, for internal use by the ARM gas.
340 * libbfd.h: Rebuilt
341 * bfd-in2.h: Rebuilt
342
37d7888d
ILT
343Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
344
345 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
346 in section dynidx start.
347
e38d6d36
ILT
348Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
349
350 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
351 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
352 optimization for g++.
353
ae20860e
MM
354Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
355
356 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
357 the -mrelocatable-lib bit set and the other doesn't, clear the
358 -mrelocatable-lib bit in the header.
359
4596421b
ILT
360Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
361
362 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
363 symbol against a STT_FUNC symbol in a shared library.
364
f11e3f62
ILT
365Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
366
410bc61d
ILT
367 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
368 symbol is found, automatically define the corresponding function
369 code.
370
d92099f1
ILT
371 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
372 if sym.n_numaux is not zero.
373 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
374 entry to disagree about the number of aux entries if the symbol
375 has zero.
376
f11e3f62
ILT
377 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
378 section if it might be needed, not just if info->shared.
379 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
380 the start of .rel.dyn if we are going to use it.
381 (mips_elf_finish_dynamic_sections): Only clear the first element
382 of .rel.dyn if the size is greater than zero.
383
fbc4ed7d
ILT
384Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
385
b2a05baf
ILT
386 * xcofflink.c (xcoff_link_input_bfd): If we already called the
387 undefined_symbol callback for a symbol, then don't issue any more
388 warnings about loader relocs.
389 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
390 after calling the undefined_symbol callback.
391
fbc4ed7d
ILT
392 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
393 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
394 as the AIX linker seems to do.
395
8612a388
ILT
396Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
397
398 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
399 (evax_initialize): Remove evax_reloc_table.
400 (evax_close_and_cleanup): Ditto.
401 (reloc_nil): Ditto.
402 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
403 entries.
404 (evax_bfd_reloc_type_lookup): Ditto.
405 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
406 cooked_size == raw_size.
407 * evax-emh.c (_bfd_evax_register_filename): Remove.
408 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
409 * evax-misc.c (add_new_contents): Malloc section at full size.
410 (_bfd_save_evax_section): Memcpy section contents directly.
411 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
412 (evax_reloc_table): Remove.
413
414 * hosts/alphavms.h (O_ACCMODE): Define if needed.
415
416 * makefile.vms: Add better support for DEC C compilation
417 Add evax.h dependencies
418
419 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
420 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
421 (BFD_RELOC_ALPHA_BASEREG): Remove.
422 * bfd-in2.h, libbfd.h: Rebuild.
423
320a5c6b
SG
424Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
425
426 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
427 getgid if _WIN32 is defined.
428 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
429
2055bf85
SG
430Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
431
432 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
433 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
434 include file.
435 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
436 isn't defined.
437
85fe9d3e
ILT
438Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
439
440 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
441 realloc.
442 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
443 (NEED_DECLARATION_REALLOC): New macro.
444 * configure, config.in: Rebuild.
445 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
446 (realloc): Declare if NEED_DECLARATION_REALLOC.
447
448 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
449 <strings.h> if they exist.
450
451 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
452
9b3307b0
ILT
453Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
454
cc425b55
ILT
455 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
456
9b3307b0
ILT
457 Based on patches from Eric Valette <valette@crf.canon.fr>:
458 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
459 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
460 (elf_howto_table): Add entries for new relocs.
461 (elf_i386_reloc_type_lookup): Handle new relocs.
462 (elf_i386_info_to_howto): Just call abort.
463 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
464 (elf_i386_relocate_section): Likewise.
465
75e3a45a
MH
466start-sanitize-d10v
467Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
468
469 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
470
471end-sanitize-d10v
191d910c
ILT
472Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
473
b944e7e8
ILT
474 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
475 only get the LMA from the phdr if they are in the same part of the
476 file.
477
191d910c
ILT
478 * elf.c (map_sections_to_segments): Rewrite tests for starting a
479 new segment to make them more comprehensible. If the relationship
480 between the LMA and the VMA changed, start a new segment. Don't
481 check dynsec when deciding whether to start a new segment for a
482 writeable section; -N will now handle this.
483
e751d506
JL
484Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
485
486 * libhppa.h: Remove "esel" changes. Not the right approach.
487 * som.c: Corresponding changes.
488 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
489 which don't have a SOM symbol type associated with them.
490 Reverses a 1994 change.
491
cdb88e87
ILT
492Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
493
494 Make ld -N more reasonable for ELF:
495 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
496 phdr_in_section to false, and always use a single load segment.
497 (elf_sort_sections): Sort sections by LMA after VMA.
498 (assign_file_positions_for_segments): If D_PAGED is not set, don't
499 align to maxpagesize.
500 (assign_file_positions_except_relocs): Likewise.
501 * elfcode.h (elf_object_p): If a section is loaded but not page
502 aligned, clear D_PAGED.
503
d1b40d8e
JSC
504Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
505
506 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
507 Added, for internal use by the ARM gas.
508 * libbfd.h: Rebuilt
509 * bfd-in2.h: Rebuilt
510
ad240a82
JL
511Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
512
513 * libhppa.h (R_HPPA_ESEL): New field selector.
514 (e_esel): Similarly.
515 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
516 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
517 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
518
fb4dc1eb
ILT
519Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
520
521 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
522 archive search before looking for stripped dynamic objects.
523
b223f950
ILT
524Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
525
526 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
527 symbol a warning rather than an error.
528
64f808f9
ILT
529Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
530
531 * elf.c (assign_file_positions_for_segments): Track the virtual
532 memory position separately from the file position, and use it to
533 compute the alignment adjustment.
534
11609502
MH
535start-sanitize-d10v
536Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
537
538 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
539 and fixed mask on R_D10V_10_PCREL_L.
540
541end-sanitize-d10v
9bd65136
ILT
542Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
543
bf9884d4
ILT
544 * elf64-mips.c: Include "aout/ar.h".
545 (mips_elf64_slurp_armap): New static function.
546 (mips_elf64_write_armap): New static function.
547 (bfd_elf64_archive_*): Define.
548 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
549 Use instead of bfd_generic_archive_p.
550 (bfd_elfNN_write_archive_contents): Define if not defined. Use
551 instead of _bfd_write_archive_contents.
552 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
553 _bfd_generic_mkarchive.
554 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
555 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
556 _bfd_archive_coff.
557 (TARGET_LITTLE_SYM): Likewise.
558 * archive.c (bfd_slurp_armap): Check for and reject an archive map
559 name of /SYM64/.
560 * Makefile.in: Rebuild dependencies.
561
562 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
563 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
564 SHT_MIPS_EVENTS sections.
565 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
566 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
567 sections.
568 (_bfd_mips_elf_fake_sections): Likewise.
569
9bd65136
ILT
570 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
571 * ecoff.c (ecoff_compute_section_file_positions): Copy
572 rdata_in_text from backend info to tdata. Clear it if any data
573 section comes before .rdata.
574 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
575 tdata rather than backend info.
576
194141a9
ILT
577Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
578
579 * configure.in: Fix test for whether a compiler has a 64 bit
580 type. From Jim Wilson <wilson@cygnus.com>.
581
a8a3d83a
ILT
582Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
583
f4e14cb9
ILT
584 * configure.host (mips-sgi-irix6*): New host.
585
586 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
587 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
588 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
589 to AC_OUTPUT call.
590 * configure: Rebuild.
591 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
592 (BFD_HOST_64_BIT): Define conditionally.
593 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
594 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
595 (symvalue, bfd_size_type): Likewise.
596 * bfd-in2.h: Rebuild.
597 * Makefile.in (do_clean): Remove bfd-tmp.h.
598 (do_distclean): Remove bfd-in3.h.
599 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
600 (bfd-in3.h): New target.
601
74556b94
ILT
602 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
603 Andrew Gierth <ANDREWG@microlise.co.uk>.
604
ab659fd6
ILT
605 * configure.host: Set INSTALL_SHLIB.
606 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
607 * configure: Rebuild.
608 * Makefile.in (install): Use @INSTALL_SHLIB@.
609
e8c249cb
ILT
610 * config.bfd (mips*-*-irix6*): New target.
611 * configure.host: Handle Irix 6 shared library like Irix 5.
612
a8a3d83a
ILT
613 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
614 symbol for a magic name.
615 (xcoff_link_input_bfd): Don't change the reloc symbol for an
616 XMC_TD symbol.
617 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
618 XMC_TD symbol.
619
b576c7b3
SS
620Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
621
622 * mpw-config.in: Add ELF support to mips config, create the
623 elf32-target.h file in the object dir.
624 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
625
2ba0d82d
KK
626Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
627
628 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
629 Also removed most abort calls, in favor of using bfd reporting.
630
50bd50d4 631start-sanitize-d10v
b576c7b3 632Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
50bd50d4 633
b576c7b3
SS
634 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
635 (BFD32_BACKENDS) Add elf32-d10v.o.
50bd50d4
MH
636 * archures.c: Add bfd_d10v_arch.
637 * bfd-in2.h: Add bfd_d10v_arch.
638 * config.bfd (d10v-*-*): New target.
639 * configure: (bfd_elf32_d10v_vec) New vector.
640 * configure.in: (bfd_elf32_d10v_vec) New vector.
641 * cpu-d10v.c: New file.
642 * elf.c (prep_headers): Added case bfd_arch_d10v.
643 * elf32-d10v.c: New file.
644 * libbfd.h: Rebuild.
b576c7b3
SS
645 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
646 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
50bd50d4
MH
647 * targets.c (bfd_elf32_d10v_vec): New vector.
648end-sanitize-d10v
649
2ce9802e
KK
650Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
651
652 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
653
9676e446 654Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
3cc21bf6 655
9676e446
SG
656 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
657 bfd_mach_i386_i8086 machine types.
3cc21bf6 658
f7171978
ILT
659Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
660
661 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
662 and _FINI sections.
663
74e2ab38
ILT
664Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
665
666 * coffcode.h (coff_set_section_contents): A/UX does not require
667 special handling of the _LIB section.
668
01cfaa6b
JL
669Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
670
671 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
672 value for R_RELBYTE.
673
674 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
675 array if one was allocated.
676
eb52b9dc
ILT
677Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
678
679 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
680 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
681 use_rld_obj_head and rld_value.
682 (mips_elf_link_hash_table_create): Initialize new fields.
683 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
684 dynamic.
685 (mips_elf_create_dynamic_sections): Create .rld_map section. If
686 __rld_obj_head symbol not seen, create an __rld_map symbol.
687 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
688 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
689 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
690 __rld_obj_head symbol.
691 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
692
56b4cbaa
ILT
693Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
694
9b292d4c
ILT
695 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
696
dab45734
ILT
697 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
698 ppc_elf_addr16_ha_reloc.
699 (ppc_elf_addr16_ha_reloc): New static function.
700
56b4cbaa
ILT
701 * coff-mips.c (struct mips_hi): Define.
702 (mips_refhi_list): New static variable.
703 (mips_refhi_addr, mips_refhi_addend): Remove.
704 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
705 (mips_reflo_reloc): Process mips_refhi_list.
706 (mips_relhi_list): New static variable.
707 (mips_relhi_addr, mips_relhi_addend): Remove.
708 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
709 (mips_rello_reloc): Process mips_relhi_list.
710 (mips_relocate_section): Permit an arbitrary number of REFHI or
711 RELHI relocs before the associated REFLO or RELLO reloc.
712
b777c6a7
ILT
713Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
714
715 * aout-target.h (MY(callback)): Set reloc_count fields.
716
100b65dd
ILT
717Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
718
48f3aaf3
ILT
719 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
720 sections unless this is a SunOS link.
721
100b65dd
ILT
722 * VERSION: Set to 2.7.1.
723
724 * Released binutils 2.7.
725
a31e14f4
ILT
726Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
727
4d3daf4f
ILT
728 * i386aout.c: Include "aout/aout64.h".
729 (i386aout_write_object_contents): New static function.
730 (MY_write_object_contents): Define.
731
a31e14f4
ILT
732 * netbsd.h (MY(write_object_contents)): Make sure that
733 adjust_sizes_and_vmas is called before fiddling with the magic
734 number.
735
d2d04f7a
ILT
736Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
737
738 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
739
4f6ee760
ILT
740Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
741
742 * libbfd-in.h (itos, stoi): Don't define.
743 * libbfd.h: Rebuild.
744 * i386lynx.c (KEEPIT): Define as udata.i.
745 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
746 (NAME(lynx,swap_ext_reloc_out)): Likewise.
747 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
748 flags. Don't use stoi.
749
750 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
751
752 * elf.c (map_sections_to_segments): Don't start a new segment for
753 a writable section if it's on the same page as the previous
754 segment. Reset the writable variable for a readonly section.
755
dfb89b82
KK
756Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
757
758 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
759 first_thunk_address, thunk_size, and import_table_size.
760 * peicode.h: Improved some diagnostics regarding edata sections.
761
762 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
763 on IMGLUE relocs.
764 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
765 (TARGET_LITTLE_SYM): Added missing D_PAGED.
766
8e80606f
ILT
767Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
768
f93fb275
ILT
769 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
770 with XCOFF_DEF_DYNAMIC set is really defined.
771 (xcoff_link_check_dynamic_ar_symbols): Likewise.
772 (xcoff_link_add_symbols): Only create special sections if using an
773 XCOFF hash table.
774
8e80606f
ILT
775 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
776 aixcoff-rs6000.
777 (bfd_install_relocation): Likewise.
778
eec2f824
ILT
779Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
780
781 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
782 field.
783 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
784 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
785 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
786 (elf64_alpha_link_hash_newfunc): Initialize flags field.
787 (elf64_alpha_check_relocs): Record types of LITUSE entries that
788 are found for LITERAL relocs.
789 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
790 taken, we cannot generate a .plt entry for the symbol.
791
5304aea9
ILT
792Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
793
794 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
795 sysconf functions (for gprof).
796 * configure, config.in: Rebuild.
797
017047d4
ILT
798Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
799
f292bbe9
ILT
800 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
801 an archive if it has a map. If the object file has the wrong
802 xvec, reject it.
803
566e2325
ILT
804 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
805 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
806 symbol.
807 (alpha_relocate_section): Likewise.
808
017047d4
ILT
809 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
810 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
811 (coff_swap_sym_out): Use SYMESZ, not sizeof.
812 (coff_swap_aux_out): Use AUXESZ, not sizeof.
813 (coff_swap_lineno_out): Use LINESZ, not sizeof.
814 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
815 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
816 * peicode.h: Corresponding changes.
817
cb73f5d7
MM
818Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
819
820 * elflink.h (elf_create_pointer_linker_section): Comment out code
821 dealing with making GOT pointers negative of the GOT symbol for
822 now.
823
297a4f1a
ILT
824Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
825
826 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
827 increment the .rela.plt size until after we're done creating the
828 .plt entry.
829 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
830 .rela.plt offset directly rather than calculating it.
831
dbbfec07
JM
832Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
833
01e58ff6
JM
834 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
835 Use autoconf-set values.
836 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
837 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
838 values.
dbbfec07
JM
839 (docdir): Deleted.
840 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
841 * configure: Rebuilt.
842
50004d8d
JL
843Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
844
845 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
846 handling code > 1k away.
847
848Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
849
850 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
851 defined, output whenever the symbol is updated.
852
2e0567eb
ILT
853Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
854
855 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
856 section to 0 if user_set_vma is set.
857 * elflink.h (elf_bfd_final_link): Likewise.
858
859Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
860
861 Partially undo patch of Jun 20.
862 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
863 (coff_compute_section_file_positions): Likewise.
864 (coff_write_object_contents): Likewise. Re-add deleted code, but
865 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
866 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
867
bff4a496
ILT
868Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
869
870 * config.bfd: Add support for *-*-rtems* configurations.
871
7ae6550f
ILT
872Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
873
874 * elf.c (prep_headers): Add bfd_arch_alpha case.
875
e8f46717
ILT
876Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
877
878 * elf64-alpha.c: New file.
879 * config.bfd (alpha-*-linuxecoff*): New target.
880 (alpha-*-linux*, alpha-*-elf*): New targets.
881 * configure.in (bfd_elf64_alpha_vec): New vector.
882 * configure: Rebuild.
883 * targets.c (bfd_elf64_alpha_vec): Declare.
884 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
885 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
886 * bfd-in2.h, libbfd.h: Rebuild.
887 * Makefile.in: Rebuild dependencies.
888 (BFD64_BACKENDS): Add elf64-alpha.o.
889 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
890
bacecac8
ILT
891Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
892
893 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
894 than relying on a right shift of 32.
895
9ca108cd
DE
896Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
897
b9110a3c
DE
898 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
899 ifdef to COFF_WITH_PE.
900 (coff_compute_section_file_positions): Likewise.
901 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
902 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
903 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
904 COFF_IMAGE_WITH_PE, always include.
905
9ca108cd
DE
906 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
907
c2073f05
ILT
908Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
909
7fc6a16a
ILT
910 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
911 approximate the correct answer if SIZEOF_HEADERS was not used.
912
c2073f05
ILT
913 * binary.c (binary_set_section_contents): Set section file
914 position based on LMA rather than VMA.
915
4838929e
ILT
916Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
917
918 * linker.c (_bfd_generic_link_output_symbols): Don't output any
919 symbols if info->strip == strip_all.
920
921Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
922
923 * coff-h8300.c: Remove #if 0 code.
924 (compatable): Don't allow mixing/matching of different architectures.
925
4838929e
ILT
926 * archures.c (bfd_mach_h8300s): Add.
927 * bfd-in2.h: Rebuilt.
928 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
929 (BADMAG): Likewise.
930 (h8300_reloc16_estimate): Likewise.
931 (h8300_reloc16_extra_cases): Likewise.
932 (h8300_bfd_link_add_symbols): Likewise.
933 * coffcode.h (coff_set_arch_mach_hook): Likewise.
934 (coff_set_flags): Likewise.
935 * cpu-h8300.c (h8300_scan): Likewise.
936 Add H8/S to bfd_h8300_arch list.
937
c3d8e071
ILT
938Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
939
940 Added support for Alpha OpenVMS:
941 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
942 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
943 * config.h-vms, makefile.vms: New files.
944 * config.bfd (alpha-*-*vms*): New target.
945 * configure.in (evax_alpha_vec): New target vector.
946 * configure: Rebuild.
947 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
948 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
949 * targets.c (bfd_target_evax_flavour): Define.
950 (evax_alpha_vec): Declare.
951 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
952 if BFD64 is defined.
953 * bfd-in2.h, libbfd.h: Rebuild.
954 * Makefile.in: Rebuild dependencies.
955 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
956 evax-emh.o, and evax-misc.o.
957 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
958 evax-etir.c, evax-emh.c, and evax-misc.c.
959 (HFILES): Add evax.h.
960
142aa7d9
ILT
961Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
962
963 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
964 pointer.
965 (h8300_bfd_link_add_symbols): Likewise.
966
b658d64d
JL
967Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
968
969 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
970 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
971
2df1e84b
ILT
972Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
973
974 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
975 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
976 created.
977 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
978 R_MIPS_32 relocs if creating a shared library.
979
980Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
981
982 * peicode.h (add_data_entry): Use pei_section_data rather than
983 _cooked_size. Corresponds to May 13 change in coffcode.h.
984
8100e72c
ILT
985Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
986
51bc9642
ILT
987 * cofflink.c (_bfd_coff_final_link): Handle long section names.
988 * coffcode.h (coff_write_object_contents): If there are long
989 section names, always set the f_symptr field, even if there are no
990 symbols.
991 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
992 if there are no symbols.
993
8100e72c
ILT
994 * coffgen.c (make_a_section_from_file): Check return value of
995 _bfd_coff_read_string_table.
996 (coff_real_object_p): Check return value of
997 make_a_section_from_file.
998 (_bfd_coff_read_string_table): Check that there are some symbols
999 before trying to read the string table size.
1000
0e3bd85e
ILT
1001Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
1002
ed675a04
ILT
1003 * xcofflink.c (xcoff_link_add_symbols): When considering whether
1004 to replace a symbol in a dynamic object with a symbol from another
1005 dynamic object, do the replacement if the existing symbol is
1006 global linkage code.
1007
49144784
ILT
1008 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
1009 for _ptrgl, and treat it as global linkage code.
1010
0e3bd85e
ILT
1011 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
1012 filename or N_SO symbol past the offset, and use it to indicate
1013 that there is no line number or function when appropriate.
1014
a5c7acea
ILT
1015Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
1016
1017 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
1018 common symbol defined by the linker. Don't export function code
1019 even if export_defineds is set.
1020
1021Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
1022
1023 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
1024 and R_JMP_DEL.
1025 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
1026 (h8300_symbol_address_p): New function.
1027 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
1028 relaxing.
1029
890f5b7f
JL
1030Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
1031
1032 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
1033 problems.
1034 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
1035 correctly for the two variants. Allow relaxing if the target
1036 is 128 bytes away since after relaxation it'll be 126 bytes away.
1037 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
1038 "dot" and "value". Allow relaxing if the target is 128 bytes
1039 away since after relaxation it'll be 126 bytes away.
1040 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
1041 the given section until nothing changes.
1042
0593fc16
ILT
1043Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
1044
1045 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
1046 alignment hack--we can get the lnnoptr info another way without
1047 suddenly increasing the alignment requirements. Set the flags for
1048 the _PDATA section.
1049 (ecoff_compute_section_file_positions): Do so.
1050
9b263b79
ILT
1051Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
1052
bbf7c335
ILT
1053 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
1054 to keep the HP emulator database happy.
1055
9b263b79
ILT
1056 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
1057 From Kevin Buettner <kev@primenet.com>.
1058
1059Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
1060
1061 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
1062 name of a NULL section.
1063
26145b15
ILT
1064Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
1065
1066 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
1067 set, always call the notice callback.
1068
1069 * VERSION: Increment for bfdlink.h change.
1070
3a2080d8
ILT
1071Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
1072
9d175198
ILT
1073 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
1074 (sh_relax_delete_bytes): Correct handling of differently sized
1075 trailing alignment reloc.
1076
5a04f1bd
ILT
1077 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
1078 * bfd-in2.h: Rebuild.
1079 * configure.in: Warn if there is no known 64 bit type.
1080 * configure: Rebuild.
1081
60c8b04f
ILT
1082 * Makefile.in: Rebuild dependencies.
1083 (BFD32_BACKENDS): Add ppcboot.o.
1084 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
1085
3a2080d8
ILT
1086 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
1087 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
1088
903612a2
ILT
1089Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
1090
1091 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
1092 (bfd_mips_elf64_swap_reginfo_out): Move from here...
1093 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
1094 (bfd_mips_elf64_swap_reginfo_out): ...to here.
1095
38893c8c
ILT
1096Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
1097
bc05732b
ILT
1098 * elf64-mips.c: Improve reloc special_functions and handling of
1099 SHT_MIPS_OPTIONS section.
1100 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
1101 mips_elf_hi16_reloc and make globally visible.
1102 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
1103 make globally visible.
1104 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
1105 make globally visible.
1106 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
1107 and make globally visible.
1108 (gprel16_with_gp): Check howto->src_mask before using value in
1109 insn.
1110 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
1111 and make globally visible.
1112 (gprel32_with_gp): Check howto->src_mask before fetching value.
1113 (bfd_mips_elf_swap_options_in): New function.
1114 (bfd_mips_elf_swap_options_out): New function.
1115 (_bfd_mips_elf_set_private_flags): Rename from
1116 mips_elf_set_private_flags and make globally visible.
1117 (_bfd_mips_elf_copy_private_bfd_data): Rename from
1118 mips_elf_copy_private_bfd_data and make globally visible.
1119 (_bfd_mips_elf_merge_private_bfd_data): Rename from
1120 mips_elf_merge_private_bfd_data and make globally visible.
1121 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
1122 for a SHT_MIPS_OPTIONS section.
1123 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
1124 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
1125 name of a SHT_MIPS_OPTIONS section.
1126 (_bfd_mips_elf_set_section_contents): New function.
1127 (mips_elf32_section_processing): Set the GP value in a
1128 SHT_MIPS_OPTIONS section.
1129 (_bfd_mips_elf_find_nearest_line): Rename from
1130 mips_elf_find_nearest_line and make globally visible.
1131 (bfd_elf32_set_section_contents): Define.
1132 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
1133 (_bfd_mips_elf_lo16_reloc): Declare.
1134 (_bfd_mips_elf_gprel16_reloc): Declare.
1135 (_bfd_mips_elf_got16_reloc): Declare.
1136 (_bfd_mips_elf_gprel32_reloc): Declare.
1137 (_bfd_mips_elf_set_private_flags): Declare.
1138 (_bfd_mips_elf_copy_private_bfd_data): Declare.
1139 (_bfd_mips_elf_merge_private_bfd_data): Declare.
1140 (_bfd_mips_elf_find_nearest_line): Declare.
1141 (_bfd_mips_elf_set_section_contents): Declare.
1142
38893c8c
ILT
1143 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
1144 elf_info_to_howto.
1145 (elf_info_to_howto): Define.
1146 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
1147 elf_info_to_howto.
1148 (elf_info_to_howto): Define.
1149 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
1150 elf_info_to_howto.
1151 (elf_info_to_howto): Define.
1152
1153 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
1154 R_MOV16B[12], to match change in coff/internal.h.
1155
cabd8fa0
ILT
1156Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
1157
00176555
ILT
1158 * elf64-mips.c: Extensive additions to provide better support for
1159 writing files and for gas.
1160 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
1161 of mips_elf_object_p.
1162 (mips_elf32_object_p): Rename from mips_elf_object_p; call
1163 _bfd_mips_elf_object_p.
1164 (_bfd_mips_elf_final_write_processing): Rename from
1165 mips_elf_final_write_processing and make globally visible.
1166 (_bfd_mips_elf_fake_sections): Rename from
1167 mips_elf_fake_sections and make globally visible.
1168 (_bfd_mips_elf_section_from_bfd_section): Rename from
1169 mips_elf_section_from_bfd_section and make globally visible.
1170 (_bfd_mips_elf_section_processing): New function, broken out of
1171 mips_elf_section_processing.
1172 (mips_elf32_section_processing): Rename from
1173 mips_elf_section_processing; call
1174 _bfd_mips_elf_section_processing.
1175 (_bfd_mips_elf_symbol_processing): Rename from
1176 mips_elf_symbol_processing and make globally visible.
1177 (_bfd_mips_elf_read_ecoff_info): Rename from
1178 mips_elf_read_ecoff_info and make globally visible.
1179 (mips_elf32_ecoff_debug_swap): Rename from
1180 mips_elf_ecoff_debug_swap.
1181 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
1182 struct symbol_cache_entry.
1183 (_bfd_elf_validate_reloc): New function, moved in from
1184 elfcode.h:validate_reloc.
1185 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
1186 to _bfd_elf_validate_reloc. Change all callers.
1187 * elf-bfd.h (bfd_section_from_shdr): Declare.
1188 (_bfd_elf_symbol_from_bfd_symbol): Declare.
1189 (_bfd_elf_validate_reloc): Declare.
1190 (_bfd_mips_elf_object_p): Declare.
1191 (_bfd_mips_elf_fake_sections): Declare.
1192 (_bfd_mips_elf_section_from_bfd_section): Declare.
1193 (_bfd_mips_elf_section_processing): Declare.
1194 (_bfd_mips_elf_symbol_processing): Declare.
1195 (_bfd_mips_elf_read_ecoff_info): Declare.
1196 (_bfd_mips_elf_final_write_processing): Declare.
1197 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
1198 if already defined.
1199
cabd8fa0
ILT
1200 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
1201 (mips_elf_final_write_processing): Likewise.
1202
d1bf45aa
ILT
1203Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
1204
1205 64-bit MIPS ELF ABI objdump support:
1206 * elf64-mips.c: New file.
1207 * Makefile.in: Rebuild dependencies.
1208 (BFD64_BACKENDS): Add elf64-mips.o.
1209 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
1210 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
1211 bfd_elf64_littlemips_vec to targ_selvecs.
1212 (mips*-*-elf*): Likewise.
1213 * confingure.in: Add bfd_elf64_bigmips_vec and
1214 bfd_elf64_littlemips_vec to vector switch.
1215 * configure: Rebuild.
1216 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
1217 broken out of mips_elf_section_from_shdr.
1218 (mips_elf32_section_from_shdr): Rename from
1219 mips_elf_section_from_shdr. Call new function.
1220 (elf_backend_section_from_shdr): Update name of renamed function.
1221 * elf-bfd.h (struct elf_size_info): Change second parameter of
1222 write_out_phdrs to be const. Likewise for second parameter of
1223 swap_symbol_out.
1224 (struct bfd_elf_section_data): Add rel_hdr2 field.
1225 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
1226 (bfd_elf32_swap_symbol_out): Likewise.
1227 (bfd_elf32_swap_reloc_in): Likewise.
1228 (bfd_elf32_swap_reloc_out): Likewise.
1229 (bfd_elf32_swap_reloca_in): Likewise.
1230 (bfd_elf32_swap_reloca_out): Likewise.
1231 (bfd_elf32_swap_phdr_in): Likewise.
1232 (bfd_elf32_swap_phdr_out): Likewise.
1233 (bfd_elf32_swap_dyn_in): Likewise.
1234 (bfd_elf32_swap_dyn_out): Likewise.
1235 (bfd_elf32_slurp_symbol_table): Declare.
1236 (bfd_elf32_write_shdrs_and_ehdr): Declare.
1237 (bfd_elf32_write_out_phdrs): Declare.
1238 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
1239 (bfd_elf64_swap_symbol_out): Likewise.
1240 (bfd_elf64_swap_reloc_in): Likewise.
1241 (bfd_elf64_swap_reloc_out): Likewise.
1242 (bfd_elf64_swap_reloca_in): Likewise.
1243 (bfd_elf64_swap_reloca_out): Likewise.
1244 (bfd_elf64_swap_phdr_in): Likewise.
1245 (bfd_elf64_swap_phdr_out): Likewise.
1246 (bfd_elf64_swap_dyn_in): Likewise.
1247 (bfd_elf64_swap_dyn_out): Likewise.
1248 (bfd_elf64_slurp_symbol_table): Declare.
1249 (bfd_elf64_write_shdrs_and_ehdr): Declare.
1250 (bfd_elf64_write_out_phdrs): Declare.
1251 (_bfd_mips_elf_section_from_shdr): Declare.
1252 * elf.c (bfd_section_from_shdr): Remove assertion requiring
1253 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
1254 section for the section, add the new one to rel_hdr2. Increment
1255 reloc_count rather than setting it.
1256 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
1257 Remove static declaration.
1258 (elf_write_shdrs_and_ehdr): Define name as macro.
1259 (elf_write_out_phdrs): Likewise.
1260 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
1261 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
1262 (elf_swap_symbol_in): Change second parameter to be const.
1263 (elf_swap_symbol_out): Likewise.
1264 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
1265 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
1266 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
1267 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
1268 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
1269 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
1270 parameter to be const. Make non-static.
1271 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
1272 Make non-static.
1273 (elf_slurp_symbol_table): Make non-static.
1274 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
1275 * elfxx-target.h (elf_info_to_howto): Define if not defined.
1276 (elf_backend_size_info): Likewise.
1277 (elfNN_bed): Use elf_backend_size_info.
1278 * targets.c (bfd_elf64_bigmips_vec): Declare.
1279 (bfd_elf64_littlemips_vec): Declare.
1280 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
1281 bfd_elf64_littlemips_vec if BFD64 is defined.
1282
1283 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
1284
7dd3d45a
ILT
1285Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
1286
07692951
ILT
1287 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
1288 zeroes, in alignment holes.
1289
a4322a77
ILT
1290 * configure: Rebuild with autoconf 2.10.
1291
7dd3d45a
ILT
1292 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
1293 potential leading underscore in the allocated buffer.
1294
0293d5b0
MM
1295Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1296
1297 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
1298 symbols into .sbss if this is a relocatable link.
1299
a5d0cd50
ILT
1300Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
1301
1302 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
1303 undefined symbols when creating a shared library.
1304
1305Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
1306
1307 * coff-sh.c: Add a bunch of new code and static const arrays to
1308 support aligning loads and stores on four byte memory boundaries.
1309 Also:
1310 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
1311 R_SH_LABEL.
1312 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
1313 call sh_align_loads.
1314 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
1315 as unused.
1316
c403d358
ILT
1317Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
1318
1319 * cache.c (bfd_open_file): Unlink the file before opening it for
1320 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
1321
1322 * opncls.c (bfd_fdopenr): Set opened_once.
1323
2f710e17
ILT
1324Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
1325
ff60fc3a
ILT
1326 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
1327 freeing it.
1328
2f710e17
ILT
1329 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
1330 the code unconditionally.
1331
efb33f6b
ILT
1332Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
1333
1334 * libcoff-in.h (struct pei_section_tdata): Define structure.
1335 (pei_section_data): Define macro.
1336 * libcoff.h: Rebuild.
1337 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
1338 store s_paddr field in pei_section_data.
1339 (coff_compute_section_file_positions): Use pei_section_data rather
1340 than _cooked_size, and don't overwrite an existing value.
1341 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
1342 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
1343 * peicode.h (coff_bfd_copy_private_section_data): Define if
1344 COFF_IMAGE_WITH_PE.
1345 (pe_bfd_copy_private_section_data): New static function if
1346 COFF_IMAGE_WITH_PE.
1347
5ecd6d7f
ILT
1348Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
1349
db1e2aa7
ILT
1350 * srec.c (srec_set_arch_mach): Write as a function rather than a
1351 macro definition.
1352
5ecd6d7f
ILT
1353 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
1354 no map, just check each member in turn to see whether it is
1355 required.
1356
aefee5c8
MM
1357Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1358
1359 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
1360 table. Call BFD_ASSERT to validate header size, instead of
1361 calling fatal.
1362 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
1363 name.
1364
0d1fcbbb
MM
1365Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1366
1367 * ppcboot.c: New target for looking at PPCbug boot records.
1368
1369 * config{ure.in,.bfd}: Add support for ppcboot target.
1370 * targets.c: Ditto.
1371 * configure: Regenerate.
1372
f4597f8c
JL
1373Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
1374
1375 * coff-h8300.c (howto_table): Update names to match recent
1376 changes to include/coff/internal.h. Fix minor errors in the
1377 existing relocs. Add R_MOVL1 and R_MOVL2.
1378 (rtype2howto): Similarly.
1379 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
1380 existing relaxing code and peform more relaxing.
1381 (h8300_reloc16_extra_cases): Likewise.
1382
0dc70e1a
JL
1383Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
1384
1385 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
1386 symbols correctly.
1387
d1b8ccb0
PS
1388Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
1389
1390 * elfcode.h (elf_object_p): Reject generic ELF target if
1391 e_machine matches an alternate machine code in a specific backend.
1392
1393 * netbsd-core.c (netbsd_core_vec): Remove initializer for
1394 obsolete align_power_min field.
1395
c9f5444e
JL
1396Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
1397
1398 * coff-h8300.c (reloc_howto_type): Add howto entry for
1399 R_PCRWORD_B.
1400 (rtype2howto): Handle R_PCRWORD_B.
1401 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
1402 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
1403 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
1404 branch (R_PCWORD_B).
1405
4ad842aa
ILT
1406Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
1407
340d654f
ILT
1408 * aoutx.h (translate_from_native_sym_flags): Set the section for
1409 BSF_CONSTRUCTOR symbols.
1410
4ad842aa
ILT
1411 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
1412 last_bf_index.
1413
9c7a5748
DE
1414Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
1415
1416 * coffcode.h (coff_write_object_contents): In comdat section lookup,
1417 stop looking when section is found.
1418
622c93a3
ILT
1419Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
1420
e8f3bb64 1421 * coffcode.h (STRING_SIZE_SIZE): Define.
9aac8e83
ILT
1422 (styp_to_sec_flags): Handle long symbol names when looking for the
1423 section symbol.
e8f3bb64
ILT
1424 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
1425 (bfd_coff_long_section_names): Define.
1426 (coff_write_object_contents): Handle long section names.
1427 (bfd_coff_std_swap_table): Initialize new field.
1428 * libcoff.h: Rebuild.
1429 * coffgen.c (make_a_section_from_file): Handle long section
1430 names.
1431 (coff_write_symbols): Handle long section names.
1432 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1433 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1434 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
1435 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
1436 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
1437 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
1438 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1439 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
1440
622c93a3
ILT
1441 * bout.c (b_out_callback): Set lma of sections.
1442 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
1443 parameter to output_bfd. Used input_bfd instead of output_bfd in
1444 several places.
1445
6b725f83
ILT
1446Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
1447
b7d1158a
ILT
1448 * aoutx.h (translate_from_native_sym_flags): Don't create
1449 SEC_CONSTRUCTOR sections.
1450 * ecoff.c (ecoff_set_symbol_info): Likewise.
1451
6b725f83
ILT
1452 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
1453 From Don Bowman <bowman@waterloo.hp.com>.
1454
e28a1e77
DE
1455Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
1456
1457 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
1458 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1459
abec70b9
ILT
1460Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
1461
1462 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
1463 mips_32_relocs field.
1464 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
1465 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
1466 relocs against a global symbol which is not defined in a regular
1467 file.
1468 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
1469 against a global symbol, increment mips_32_relocs.
1470 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
1471 the symbol is not defined in a regular file, make room in the
1472 .rel.dyn section.
1473
ecba7a3a
ILT
1474Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
1475
656c5b6d
ILT
1476 * ecoff.c (ecoff_compute_section_file_positions): Track the real
1477 file position and the virtual file position separately. Set
1478 filepos information bsaed on the real file position.
1479 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
1480 Jan 23 change to coffcode.h.
1481
ecba7a3a
ILT
1482 * som.c (som_slurp_symbol_table): Set the symbol count to the
1483 number of BFD symbols created.
1484
e25a7988
MM
1485Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1486
1487 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
1488 output file if linking shared objects. Loop to check all relocs,
1489 rather than returning false on first error.
1490
5c28a96e
MM
1491Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1492
3f7ca26b
MM
1493 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
1494 (ppc_elf_additional_program_headers): If .interp section, bump #
1495 of program headers by 1.
1496 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
1497 (ppc_elf_size_dynamic_sections): Add support for .plt section.
1498 (ppc_elf_check_relocs): Print out filename in debug code. Enable
1499 PLT support.
1500 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
1501 debug output.
1502 (ppc_elf_relocate_section): If the output section isn't defined,
1503 don't abort, just give an error message.
1504
5c28a96e
MM
1505 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
1506 being created is .sdata or .sdata2, don't make the symbol dynamic.
1507
f5d65485
ILT
1508Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
1509
1510 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
1511 members of an archive for dynamic objects with no symbols, and
1512 pass them directly to check_archive_element.
1513 (xcoff_link_check_ar_symbols): Pass dynamic objects to
1514 xcoff_link_check_dynamic_ar_symbols.
1515 (xcoff_link_check_dynamic_ar_symbols): New static function.
1516
1517 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
1518 from _bfd_nodynamic to _bfd_xcoff.
1519 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
1520 Declare.
1521 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
1522 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
1523 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
1524 * libcoff.h: Rebuild.
1525 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
1526 (xcoff_get_section_contents): New static function.
1527 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
1528 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
1529 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
1530 (xcoff_dynamic_reloc): New static variable.
1531 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
1532 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
1533
1534Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
1535
1536 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
1537 if reloc_entry->addend is not 0.
1538 (CALC_ADDEND): Just set the addend to reloc.r_offset.
1539
34249b2f
DE
1540Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
1541
1542 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
1543 R_SPARC_GLOB_JMP.
1544 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
1545 Add entries for R_SPARC_[56].
1546 (sparc_reloc_map): Add entries for R_SPARC_[56].
1547
af50cd91
ILT
1548Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
1549
1726b8f0
ILT
1550 Optimize linking of stabs in sections as used in ELF and COFF.
1551 * stabs.c: New file.
1552 * libbfd-in.h (_bfd_link_section_stabs): Declare.
1553 (_bfd_write_section_stabs): Declare.
1554 (_bfd_write_stab_strings): Declare.
1555 * libbfd.h: Rebuild.
1556 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
1557 (struct coff_link_hash_table): Add stab_info field.
1558 * libcoff.h: Rebuild.
1559 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
1560 stab_info field.
1561 (coff_link_add_symbols): Call _bfd_link_section_stabs if
1562 appropriate.
1563 (_bfd_coff_final_link): Write out stab strings hash table.
1564 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
1565 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
1566 hash table.
1567 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
1568 (struct bfd_elf_section_data): Add stab_info field.
1569 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
1570 field.
1571 * elflink.h (elf_link_add_object_symbols): If appropriate, call
1572 _bfd_link_section_stabs.
1573 (elf_bfd_final_link): Write out stab strings hash table.
1574 (elf_link_input_bfd): Handle optimized stabs sections.
1575 * reloc.c (_bfd_final_link_relocate): Check address against
1576 _raw_size rather than _cooked_size.
1577 * Makefile.in: Rebuild dependencies.
1578 (BFD_LIBS): Add stabs.o
1579 (BFD_LIBS_CFILES): Add stabs.c.
1580
1581 * VERSION: Increment for bfdlink.h change.
1582
af50cd91
ILT
1583 * coffgen.c (coff_renumber_symbols): Correct handling of
1584 BSF_NOT_AT_END common symbols.
1585
f9fa5df3
ILT
1586Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
1587
1588 * coff-ppc.c (record_toc): Add cast to avoid warning.
1589 (ppc_allocate_toc_section): Likewise.
1590 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
1591 (ppc_coff_reloc_type_lookup): Remove unreached code.
1592 * coffcode.h (coff_write_object_contents): Don't take the address
1593 of an array.
1594 * peicode.h (pe_print_idata): Add casts to avoid warning.
1595 (pe_print_edata): Likewise.
1596 (pe_print_reloc): Remove ANSI C string concatenation.
1597
d6e0e2f7
ILT
1598Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
1599
1600 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
1601 and last_bf fields.
1602 * libcoff.h: Rebuild.
1603 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
1604 symbols.
1605 (coff_swap_aux_out): Likewise.
1606 * peicode.h (coff_swap_aux_in): Likewise.
1607 (coff_swap_aux_out): Likewise.
1608 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
1609 symbols.
1610 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
1611 field.
1612 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
1613 Fix up .bf endndx link fields.
1614 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
1615 field.
1616 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
1617 symbols.
1618
221d1e19
MM
1619Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1620
1621 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
1622 on Solaris PowerPC systems doesn't get confused.
1623
1624 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
1625 #ifdef PPC.
1626
1627 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
1628 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
1629 update did_reg and did_reg2.
1630
8f9a56c6
ILT
1631Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
1632
f97fca78
ILT
1633 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
1634
8f9a56c6
ILT
1635 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
1636 callback routines, pass h->root.string rather than name, in case
1637 copy is true and name is transient.
1638
603fdf16
SG
1639Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
1640
1641 * elfcore.h: Add support for core files with multiple threads.
1642 (Primarily for Solaris.)
1643
a2d914e1
ILT
1644Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1645
cdf23557
ILT
1646 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
1647 section->orelocation is NULL.
1648
a2d914e1
ILT
1649 * coffgen.c (bfd_coff_get_syment): New function.
1650 (bfd_coff_get_auxent): New function.
1651 * bfd-in.h (bfd_coff_get_syment): Declare.
1652 (bfd_coff_get_auxent): Declare.
1653 * bfd-in2.h: Rebuild.
1654
5cf36a32
ILT
1655Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
1656
1657 * elf32-mips.c (struct mips_hi16): Define.
1658 (mips_hi16_addr, mips_hi16_addend): Remove.
1659 (mips_hi16_list): New static variable.
1660 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
1661 (mips_elf_lo16_reloc): Process mips_hi16_list.
1662 (mips_elf_relocate_section): Permit an arbitrary number of HI16
1663 relocs before the associated LO16 reloc.
1664
b7fce5be
ILT
1665Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
1666
176512da
ILT
1667 * versados.c (versados_scan): Check bfd_alloc return value.
1668 (versados_object_p): Check all bfd_read return values. Require
1669 that lang field be less than 10, to avoid confusion with Intel Hex
1670 files.
1671
18de3f19
ILT
1672 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
1673 aren't any symbols.
1674 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
1675 not 0, for an absolute symbol.
1676 (NAME(aout,swap_ext_reloc_out)): Likewise.
1677
66ab4152
ILT
1678 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
1679 (ihex_write_object_contents): For a large start address, output
1680 the full 32 bit address in record type 5.
1681
b7fce5be
ILT
1682 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
1683 to int to avoid promotion problems in prototype.
1684
f1b45745
ILT
1685Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
1686
f400f358
ILT
1687 * configure.host: Use ${srcdir} when looking for picfrag.
1688
3d9a5986
ILT
1689 * configure.host: Switch on ${libdir}, not $(libdir). From
1690 alan@spri.levels.unisa.edu.au (Alan Modra).
1691
f1b45745
ILT
1692 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
1693 entry point, not just for DYNAMIC objects.
1694 * sunos.c (sunos_add_dynamic_symbols): Always call
1695 sunos_create_dynamic_sections. If called with a non DYNAMIC
1696 object, don't do anything else.
1697 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
1698
6f21f2e3
ILT
1699Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
1700
639b5a09
ILT
1701 * configure.in: Permit --enable-shared to specify a list of
1702 directories.
1703 * configure: Rebuild.
1704
6f21f2e3
ILT
1705 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
1706 host when configuring with --enable-shard.
1707
3f5f565b
ILT
1708Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
1709
1ac75f5c
ILT
1710 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
1711 <jdp@polstra.com>.
1712
1a9951a9
ILT
1713 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
1714 to avoid crashing in bfd_hash_replace.
1715
f1ac3acb 1716 * sysdep.h: Use #ifdef, not #if.
3f5f565b 1717
eb5f58e0
ILT
1718Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
1719
1720 * config.in: Rebuild.
1721
ab1aa5cd
FF
1722Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
1723
1724 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
1725 (AC_CHECK_HEADERS): Check for sys/time.h
1726 (AC_HEADER_TIME): Add macro.
1727 * configure: Rebuild.
1728 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
1729 to control what combination of <time> and <sys/time.h>
1730 get included.
1731
d1f74cd2
DE
1732Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
1733
1734 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
1735 (aout_32_sunos4_write_object_contents): Likewise.
1736 * aoutx.h (NAME(aout,machine_type)): Handle
1737 bfd_mach_sparc_{sparclet,sparclite}.
1738 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
1739 (bfd_mach_sparc_v9_p): Update.
1740 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
1741 * libaout.h (enum machine_type): Add M_SPARCLET.
1742 * sunos.c (MACHTYPE_OK): Define.
1743 * bfd-in2.h: Regenerated.
1744
1dad72bd
ILT
1745Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
1746
19bfbcbe
ILT
1747 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
1748 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
1749 * elflink.c (_bfd_elf_create_got_section): Store the
1750 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
1751 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
1752 global offset table goes over 0x1000, set the value of
1753 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
1754 (elf32_sparc_relocate_section): Subtract the offset of
1755 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
1756
1dad72bd
ILT
1757 * elfcode.h: Don't include <string.h>.
1758
ca4e2190
JL
1759Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
1760
1761 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
1762 generic_link_hash_newfunc. All references changed.
1763 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
1764 moved here from libbfd-in.h.
1765 * libbfd-in.h: Corresponding changes.
1766 * libbfd.h: Regenerated.
1767
ce6a7731
ILT
1768Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
1769
aad53b0d
ILT
1770 * aoutx.h (aout_link_input_section_std): When reporting an
1771 overflow error, use the name of the symbol in the hash table if
1772 available.
1773 (aout_link_input_section_ext): Likewise.
1774
ce6a7731
ILT
1775 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
1776 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
1777
323b430f
SC
1778Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
1779
1780 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
1781 * coffcode.h (coff_compute_section_file_positions): Likewise.
1782 (coff_write_object_contents): Likewise.
1783
7fc1cd16
ILT
1784Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
1785
5a28331f
ILT
1786 * section.c (SEC_LINK_ONCE): Define.
1787 (SEC_LINK_DUPLICATES): Define.
1788 (SEC_LINK_DUPLICATES_DISCARD): Define.
1789 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
1790 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
1791 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
1792 * bfd-in2.h: Rebuild.
1793 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
1794 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
1795 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
1796 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
1797 SEC_LINK_ONCE, and look through the symbol table for the setting
1798 for SEC_LINK_DUPLICATES.
1799 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
1800 set for a section, find the section symbol in the symbol table,
1801 and set the aux entry based on SEC_LINK_DUPLICATES.
1802 * coffgen.c (coff_print_symbol): Add a space before "checksum".
1803 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
1804 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
1805 * coff-i386.c (i386coff_vec): Likewise.
1806 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
1807
7fc1cd16
ILT
1808 * VERSION: Bump to 2.6.1.
1809 * Makefile.in (stamp-h): Depend upon VERSION.
1810
9399a257
JL
1811Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
1812
1813 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
1814 * libbfd.h: Rebuilt.
1815 * linker.c (generic_link_hash_newfunc): No longer static.
1816 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
1817 to override.
1818 * coff-h8300.c: Add two derived hash tables and their associated
1819 funtions and #defines for use by the h8300 linker.
1820 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
1821 the function vector as needed. Place the address of the function
1822 vector entry in the location specified by the R_MEM_INDIRECT reloc.
1823 Rewrite the vectors section contents as necessary.
1824 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
1825 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
1826 (coff_bfd_link_hash_table_create): Likewise.
1827
506f2bb4
ILT
1828Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
1829
1830 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
1831 __attribute__ ((__unused__)) so that -Wall doesn't warn about
1832 them.
1833 (hppa_rebuild_insn): Pass pointer to correct type to
1834 low_sign_unext and dis_assemble_21.
1835
05a84ae1
DE
1836Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
1837
1838 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
1839 Stick with sparc-*-{sysv4*,solaris2*}.
1840
919cf4b5
ILT
1841Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
1842
8230f31c
ILT
1843 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
1844 (coff_swap_aux_out): Swap out extra PE x_scn fields.
1845 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
1846 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
1847 fields is non-zero, print them.
1848
9addd1d4
ILT
1849 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
1850 ifdef. Remove unused variables.
1851 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
1852 variables.
1853 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
1854 (get_symbol_value): Ifdef out.
1855 (pe_ppc_reloc): Ifdef out. Remove unused variables.
1856 (coff_ppc_relocate_section): Remove unused variables. Make
1857 fprintf strings and argument types correspond. Put before_addr in
1858 DEBUG_RELOC ifdef.
ff0e4a93
ILT
1859 (dump_toc): Make fprintf strings and argument types correspond.
1860 (ppc_process_before_allocation): Remove unused variables. Always
1861 return a value.
9addd1d4
ILT
1862 (ppc_reflo_reloc): Ifdef out.
1863 (ppc_addr32nb_reloc): Ifdef out.
1864 (ppc_coff_rtype2howto): Make fprintf strings and argument types
1865 correspond.
1866 (coff_ppc_rtype_to_howto): Likewise.
1867 (ppc_coff_swap_sym_in_hook): Remove unused variables.
1868
1869 * peicode.h (pe_print_idata): Move otherwise unused variables into
1870 the #ifdef where they are used. Always return a value.
ff0e4a93
ILT
1871 (pe_print_edata): Make fprintf strings and argument types
1872 correspond. Always return a value.
9addd1d4
ILT
1873 (pe_print_pdata): Removed unused variable addr_value. Always
1874 return a value.
1875 (pe_print_reloc): Remove unused variable onaline. Make fprintf
ff0e4a93 1876 strings and argument types correspond. Always return a value.
9addd1d4
ILT
1877
1878 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
1879 (ppc_elf_finish_dynamic_symbol): Move definition of unused
1880 variable rela inside #if 0 section where it is used.
1881
c877bdf1
ILT
1882 * ns32k.h: New file.
1883 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
1884 functions to start with _bfd_.
1885 * aout-ns32k.c: Include ns32k.h. Change references to renamed
1886 functions in cpu-ns32k.h.
1887 * Makefile.in: Rebuild dependencies.
1888 (HFILES): Add ns32k.h.
1889
ff0e4a93
ILT
1890 * section.c (struct sec): Add linker_mark field. Change
1891 user_set_vma and reloc_done to be single bit fields.
1892 (STD_SECTION): Update accordingly.
7ec49f91
ILT
1893 * bfd-in2.h: Rebuild.
1894 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
1895 link.
1896 (aout_link_input_bfd): Don't link unmarked sections.
1897 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
1898 link.
1899 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
1900 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
1901 the link.
1902 * elflink.h (elf_bfd_final_link): Mark sections included in the
1903 link.
1904 (elf_link_input_bfd): Don't link unmarked sections.
1905 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
1906 in the link.
1907 (xcoff_link_input_bfd): Don't link unmarked sections.
1908
919cf4b5
ILT
1909 * coffswap.h (coff_swap_scnhdr_out): Include section name in
1910 overflow error messages.
1911
986cf3b8
ILT
1912Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
1913
fd681dcd
ILT
1914 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
1915 is not set, print "BFD: " before the error message.
1916
986cf3b8
ILT
1917 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
1918 Miles Bader <miles@gnu.ai.mit.edu>.
1919 * configure: Rebuild.
1920
3998d526
ILT
1921Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
1922
c3dffbd7
ILT
1923 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
1924 symbols.
1925
3998d526
ILT
1926 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
1927 m68k-aout, m68k-coff, and m68k-elf targets.
1928
e4d27380
ILT
1929Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
1930
1931 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
1932 (ieee_generic_stat_arch_elt): Restructured to prevent
1933 ieee_object_p from being called repeatedly.
1934
51776a11
SC
1935Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
1936
1937 * coffcode.h (coff_write_object_contents): Allocate
1938 buffers large enough for any FILEHDR or AOUTHDR.
1939
1940Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
1941
1942 * ecofflink.c (lookup_line): New static function, renamed and
1943 slighly changed from old _bfd_ecoff_locate_line.
1944 (_bfd_ecoff_locate_line): Cache line number information. Use
1945 lookup_line for actual lookup.
1946
9e4ebb1b
MM
1947Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
1948
1949 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
1950 multiple of 20 bytes.
1951
9e7427a4
ILT
1952Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
1953
51776a11
SC
1954 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
1955 allocate ecoff_find_line, and don't initialize by hand.
1956 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
1957 mips_elf_find_line, and don't call memset.
1958
9e7427a4
ILT
1959 * coffcode.h (coff_compute_section_file_positions): If not
1960 producing a final executable, don't consider sofar when aligning
1961 the section to the correct size.
1962
1963Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
1964
1965 * coffcode.h (coff_add_missing_symbols): Ifdef out.
1966 (coff_write_object_contents): Don't call coff_add_missing_symbols.
1967 * coffgen.c (coff_section_symbol): Ifdef out.
1968
e7f9ba4f
ILT
1969Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
1970
1971 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
1972 output_bfd is not NULL.
1973
34c4d647
DE
1974Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
1975
1976 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
1977 of bfd_alloc (fixes fix_line not being initialized).
1978 Delete zeroing of fix_{value,tag,end,scnlen} fields.
1979
4e054247
JL
1980Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
1981
57289b5c
JL
1982 * coffcode.h: Allow specific backends to override the
1983 bfd_link_add_symbols routine.
1984
4e054247
JL
1985 * coff-h8300.c: Include genlink.h.
1986 (howto_table): Add R_MEM_INDIRECT.
1987 (rtype2howto): Support R_MEM_INDIRECT.
1988 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
1989 for now.
1990
a10d3dec
ILT
1991Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
1992
1993 * coff-alpha.c (alpha_relocate_section): Use
1994 info->callbacks_warning, rather than _bfd_error_handler, for
1995 "multiple gp" warning.
1996
ea2488ad
ILT
1997Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
1998
8881b321
ILT
1999 * linker.c (bfd_wrapped_link_hash_lookup): New function.
2000 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
2001 table string. Use bfd_wrapped_link_hash_lookup.
2002 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
2003 table string.
2004 * aoutx.h (aout_link_write_symbols): Use the name from the hash
2005 table, if any, when writing out symbols.
2006 (aout_link_input_section_std): Use the name from the hash table,
2007 if any, when reporting undefined symbols.
2008 (aout_link_input_section_ext): Likewise.
2009 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
2010 * bout.c (get_value): Likewise.
2011 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2012 * ecoff.c (ecoff_reloc_link_order): Likewise.
2013 * elflink.h (elf_link_add_object_symbols): Likewise.
2014 (elf_reloc_link_order): Likewise.
2015 * linker.c (_bfd_generic_link_output_symbols): Likewise.
2016 (_bfd_generic_reloc_link_order): Likewise.
2017 (default_indirect_link_order): Likewise.
2018 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
2019 * sunos.c (sunos_add_one_symbol): Likewise.
2020 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2021 (bfd_xcoff_link_count_reloc): Likewise.
2022 (xcoff_reloc_link_order): Likewise.
2023
2024 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
2025 into -1 for intern->rss.
2026
ea2488ad
ILT
2027 * configure: Rebuild with autoconf 2.8.
2028
c189fdfb
ILT
2029Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
2030
2031 * stab-syms.c (__define_stab_duplicate): Define.
2032 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
2033 switch.
2034 * bfd-in.h (bfd_get_stab_name): Declare.
2035 * bfd-in2.h: Rebuild.
2036 * Makefile.in: Rebuild dependencies.
2037 (BFD_LIBS): Add stab-syms.o.
2038 (BFD_LIBS_CFILES): Add stab-syms.c.
2039 (BFD32_BACKENDS): Remove stab-syms.o.
2040 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
2041 * configure.in: Don't list stab-syms.o in bfd_backends.
2042 * configure: Rebuild.
2043 * libaout.h (aout_stab_name): Don't declare.
2044 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
2045 not aout_stab_name.
2046
2047Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
2048
2049 * elf.c (assign_file_positions_for_segments): Adjust file offset
2050 for section alignment even if SEC_LOAD is not set.
2051
c5bde1ef
ILT
2052Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
2053
8f218e05
ILT
2054 * configure.in: Don't set SHLIB or SHLINK to an empty string,
2055 since they appear as targets in Makefile.in.
2056 * configure: Rebuild.
2057
c5bde1ef
ILT
2058 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
2059 don't fiddle with a symbol which is not defined anywhere.
2060
cb84f028
ILT
2061Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
2062
4e59f523
ILT
2063 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
2064 though they are defined in a shared library.
2065 (xcoff_build_ldsyms): Likewise.
2066
ea2504d5
ILT
2067 * coffgen.c (coff_find_nearest_line): Don't look at the line
2068 numbers for the section if section->lineno is NULL.
2069
cb84f028
ILT
2070 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
2071 message rather than calling BFD_ASSERT.
2072 * elfcode.h (write_relocs): Check return value of
2073 _bfd_elf_symbol_from_bfd_symbol.
2074
6e036cf7
MM
2075Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2076
2077 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
2078 for .sbss section.
2079
d08435de
JL
2080Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
2081
2082 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
2083 and R_HPPA_NLRSEL.
2084 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
2085 hppa_reloc_field_selector_type_alt.
2086 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
2087 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
2088 selectors.
2089 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
2090
09609415
ILT
2091Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
2092
2093 * elf.c (assign_file_positions_for_segments): Adjust the segment
2094 memory size for the alignment of a SEC_ALLOC section, not just a
2095 SEC_LOAD section.
2096
55626bf0
ILT
2097Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2098
2099 * m68klinux.c: New file.
2100 * hosts/m68klinux.h: New file.
2101 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
2102 * configure.in (m68*-*-linux*): New native host.
2103 (m68klinux_vec): New vector.
2104 * configure: Rebuild.
2105 * targets.c (m68klinux_vec): Declare.
2106 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
2107 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
2108 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
2109 declaration from bfd_linux_size_dynamic_sections.
2110 (bfd_m68klinux_size_dynamic_sections): Declare.
2111 * bfd-in2.h: Rebuild.
2112 * Makefile.in: Rebuild dependencies.
2113 (BFD32_BACKENDS): Add m68klinux.o.
2114 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
2115
6c7b3090
JL
2116Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
2117
2118 * libhppa.h (pa_arch): Add pa20.
2119 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
2120 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
2121 (hppa_field_adjust): Handle e_nsel.
2122 * som.c: Provide default definitions for many new relocs found only
2123 in hpux10 include files.
2124 (som_fixup_formats): Add several new relocs from hpux10.
2125 (som_hppa_howto_table): Add hpux10 relocs.
2126 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
2127
14fd4616
SS
2128Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
2129
2130 * mpw-make.sed: Edit out recent shared library support, and
2131 rules to rebuild .h files using doc/chew.
2132
3d9f042c
ILT
2133Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
2134
2135 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
2136 size even of sections with no contents.
2137
bdec6228
ILT
2138Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
2139
88358469
ILT
2140 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
2141 starting with '$' the way we skip names starting with '.'. When
2142 updating x_endndx, don't be fooled by an index which has been
2143 merged.
2144
bdec6228
ILT
2145 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
2146 struct/union/enum type with no elements.
2147
053ae1d7
ILT
2148Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
2149
15f4406c
ILT
2150 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
2151
c8435133
ILT
2152 * archive.c (bfd_generic_archive_p): If the first file in the
2153 archive can not be recognized as an object, don't assume that this
2154 is the wrong format.
2155
053ae1d7
ILT
2156 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
2157 format is not bfd_object.
2158 (bfd_elf_get_dt_soname): Likewise.
2159
ea74d979
ILT
2160Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
2161
2162 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
2163 reloc.
2164
871a3f3b
C
2165Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2166
2167 * bfd.c (tdata): Add netbsd_core_data.
2168 * bfd-in2.h: Regenerated.
2169
2170Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
2171
fe6fc35f
ILT
2172 * sunos.c (SUNOS_CONSTRUCTOR): Define.
2173 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
2174 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
2175 appropriate.
2176
871a3f3b
C
2177 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
2178 to get the symbol index, matching 14 Jul 95 change.
2179
d3785301
FF
2180Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
2181
2182 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2183 Remove duplicate definition of gp.
2184
60a49e7f
ILT
2185Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
2186
81bdcecf
ILT
2187 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
2188 assume that we can set the GP value and then get the same value,
2189 since it won't be true if the output file is neither ELF nor
2190 ECOFF.
2191 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
2192 _bfd_get_gp_value here.
2193 (mips_gprel_reloc): Don't assume we can set and get the GP value.
2194 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
2195 mips_elf_final_gp.
2196 (mips_elf_lo16_reloc): Likewise.
2197 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
2198 Don't require that the BFD be ELF.
2199 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
2200 (mips_elf_gprel32_reloc): Likewise.
2201 (mips_elf_relocate_section): Don't assume we can set and get the
2202 GP value.
2203 (mips_elf_finish_dynamic_symbol): Don't bother to use
2204 _bfd_get_gp_value here.
2205
2206 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
2207 Don't change epdr between malloc and free. Be careful not to free
2208 NULL pointers. Zero out the first RPDR.
2209
7b61165a
ILT
2210 * configure.host: On Linux, only pass -rpath option if $(libdir)
2211 is neither /lib nor /usr/lib. From Alan Modra
2212 <alan@mullet.Levels.UniSA.Edu.Au>.
2213
60a49e7f
ILT
2214 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
2215 dt_name.
2216 (elf_dt_name): Rename from elf_dt_needed_name.
2217 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
2218 elf_dt_needed_name.
2219 (bfd_elf_get_dt_soname): New function.
2220 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
2221 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
2222 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
2223 * bfd-in2.h: Rebuild.
2224
b268e261
DE
2225Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
2226
2227 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
2228 _bfd_sparc_elf_reloc_type_lookup.
2229 (bfd_elf32_bfd_reloc_type_lookup): Update.
2230 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
2231 (sparc64_elf_howto_table): Define.
2232 (sparc_reloc_map): Define.
2233 (sparc64_elf_reloc_type_lookup): New function.
2234 (sparc_elf_wdisp16_reloc): New function.
2235 (elf_info_to_howto): Use sparc64_elf_howto_table.
2236 (sparc64_elf_relocate_section): Likewise.
2237 (bfd_elf64_bfd_reloc_type_lookup): Update.
2238
9e2ef098
ILT
2239Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
2240
2241 * configure.host: Check for 'do not mix' from native linker before
2242 trying to use -rpath.
2243
4c70373f
ILT
2244Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
2245
cba3f8a9
ILT
2246 * bfd.c (_bfd_get_gp_value): New function.
2247 (_bfd_set_gp_value): New function.
2248 * libbfd-in.h (_bfd_get_gp_value): Declare.
2249 (_bfd_set_gp_value): Declare.
2250 * libbfd.h: Rebuild.
2251 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
2252 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
2253 directly to the fields in the tdata information.
2254 (alpha_relocate_section): Likewise.
2255 * coff-mips.c (mips_adjust_reloc_in): Likewise.
2256 (mips_gprel_reloc): Likewise.
2257 (mips_relocate_section): Likewise.
2258 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
2259 (mips_elf_lo16_reloc): Likewise.
2260 (mips_elf_final_gp): Likewise.
2261 (mips_elf_gprel16_reloc): Likewise.
2262 (mips_elf_gprel32_reloc): Likewise.
2263 (mips_elf_relocate_section): Likewise.
2264 (mips_elf_finish_dynamic_symbol): Likewise.
2265
4c70373f
ILT
2266 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
2267
a0a2dd54
ILT
2268Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
2269
f54c7482 2270 * configure.in: Call AC_PROG_CC before configure.host.
65eed095
ILT
2271 * configure: Rebuild.
2272 * configure.host: Don't set information which autoconf should
2273 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
65eed095 2274
14293419
ILT
2275 * configure.host: Remove go32 and win32 host information, since it
2276 should no longer be needed.
2277
edf3fe48
ILT
2278 * elf.c (map_sections_to_segments): If we have a .dynamic section,
2279 then start a new segment rather than put a writable section in a
2280 readonly segment.
2281
b5e4f369
ILT
2282 * configure.host: Set RPATH_ENVVAR.
2283
f2e33e27
ILT
2284 * Makefile.in: Rebuild dependencies.
2285
a0a2dd54
ILT
2286 * elflink.c (_bfd_elf_create_linker_section): Remove unused
2287 zero_section variable.
2288
52c6bc4d
ILT
2289Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
2290
2291 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
2292 ($(srcdir)/libbfd.h): Rename from libbfd.h.
2293 ($(srcdir)/libcoff.h): Rename from libcoff.h.
2294
c9e5279f
ILT
2295Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
2296
cb50baea
ILT
2297 * ieee.c (ieee_write_expression): Only use an R variable for a
2298 local symbol. Don't output a zero offset. Handle a zero address.
2299 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
2300 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
2301 PCREL_OFFSET.
2302 (parse_expression): Don't try to handle multiple occurrences of a
2303 P variable. Handle I variables differently from X variables. Fix
2304 the order of minus expressions.
2305 (ieee_slurp_external_symbols): Generate an I variable for an NN
2306 record. Fix handling of ATI and ATX records.
2307 (ieee_slurp_sections): Only set minimal section attributes.
2308 Adjust them later, based on the section contents.
2309 (ieee_object_p): Read in the file until just after the ME record.
2310 Call ieee_slurp_section_data to set the section flags.
2311 (do_one): Add iterations parameter. Only repeat the first load
2312 item. Set the section and file reloc flags.
2313 (ieee_slurp_section_data): Set section flags. Pass iterations to
2314 do_one.
2315 (ieee_canonicalize_reloc): Handle I variables.
2316 (do_with_relocs): Only emit relocation size when necessary.
2317 Increase MAXRUN to 127. Change ov to be assigned, and take
2318 src_mask and pcrel_offset into account.
2319 (ieee_write_data_part): Skip sections that are not loaded.
2320 (ieee_write_external_part): Don't output optional last entry of WX
2321 records.
2322 (ieee_write_me_part): Make setting of me_record neater.
2323 (ieee_generic_stat_arch_elt): Get the size of an archive element.
2324
c9e5279f
ILT
2325 * syms.c (stt): Add entries for zerovars, vars, and code.
2326
2327 * elfcode.h (validate_reloc): New static function.
2328 (write_relocs): Call validate_reloc for non ELF relocs.
2329
2330 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
2331 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
2332 (TARGET_LITTLE_SYM): Likewise.
2333
2334 * config.bfd (m68*-*-psos*): New target.
2335
d9d65be6
ILT
2336Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
2337
2338 * i386msdos.c: Remove some #if 0 code.
2339 (msdos_write_object_contents): Don't include empty sections in the
2340 size computation, regardless of their address.
2341
2342Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2343
2344 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
2345 is NULL, ie, the -r switch is used.
2346
db5970c7
ILT
2347Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
2348
e9f03cd4
ILT
2349 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
2350 (BFD_RELOC_MIPS_GOT_LO16): Define.
b7384d22 2351 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
e9f03cd4
ILT
2352 * bfd-in2.h, libbfd.h: Rebuild.
2353 * elf32-mips.c (mips_reloc_map): Map new relocs.
2354
fe7c066a
ILT
2355 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
2356
1ab628e4
ILT
2357 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
2358 $(SHLINK).
2359
db5970c7
ILT
2360 * ieee.c (get_symbol): Set the section to bfd_abs_section.
2361 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
2362 simple number for the section address, rather than an expression.
2363 Limit the number of bytes between relocs to MAXRUN.
2364 (ieee_write_me_part): Set me_record to the file offset after the
2365 start address.
2366 (ieee_write_processor): New static function.
2367 (ieee_write_object_contents): Use ieee_write_processor.
2368
318b7c18
ILT
2369Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
2370
db5970c7
ILT
2371 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
2372
2373 * coff-aux.c: Change include of aux.h to aux-coff.h.
318b7c18 2374
56b64690
ILT
2375Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2376
2377 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
2378 relocation put the addend both in the reloc entry and the data.
2379 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
2380 GOT offset value.
2381
2382 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
2383 a R_68K_PCxx reloc against a defined global symbol directly.
2384 (elf_m68k_check_relocs): Don't count such a reloc.
2385
2386 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
2387 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
2388 symbol for now, otherwise always record the symbol as dynamic.
2389 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
2390 is not referenced by a dynamic object, and we are not making a
2391 shared object, then don't make a PLT entry. If we do make a PLT
2392 entry, make sure the symbol has been recorded as dynamic.
2393
5d649ca8
ILT
2394Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
2395
2396 * configure.host: When making a shared library, set HLDFLAGS to
2397 pass an appropriate -rpath option. Use the make variable SONAME
2398 as the shared library soname, rather than computing it here. On
2399 SunOS, build stamp-tshlink in place of $(SHLINK).
2400 * Makefile.in (SONAME): New variable.
2401 ($(SHLINK)): Make a link to the transformed name, as well.
2402 (stamp-tshlink): New target.
2403 (install): Skip stamp-tshlink during install.
2404
8cc98cd5
MM
2405Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2406
56b64690
ILT
2407 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
2408 linker sections have been set up yet.
2409
8cc98cd5
MM
2410 * elf.c (make_mapping): Add an additional argument to suppress
2411 making the first section include the program headers.
2412 (map_sections_to_segments): If the user used -Ttext such that the
2413 program headers are on a different page, do not set the flags
2414 saying that this section includes the program headers.
2415
fe16107d
C
2416Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
2417
2418 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
2419 don't define TRAD_HEADER.
2420 * configure: Rebuild.
2421
2422 * netbsd-core.c: New file, support for NetBSD core files.
2423 * hosts/*nbsd.h: Removed.
2424
f1783016
DE
2425Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
2426
2427 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
2428 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
2429 * libbfd.h, bfd-in2.h: Regenerated.
2430 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
2431 bfd_elf32_bfd_reloc_type_lookup.
2432 (reloc_type{,_names}): Deleted.
2433 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2434 Add sparc64 relocs.
2435 (sparc_reloc_map): Add sparc64 relocs.
2436 (sparc_elf_notsupported_reloc): New static function.
2437 (sparc_elf_wdisp16_reloc): New static function.
2438 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
2439 (elf32_sparc_relocate_section): Likewise.
2440 (bfd_elf32_bfd_reloc_type_lookup): Define.
2441 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
2442 (reloc_type{,_names}): Deleted.
2443 (elf_sparc_howto_table): Deleted.
2444 (sparc_reloc_map): Deleted.
2445 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
2446 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
2447
48fd00b6
ILT
2448Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
2449
2300e217
ILT
2450 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
2451 *-*-hpux* host.
2452
48fd00b6
ILT
2453 * Makefile.in (program_transform_name): New variable.
2454 (install): Transform library name before installing it.
2455
8adca582
ILT
2456Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
2457
cbe75cb6
ILT
2458 * archures.c (bfd_mach_i960_hx): Define.
2459 * bfd-in2.h: Rebuild.
2460 * cpu-i960.c (scan_960_mach): Accept machine "hx".
2461 (MATRIX): Expand entries for HX.
2462 (arch_info_struct): Add i960:hx entry.
2463 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
2464 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
2465 (coff_set_flags): Handle bfd_mach_i960_hx.
2466
44f795f7
ILT
2467 Support for building as a shared library, based on patches from
2468 Alan Modra <alan@spri.levels.unisa.edu.au>:
2469 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
2470 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
2471 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
2472 * configure: Rebuild.
2473 * configure.host: If --enable-shared, adjust shared library stuff
2474 based on the host. If the host is SunOS, and the linker supports
2475 -rpath, set HLDFLAGS to use it.
2476 * Makefile.in (ALLLIBS): New variable.
2477 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
2478 (COMMON_SHLIB, SHLINK): New variables.
2479 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
2480 (STAGESTUFF): Remove variable.
2481 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
2482 $(TARGETLIB).
2483 (stamp-ofiles): New target, like old ofiles target, but build
2484 using a temporary file and move-if-change, and touch stamp-ofiles
2485 when done.
2486 (ofiles): Just depend upon stamp-ofiles.
2487 (stamp-piclist, piclist): New targets.
2488 ($(SHLIB), $(SHLINK)): New targets.
2489 (targets.o, archures.o): Build twice if PICFLAG is set.
2490 (do_mostlyclean): Remove pic/*.o.
2491 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
2492 stamp-piclist.
2493 (do_distclean): Remove pic and stamp-picdir.
2494 (install): Install shared libraries.
2495 ($(OFILES)): Depend upon stamp-picdir.
2496 (stamp-picdir): New target.
2497
cb62d2bc
ILT
2498 * libcoff-in.h: Add comment reminding people that libcoff.h is a
2499 generated file.
2500 * libcoff.h: Rebuild.
2501
8adca582
ILT
2502 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
2503 flavour of a section with no owner.
2504
2505 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
2506 ELF_LINK_NON_ELF flag.
2507 (mips_elf_create_got_section): Likewise.
2508
2509 * elf.c: Revert last change, since it breaks dynamic linking.
2510 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
2511 field.
2512 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
2513 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
2514 (elfNN_bed): Don't initialize want_hdr_in_seg field.
2515
2516Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2517
2518 * elf.c (assign_file_positions_for_segments): If the backend does
2519 not want the elf header or the program headers in the address
2520 space, do not include them in the calculations.
2521
2522 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
2523 function to determine if we need additional program headers.
2524 (ppc_elf_modify_segment_map): Define as a NOP function for now.
2525 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
2526
0f09ddd4
ILT
2527Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
2528
2529 * coffcode.h: Move today's libcoff.h change into coffcode.h.
2530
b48f10ba
FF
2531Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
2532
0f09ddd4
ILT
2533 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
2534 back into one line. Some compilers (sunos 4.1.3 for example)
2535 won't accept args split across more than one line.
b48f10ba 2536
50761d3b
SC
2537Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
2538
2539 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
2540 * configure: Regenerate.
2541
9dce8260
JL
2542Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
2543
2544 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
2545 try to do arithmetic on a void *, cast it to a unsigned char * first.
2546
6c55897c
ILT
2547Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
2548
869b7d80
ILT
2549 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
2550 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
2551 ELF_LINK_NON_ELF.
2552 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
2553 flag for a newly defined symbol.
2554 (NAME(bfd_elf,record_link_assignment)): Likewise.
2555 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
2556 set the DEF or REF_REGULAR flags correctly.
2557
6f6956c6
ILT
2558 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
2559 (libbfd.h, libcoff.h): Corresponding change.
2560
6c55897c
ILT
2561 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
2562 a PLT32 reloc as dynamic.
2563 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
2564 is not referenced by a dynamic object, and we are not making a
2565 shared object, then don't make a PLT entry. If we do make a PLT
2566 entry, make sure the symbol has been recorded as dynamic.
2567
b06136f2
SC
2568Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
2569
2570 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
2571 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
2572 (powerpcle-*-cygwin32): New.
2573 * peicode.h (add_data_entry): Get address from vma.
2574
5c867ecd
MM
2575Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2576
2577 * elflink.c (_bfd_elf_create_linker_section): If the symbol
2578 attached to the section has already been created as an undefined
2579 symbol, treat it as if it hasn't been created yet.
2580
28c16b55
ILT
2581Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
2582
2583 * elflink.h (elf_bfd_final_link): Don't output initial dummy
2584 symbol or section symbols if stripping all symbols and this is not
2585 a relocateable link. Don't output the symbol string table if
2586 there are no symbols.
2587 (elf_link_flush_output_syms): Don't do anything if there are no
2588 symbols to flush.
2589
d19df9b5
ILT
2590Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
2591
2592 * coff-aux.c: New file.
2593 * hosts/m68kaux.h: New file.
2594 * config.bfd (m68*-apple-aux*): New target.
2595 * configure.in (m68*-apple-aux*): New native host.
2596 (m68kaux_coff_vec): New vector.
2597 * configure: Rebuild.
2598 * targets.c (m68kaux_coff_vec): Declare.
2599 * coffcode.h (bfd_coff_backend_data): Add field
2600 _bfd_coff_link_add_one_symbol.
2601 (bfd_coff_link_add_one_symbol): Define.
2602 (compare_arelent_ptr): New static function if TARG_AUX.
2603 (coff_write_relocs): If TARG_AUX, sort the relocs.
2604 (coff_write_object_contents): Set A/UX aouthdr magic number.
2605 (coff_link_add_one_symbol): Define if not defined.
2606 (bfd_coff_std_swap_table): Initialize new field.
2607 * libcoff.h: Rebuild.
2608 * cofflink.c (coff_link_add_symbols): Call
2609 bfd_coff_link_add_one_symbol rather than
2610 _bfd_generic_link_add_one_symbol.
2611 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
2612 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
2613 * coff-mips.c (mips_ecoff_backend_data): Likewise.
2614 * Makefile.in: Rebuild dependencies.
2615 (BFD32_BACKENDS): Add coff-aux.o.
2616 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
2617
a796aafd
ILT
2618Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2619
2620 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
2621 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
2622
a8763553
ILT
2623Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
2624
66761e59
ILT
2625 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
2626 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
2627 (maintainer-clean): Warn about deleting special files.
2628 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
2629
cf5138e3
ILT
2630 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
2631 warning symbols correctly.
2632 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2633 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2634 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2635 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2636 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2637 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2638
a8763553
ILT
2639 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
2640 warnings.
2641
bdd2e7f1
KK
2642Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
2643
2644 * libcoff-in.h: aligned newly exported names with bfd naming
2645 conventions. Removed an erroneous define of POWERPC_LE_PE.
2646 * libcoff.h: Rebuild.
2647 * cofflink.c, coff-ppc.c: the above function name changes
2648
d2bb6c79
ILT
2649Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
2650
eb5bc1f3
ILT
2651 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
2652 * ecoff.c (struct extsym_info): Define.
2653 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
2654 to ecoff_link_write_external.
2655 (ecoff_link_write_external): Accept a struct extsym_info pointer.
2656 Strip symbols when appropriate.
2657
052b35d2
ILT
2658 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
2659 * syms.c (BSF_OBJECT): Define.
2660 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
2661 * bfd-in2.h: Rebuild.
2662 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
2663 STT_OBJECT symbol.
2664 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
2665 is set.
2666
53787b23
ILT
2667 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
2668 copying relocs into a shared object, treat a defined global symbol
2669 as a local symbol.
2670 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2671 * elf32-mips.c (mips_elf_relocate_section): Likewise.
2672 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2673
d2bb6c79
ILT
2674 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
2675 real defined symbol, not to a weak defined symbol.
2676
13d1a4dd
KK
2677Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
2678
2679 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
2680 and made a few static functions externs.
2681
2682 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
2683 POWERPC_LE_PE hack in cofflink.
2684
2685 * libcoff-in.h: promoted the following from cofflink.c to allow
2686 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
2687 coff_debug_merge_element, struct coff_debug_merge_type,
2688 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
2689 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
2690 coff_debug_merge_hash_lookup, coff_link_section_info,
2691 coff_final_link_info, coff_debug_merge_hash_newfunc,
2692 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
2693
2694 * libcoff.h: re-gen'd
2695
86aac8ea
ILT
2696Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
2697
2698 * syms.c: Include "bfdlink.h".
2699 (struct stab_find_info): Define.
2700 (_bfd_stab_section_find_nearest_line): New function.
2701 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
2702 * libbfd.h: Rebuild.
2703 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
2704 * elf.c (_bfd_elf_find_nearest_line): Try calling
2705 _bfd_stab_section_find_nearest_line before searching the ELF
2706 symbol table. Find the closest STT_FUNC symbol, not the last one.
2707 * libcoff-in.h (coff_data_type): Add line_info field.
bdd2e7f1 2708 * libcoff.h: Rebuild.
86aac8ea
ILT
2709 * coffgen.c (coff_find_nearest_line): Try calling
2710 _bfd_stab_section_find_nearest_line before searching the COFF
2711 symbol table.
2712 * Makefile.in: Rebuild dependencies.
2713
2714Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2715
2716 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
2717 4 bytes, so we get the correct value when updating the register
2718 field in little endian mode.
2719
43d36aad
ILT
2720Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
2721
f0a97077
ILT
2722 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
2723 entry_section fields. Add sntoc and snentry fields.
2724 * libcoff.h: Rebuild.
2725 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
2726 not toc_section and entry_section (the COFF file does not have any
2727 sections at this point).
2728 (coff_write_object_contents): Set o_snentry and o_sntoc from
2729 snentry and sntoc rather than entry_section and toc_section.
2730 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
2731 snentry, not toc_section and entry_section.
2732 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
2733 entry_section from hentry.
2734 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
ea2504d5 2735 set snenty.
f0a97077
ILT
2736 (xcoff_link_input_bfd): Set sntoc, not toc_section.
2737 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
2738 than using toc_section directly.
2739
9b4598d0
ILT
2740 * archures.c: Add missing `.' in enum bfd_architecture.
2741 * bfd-in2.h: Rebuild.
2742
43d36aad
ILT
2743 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
2744 Robert Lipe <robertl@arnet.com>.
2745
eb82bc60
MM
2746Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2747
2748 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
2749 to sections we allocate. Use bfd_zalloc to allocate initialial
2750 sections, not bfd_alloc.
2751 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
2752 SDA{,2}I16 relocations.
2753 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
2754 whether to put something in .sbss or not.
2755 (ppc_elf_relocate_section): Add support for more relocations. Add
c1e65e24
MM
2756 in sec->output_offset where appropriate. Make error messages
2757 include the symbol name.
eb82bc60
MM
2758
2759 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
2760 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
2761 doesn't get redefined messages if -shared.
2762
2763 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
2764 section if the rel_section field has been set up.
2765
9d621c7d
MM
2766Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2767
2768 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
2769 relocations.
2770
75c9ddc9
DE
2771Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
2772
2773 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
2774 of flags, only flags used are controlled by mach number. Bump up
2775 output file mach number to highest of input file mach numbers.
2776 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
2777 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
2778
72c513bc
DE
2779 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
2780 bfd_elf64_sparc_vec support.
2781
3cbe19d2
MM
2782Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2783
2784 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
2785 the embedded bit is set on some objects and not on others. Just
2786 or it together.
d8fd85ad
MM
2787 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
2788 relocations.
3cbe19d2 2789
5eb83ede
ILT
2790Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
2791
4a3d3b42
ILT
2792 * coffcode.h (coff_new_section_hook): Don't try to align the
2793 .stabstr section.
2794
5eb83ede
ILT
2795 * coffcode.h (coff_set_section_contents): Fix the handling of the
2796 .lib section to work even if the entire section contents are
2797 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
2798 Robert Lipe <robertl@arnet.com>.
2799
05f927dd
MM
2800Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2801
2802 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
2803 memory here for contents.
2804
2805 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
2806 _SDA2_BASE_ by 32768.
2807 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
2808 started using. Allocate contents for .sdata and .sdata2 sections
2809 also.
2810 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
2811 rather than _name.
2812 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
2813 size _SDA{,2}_BASE_.
2814 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
2815 done.
2816
5bc513b4
DE
2817Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
2818
5a5bac64
DE
2819 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
2820
5bc513b4 2821 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
5bc513b4 2822 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
5bc513b4 2823 (bfd_mach_sparc_v9a): Define.
049f3d4c 2824 (bfd_mach_sparc_v9_p): Define.
5bc513b4
DE
2825 * bfd-in2.h: Regenerated.
2826 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
2827 bfd_mach_sparc_v9.
d3366d23 2828 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
5bc513b4
DE
2829 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
2830 to bfd_elf32_sparc_vec.
2831 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
5bc513b4 2832 Add v8plus{,a} support.
5bc513b4 2833 Add v9a support.
768b8ade 2834 (sparc_compatible): New function.
5bc513b4 2835 * elf32-sparc.h: #include "elf/sparc.h".
75c9ddc9 2836 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
5bc513b4 2837 elf32_sparc_final_write_processing): New functions.
75c9ddc9 2838 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
5bc513b4 2839 elf_backend_final_write_processing): Define.
5bc513b4 2840
3b3753b8
MM
2841Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2842
2843 * elf-bfd.h (struct elf_link_hash_entry): Add
2844 linker_section_pointer field.
2845 (enum elf_linker_section_enum): Enumeration for new way of
2846 creating linker dynamic sections and symbols.
2847 (elf_linker_section{,_pointers}): New structures for creating
2848 dynamic sections and symbols.
2849 (elf_obj_tdata): Add linker_section_pointers and linker_section
2850 fields.
2851 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
2852 (_bfd_elf_create_linker_section): New declarations.
2853 (_bfd_elf_find_pointer_linker_section): Ditto.
2854 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
2855 (_bfd_elf_make_linker_section_rela): Ditto.
2856
2857 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
2858
2859 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
2860 (ppc_elf_create_linker_section): New function to create the
2861 sections .got, .sdata, and .sdata2.
2862 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
2863 needed.
2864 (ppc_elf_check_relocs): Support more of the eabi relocations.
2865 (ppc_elf_relocate_section): Ditto.
2866 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
2867 if the .sdata{,2} + .sbss{,2} section size is > 32k.
2868
2869 * elflink.h (elf_create_pointer_linker_section): New function to
2870 create initialized pointers in dynamic linker sections.
2871 (elf_finish_pointer_linker_section): Actually intialize the
2872 pointers created above.
2873
2874 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
2875 macros to provide both 32 and 64 bit versions of
2876 elf_create_pointer_linker_section.
2877 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
2878 provide both 32 and 64 bit versions of
2879 elf_finish_pointer_linker_section.
2880
2881 * elflink.c (_bfd_elf_create_linker_section): New function to
2882 create a linker section.
2883 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
2884 given address in the linker pointer offsets created for a given
2885 symbol.
2886 (_bfd_elf_make_linker_section_rela): Make a RELA section
2887 corresponding to the generated linker section.
2888
6b3eb07e
DE
2889Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
2890
2891 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
2892
e7894f6b
KK
2893Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
2894
2895 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
2896 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
2897 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
2898 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
2899 toc entry in an objdump) for now.
2900 (ppc_do_last, ppc_get_last): New function - needed to save processing
2901 the toc owner to the end.
2902 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
2903 toc owner last.
2904
2905 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
2906 toc owner from being done till last. Must define POWERPC_LE_PC
2907 to enable it.
2908
2909 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
2910
2911 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
2912 to INFO.
2913 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
2914 SizeOfImage for PowerPC. Ignore the size of the .junk section.
2915
80b99ca0
ILT
2916Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
2917
2918 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
2919
df96df4c
ILT
2920Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
2921
2922 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
2923 back to first.
2924 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
2925
d49ddb85
ILT
2926Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
2927
2928 * elf.c (assign_file_positions_for_segments): Don't increment file
2929 offset for a segment which contains no loadable sections.
2930
4500a112
MM
2931Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2932
2933 * reloc.c: Add new PowerPC relocations.
2934 * {bfd-in2,libbfd}.h: Regenerate.
2935
2936 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
2937 (ppc_elf_reloc_type_lookup): Lookup new relocations.
2938
252239f8
ILT
2939Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
2940
20ab764e
ILT
2941 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
2942 entries.
2943
0a4ffa2d
ILT
2944 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
2945 info->shared.
2946
45ca3195
ILT
2947 * coffgen.c (coff_find_nearest_line): Don't try to cache
2948 information in sections that are not owned by a BFD. From Richard
2949 Henderson <richard@atheist.tamu.edu>.
2950
252239f8
ILT
2951 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
2952 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
2953 * elflink.h (elf_link_output_extsym): Remove special check for
2954 _rld_new_interface.
2955
2956 * ecoffswap.h: Add prototypes for static functions.
2957
bd2d10c0
MM
2958Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2959
2960 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
2961 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
2962 references.
2963 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
2964 to satisfy a TOC16 relocation. Rewrite unsupported relocation
2965 support. Begin support for R_PPC_SDA{2,}REL.
2966
1c3a295b
MM
2967Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2968
2969 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
2970 create the .got and .got.neg sections.
2971 (ppc_elf_size_dynamic_sections): Call it.
2972 (ppc_elf_check_relocs): Call it.
2973 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
2974 (ppc_elf_check_relocs): Add error messages for relocations we
2975 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
2976 relocation.
2977
57081126
MM
2978Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2979
2980 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
2981 section flags for V.4 and eabi.
2982
3c38b3df
ILT
2983Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
2984
14899eb7
ILT
2985 * elf.c (assign_file_positions_for_segments): If a segment
2986 contains no sections, don't mark it as readable.
2987
98bb57ad
ILT
2988 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
2989 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
2990
02fcd126
ILT
2991 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
2992 dynamic section, if there is one.
2993 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
2994 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
2995 (bfd_elf64_swap_dyn_in): Likewise.
2996 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
2997 PTR.
2998 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
2999
3c38b3df
ILT
3000 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
3001 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
3002 <pirker@eiunix.tuwien.ac.at>.
3003
83f4323e
MM
3004Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3005
3006 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
3007 PowerPC V.4 and eabi.
3008 * bfd-in2.h: Regenerate.
3009 * libfd.h: Regenerate.
3010
3011 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
3012
3013 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
3014 section type and SHF_EXCLUDE section flag, turning them into the
3015 appropriate bfd section flag.
3016
a0271667
ILT
3017Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
3018
c9746fb6
ILT
3019 * xcofflink.c (xcoff_link_add_symbols): Create the special
3020 sections if we see a DYNAMIC object, in case that is the only
3021 XCOFF input object we see.
3022
5b3b9ff6
ILT
3023 * elf32-mips.c: Extensive changes for a start at dynamic linking
3024 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
3025
3026 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
3027 (struct elf_backend_data): Remove
3028 elf_backend_create_program_headers field. Add
3029 elf_backend_additional_program_headers and
3030 elf_backend_modify_segment_map fields.
3031 * elfxx-target.h (elf_backend_type_change_ok): Define if not
3032 defined.
3033 (elf_backend_additional_program_headers): Likewise.
3034 (elf_backend_modify_segment_map): Likewise.
3035 (elf_backend_create_program_headers): Don't define.
3036 (elfNN_bed): Change to account for field changes.
3037 * elf.c (assign_file_positions_for_segments): Call new
3038 modify_segment_map backend function. Don't call old
3039 create_program_headers backend function.
3040 (get_program_header_size): Call additional_program_headers rather
3041 than create_program_headers.
3042 * elflink.h (elf_link_add_object_symbols): Initialize
3043 type_change_ok from new backend field.
3044 (elf_link_output_extsym): Don't warn if _rld_new_interface is
3045 defined.
3046 (elf_reloc_link_order): Treat a reloc against a defined symbol as
3047 a reloc against the appropriate section.
3048
761f377f
ILT
3049 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
3050 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
3051 (elf_flags_init): Rename from elf_ppc_flags_init.
3052 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
3053 elf_ppc_flags_init.
3054 (ppc_elf_copy_private_bfd_data): Likewise.
3055 (ppc_elf_merge_private_bfd_data): Likewise.
3056
a0271667
ILT
3057 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
3058 relocation entries.
3059
64d5f5d0
ILT
3060Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
3061
3062 * coff-alpha.c (alpha_relocate_section): During final link, allow
3063 output .lita section to be bigger than 64k by adjusting gp value
3064 on a per-input section basis.
3065 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
3066 field.
3067 (struct ecoff_section_tdata): Add gp field.
3068
c40d9c77
ILT
3069Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
3070
64d5f5d0
ILT
3071 Handle Alpha ECOFF changes in OSF/1 3.2.
3072 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
3073 field.
3074 * coff-alpha.c: Include "aout/ar.h".
3075 (alpha_ecoff_get_relocated_section_contents): Don't require an
3076 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
3077 3.2 doesn't generate one.
3078 (alpha_relocate_section): Likewise.
3079 (alpha_ecoff_slurp_armap): Define.
3080 (alpha_ecoff_slurp_extended_name_table): Define.
3081 (alpha_ecoff_construct_extended_name_table): Define.
3082 (alpha_ecoff_truncate_arname): Define.
3083 (alpha_ecoff_write_armap): Define.
3084 (alpha_ecoff_generic_stat_arch_elt): Define.
3085 (alpha_ecoff_update_armap_timestamp): Define.
3086 (ARFZMAG): Define.
3087 (alpha_ecoff_read_ar_hdr): New static function.
3088 (alpha_ecoff_get_elt_at_filepos): New static function.
3089 (alpha_ecoff_openr_next_archived_file): New static function.
3090 (alpha_ecoff_get_elt_at_index): New static function.
3091 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
3092 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
3093 _bfd_ecoff to alpha_ecoff.
3094 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
3095 field from backend structure, rather than always calling
3096 _bfd_get_elt_at_filepos.
3097 * coff-mips.c (mips_ecoff_backend_data): Initialize
3098 get_elt_at_filepos field.
3099 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
3100 from _bfd_generic_read_ar_hdr with minor changes.
3101 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
3102 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
3103 * libbfd.h: Rebuild.
3104
3105 * bfd-in.h (BFD_IN_MEMORY): Define.
3106 * libbfd-in.h (struct bfd_in_memory): Define.
3107 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
3108 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
3109 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
3110 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
3111 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
3112 (bfd_get_size): Handle BFD_IN_MEMORY flag.
3113 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
3114 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
3115 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
3116 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
3117 iostream.
3118 (bfd_openstreamr): Likewise.
3119 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
3120 BFD_IN_MEMORY is not set.
3121 * riscix.c (riscix_some_aout_object_p): Likewise.
3122 * bfd-in2.h, libbfd.h: Rebuild.
3123
3124 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
3125 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
3126 (bfd_get_elt_at_index): Define.
3127 * archive.c (_bfd_generic_get_elt_at_index): Rename from
3128 bfd_get_elt_at_index. Change index parameter from int to
3129 symindex.
3130 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
3131 (_bfd_noarchive_get_elt_at_index): Define.
3132 (_bfd_archive_bsd_get_elt_at_index): Define.
3133 (_bfd_archive_coff_get_elt_at_index): Define.
3134 * bfd-in2.h, libbfd.h: Rebuild.
3135 * aout-target.h (MY_get_elt_at_index): Define if not defined.
3136 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
3137 * ieee.c (ieee_get_elt_at_index): Define.
3138 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
3139 * oasys.c (oasys_get_elt_at_index): Define.
3140 * som.c (som_get_elt_at_index): Define.
3141
c40d9c77
ILT
3142 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
3143 numbers to the .text section.
3144
efa77952
ILT
3145Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
3146
3147 * ieee.c (ieee_write_debug_part): Change return type to boolean.
3148 If there is a SEC_DEBUGGING section, get the contents of the debug
3149 information part from it.
3150 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
3151 section in memory.
3152 (ieee_write_object_contents): Check ieee_write_debug_part return.
3153
767f22d5
FF
3154Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
3155
3156 * config.bfd (i[345]86-*-freebsd*): Add target.
3157 * configure.in (i386freebsd_vec): Add vec.
3158 * configure: Regenerate.
3159 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
3160 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
3161 Rebuild dependencies..
3162 * freebsd.h: New file.
3163 * i386freebsd.c: New file.
3164 * targets.c (i386freebsd_vec): Declare.
3165 (bfd_target_vector): Add i386freebsd_vec.
3166 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3167 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
3168
f8254a3c
ILT
3169Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
3170
3171 * ieee.c (ieee_slurp_debug): New static function.
3172 (ieee_object_p): Call it.
3173 (ieee_slurp_section_data): Skip debugging sections.
3174 (ieee_get_reloc_upper_bound): Likewise.
3175 (ieee_get_section_contents): Likewise.
3176 (ieee_canonicalize_reloc): Likewise.
3177 (ieee_write_section_part): Likewise.
3178 (ieee_write_debug_part): Likewise.
3179 (ieee_write_data_part): Likewise.
3180 (init_for_output): Likewise.
3181
07a159db
MM
3182Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
3183
3184 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
3185 work.
3186 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
3187 relocs, since ppc_elf_relocate_section handles the linker case.
3188 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
3189 used.
3190 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
3191 ppc_elf_relocate_section since that is now the only caller.
3192 (ppc_elf_relocate_section): Ditto.
3193
d812945a
ILT
3194Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
3195
3196 * coffcode.h (coff_write_object_contents): If we don't know the
3197 section of the entry point for an XCOFF executable, always set the
3198 entry address to -1.
3199
3a56d0b4
MM
3200Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3201
3202 * elf.c (bfd_section_from_shdr): Add support for note sections.
3203
c4406e50
ILT
3204Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
3205
d812945a
ILT
3206 * bfd-in.h (struct _symbol_info): Add stab_type field.
3207 * bfd-in2.h: Rebuild.
3208 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
3209
c4406e50
ILT
3210 * elf32-ppc.c: Remove trailing newline from calls to
3211 _bfd_error_handler.
3212 (ppc_elf_merge_private_bfd_data): Only warn about endianness
3213 difference if target endianness is known.
3214
08556813
MM
3215Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
3216
3217 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
3218 old style TOC16 references without using R_PPC_GOT.
3219 (ppc_reloc_type): Ditto.
3220 (ppc_elf_reloc_type_lookup): Add support for TOC16.
3221 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
3222 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
3223 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
3224 (ppc_elf_check_relocs): New function for GOT/PLT support that is
3225 work in progress.
3226 (ppc_elf_adjust_dynamic_symbol): Ditto.
3227 (ppc_elf_adjust_dynindx): Ditto.
3228 (ppc_elf_size_dynamic_sections): Ditto.
3229 (ppc_elf_finish_dynamic_symbol): Ditto.
3230 (ppc_elf_finish_dynamic_sections): Ditto.
3231 (ELF_DYNAMIC_INTERPRETER): Define.
3232
86587dd4
KR
3233Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
3234
3235 * elf.c (copy_private_bfd_data): When attaching sections to
3236 segments ignore sections that won't be allocated. Patch from
3237 Andreas Schwab.
3238
bf7f243f
KR
3239Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
3240
3241 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
3242 anything else.
3243
d9518e2e
ILT
3244Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
3245
3246 * coff-i960.c (CALC_ADDEND): Define.
3247 (coff_i960_relocate_section): Add the input section VMA to the
3248 addend for PC relative relocs.
3249
3250Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
3251
3252 * peicode.h (pe_print_pdata): Must test the entire entry for zero
3253 to correctly terminate.
3254
010a405a
ILT
3255Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
3256
dc092b6b
ILT
3257 * targets.c (enum bfd_endian): Define.
3258 (bfd_target): Rename byteorder_big_p to byteorder, and change it
3259 from boolean to enum bfd_endian. Change header_byteorder_big_p
3260 correspondingly.
3261 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
3262 (bfd_header_big_endian, bfd_header_little_endian): New macros.
3263 * bfd-in2.h: Rebuild.
3264 * All targets: Change initialization of byteorder and
3265 header_byteorder to use enum bfd_endian values rather than
3266 booleans.
3267 * All files: Change all references to byteorder_big_p and
3268 header_byteorder_big_p to use new bfd_*_endian macros.
3269
010a405a
ILT
3270 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
3271 s_vaddr.
3272 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
3273 vma.
3274 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
3275
fcb43906
SC
3276Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
3277
3278 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
3279
0d709d31
ILT
3280Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
3281
14578105
ILT
3282 * ieee.c: Lots of minor cleanups. Make many functions return
3283 errors rather than calling abort. Also:
3284 (ieee_write_twobyte): Remove; change callers to call existing
3285 ieee_write_2bytes function.
3286 (ieee_write_expression): Don't output the section twice when
3287 outputting a local symbol. Don't emit an extraneous zero if there
3288 is only one term.
3289 (ieee_slurp_sections): Set the lma as well as the vma.
3290 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
3291
0d709d31
ILT
3292 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
3293 a recognized one or bfd_arch_unknown.
3294 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
3295 to succeed.
3296 (ihex_get_symtab): Likewise.
3297
14dc2f77
ILT
3298Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
3299
3300 * aoutx.h: Include <ctype.h>.
3301 (struct aout_link_includes_table): Define.
3302 (struct aout_link_includes_totals): Define.
3303 (struct aout_link_includes_entry): Define.
3304 (aout_link_includes_lookup): Define macro.
3305 (struct aout_final_link_info): Add includes field.
3306 (aout_link_includes_newfunc): New static function.
3307 (NAME(aout,final_link)): Initialize includes hash table.
3308 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
3309
480ccad5
SS
3310Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
3311
3312 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
3313
3920d9c9
KK
3314Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
3315
3316 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
3317
207345f2
KK
3318Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
3319
3320 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
3321 (pe_print_private_bfd_data): call pe_print_reloc.
3322 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
3323 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
3324 up some debugging as well.
3325
273c019e
ILT
3326Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
3327
3328 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
3329 <rfg@monkeys.com>.
3330
010d9f2d
ILT
3331Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
3332
3333 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
3334 when setting sections to NULL.
3335
4a4a66bd
ILT
3336Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
3337
3338 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
3339 field.
3340 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
3341 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
3342 for all symbols.
3343 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3344 * bfd-in2.h: Rebuild.
3345
545bf026
KK
3346Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
3347
3348 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
3349
1f4ae0d6
ILT
3350Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
3351
55cac920
ILT
3352 * ihex.c (ihex_scan): Handle record types 4 and 5.
3353 (ihex_object_p): Permit types 4 and 5.
3354 (ihex_set_section_contents): Remove check for out of range
3355 addresses.
3356 (ihex_write_object_contents): Generate types 4 and 5.
3357
1f4ae0d6
ILT
3358 * elflink.h (elf_link_output_extsym): Just ignore warning and
3359 indirect references to symbols which don't really exist.
3360
53d45489
KK
3361Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
3362
3363 * peicode.h (pe_print_idata): Minor format fixes
3364 (pe_print_edata): New function. Under private printing, this formats
3365 the edata section of a PE file.
3366 (pe_print_private_bfd_data): Added call to pe_print_edata.
3367
361e8876
DE
3368Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3369
3370 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
3371 index, don't call stoi.
3372
58142f10
ILT
3373Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
3374
ffd15489
ILT
3375 * srec.c (srec_scan): Set lma as well as vma.
3376
3377 * ihex.c: New file; support for Intel Hex format.
3378 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
3379 (ihex_vec): Declare.
3380 (bfd_target_vector): Always include ihex_vec.
3381 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
3382 * Makefile.in: Rebuild dependencies.
3383 (BFD_LIBS): Add ihex.o
3384 (BFD_LIBS_CFILES): Add ihex.c.
3385 * bfd-in2.h: Rebuild.
3386
ae0a6bea
ILT
3387 * elf.c (assign_file_positions_for_segments): Sort the sections in
3388 each segment.
3389 (get_program_header_size): Return the right size if segment_map is
3390 not NULL.
3391 (copy_private_bfd_data): Don't bother to sort the sections.
3392
3393 * bfd.c (bfd_record_phdr): New function.
3394 * bfd-in.h (bfd_record_phdr): Declare.
3395 * bfd_in2.h: Rebuild.
3396
ce0ee4bf
ILT
3397 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
3398 BFD_ASSERT.
3399
58142f10
ILT
3400 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
3401 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
3402 bfd_size_type.
3403 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
3404 (bfd_zmalloc): Change declaration.
3405 * libbfd.h: Rebuild.
3406 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
3407 and realloc. Don't set bfd_error_no_memory if they fail.
3408
59066248
KK
3409Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
3410
3411 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
3412 uses as well. Added a new howto to deal with TOCREL16 relocs that
3413 are TOCDEFN as well.
3414 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
3415 to handle RVA relocs from dlltool.
3416 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
3417 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
3418 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
3419
3420 * coffcode.h (coff_set_alignment_hook): check idata$X sections
3421 to get the right section alignment.
3422
6933148a
ILT
3423Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
3424
3425 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3426 p_paddr if p_paddr is zero.
3427 (make_mapping): Set includes_filehdr and includes_phdrs for first
3428 PT_LOAD segment.
3429 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
3430 segment.
3431 (assign_file_positions_for_segments): Handle includes_filehdr and
3432 includes_phdrs. Remove special handling of PT_PHDR and first
3433 PT_LOAD segments.
3434 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
3435 when appropriate. Remove special handling of PT_PHDR segment.
3436 Use a more complex condition for when a section is included in a
3437 segment to handle Solaris linker oddities.
3438
f62fed1c
ILT
3439Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
3440
3441 * coff-m88k.c (howto_table): Reformatted for easier reading;
3442 special_function now points to new function m88k_special_reloc.
3443 (howto_hvrt16): Function previously used for handling HVRT16 relocs
3444 removed.
3445 (rtype2howto): Do not add reloc's r_offset to the addend, this will
3446 be done correctly by m88k_special_reloc.
3447 (reloc_processing): New function to be used by RELOC_PROCESSING.
3448 (RELOC_PROCESSING): Define to call reloc_processing.
3449
64ecde46
ILT
3450Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
3451
b00c57ec
ILT
3452 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
3453 (pe_print_pdata): Likewise.
3454
a9713b91
ILT
3455 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
3456 obstack_alloc fails.
3457 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
3458 fails.
3459 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
3460 * Many files: don't set bfd_error_no_memory if one of the above
3461 routines fails.
3462
3dbf33ee
ILT
3463 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
3464 if p_paddr_valid is set.
3465 (copy_private_bfd_data): New static function.
3466 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
3467
44ef8897
ILT
3468 * elf.c (assign_file_positions_for_segments): Fix case where extra
3469 program headers were allocated.
3470
27fb8f29
ILT
3471 * elf.c (_bfd_elf_print_private_bfd_data): New function.
3472 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
3473 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
3474 _bfd_elf_print_private_bfd_data.
3475
64ecde46
ILT
3476 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
3477 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
3478 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
3479 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
3480 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
3481 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
3482 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
3483
fd0198f0
ILT
3484Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
3485
3486 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
3487 * elf.c (make_mapping): New static function.
3488 (map_sections_to_segments): New static function.
3489 (elf_sort_sections): New static function.
3490 (assign_file_positions_for_segments): New static function.
3491 (map_program_segments): Remove.
3492 (get_program_header_size): Remove sorted_hdrs, count, and
3493 maxpagesize parameters. Simplify.
3494 (assign_file_positions_except_relocs): When generating an
3495 executable, use assign_file_positions_for_segments.
3496 (elf_sort_hdrs): Remove.
3497 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
3498 to get_program_header_size.
3499
3b3f7625
ILT
3500Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
3501
1ff0461b
ILT
3502 * hp300hpux.c (MY(callback)): Set lma as well as vma.
3503
80c8485c
ILT
3504 * configure, config.in: Regenerate with autoconf 2.7.
3505
3b3f7625
ILT
3506 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
3507 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
3508
fa63d1ef
ILT
3509Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
3510
a877f591
ILT
3511 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
3512 (ecoff_sec_to_styp_flags): Likewise.
3513 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
3514 (ecoff_set_symbol_info): Handle scRConst.
3515 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
3516 (ecoff_compute_section_file_positions): Handle .rconst section.
3517 (_bfd_ecoff_write_object_contents): Likewise.
3518 (ecoff_link_check_archive_element): Handle scRConst.
3519 (ecoff_link_add_externals): Likewise.
3520 (ecoff_link_write_external): Handle .rconst section.
3521 (ecoff_reloc_link_order): Likewise.
3522 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
3523 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
3524 section.
3525 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
3526
fa63d1ef
ILT
3527 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
3528 DEF_DYNAMIC flag is set.
3529
25bada65
KR
3530Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
3531
3532 * host-aout.c: If TRAD_HEADER is defined, include it.
3533
7938b4cb
ILT
3534Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
3535
85e493f0
ILT
3536 * aclocal.m4 (AC_PROG_CC): Remove local definition.
3537 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
3538 (BFD_NEED_DECLARATION): New function.
3539 * configure.in: Use BFD_NEED_DECLARATION.
bd77213b
ILT
3540 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
3541 * configure, config.in: Rebuild with autoconf 2.6.
85e493f0 3542
83dcdc61
ILT
3543 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
3544 special_sections before returning when called with a non XCOFF
3545 BFD.
3546
7938b4cb
ILT
3547 * coffgen.c (coff_renumber_symbols): Sort common symbols with
3548 global symbols.
3549
3550 * coffcode.h (coff_compute_section_file_positions): Only pad the
3551 previous section to force file alignment when creating an
3552 executable.
3553
b5403ad7
ILT
3554Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
3555
a418e05d
ILT
3556 * coffcode.h (coff_compute_section_file_positions): If
3557 RS6000COFF_C, set up the .debug section.
3558
b5403ad7
ILT
3559 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
3560 if it is not large enough to accomodate the entire TOC area with
3561 signed 16 bit offsets.
3562 (xcoff_write_global_symbol): Handle negative TOC offsets in global
3563 linkage code.
3564 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
3565 TOC anchor to use the TOC value used in the output file.
3566
90a7abbc
ILT
3567Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
3568
3569 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
3570 (_bfd_coff_read_string_table): Likewise.
3571
177b1932
DE
3572Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3573
3574 * pe-arm.c: Fix typos.
3575 * coff-arm.c: Likewise.
3576
3577Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
3578
3579 * coff-ppc.c (list_ele): Added "cat"egory member.
3580 (record_toc): New category parameter (priv or pub).
3581 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
3582 (ppc_process_before_allocation): Removed embrionic data-in-toc from
3583 the mainline. It addes extra toc cells in error.
3584 (ppc_coff_swap_sym_in_hook): Added some documentation.
3585 (dump_toc): Can now diagnose "virtual toc" chicanery.
3586
e34314c4
ILT
3587Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
3588
3589 * elf-bfd.h (struct elf_link_hash_table): Change type of
3590 dynsymcount and bucketcount fields from size_t to bfd_size_type.
3591
73a68447
ILT
3592Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
3593
535e9e29
ILT
3594 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
3595 pointerize C_LEAFSTAT or C_LEAFEXT entries.
3596
73a68447
ILT
3597 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
3598 DT_INIT and DT_FINI entries if the _init or _fini symbol is
3599 defined or mentioned in a regular file.
3600
cd2b2402
KK
3601Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
3602
3603 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
3604 (coff_ppc_relocate_section): Handle TOCDEFN attribute
3605 (coff_ppc_relocate_section): Correct REL24 handling
3606 (ppc_process_before_allocation): Correct TOCDEFN handling
3607
3608 * peicode.h (dir_names): Added name descriptions
3609
b218076e
KR
3610Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
3611
3612 * VERSION: Updated to cygnus-2.6.
3613
3614Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
3615
3616 * targets.c (m68k4knetbsd_vec): Declare.
3617
e9f30616
ILT
3618Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
3619
3620 * targets.c (bfd_target): Change type of second argument to
3621 _bfd_print_private_bfd_data from void * to PTR.
3622 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
3623 using PTR rather than void *.
3624 * bfd-in2, libbfd.h: Rebuild.
3625 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
3626 to PTR.
3627 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
3628 _bfd_generic_bfd_print_private_bfd_data rather than casting
3629 bfd_true.
3630
ae75c4a4
KR
3631Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
3632
3633 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
3634 "DO NOT DELETE" lines or blank lines that mkdep writes on some
3635 systems.
3636 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
3637 BFD64_BACKENDS_CFILES): New variables.
3638 (CFILES): Use them.
3639
bebcd3db
ILT
3640Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
3641
4b71e164
ILT
3642 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
3643 not at the file position of the first section.
3644 * coffcode.h (coff_compute_section_file_positions): Avoid using
3645 unportable #elif.
3646 (coff_write_object_contents): When generating a PPC PE executable
3647 with no symbols, round up the file size to a COFF_PAGE_SIZE
3648 boundary.
3649 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
3650 don't write out a string table.
3651
631b10f4
ILT
3652 * elf.c (bfd_section_from_shdr): When using a different section
3653 header, pass the new one to _bfd_elf_make_section_from_shdr.
3654 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
3655 (elf_map_symbols): Add section VMA to symbol value when comparing
3656 against 0.
3657 (_bfd_elf_compute_section_file_positions): Only build symbol table
3658 if there are some symbols. Set file offset of symtab and strtab
3659 sections.
3660 (assign_file_positions_except_relocs): Remove dosyms parameter.
3661 Change all callers. Never set file offset of symtab and strtab
3662 sections.
3663 (_bfd_elf_copy_private_section_data): New function.
3664 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
3665 (_bfd_elf_copy_private_symbol_data): New function.
3666 (swap_out_syms): Check for special mapping of st_shndx created by
3667 copy_private_symbol_data.
3668 * elfxx-target.h: Use new copy routines.
3669 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
3670 (_bfd_elf_copy_private_section_data): Declare.
3671
3672 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
3673
3674 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
3675 C_NT_WEAK.
3676
bebcd3db
ILT
3677 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
3678 _bfd_dummy_target, matching the recent change to archive
3679 recognition.
3680
7ad4ba81
ILT
3681Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
3682
afa67334
ILT
3683 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
3684 arithmetic on PTR types.
3685
f2bd8915
ILT
3686 * aout-target.h (MY(callback)): Set the lma of the sections.
3687
7ad4ba81
ILT
3688 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
3689 symbol into a reloc against the section.
3690
93b6a3f8
KK
3691Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
3692
3693 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
3694 glue for the relocs: IMGLUE and IFGLUE.
3695 (record_toc): new function - tracks toc contents
3696 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
3697 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
3698 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
3699 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
125d37c4 3700 (ppc_record_toc_entry): Removed a debug define (duh)
93b6a3f8
KK
3701
3702 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
3703 (pe_print_idata): New function - formats the idata section data
3704 (pe_print_pdata): New function - formats the pdata section data
3705 (pe_print_private_bfd_data): calls to above
3706
c769947b
SS
3707Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
3708
3709 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
3710 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
3711 TARGET_SYM and TARGET_NAME for vector and BFD name.
3712 * coff-pmac.c (pmac_xcoff_vec): Remove.
3713 (TARGET_SYM, TARGET_NAME): Define.
3714 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
3715 machine to 0, not all PowerMacs are 601s.
3716
3717Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
3718
3719 * elfcode.h (elf_object_p): Read in any program headers.
3720 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
3721 based on the program headers, if any.
3722 (elf_fake_sections): Set sh_addr from the vma, not the lma.
3723 (map_program_segments): Set p_paddr of program headers based on
3724 the lma.
3725
ee174815
ILT
3726Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
3727
839087b7
ILT
3728 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
3729 failure.
3730
922530a6
ILT
3731 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
3732 trying to do a relocateable link with a non-a.out object file.
3733
3734 * archive.c (bfd_generic_archive_p): Check the first object file
3735 in an archive even if target_defaulted is set. If the object file
3736 has the wrong xvec, reject it.
3737
a1774c51
ILT
3738 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
3739 be represented, report the name via _bfd_error_handler.
3740 (translate_to_native_sym_flags): Likewise.
3741 * elf32-mips.c (mips_elf_final_link): Likewise.
3742 * oasys.c (oasys_write_sections): Likewise.
3743
4a378b13
ILT
3744 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
3745 which checks for STYP_OVRFLO sections.
3746 (coff_compute_section_file_positions): If RS6000COFF_C, handle
3747 reloc and lineno count overflows.
3748 (coff_write_object_contents): Call coff_count_linenumbers before
3749 coff_compute_section_file_positions. If RS6000COFF_C, handle
3750 reloc and lineno count overflows.
3751 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
3752 relocs before dealing with .pad sections. Count overflow section
3753 headers when handling .pad sections.
3754
7906bf87
ILT
3755 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
3756 if RS6000COFF_C.
3757
ee174815
ILT
3758 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
3759 (struct xcoff_link_hash_table): Add descriptor_section and
3760 special_sections fields.
3761 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
3762 (xcoff_link_add_symbols): Set linkage section alignment. Create
3763 descriptor section. Check for magic symbol names (_text, etc.),
3764 and record them in special_sections if found. Set
3765 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
3766 descriptor field to point back to the function code symbol.
3767 (xcoff_sweep): Always mark the special descriptor_section.
3768 (bfd_xcoff_export_symbol): Check whether the symbol might be a
3769 function descriptor, and mark it if it is.
3770 (bfd_xcoff_size_dynamic_sections): Add new special_sections
3771 parameter, and fill it in. Allocate space for the descriptor
3772 section.
3773 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
3774 global linkage code. If an undefined function descriptor is
3775 exported, arrange to define it. Warn about any other undefined
3776 exported symbol.
3777 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
3778 (xcoff_write_global_symbol): Create a function descriptor when
3779 necessary.
3780 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
3781 * bfd-in2.h: Rebuild.
3782
0e829f18
KK
3783Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
3784
3785 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
3786 (ppc_coff_link_hash_table): new types for hashing
3787 (ppc_coff_link_hash_newfunc): hash entry constructor
3788 (ppc_coff_link_hash_table_init): hash table initializer
3789 (ppc_coff_link_hash_table_create): hash table constructor
3790 (ppc_record_toc_entry): changed references to hash table
3791 (coff_ppc_relocate_section): changed references to hash table
3792
3793 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
3794 * libcoff.h: Rebuild
3795
3796 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
3797 (coff_link_add_symbols): removed toc_offset init
3798
7ac84736
KR
3799Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
3800
b27cc4bc
KR
3801 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
3802 first.
3803
7ac84736
KR
3804 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
3805 if it is given and mmep is available.
3806 * acconfig.h: Undef USE_MMAP.
3807 * configure, config.in: Regenerated.
3808 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
3809 table handling the old way.
3810 (aout_get_external_symbols): Don't complain if last byte of string
3811 table is nonzero.
3812 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
3813 (bfd_free_window) [! USE_MMAP]: Don't define.
3814 (bfd_get_file_window,
3815 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
3816
1b3b0c03
ILT
3817Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
3818
3819 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
3820 0xffff0000.
3821
092abcdf
ILT
3822Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
3823
33698029
ILT
3824 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
3825 compatible with AMD generated COFF files. Try to support both AMD
3826 and GNU formats simultaneously.
3827 (coff_a29k_relocate_section): Likewise.
3828
0bb8ff19
ILT
3829 * libbfd.c (bfd_get_file_window): Change writable parameter from
3830 int to boolean; update all callers. Pass MAP_SHARED if not
3831 writable--it's required on Solaris. Cast fprintf argument to
3832 avoid warning.
3833 * bfd-in.h (bfd_get_file_window): Update declaration.
3834 * bfd-in2.h: Rebuild.
3835 * aoutx.h: Update calls to bfd_get_file_window.
3836
0634a431
ILT
3837 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
3838 Change all uses.
3839 (xcoff_swap_ldhdr_in): New static function.
3840 (xcoff_swap_ldsym_in): New static function.
7812bf9c 3841 (xcoff_find_reloc): Handle the case of a single reloc correctly.
0634a431
ILT
3842 (xcoff_link_add_symbols): If we just created a descriptor, pass it
3843 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
417acf22 3844 Handle XTY_ER/XMC_XO symbols correctly.
0634a431
ILT
3845 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
3846 rather than normal symbol table.
417acf22
ILT
3847 (bfd_xcoff_import_symbol): It's not an error if the symbol is
3848 already defined with the same absolute value.
0634a431
ILT
3849 (xcoff_mark): When considering called symbols, check whether the
3850 descriptor is from a dynamic object, rather than the symbol
3851 itself.
3852 (xcoff_build_ldsyms): Likewise.
3853
092abcdf
ILT
3854 * libbfd.c (bfd_get_file_window): Change return type to boolean.
3855 Cast realloc and malloc return values. If malloc or realloc fail,
3856 set bfd_error_no_memory.
3857 * bfd-in.h (bfd_get_file_window): Change type to boolean.
3858 * bfd-in2.h: Rebuild.
3859
d6f41a7d
KK
3860Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
3861
3862 * coff-ppc.c (ppc_record_toc_entry): new function.
3863 (in_reloc_p): changed return value.
3864 (coff_ppc_relocate_section): much rework.
3865 (ppc_allocate_toc_section): new function.
3866 (ppc_process_before_allocation): new function.
3867 (ppc_coff_swap_sym_in_hook): new function.
3868
3869 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
3870 (coff_link_add_symbols): initialize toc_offset.
3871
3872 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
3873 (coff_swap_aouthdr_out): Added more sections to the data
3874 dictionary for the pe file header. Also changed linker version
3875 number on the ppc side.
3876 (dir_names): small improvements to the dictionary printing.
3877 (pe_mkobject_hook): save the file level flags.
3878
3879 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
3880 (pe_tdata): added real_flags field
3881 (coff_tdata): added local_toc_sym_map and access macro
3882
3883 * libcoff.h (coff_link_hash_entry): added toc_offset field
3884 (pe_tdata): added real_flags field
3885 (coff_tdata): added local_toc_sym_map and access macro
3886
3887 * coffcode.h (coff_set_alignment_hook): added hook for PE.
3888 (coff_mkobject): init for local_toc_sym_map
3889 (coff_write_object_contents): set the internal_a.magic to
3890 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
3891 ppc compilers use.
3892
6bc200f2
ILT
3893Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
3894
c0971298
ILT
3895 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
3896 entries until both the line number address and the function name
3897 address are too large.
3898
6a468850
ILT
3899 * configure.in: Call AC_CHECK_PROG to find and cache AR.
3900 * configure: Rebuilt.
3901
6bc200f2
ILT
3902 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
3903 is defined in the environment.
3904
c44bf94c
JL
3905Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
3906
3907 * som.c (som_get_section_contents_in_window): Define to use
3908 generic version.
3909
cf587de8
ILT
3910Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
3911
3912 * coff-i860.c: New file, based on coff-i386.c.
3913 * cpu-i860.c: New file, based on cpu-i386.c.
3914 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
3915 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
3916 targets, using i860coff_vec.
3917 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
3918 trad-core.o and hosts/i860mach3.h.
3919 (i860coff_vec): Use coff-i860.o and cofflink.o.
3920 * configure: Rebuild.
3921 * Makefile.in: Rebuild dependencies.
3922 (ALL_MACHINES): Add cpu-i860.o.
3923 (BFD32_BACKENDS): Add coff-i860.o.
3924 (CFILES): Add cpu-i860.c and coff-i860.c.
3925 * targets.c (i860coff_vec): Declare.
3926 (bfd_target_vector): Add &i860coff_vec.
3927 * archures.c (bfd_i860_arch): Declare.
3928 (bfd_archures_list): Add &bfd_i860_arch.
3929 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
3930 (coff_set_flags): Handle bfd_arch_i860.
3931 (coff_write_object_contents): Handle I860 a.out magic number.
3932
83c23fca
ILT
3933Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
3934
3935 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
3936 the created .tc section to 2.
3937 (xcoff_mark): Don't keep a .loader reloc for a call to an
3938 undefined symbol when creating a shared library.
3939 (xcoff_build_ldsyms): When creating a shared library, generate
3940 global linkage code for a call to an undefined symbol.
3941
5d9eb9c3
KR
3942Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
3943
3944 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
3945 BFD32_BACKENDS, BFD64_BACKENDS.
3946 (.dep1): Put mkdep output in a separate file.
3947 Rebuilt dependencies.
3948
ffacb892
KR
3949 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
3950 value.
3951
4fe6d901
KR
3952 Permit use of mmap when available:
3953
3954 * configure.in: Check for mmap, madvise, mprotect.
3955 * config.in, configure: Regenerated.
3956
3957 * libbfd.c (struct _bfd_window_internal): Define type.
3958 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
3959 functions.
3960 (ok_to_map): New static variable for debugging.
3961 (_bfd_generic_get_section_contents_in_window): New function.
3962 * bfd-in.h (bfd_window_internal): Declare type.
3963 (bfd_window): Define type.
3964 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
3965 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
3966 Declare.
3967
3968 * libaout.h (struct aoutdata): Add two window fields.
3969 (obj_aout_sym_window, obj_aout_string_window): New macros.
3970 * aoutx.h (some_aout_object_p): Initialize windows.
3971 (aout_get_external_symbols): Get symbol data and strings in
3972 windows instead of explicitly allocated buffers.
3973 (slurp_symbol_table): Free window instead of memory.
3974 (bfd_free_cached_info): Release windows instead of freeing storage
3975 directly.
3976 (aout_link_free_symbols): Ditto.
3977
3978 * targets.c (bfd_target): Add new field for
3979 get_section_contents_in_window.
3980 (BFD_JUMP_TABLE_GENERIC): Updated.
3981 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
3982 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
3983 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
3984 macros for get_section_contents_in_window field.
3985
d9e771e3
FF
3986Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
3987
3988 * core.c: Renamed to corefile.c
3989 * makefile.dos (OBJS): Change core.o to corefile.o
3990 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
3991
bf917766
SG
3992start-sanitize-gm
3993Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
3994
3995 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
3996 targ_selvecs to allow debugging under Irix-5 native.
3997
3998end-sanitize-gm
583db7a8
ILT
3999Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
4000
4001 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
4002 to o. Clobber and restore the list of new csects around the call
4003 to _bfd_generic_link_add_one_symbol, in case it wants to report a
4004 linker error and the linker wants to read the symbol table. Reset
4005 the line number count of a real section even if it has no relocs.
4006 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
4007
4008 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
4009 is too small.
4010
68aed7db
ILT
4011Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
4012
18a9609c
ILT
4013 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
4014 an undefined symbol in a shared link.
4015
68aed7db
ILT
4016 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
4017 oldtype from bfd_link_order_type to bfd_link_hash_type. From
4018 phdm@info.ucl.ac.be (Philippe De Muyter).
4019
7f82c7e1
ILT
4020Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
4021
4022 * coff-m88k.c (rtype2howto): New static function.
4023 (RTYPE2HOWTO): Use it rather than a macro definition.
4024
4025 * coffcode.h (coff_write_object_contents): set internal_a.magic
4026 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
4027
4c8b9746 4028 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
7f82c7e1
ILT
4029 define TRAD_HEADER to new file hosts/delta68.h.
4030 m88*-motorola-sysv*, however, does use ptrace-core.o.
4031 * hosts/delta68.h: New file.
4032
4033 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
4034 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
4035
619c7730
KR
4036Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
4037
4038 * i386linux.c (MY(vec)): Declare before use.
4039
73246ff8
ILT
4040Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
4041
e8d6d5d0
ILT
4042 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
4043 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
4044
b2193cc5
ILT
4045 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
4046 BFD is not of the right type.
4047 (bfd_elf_get_needed_list): Likewise.
4048 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
4049 * sunos.c (bfd_sunos_get_needed_list): Likewise.
4050 * xcofflink.c (XCOFF_XVECP): Define.
4051 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
4052 of the right type.
4053 (bfd_xcoff_import_symbol): Likewise.
4054 (bfd_xcoff_export_symbol): Likewise.
4055 (bfd_xcoff_link_count_reloc): Likewise.
4056 (bfd_xcoff_record_link_assignment): Likewise.
4057 (bfd_xcoff_size_dynamic_sections): Likewise.
4058
baabeb74
ILT
4059 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
4060 table index against the number of symbols for a base relative
4061 reloc.
4062
73246ff8
ILT
4063 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
4064 static function.
4065 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
4066 full_aouthdr flag here...
4067 (_bfd_xcoff_bfd_final_link): ...not here.
4068
6ab826bd
FF
4069Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
4070
4071 * libelf.h: Rename to elf-bfd.h to avoid conflict with
4072 systems that have a system <libelf.h>.
4073 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
4074 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
4075 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
4076 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
4077 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
4078 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
4079 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
4080
999cc186
ILT
4081Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
4082
0652d579
ILT
4083 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
4084 set, set BSF_WEAK in symbol. Change all callers.
4085 (ecoff_get_extr): Set weakext based on BSF_WEAK.
4086 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
4087 _bfd_generic_link_add_one_symbol.
4088 (ecoff_indirect_link_order): Check that the section tdata relocs
4089 are not NULL before using them.
4090
999cc186
ILT
4091 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
4092 define TRAD_HEADER as hosts/alphalinux.h.
4093 * configure: Rebuild.
4094 * hosts/alphalinux.h: New file.
4095 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
4096 not int.
4097
e6080520
ILT
4098Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
4099
2bd0aeb9
ILT
4100 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
4101 C_ECOMM storage classes.
4102
e6080520
ILT
4103 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
4104 of xcoff_mark.
4105 (xcoff_mark): Call xcoff_mark_symbol.
4106 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
4107 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
4108 doing it by hand.
4109 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
4110
5fe14a9f
ILT
4111Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
4112
f630a0a4
ILT
4113 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
4114 field.
4115 (xcoff_find_reloc): New static function.
4116 (xcoff_link_add_symbols): Use it.
4117 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
4118 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
4119 relocate the value of C_DECL.
4120
5fe14a9f
ILT
4121 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
4122
dff77ed7
SC
4123Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
4124
4125 * cofflink.c (_bfd_coff_generic_relocate_section): Make
4126 callback decide what goes in .relocs.
4127 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
4128 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
4129 there is one.
4130
697a8fe8
ILT
4131Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
4132
4133 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
4134 absolute section.
4135
2d7de17d
ILT
4136Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
4137
4138 * xcofflink.c: More improvements, mostly to fix handling of
4139 constructors and a few other special cases.
4140 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
4141 zero, reverting yesterday's change.
4142 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
4143 (bfd_xcoff_link_count_reloc): Declare.
4144 (bfd_xcoff_record_link_assignment): Declare.
4145 * bfd-in2.h: Rebuild.
4146
f552f751
NH
4147Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
4148
4906b2a3 4149 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
f552f751
NH
4150 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
4151 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
4152 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
4153 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
4154 Change PAGE_SIZE to TARGET_PAGE_SIZE.
4155
4156 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
4157 format.
4158
4159 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
4160 segments includes the a.out header. See to that the magic number
4161 *always* is big-endian.
4162
4163 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
4164 m68k4k NetBSD configurations.
4165
4166 * configure.in, configure: Separate i386 & mips NetBSD
4167 configurations from other BSD ones. Don't assume DEC is the only
4168 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
4169 configurations. Add support for m68k4k NetBSD object format.
4170
4171 * libaout.h: Added M_68K4K_NETBSD magic.
6fd1f40d
NH
4172
4173 * m68k4knetbsd.c: New file.
f552f751
NH
4174
4175 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
4176
4177 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
4178 <machine/endian.h>.
4179
6fd1f40d
NH
4180 * hosts/mipsnbsd.h: New file.
4181
d6d44ef9
SG
4182start-sanitize-gm
4183Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
4184
4185 * config.bfd: Add config stuff for mips*-*-magic* to set
4186 targ_defvec to ecoff_big_vec.
4187
4188end-sanitize-gm
867d923d
ILT
4189Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
4190
4191 * xcofflink.c: Numerous changes to get closer to a working XCOFF
4192 linker.
4193 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
4194 toc_section, and entry_section fields.
4195 (struct xcoff_section_tdata): Remove ldrel_count field.
4196 * libcoff.h: Rebuild.
4197 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
4198 fields.
4199 (coff_compute_section_file_positions): If RS6000COFF_C, generate
4200 full a.out header if full_aouthdr is set in xcoff_data.
4201 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
4202 based on sections stored in xcoff_data.
4203 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
4204 fields.
aad2c618
ILT
4205 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
4206 (rs6000coff_vec): Set symbol_leading_char to '.'.
867d923d
ILT
4207 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
4208 value stored in ret rather than returning a pointer value.
4209
6bd9ffdb
MM
4210Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4211
4212 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
4213 format for now.
4214
9d14250f
JL
4215Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
4216
4217 * som.c (som_slurp_string_table): Allocate the strings with malloc
4218 since they're free'd by free_cached_info.
4219 (som_slurp_symbol_table): Similarly for the symbol table.
4220
a2bd0529
PB
4221Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
4222
4223 * Makefile.in (diststuff): Don't make headers.
4224
28a0c103
ILT
4225Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
4226
356cd465
ILT
4227 * Makefile.in: Rebuild dependencies.
4228
1edd3a7b
ILT
4229 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
4230 output_bfd is not SunOS.
4231 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
4232 non-SunOS input files.
4233
28a0c103
ILT
4234 * xcofflink.c: Extensive changes to support linking shared objects
4235 and generating a .loader section.
4236 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
b73322d9
ILT
4237 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
4238 last_symndx, and ldrel_count fields.
28a0c103
ILT
4239 * libcoff.h: Rebuild.
4240 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
4241 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
4242 is set.
4243 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
4244 (bfd_xcoff_export_symbol): Declare.
4245 (bfd_xcoff_size_dynamic_sections): Declare.
4246 * bfd-in2.h: Rebuild.
4247
aadf04f7
SS
4248Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
4249
4250 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
4251 * configure: Rebuild.
4252 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
4253 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
4254 contents.
4255 (pmac_xcoff_vec): Update to use new xcoff support.
4256 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
4257 (xcoff_write_armap): Declare buf as unsigned char.
4258 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
4259
4260 * mpw-make.sed: Generalize subdir_do edit.
4261
ddf4639b
JL
4262Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
4263
4264 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
4265 correctly. Don't initialize asect->vma.
4266
e7bedf65
KR
4267Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
4268
4269 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
4270 something a little less than the page size.
4271
4272Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
4273
4274 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
4275
3a70e298
SC
4276Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
4277
4278 * coff-i386.c (coff_i386_reloc_type_lookup): New.
4279 * coffcode.h (coff_write_object_contents): If .bss is before
4280 .data us that as data_start.
4281 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
4282 calc correct.
4283 * peicode.h (add_data_entry): Use _cooked_size of data directory.
4284 (coff_swap_outhdr_out): Hardwire in version number.
4285
5a2846e3
KR
4286Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
4287
3c3a5268
KR
4288 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
4289 major and minor to *_vno, since the former are also macros in
4290 SunOS header files. Cast result of bfd_alloc to appropriate
4291 type.
4292
5a2846e3
KR
4293 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
4294 before assigning to sec_data.
4295
0f6c885e
ILT
4296Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
4297
4298 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
4299 now relative to the section, not absolute.
4300 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
4301 get the file name when there is a N_SO directory name. When
4302 handling stabs, remember that section->vma was added to the
4303 offset.
4304
11fa6636
ILT
4305Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
4306
4307 * sunos.c (struct sunos_link_hash_table): Add needed field.
4308 (sunos_link_hash_table_create): Call bfd_release, not free.
4309 (sunos_link_hash_table_create): Initialize needed field.
4310 (sunos_add_dynamic_symbols): Record needed objects.
4311 (bfd_sunos_get_needed_list): New function.
4312 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
4313 * bfd-in2.h: Rebuild.
4314
c974e19e
SC
4315Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
4316
4317 * libcoff-in.h (pe_data_type.in_reloc_p): New.
4318
22a35f0b
ILT
4319Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
4320
54406786
ILT
4321 * bfd-in.h (struct bfd_link_needed_list): Rename from
4322 bfd_elf_link_needed_list.
4323 * bfd-in2.h: Rebuild.
4324 * elf.c, elflink.h, libelf.h: Corresponding changes.
4325
dd984644
ILT
4326 Add start at AIX linker support; no shared libraries yet.
4327 * xcofflink.c: New file.
4328 * configure.in (rs600coff_vec): Use xcofflink.o.
4329 * configure: Rebuild.
4330 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
4331 fields.
4332 (struct xcoff_section_tdata): Define.
4333 (xcoff_section_data): Define macro.
4334 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
4335 (_bfd_xcoff_bfd_link_add_symbols): Declare.
4336 (_bfd_xcoff_bfd_final_link): Declare.
4337 (_bfd_ppc_xcoff_relocate_section): Declare.
4338 * libcoff.h: Rebuild.
4339 * coff-rs6000.c: Clean up a bit.
4340 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
4341 cputype, csects, and debug_indices.
4342 (xcoff_copy_private_bfd_data): Copy cputype.
4343 (xcoff_howto_table): Rename from rs6000coff_howto_table.
4344 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
4345 (xcoff_reloc_type_lookup): Rename from
4346 rs6000coff_reloc_type_lookup.
4347 (coff_relocate_section): Define.
4348 (_bfd_xcoff_sizeof_headers): Define.
4349 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
4350 (_bfd_xcoff_bfd_relax_section): Define.
4351 (_bfd_xcoff_bfd_link_split_section): Define.
4352 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
4353 coff.
4354 * coffcode.h (coff_compute_section_file_positions): If AIX,
4355 increment sofar by SMALL_AOUTSZ if not executable.
4356 (coff_write_object_contents): If AIX, always output an a.out
4357 header; if not executable, header size of SMALL_AOUTSZ.
4358 * hash.c (struct bfd_strtab_hash): Add xcoff field.
4359 (_bfd_stringtab_init): Initialize xcoff field.
4360 (_bfd_xcoff_stringtab_init): New function.
4361 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
4362 (_bfd_stringtab_emit): In XCOFF mode, write out length.
4363 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
4364 * libbfd.h: Rebuild.
4365 * Makefile.in: Rebuild dependencies.
4366 (BFD32_BACKENDS): Add xcofflink.o.
4367 (CFILES): Add xcofflink.c.
4368
22a35f0b
ILT
4369 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
4370 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
4371 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
4372
fb417a21
MM
4373Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4374
4375 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
4376
4377Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
4378
4379 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
4380 * config.in: Regenerated.
4381
4382 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
4383 (_bfd_chunksize): New variable.
4384 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
4385 for obstack chunk size.
4386 * configure.in: Check for getpagesize.
4387 * configure: Regenerated.
4388
4389 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4390
4391 * trad-core.c (rawptr): Make it a local variable of
4392 ptrace_unix_core_file_p.
4393
b1e46369
SC
4394Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
4395
4396 * coff-arm.c (in_reloc_p): New.
4397 * coff-i386.c (in_reloc_p): New.
4398 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
4399 (coff_write_object_contents): Only set has_reloc_section
4400 if PE_IMAGE.
4401 * cofflink.c (_bfd_coff_generic_relocate_section): Call
4402 in_reloc_p to decide if reloc should be emitted.
4403 * libcoff.h (pe_data_type.in_reloc_p): New.
4404 * peicode.h (pe_mkobject): Initialize in_reloc_p.
4405
ee9f09cd
ILT
4406Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
4407
b1e46369
SC
4408 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
4409 (_bfd_coff_read_internal_relocs): Likewise.
4410 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
4411 (_bfd_coff_read_internal_relocs): Likewise.
4412
ee9f09cd
ILT
4413 * elflink.h (elf_link_add_object_symbols): Correct conditions
4414 under which type and size change warnings are issued.
4415
78b31b6b
ILT
4416Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
4417
4418 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
4419 a symbol which is not in a real section.
4420 (coff_write_native_symbol): Corresponding change.
4421
4422 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
4423 coff_link_hash_newfunc and make non-static.
4424 (_bfd_coff_link_hash_table_init): New function, broken out of
4425 _bfd_coff_link_hash_table_create.
4426 (_bfd_coff_link_hash_table_create): Use it.
4427 (process_embedded_commands): Make static.
4428 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
4429 (_bfd_coff_link_hash_table_init): Declare.
4430 * libcoff.h: Rebuild.
4431
4432 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
4433 field in XCOFF tdata.
4434 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
4435 U802ROMAGIC, for clarity. Try to set arch and machine correctly
4436 based on cputype stored in a.out header, or in n_type of initial
4437 .file symbol.
4438 (coff_write_object_contents): Set cputype correctly in a.out
4439 header.
4440 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
4441 warnings.
4442 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
4443 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
4444 old resv1 field.
4445 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
4446 * libcoff.h: Rebuild.
4447
4448 * cpu-rs6000.c (rs6000_compatible): New static function.
4449 (bfd_rs6000_arch): Use it.
4450 * cpu-powerpc.c (powerpc_compatible): New static function.
4451 (arch_info_struct): Define various flavours of PowerPC.
4452 (bfd_powerpc_arch): Use powerpc_compatible. Point at
4453 arch_info_struct.
4454
9dd7e56f
FF
4455Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
4456
78b31b6b 4457 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
9dd7e56f 4458
8235c112
ILT
4459Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
4460
4461 * elflink.h (elf_link_add_object_symbols): Don't warn about
4462 changing the size or type if the old definition was weak.
4463
0322af0d
ILT
4464Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
4465
49488f2b
ILT
4466 * coffcode.h (combined_entry_type): Add fix_line field.
4467 (coff_slurp_line_table): Warn if we try to set the lineno field of
4468 a symbol twice.
4469 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
4470 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
4471 * coffgen.c (coff_mangle_symbols): Handle fix_line.
4472 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
4473 absolute section.
4474 (coff_print_symbol): Print fix_value symbols in a useful fashion.
4475 * libcoff.h: Rebuild.
4476
5f710a3a
ILT
4477 * libcoff-in.h (struct xcoff_tdata): Define.
4478 (xcoff_data): Define.
4479 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
4480 * bfd-in2.h, libcoff.h: Rebuild.
4481 * coff-rs6000.c (xcoff_mkobject): New static function.
4482 (coff_mkobject): Define.
4483 (xcoff_copy_private_bfd_data): New static function.
4484 (coff_bfd_copy_private_bfd_data): Define.
4485 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
4486 signed to bitfield.
4487 (rs6000coff_vec): Add DYNAMIC to object_flags.
4488 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
4489 .loader sections specially.
4490 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
4491 section alignment from the XCOFF tdata information.
4492 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
4493 F_SHROBJ, and copy the extra a.out header information into the
4494 XCOFF tdata structure.
4495 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
4496 F_DYNLOAD and the extra a.out header information.
4497 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
4498 C_HIDEXT symbol with attached csect information.
4499 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
4500 in the o_maxdata field.
4501 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
4502 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
4503 end if BSF_NOT_AT_END is set.
3f2c5b2d 4504
0322af0d
ILT
4505 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
4506 _bfd_read_ar_hdr_fn.
4507 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
4508 * bfd-in2.h, libbfd.h: Rebuild.
4509 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
4510 return value.
4511 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
4512 (bfd_slurp_bsd_armap_f2): Likewise.
4513 (_bfd_slurp_extended_name_table): Likewise.
4514
3266eaff
KR
4515Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
4516
4517 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4518
4519 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
4520 when the symbol table is empty.
4521
4522 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
4523 space for section symbols, since we don't output them either.
4524 (elf_m68k_adjust_dynindx): Removed.
4525
4526 * ptrace-core.c (rawptr): Make it a local variable of
4527 ptrace_unix_core_file_p.
3266eaff 4528
249479fa
MM
4529Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4530
45b5d2f0
MM
4531 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
4532 NULL.
4533
249479fa
MM
4534 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
4535 Mac object file formats.
4536
c53fac12
ILT
4537Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
4538
4372f33f
ILT
4539 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
4540 auxent if there isn't one.
4541 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
4542 rather than FILNMLEN as the maximum name length.
4543
0fc9ada9
ILT
4544 * coffcode.h (bfd_coff_backend_data): Add new field
4545 _bfd_coff_print_aux.
4546 (bfd_coff_print_aux): New static function.
4547 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
4548 scnlen field of an XTY_LD csect aux entry.
4549 (coff_print_aux): New static function.
4550 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
4551 in coff_pointerize_aux_hook.
4552 (bfd_coff_std_swap_table): Initialize new field.
4553 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
4554 * libcoff.h: Rebuild.
4555 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4556 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4557
7860fe38
ILT
4558 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
4559 if there are symbols, for native AIX ld compatibility.
4560
c80cc833
ILT
4561 * coffcode.h (bfd_coff_backend_data): Add new field
4562 _bfd_coff_pointerize_aux_hook.
4563 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
4564 or I960, and as 0 otherwise.
4565 (bfd_coff_std_swap_table): Initialize new field.
4566 * libcoff.h: Rebuild.
4567 * coffgen.c (coff_pointerize_aux): Change parameters to take
4568 symbol pointer instead of type and class, and to take aux index.
4569 Call _bfd_coff_pointerize_aux_hook if it is defined.
4570 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
4571 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
4572 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4573
c53fac12
ILT
4574 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
4575 read-only/host-only support.
4576
4577 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
4578 BSF_LOCAL.
d11e6b52
ILT
4579 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
4580 RS6000COFF_C.
c53fac12
ILT
4581
4582 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
4583 BFD_JUMP_TABLE_ARCHIVE accordingly.
4584 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
4585 (_bfd_compute_and_write_armap): Declare.
4586 (_bfd_generic_read_ar_hdr): Declare.
4587 (_bfd_read_ar_hdr): Define.
4588 (_bfd_noarchive_read_ar_hdr): Define.
4589 (_bfd_archive_bsd_read_ar_hdr): Define.
4590 (_bfd_archive_coff_read_ar_hdr): Define.
4591 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
4592 _bfd_read_ar_hdr instead.
4593 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
4594 (_bfd_compute_and_write_armap): Rename from
4595 compute_and_write_armap. Make non-static. Change all callers.
4596 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
4597 than _bfd_snarf_ar_hdr.
4598 * aout-target.h (MY_read_ar_hdr): Define if not defined.
4599 * ieee.c (ieee_read_ar_hdr): Define.
4600 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
4601 * oasys.c (oasys_read_ar_hdr): Define.
4602 * som.c (som_read_ar_hdr): Define.
4603 * bfd-in2.h, libbfd.h: Rebuild.
4604
f8e47484
SC
4605Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
4606
4607 * peicode.c (coff_swap_filehdr_in): If symptr is
4608 zero, there aren't any symbols, even if nsyms is set.
4609
2b874a2d
ILT
4610Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
4611
aca73687
ILT
4612 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
4613 field.
4614 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
4615 sections, and set styp correctly for them: .got, .hash, .dynamic,
4616 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
4617 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
4618 types.
4619 (ecoff_sort_hdrs): New static function.
4620 (ecoff_compute_section_file_positions): Return boolean, not void.
4621 Sort the sections by VMA before looking through them. Put the
4622 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
4623 section on an appropriate boundary within the page.
4624 (ecoff_compute_reloc_file_positions): Check return value of
4625 ecoff_compute_section_file_positions.
4626 (_bfd_ecoff_set_section_contents): Likewise.
4627 (_bfd_ecoff_write_object_contents): Check for various Alpha
4628 section types when incrementing text_size and data_size. Call
4629 adjust_headers backend function if it exists.
4630 * coff-alpha.c (alpha_adjust_headers): New static function.
4631 (alpha_ecoff_backend_data): Initialize adjust_headers field.
4632 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4633
2b874a2d
ILT
4634 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
4635
c780e5db
JL
4636Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
4637
4638 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
4639 of ALTERNATE_AIX_CORE_FORMAT.
4640 * configure.in (aix4): No longer need CORE_FLAGS.
4641 * configure: Updated.
4642
2a01c351
KR
4643Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
4644
4645 NS32k changes from Ian Dall:
4646 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
4647 macros.
4648 (aout_link_input_section_std, aout_link_input_section_ext,
4649 aout_link_reloc_link_order): Call them instead of _bfd_*
4650 versions.
4651 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
4652 to zero.
4653 (backend_data): Use it instead of hardcoded zero.
4654
4655 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
4656 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
4657
4658 * ns32knetbsd.c: Include bfd.h.
4659 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
4660 (MY_bfd_reloc_type_lookup): Declare function too.
4661 * pc532-mach.c (set_sizes): Don't declare.
4662 (MY_text_includes_header, MY_exec_header_not_counted): Define.
4663 (backend_data, MY_backend_data): Don't define.
4664
4665 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
4666 ns32k-*-lites* like ns32k-*-netbsd*.
4667
4668 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
4669 compile on lites.
4670
5944d75b
ILT
4671Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
4672
4673 * coffcode.h (coff_write_object_contents): Restore setting
4674 f_timdat to 0, deleted on August 22.
4675
db344f82
SC
4676Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
4677
4678 * coffcode.h (coff_bfd_copy_private_symbol_data,
4679 coff_bfd_copy_private_section_data,
4680 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
4681 * peicode.h (coff_bfd_copy_private_bfd_data): New
4682 (pe_bfd_copy_private_bfd_data): New.
4683 (coff_swap_scnhdr_in): Swap bss size into the right place.
4684 (pe_print_private_bfd_data): Add some newlines.
5944d75b 4685
c780e5db 4686Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
97f1feda
JL
4687
4688 * som.c (setup_sections): Don't die if a space has no subspaces.
4689
3d7c42c9
ILT
4690Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
4691
4692 * elflink.h (elf_link_add_object_symbols): Don't let a weak
4693 dynamic symbol override a common symbol. Don't change the size or
4694 type if they have been set and the new symbol is not a definition.
4695 Warn if the size or type changes.
4696
c780e5db 4697Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
709af562
JL
4698
4699 * som.c (som_begin_writing): Don't write the symbol table or
4700 symbol strings.
4701 (som_finish_writing): Write them here. Place them after the
4702 subspace data, but before the relocs.
4703
4704Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
4705
4706 * sunos.c (sunos_add_one_symbol): Just pass false, not
4707 info->shared_library, to sunos_create_dynamic_sections.
4708 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
4709 section.
4710 (sunos_check_dynamic_reloc): Remove .text section assertion.
4711
7009e451
SS
4712Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
4713
4714 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
4715 * configure, configure.in: Add pmac_xcoff_vec case.
4716 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
4717 * coff-pmac.c: New file, PowerMac XCOFF support.
4718 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
4719 * targets.c (pmac_xcoff_vec): Declare.
4720
4721 * mpw-config.in: Various changes to be compatible with the
4722 autoconf-based configury.
4723 * mpw-make.sed: New file, sed commands to translate Unix
4724 makefile into MPW syntax.
4725 * mpw-make.in: Remove.
4726 * hosts/mpw.h: Remove.
4727 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
4728 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
4729
b91537be
SC
4730Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
4731
4732 * binary.c (binary_get_symtab): Return an empty string on error.
4733 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
4734
30360a6f
KK
4735Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
4736
4737 * coff-ppc.c: Reformatted according to gnu conventions
4738 Removed irrelevant "if 0" code
4739
20d1e233
ILT
4740Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
4741
69fd4fdd
ILT
4742 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
4743 symbols rather than as indirect symbols.
4744 (MY(slurp_symbol_table)): Don't do anything special about
4745 secondary symbols.
4746
46b5a892
ILT
4747 * coffcode.h (coff_new_section_hook): Make sure that the alignment
4748 of .ctors and .dtors sections is no larger than 2.
4749
9db59230
ILT
4750 * sunos.c (sunos_add_one_symbol): Don't change
4751 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
4752 undef list.
4753 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
4754 dynamic symbols when creating a shared library.
4755 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
4756 shared library.
4757 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
4758 written even if it is not defined in a regular object.
4759 (sunos_write_dynamic_symbol): Use plt_offset for the address of
4760 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
4761 rather than the constant 22.
4762 (sunos_check_dynamic_reloc): Handle creating a shared library.
4763 (sunos_finish_dynamic_link): Set the first entry in the GOT to
4764 zero when creating a shared library.
4765 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
4766 write it out at the start of the symbol table.
4767
20d1e233
ILT
4768 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
4769
a11e10fe
DE
4770Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
4771
4772 * config.bfd: Add arm-*-coff.
4773 * configure.in, configure: Add armcoff_{little,big}_vec.
4774 * targets.c (armcoff_{little,big}_vec): Declare.
4775 (bfd_target_vector): Add armcoff_{little,big}_vec.
4776 * coff-arm.c (armcoff_{little,big}_vec): Always define.
4777
99062cfc
ILT
4778Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
4779
4780 * targets.c (bfd_find_target): Remove debugging code.
4781
deacbe0f
KK
4782Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
4783
4784 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
4785 support on powerpc.
4786 * Makefile.in: added *-ppc files
4787 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
4788 allow pe based .o's to be shared with other tools on ppc/NT
4789 * config.bfd: added powerpc[le]-[pe|winnt] config support
4790 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
4791 * peicode.h: Added more section flags for PE on ppc
4792 Added coff_swap_filehdr_out to allow peicode.h to be
4793 used for non-image PE files on ppc.
4794 Check for image, or not, before copying pe_opthdr
4795 * targets.c: Added new bfd's
30360a6f
KK
4796 * targets.c: Removed two inactive bfds that shouldn't have made it this
4797 far.
deacbe0f 4798
d22b02e0
MM
4799Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4800
4801 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
4802 explicit values to initialize all relocs. Change all users.
4803 (ppc_elf_brtaken_inner): New function to handle branch predicition
4804 relocs.
4805 (ppc_elf_brtaken_reloc): Ditto.
4806 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
4807 relocs use ppc_elf_unsupported_reloc.
4808 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
4809 needs to be reported.
4810 (ppc_elf_relocate_section): Support branch prediction relocs.
4811
fcf490c0
ILT
4812Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
4813
e6cb7b41
ILT
4814 * bfd.c (bfd_assert): Remove \n from string passed to
4815 _bfd_error_handler.
4816
1af85fbb
ILT
4817 * coff-i386.c: (TWO_DATA_SECS): Don't define.
4818 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
4819 (bfd_coff_make_section_hook): Don't define.
4820 (coff_make_section_hook): Remove.
4821 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
4822 (styp_to_sec_flags): Likewise.
4823 (coff_write_object_contents): Likewise.
4824 (bfd_coff_std_swap_table): Don't initialize make_section_hook
4825 field.
4826 * libcoff.h: Rebuild.
4827 * coffgen.c (make_a_section_from_file): Just call
4828 bfd_make_section_anyway, not bfd_make_section or
4829 bfd_coff_make_section_hook.
4830 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
4831 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
4832 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
4833 make_section_hook field.
4834 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4835
fcf490c0
ILT
4836 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
4837 pointers into value field for warning and indirect symbols; just
4838 leave the value field alone.
4839 * linker.c (generic_link_add_symbol_list): Use next symbol for
4840 warning and indirect symbols, rather than looking in symbol value.
4841 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
4842 parameter. Change all callers. Remove support for indirect
4843 symbols; it didn't work anyhow.
4844 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
4845 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
4846 * bfd-in2.h: Rebuild.
4847
cc47d19a
MM
4848Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4849
4850 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
4851 go back to telling the tools this reloc operates on 32 bits.
4852
81449d47
ILT
4853Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
4854
7a7fbffb
ILT
4855 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
4856 rather than a direct fprintf.
4857 * archive.c (_bfd_write_archive_contents): Likewise.
4858 * coffcode.h (coff_slurp_symbol_table): Likewise.
4859 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
4860 (ppc_elf_unsupported_reloc): Likewise.
4861 (ppc_elf_relocate_section): Likewise.
4862 * i386linux.c (linux_tally_symbols): Likewise.
4863 (linux_finish_dynamic_link): Likewise.
4864 * osf-core.c (osf_core_core_file_p): Likewise.
4865 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
4866 * som.c (som_sizeof_headers): Likewise.
4867 * srec.c (srec_bad_byte): Likewise.
4868 * bfd.c (bfd_assert): Likewise. Also change file to be const.
4869 * libbfd-in.h (bfd_assert): Declare first parameter const.
4870 * libbfd.h: Rebuild.
4871 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
4872 bfd_reloc_overflow is enough.
4873 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
4874 * coff-h8500.c (rtype2howto): Likewise.
4875 * coff-z8k.c (rtype2howto): Likewise.
4876 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
4877 * elf.c (_bfd_elf_get_lineno): Likewise.
4878 (_bfd_elf_no_info_to_howto): Likewise.
4879 (_bfd_elf_no_info_to_howto_rel): Likewise.
4880 * hp300hpux.c (convert_sym_type): Likewise.
4881 (MY(swap_std_reloc_in)): Likewise.
4882 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
4883
f1c6dd5d
ILT
4884 * libaout.h (struct aoutdata): Add line_buf field.
4885 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
4886 and filename_buffer. Instead, use a malloc buffer stored in the
4887 new line_buf field. Remove length restrictions.
4888
f0500a41
ILT
4889 * coffgen.c (string_size): Remove static variable.
4890 (debug_string_size, debug_string_section): Likewise.
4891 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
4892 and debug_string_size_p parameters. Use them instead of the
4893 global variables. Change all callers.
4894 (coff_write_symbol): Likewise.
4895 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
4896 (coff_write_symbols): Add local variables to replace removed
4897 global variables.
4898
25b5a53d
ILT
4899 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
4900 function, and line_base fields.
4901 * libcoff.h: Rebuild.
4902 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
4903 information, rather than using static variables.
4904
641ac26a
ILT
4905 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
4906 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
4907
81449d47
ILT
4908 * init.c (initialized): Remove static variable.
4909 (bfd_init): Don't bother setting initialized.
4910 (bfd_check_init): Remove.
4911 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
4912 * libbfd.h: Rebuild.
4913
138b9b81
PS
4914Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4915
4916 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
4917 size for full core dumps. Copy core file header to private data.
4918 (rs6000coff_core_file_failing_command,
4919 rs6000coff_core_file_failing_signal): New functions to extract
4920 the file name and terminating signal from the core file.
4921 * coff-rs6000.c: Use them.
4922
2ffbb79a
ILT
4923Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
4924
4925 Change arch info to be const, initialized at compile time.
4926 * archures.c: Reindent many functions. Change CONST to const.
4927 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
4928 nothing set it anyhow. Make next const.
4929 (bfd_arch_info_list): Remove.
4930 (bfd_archures_list): Rename from archures_init_table. Change from
4931 a table of function pointers to a table of bfd_arch_info_type
4932 structure addresses.
4933 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
4934 (bfd_lookup_arch): Likewise.
4935 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
4936 const pointer.
4937 (bfd_default_arch_struct): Make const.
4938 (bfd_arch_init, bfd_arch_linkin): Remove.
4939 (bfd_get_arch_info): Return a const pointer.
4940 * init.c (bfd_init): Don't call bfd_arch_init.
4941 * bfd.c (struct _bfd): Make arch_info const.
4942 * bfd-in2.h: Rebuild.
4943 * libbfd.h: Rebuild.
4944 * configure.in: Put & before everything in $selarchs.
4945 * configure: Rebuild.
4946 * cpu-*.c: Change bfd_*_arch from a function which calls
4947 bfd_arch_linkin to a const structure.
4948 * ieee.c (ieee_object_p): Make arch const.
4949
02f85cda
MM
4950Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
4951
4952 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
4953 PowerPC V.4.
4954 * bfd-in2.h: Regenerate.
4955 * libbfd.h: Regenerate.
4956
4957 * elf32-ppc.c (reloc_type): Update names to match current draft.
4958 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
4959 relative. Update names to current V.4 draft.
4960 (ppc_elf_reloc_type_lookup): Add support for more relocations.
4961 (ppc_elf_relocate_section): Rename relocations to match draft.
4962
dd82c578
MM
4963Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
4964
4965 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
4966 compiled with -mrelocatable-lib to be linked with either normal
4967 modules or -mrelocatable modules.
4968
f69e888e
ILT
4969Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
4970
e18c4e8f
ILT
4971 * coffcode.h (coff_write_object_contents): Clear the vstamp field
4972 in the a.out header.
4973
f69e888e
ILT
4974 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
4975 a reloc against a local symbol, even if it's not a section.
4976
a5655244
ILT
4977Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
4978
4979 * targets.c (bfd_target): Remove unused align_power_min field.
4980 * bfd-in2.h: Rebuild.
4981 * All backends: Remove initialization of align_power_min.
4982
500d7394
SC
4983Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
4984
4985 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
500d7394 4986
049df0a8
ILT
4987Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
4988
4989 * config.bfd (mips-dec-netbsd*): New target.
4990 * configure.host (mips-dec-netbsd*): New host.
4991 * configure.in (mips-dec-netbsd*): New native.
4992 * configure: Rebuild.
4993
1862bbd8
ILT
4994Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
4995
4996 Make the COFF backend linker merge common types:
4997 * cofflink.c (struct coff_debug_merge_element): Define.
4998 (struct coff_debug_merge_type): Define.
4999 (struct coff_debug_merge_hash_entry): Define.
5000 (struct coff_debug_merge_hash_table): Define.
5001 (coff_debug_merge_hash_table_init): Define.
5002 (coff_debug_merge_hash_table_free): Define.
5003 (coff_debug_merge_hash_lookup): Define.
5004 (struct coff_final_link_info): Add debug_merge field.
5005 (coff_debug_merge_hash_newfunc): New static function.
5006 (_bfd_coff_final_link): Allocate and free debug_merge table.
5007 (coff_link_input_bfd): Merge identical enum, struct and union
5008 types.
5009
a208a70f
ILT
5010Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
5011
5012 Convert i960 COFF to use COFF backend linker.
5013 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
5014 structure to store the symbol being used.
5015 (coff_i960_start_final_link): New static function.
5016 (coff_i960_relocate_section): New static function.
5017 (coff_i960_adjust_symndx): New static function.
5018 (coff_start_final_link): Define.
5019 (coff_relocate_section): Define.
5020 (coff_adjust_symndx): Define.
5021 * coffcode.h (bfd_coff_backend_data): Add new callback function
5022 _bfd_coff_start_final_link.
5023 (bfd_coff_start_final_link): Define.
5024 (coff_start_final_link): Define if not defined.
5025 (bfd_coff_std_swap_table): Add coff_start_final_link.
5026 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
5027 visible.
5028 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
5029 function callback is not NULL.
5030 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
5031 (_bfd_coff_internal_syment_name): Declare.
5032 * libcoff.h: Rebuild.
5033 * configure.in (icoff_big_vec): Add cofflink.o.
5034 (icoff_little_vec): Likewise.
5035 * configure: Rebuild.
5036
f0abedbe
FF
5037Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
5038
5039 * Makefile.in (clean-info): Remove extraneous tab from line
5040 following action.
5041
aa4b3dc5
ILT
5042Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
5043
5044 * cofflink.c (coff_link_input_bfd): Fail if a section with no
5045 contents has relocs.
5046
4ca63811 5047Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
beee31b1
SC
5048
5049 * coffcode.h (coff_compute_section_file_positions): Keep the
5050 raw size safe.
5051 (coff_write_object_contents): Remember if it's a relocatable
5052 file.
5053 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
5054 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
5055 if relocatable file. Swap out saved raw size.
5056
ae115e51
ILT
5057Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
5058
9521bac3
ILT
5059 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
5060 (maintainer-clean): Rename from realclean, passing
5061 maintainer-clean down to subdirectories, but leave realclean as a
5062 synonym.
5063
4ca63811
ILT
5064 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
5065 warning callback.
5066
5aa4c3ff
ILT
5067 * dep-in.sed: Remove config.h from generated dependencies.
5068
396aaeb2
ILT
5069 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
5070 broken out of sunos_canonicalize_dynamic_symtab.
5071 (sunos_canonicalize_dynamic_symtab): Call new function
5072 sunos_slurp_dynamic_symtab.
5073 (sunos_add_dynamic_symbols): Add three new parameters. Return the
5074 dynamic symbol table to the caller.
5075 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
5076 callback to override the symbols being read.
5077 * libaout.h (struct aout_backend_data): Add three new parameters
5078 to add_dynamic_symbols callback.
5079
ae115e51
ILT
5080 Extensive minor changes to avoid various gcc warnings. Also:
5081 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
5082 * archures.c (bfd_arch_info_type): Change mach field from long to
5083 unsigned long.
5084 (bfd_lookup_arch): Change machine parameter from long to unsigned
5085 long.
5086
b088e4b2
ILT
5087Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
5088
5089 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
5090 a symbol with a non-zero plt_offset.
5091
1dff7902
ILT
5092Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
5093
2b71e1e4
ILT
5094 * elfcode.h (align_file_position): Remove; not used.
5095
1dff7902
ILT
5096 * configure.in: Only check for <sys/procfs.h> on a native system,
5097 and make sure it defines prstatus_t.
5098 * configure: Rebuild.
5099
870015b1
ILT
5100Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
5101
535c89f0
ILT
5102 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
5103
936b870c
ILT
5104 * config.in: Rename from config.h.in.
5105 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
a7873a6c 5106 Check for config.h:config.in when creating stamp-h.
936b870c 5107 * configure: Rebuild.
a7873a6c
ILT
5108 * Makefile.in (stamp-h): Depend upon config.in rather than
5109 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
5110 calling config.status.
936b870c 5111
870015b1
ILT
5112 * Makefile.in (do_distclean): Remove config.h and stamp-h.
5113 (Makefile): Just rebuild Makefile.
5114 (config.h, stamp-h): New targets.
5115 * configure.in: Create stamp-h when rebuilding config.h.
5116 * configure: Rebuild.
5117
b7577823
ILT
5118Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
5119
5120 * configure.in: Call AC_CONFIG_HEADER. Substitute
5121 HOST_64BIT_LONG. Check that various header files exist. Check
5122 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
5123 and/or free need to be declared. Don't make a link to sysdep.h.
5124 Define TRAD_HEADER for various hosts.
5125 * configure: Rebuild.
5126 * configure.host: Don't set my_host. Add definitions taken from
5127 host header files for various entries. Remove entries which now
5128 do nothing.
5129 * acconfig.h: New file.
5130 * config.h.in: New file, built by autoheader.
5131 * sysdep.h: New file.
5132 * Makefile.in (do_distclean): Don't remove sysdep.h.
5133 (RECONFIG): Remove.
5134 (LOCAL_H_DEPS): New variable.
5135 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
5136 $(RECONFIG).
5137 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
5138 ($(OPTIONAL_BACKENDS)): Likewise.
5139 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
5140 looking through sysdep.h.
5141 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
5142 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
5143 (fprintf_vma, sprintf_vma): Likewise.
5144 (int64_type, uint64_type): Don't define.
5145 * bfd-in2.h: Rebuild.
5146 * archures.c, bfd.c, srec.c: Include <ctype.h>.
5147 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
5148 * lynx-core.c: Include stuff from old hosts/lynx.h.
5149 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
5150 rather than NO_FCNTL.
5151 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
5152 rather than NATIVE_HPPAHPUX_COMPILER.
5153 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
5154 is defined.
5155 * hosts/*.h: Remove all header files which merely include,
5156 declare, and define things. Leave header files which define
5157 information needed by trad-core.c.
5158
5159 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
5160 (BFD_CC_FOR_BUILD): Define.
5161 * configure.in: Use BFD_CC_FOR_BUILD.
5162 * configure: Rebuild.
5163
7a93ebdd
ILT
5164Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
5165
4c2e4d0e
ILT
5166 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
5167 * configure: Rebuild.
5168
7a93ebdd
ILT
5169 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
5170 a global symbol.
5171
866bb9e5
JM
5172Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
5173
5174 * config.bfd: i386pe_ve -> i386pe_vec.
5175
2b79a104
ILT
5176Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
5177
f515fb2f
ILT
5178 * configure.host: Incorporate host Makefile fragments by setting
5179 shell variables.
5180 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
5181 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
5182 value based on whether the code is being compiled by a cross
5183 compiler. Don't substitute host_makefile_frag or frags.
5184 * aclocal.m4: New file to define local AC_PROG_CC.
5185 * configure: Rebuild.
5186 * Makefile.in (INSTALL): Set to @INSTALL@.
5187 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
5188 (INSTALL_DATA): Set to @INSTALL_DATA@.
5189 (AR): Set to @AR@.
5190 (CC): Define as @CC@.
5191 (CFLAGS): Set to @CFLAGS@.
5192 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
5193 (@host_makefile_frag@): Remove.
5194 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
5195 after other options.
5196 (config.status): Remove dependency upon @frags@.
5197 * config/*.mh, config/README: Remove.
5198
2b79a104
ILT
5199 * config.bfd: Rewrite to incorporate the contents of the Makefile
5200 fragments by setting shell variables, rather than merely returning
5201 the name of a Makefile fragment.
5202 * configure.in: Use shell variables set by config.bfd rather than
5203 looking at the target Makefile fragment files. Don't substitute
5204 target_makefile_frag. Do substitute TDEFINES.
5205 * configure: Rebuild.
5206 * Makefile.in (@target_makefile_frag@): Remove.
5207 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
5208 * config/*.mt: Remove.
5209
2cb159a5
KR
5210Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
5211
5212 * configure.in: Put changequote lines around "i[345]86" patterns
5213 section of core file support.
5214
ef07871c
JL
5215Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
5216
5217 * som.c (som_bfd_print_private_bfd_data): Define to use the
5218 generic version.
5219
1613e075
SC
5220Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
5221
5222 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
5223 entry, text_start and data_start.
5224
a52a3ce8
ILT
5225Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
5226
a21227ef
ILT
5227 * Makefile.in (OFILES): Remove $(TDEPFILES).
5228 * config/apollo.mt (TDEPFILES): Remove.
5229 * config/README: Update.
5230
a52a3ce8
ILT
5231 * configure.in: For a native configuration, set COREFILE and
5232 COREFLAG based on the canonical host name.
5233 * configure: Rebuild.
5234 * Makefile.in: Rebuild dependencies.
5235 (ALL_CFLAGS): Add @COREFLAG@.
5236 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
5237 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
5238 support routines. Check LYNX_CORE rather than HOST_LYNX.
5239 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
5240 * i386lynx.c: Likewise.
5241 * m68klynx.c: Likewise.
5242 * sparclynx.c: Likewise.
5243 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
5244 * *-core.c: Comment changes.
5245 * config/decstation.mh (HDEPFILES): Remove.
5246 (HDEFINES): Remove -DTRAD_CORE.
5247 * config/irix3.mh (RANLIB): Remove.
5248 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
5249 (HDEFINES): Remove -DIRIX_CORE.
5250 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
5251 (HDEFINES): Remove -DTRAD_CORE.
5252 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
5253 * config/ultra3.mh (RANLIB): Remove.
5254 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
5255 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
5256 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
5257 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
5258 * config/hppahpux.mh, config/hppaosf.mh: Remove.
5259 * config/i386aix.mh, config/i386bsd.mh: Remove.
5260 * config/i386linux.mh, config/i386mach3.mh: Remove.
5261 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
5262 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
5263 * config/mipsmach3.mh, config/news-mips.mh: Remove.
5264 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
5265 * config/rs600.mh, config/rs6000lynx.mh: Remove.
5266 * config/solaris2.mh, config/stratus.mh: Remove.
5267 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
5268 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
5269
d6f672b8
ILT
5270Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
5271
5272 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
5273 DT_FINI entry if the appropriate symbol is not in the hash table.
5274
5275 * libelf.h (struct elf_backend_data): Add create_program_headers
5276 and want_hdr_in_seg fields.
5277 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
5278 defined.
5279 (elf_backend_create_program_headers): Likewise.
5280 (elfNN_bed): Initialize create_program_headers and
5281 want_hdr_in_seg.
5282 * elf.c (get_program_header_size): Call create_program_headers
5283 backend routine.
5284 (map_program_segments): Check want_hdr_in_seg backend field. Call
5285 create_program_headers backend routine.
5286
5287 * elf.c (assign_file_positions_except_relocs): Align non allocated
5288 sections when creating an executable.
5289
5290 * elfcode.h (elf_swap_phdr_in): Make non static.
5291 (elf_swap_phdr_out): Make non static.
5292 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
5293 (bfd_elf32_swap_phdr_out): Declare.
5294 (bfd_elf64_swap_phdr_in): Declare.
5295 (bfd_elf64_swap_phdr_out): Declare.
5296
5297 * ecofflink.c (ecoff_collect_shuffle): New static function.
5298 (_bfd_ecoff_get_accumulated_pdr): New function.
5299 (_bfd_ecoff_get_accumulated_sym): New function.
5300 (_bfd_ecoff_get_accumulated_ss): New function.
5301 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
5302 (_bfd_ecoff_get_accumulated_sym): Declare.
5303 (_bfd_ecoff_get_accumulated_ss): Declare.
5304 * libbfd.h: Rebuild.
5305
0cb70568
ILT
5306Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
5307
d6f672b8
ILT
5308 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
5309
0cb70568
ILT
5310 * elflink.h (elf_link_add_object_symbols): Handle indirect and
5311 warning symbols. If any section is named .gnu.warning.XXX, treat
5312 the contents as a warning to be issued if the symbol XXX is
5313 referenced.
5314 (elf_link_output_extsym): For an indirect or warning symbol, just
5315 output the symbol it points to.
5316
5317 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
5318 if bfd_hash_allocate fails, since it will already be set.
5319 (generic_link_hash_newfunc): Likewise.
5320 (archive_hash_newfunc): Likewise.
5321 (hash_entry_bfd): New static function.
5322 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
5323 callback. Allocate a new warning using the hash table newfunc.
5324 Use bfd_hash_replace to update the entry in the hash table, rather
5325 than assuming we can copy the fields with structure assignment.
5326
5327 * hash.c (bfd_hash_replace): New function.
5328 * bfd-in.h (bfd_hash_replace): Declare.
5329 * bfd-in2.h: Rebuild.
5330
f14db880
JSC
5331Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
5332
5333 * config.bfd: Add mips*vr4300-*-elf* target.
5334 * config/mipsbvr4300.mt: Added.
5335
1613e075 5336See file ChangeLog.2
e6d739eb 5337
41126f15
JK
5338\f
5339Local Variables:
5340mode: indented-text
5341left-margin: 8
6ec3bb6a
ILT
5342fill-column: 74
5343version-control: never
5344End:
This page took 0.420402 seconds and 4 git commands to generate.