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