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