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