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