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