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