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