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