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