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