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