2 Mon Aug 25 15:35:46 1997 Nick Clifton <nickc@cygnus.com>
4 * cpu-v850.c (scan): New function.
5 (arch_info_struct): New structure.
6 (bfd_v850_arch): Add link into arch_info_structure.
8 * config.bfd (targ_cpu): All v850 variants use the bfd_arch_v850
11 * elf32-v850.c (v850_elf_object_p): New function.
14 * archures.c (bfd_mach_v850e): Machine value for v850e.
16 * bfd-in2.h (bfd_mach_v850e): Machine value for v850e.
18 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850e machine
21 * elf.c (prep_headers): Add support for v850e machine number.
25 * archures.c (bfd_mach_v850eq): Machine value for v850eq.
27 * bfd-in2.h (bfd_mach_v850eq): Machine value for v850eq.
29 * elf32-v850.c (ELF_MACHINE_CODE): Default to v850eq machine
32 * elf.c (prep_headers): Add support for v850eq machine number.
36 Mon Aug 25 14:07:33 1997 Ian Lance Taylor <ian@cygnus.com>
38 * syms.c (_bfd_stab_section_find_nearest_line): Clear the
39 cached_stab field if the offset prevents us from using the cache.
41 Mon Aug 25 12:08:13 1997 Ian Lance Taylor <ian@cygnus.com>
43 * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
45 * aout-arm.c (aout_arm_little_vec): Likewise.
46 (aout_arm_big_vec): Likewise.
47 * bout.c (b_out_vec_big_host): Likewise.
48 (b_out_vec_little_host): Likewise.
49 * mipsbsd.c (aout_mips_little_vec): Likewise.
50 (aout_mips_big_vec): Likewise.
53 Tue Aug 19 10:09:10 1997 Fred Fish <fnf@cygnus.com>
55 * coff-tic80.c (COFF_ALIGN_IN_SFLAGS): Define to 1.
56 * coffcode.h (styp_to_sec_flags): Ignore incoming STYP_INFO
57 bit in s_flags if COFF_ALIGN_IN_S_FLAGS is defined.
60 Tue Aug 19 08:47:17 1997 Fred Fish <fnf@cygnus.com>
62 * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
63 (GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
64 * coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
65 * coffcode.h (coff_set_alignment_hook): Conditionally compile in if
66 COFF_ALIGN_IN_SECTION_HEADER is defined. Convert alignment to power
68 * coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
69 PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
71 (coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
72 GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
73 (coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
75 * Makefile.in (coff-tic80.o): Depends upon coffswap.h.
76 * coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
77 (GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
78 *coffcode.h (coff_write_object_contents): Set alignment field in
79 section header for TIC80COFF files.
83 Mon Aug 18 11:36:19 1997 Nick Clifton <nickc@cygnus.com>
85 * elf32-v850.c (v850_elf_howto_table, v850_elf_reloc_map,
86 v850_elf_check_relocs, v850_elf_reloc,
87 v850_elf_final_link_relocate): Add support for
88 BFD_RELOC_V850_16_PCREL relocation.
90 * reloc.c (COMMENT): Add suuport for BFD_RELOC_V850_16_PCREL
93 * libbfd.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
95 * bfd-in2.h: Add support for BFD_RELOC_V850_16_PCREL relocation.
99 Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
101 * cpu-v850e: New file.
103 * elf.c (prep_headers): Add support for v850e target.
105 * bfd-in2.h (bfd_architecture): Add support for v850e target.
107 * config.bfd: Add support for v850e target.
109 * archures.c: Add support for v850e target.
112 start-sanitize-v850eq
113 Mon Aug 18 11:33:56 1997 Nick Clifton <nickc@cygnus.com>
115 * cpu-v850eq: New file.
117 * elf.c (prep_headers): Add support for v850eq target.
119 * bfd-in2.h (bfd_architecture): Add support for v850eq target.
121 * config.bfd: Add support for v850eq target.
123 * archures.c: Add support for v850eq target.
126 Fri Aug 15 12:01:28 1997 Ian Lance Taylor <ian@cygnus.com>
128 * coffgen.c (coff_find_nearest_line): Correctly handle the offset
129 argument as section relative, rather than an absolute address.
130 From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
132 Fri Aug 15 04:58:02 1997 Doug Evans <dje@canuck.cygnus.com>
134 * config.bfd (arc-*-elf*): Add.
135 * configure.in (bfd_elf32_{little,big}arc_vec): Add.
136 * configure: Rebuild.
137 * Makefile.am (ALL_MACHINES): Add cpu-arc.lo.
138 (BFD32_BACKENDS): Add elf32-arc.lo.
139 (cpu-arc.lo,elf32-arc.lo): Add rules for.
140 * Makefile.in: Rebuild.
141 * archures.c (architecture list): Add bfd_arch_arc.
142 (bfd_archures_list): Add bfd_arc_arch.
143 (bfd_mach_arc_base): Define.
144 * reloc.c (BFD_RELOC_ARC_B22_PCREL,BFD_RELOC_ARC_B26): Add.
145 * targets.c (bfd_elf32_{little,big}arc_vec): Declare.
146 (bfd_target_vect): Add them.
147 * bfd-in2.h, libbfd.h: Rebuild.
148 * cpu-arc.c, elf32-arc.c: New files.
149 * elf.c (pre_headers): Recognize bfd_arch_arc.
151 Tue Aug 12 11:45:18 1997 Ian Lance Taylor <ian@cygnus.com>
153 * aoutx.h (NAME(aout,final_link)): If no symbols, make sure the
154 data section is correctly rounded to a page in the file.
156 Mon Aug 11 12:45:43 1997 Ian Lance Taylor <ian@cygnus.com>
158 * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
159 there are no symbols.
161 Sun Aug 10 14:45:56 1997 Ian Lance Taylor <ian@cygnus.com>
163 * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
164 file system 14 character limit.
165 * Makefile.am, configure.in: Corresponding changes.
166 * Makefile.in, configure: Rebuild.
168 Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
170 * Makefile.am: (ALL_MACHINES_CFILES): Add elf32-d10v.c.
171 Rebuild dependencies.
172 * Makefile.in: Rebuild.
174 Wed Aug 6 18:56:51 1997 Ian Lance Taylor <ian@cygnus.com>
176 * Makefile.am (docdir): Define.
177 * Makefile.in: Rebuild.
179 Tue Aug 5 23:05:03 1997 Ian Lance Taylor <ian@cygnus.com>
181 * configure: Rebuild with autoconf 2.12.1.
183 Mon Aug 4 12:00:35 1997 Ian Lance Taylor <ian@cygnus.com>
185 * aclocal.m4, configure: Rebuild with new automake patches.
187 Sun Aug 3 08:15:12 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
189 * rs6000-core.c (make_bfd_asection): New function to add a section
190 to the core file bfd.
191 (rs6000coff_core_p): Use make_bfd_asection to add the core file
193 Use BFD routines to seek, read and stat the core file.
194 Handle .data sections from loaded objects and anonymously mmapped
195 regions, these are available in AIX 4 core files.
197 Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
199 * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
200 * acinclude.m4: Move acmacros.m4 in here. Remove AM_PROG_LIBTOOL
201 copy; use a patches libtool instead.
202 * acmacros.m4: Remove.
203 * Makefile.in, aclocal.m4, configure: Rebuild.
205 Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
207 * Makefile.am: New file, based on old Makefile.in.
208 * acmacros.m4: New file, copied from old aclocal.m4.
209 * acinclude.m4: New file.
210 * configure.in: Call AM_PROG_LIBTOOL. Remove shared library
211 handling; now handled by libtool. Replace AC_CONFIG_HEADER with
212 AM_CONFIG_HEADER. Replace AC_PROG_INSTALL with AM_PROG_INSTALL.
213 Call AM_MAINTAINER_MODE, AM_CYGWIN32, and AM_EXEEXT. Change all
214 .o files to .lo. Remove stamp-h handling in AC_OUTPUT.
215 * acconfig.h: Mention PACKAGE and VERSION.
216 * stamp-h.in: New file.
217 * dep-in.sed: Change .o to .lo.
218 * Makefile.in: Now built with automake.
219 * aclocal.m4: Now built with aclocal.
220 * config.in, configure: Rebuild.
223 Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
225 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
226 if there is only a relocation to a read-only but not allocatable
227 section (like .stab).
228 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
229 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
230 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
231 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
232 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
234 * elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
235 (ppc_elf_create_linker_section): These sections are not
236 created by the linker (that is, they are created by the user
237 putting data in them). In particular, they can be the source
238 and target of relocations.
239 (ppc_elf_adjust_dynamic_symbol): Check postcondition of
240 bfd_elf32_link_record_dynamic_symbol. Align 16-byte common
241 objects (for instance, 'long double') to 16-byte boundaries.
242 (ppc_elf_size_dynamic_sections): Make the code that generates
243 section symbols exactly the same as for sparc, reducing the
244 number of section symbols output.
245 (ppc_elf_check_relocs): Check postcondition of
246 bfd_elf32_link_record_dynamic_symbol. Make default case the
247 same as corresponding code for sparc, fixing bug involving
249 (ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
250 forced to be local because of versioning (by replicating
251 corresponding change in sparc). Treat R_PPC_RELATIVE RELA relocs
252 as usual in ELF, not as pseudo-REL relocs (as the sparc linker
254 (ppc_elf_relocate_section): Add handy debugging code for when
255 assertion fails. Add some more 'symbol made local because of
258 * elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
259 processing a GOT relocation as required by ABI.
261 Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
263 * elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
264 version info if this symbol came from a dynamic object.
265 (elf_link_add_object_symbols): Set the version info of a symbol
266 only if the object actually contains version definitions and
269 Mon Jul 28 18:07:43 1997 Rob Savoye <rob@chinadoll.cygnus.com>
271 * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
272 * configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
274 * configure: Regenerated with autoconf 2.12.
275 * doc/Makefile.in: Add $(EXEEXT) to chew executable.
277 Mon Jul 28 02:50:29 1997 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
279 * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
280 a warning rather than returning an error.
282 Sun Jul 27 19:54:14 1997 Felix Lee <flee@cygnus.com>
284 * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy.
286 Fri Jul 25 14:50:08 1997 Felix Lee <flee@cygnus.com>
288 * cisco-core.c: define signals for wingdb.
290 Fri Jul 25 16:27:07 1997 Ian Lance Taylor <ian@cygnus.com>
292 * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
293 the same number of aux entries.
295 Fri Jul 25 08:22:15 1997 Jeffrey A Law (law@cygnus.com)
297 * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
298 difference of two symbols if the relocation size is 32 bits.
299 (som_write_fixups): Handle R_DATA_EXPR.
301 Wed Jul 23 16:08:02 1997 Ian Lance Taylor <ian@cygnus.com>
303 * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
304 its value if COFF_WITH_PE is defined.
306 Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
308 * coff-stubgo32.c: New file.
309 * go32stub.h: New file.
310 * coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
311 * coffswap.h (coff_swap_filehdr_in): Invoke
312 COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
314 (coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
315 COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
316 (coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
317 COFF_ADJUST_AUX_IN_POST if they are defined.
318 (coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
319 COFF_ADJUST_AUX_OUT_POST if they are defined.
320 (coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
321 COFF_ADJUST_SCNHDR_IN_POST if they are defined.
322 (coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
323 COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
324 * targets.c (go32stubbedcoff_vec): Declare.
325 (bfd_target_vector): Add go32stubbedcoff_vec.
326 * configure.in (go32coff_vec): New target vector.
327 (go32stubbedcoff_vec): Likewise.
328 * config.bfd (i[3456]86-*-msdosdjgpp*): New target.
329 (i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
330 * Makefile.in: Rebuild dependencies.
331 (BFD32_BACKENDS): Add coff-stubgo32.o.
332 (BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
333 (HFILES): Add go32stub.h.
335 Tue Jul 22 15:09:12 1997 Ian Lance Taylor <ian@cygnus.com>
337 * configure.in: Check for fdopen.
338 * configure, config.in: Rebuild.
339 * opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
340 __GO32__. Reindent a bit.
342 Sun Jul 20 20:05:20 1997 Ian Lance Taylor <ian@cygnus.com>
344 * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
345 flag for newly created sections.
346 (sunos_add_dynamic_symbols): Don't discard newly created sections
347 if shared library is dynobj.
349 Mon Jul 14 15:33:55 1997 Ian Lance Taylor <ian@cygnus.com>
351 * elf.c (map_sections_to_segments): When checking whether
352 including a section in a segment would force us to skip a page,
353 align the address of the next segment to avoid wraparound
357 Tue Jul 8 12:11:29 1997 Fred Fish <fnf@cygnus.com>
359 * coffcode.h (coff_write_object_contents): Initialize
360 target id field to TIC80_TARGET_ID.
361 * coffswap.h (coff_swap_filehdr_out): Swap out target id field
363 (coff_swap_filehdr_in): Swap in target id field if used.
366 Mon Jul 7 16:41:20 1997 Ian Lance Taylor <ian@cygnus.com>
368 * coff-i386.c (coff_i386_is_local_label_name): New static function
369 if TARGET_UNDERSCORE.
370 (coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
371 (i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
373 Mon Jun 30 14:29:26 1997 Ian Lance Taylor <ian@cygnus.com>
375 * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
376 complain_overflow_signed, for 32 bit PC relative relocations.
378 Thu Jun 26 01:26:31 1997 Ian Lance Taylor <ian@cygnus.com>
380 * elflink.h (elf_link_add_object_symbols): When a version
381 indirection symbol is overridden, make the original symbol point
382 at the real overriding symbol.
384 * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
387 * elflink.h (elf_link_output_extsym): Use the right section for a
389 * elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
390 symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
392 Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
394 * elflink.h (elf_merge_symbols): Resolve indirect and warning
395 symbols before checking for new symbols.
397 * elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
399 Tue Jun 24 11:20:43 1997 Ian Lance Taylor <ian@cygnus.com>
401 * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
402 file, not aoutsz bytes (they are different in XCOFF .o files).
404 * xcofflink.c (xcoff_link_add_symbols): Permit symbols to be
405 redefined by objects included from archives.
407 Mon Jun 23 18:03:27 1997 Ian Lance Taylor <ian@cygnus.com>
409 * elflink.h (elf_merge_symbol): In the case of a new defined
410 symbol overriding an old defined symbol, return the hash table
411 entry which we modify, even if it is the target of an
413 (elf_link_add_object_symbols): If the real name of the symbol gets
414 overridden, convert the versioned symbol into an indirect symbol
417 * elflink.h (elf_merge_symbol): New static function, broken out of
418 elf_link_add_object_symbols.
419 (elf_link_add_object_symbols): Call it.
421 Sun Jun 22 19:40:57 1997 Ian Lance Taylor <ian@cygnus.com>
423 * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
424 handle case where COFF filehdr does not immediately follow PE
426 * coffgen.c (coff_object_p): Remove useless seek to current
429 Wed Jun 18 19:03:38 1997 Ian Lance Taylor <ian@cygnus.com>
431 * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
434 Tue Jun 17 11:55:02 1997 Ian Lance Taylor <ian@cygnus.com>
436 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
437 symbols, skip N_ABS symbols with debugging storage classes.
439 Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
441 * elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
442 relocs in shared libraries which refer to local symbols. Cope
443 with addend when processing a GOT relocation.
445 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
446 for sections that the linker didn't create.
447 (ppc_elf_finish_dynamic_sections): Only try to write out a section
448 symbol if it was created in ppc_elf_size_dynamic_sections.
449 (ppc_elf_relocate_section): Complain if we have to generate a reloc
450 relative to a section for which we didn't output a symbol.
452 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up. PLT
453 relocs are 'rela' relocs, like everything else. .rela.plt is not
454 a read-only section, so we don't have to special-case it.
456 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
457 .rela.bss section are (of course) 'rela' relocs not 'rel' relocs.
459 * elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
460 (ppc_elf_relocate_section): @got offsets are 4 from start of the
462 * elflink.c (_bfd_elf_create_got_section): The three reserved
463 words start from the symbol '_GLOBAL_OFFSET_TABLE_'.
465 * elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
468 * elf32-ppc.c (ppc_elf_check_relocs): Use
469 _bfd_elf_create_got_section to create the GOT rather than
470 ppc_elf_create_linker_section. Create the '.rela.got' section
472 (ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
473 symbol has a GOT entry.
474 (ppc_elf_relocate_section): Record when a symbol is used through
475 the GOT, and allocate space in the GOT for each such symbol.
476 (ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
477 (ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
480 * elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
481 treated in a similar way to ADDR16_HA relocs.
482 (ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
483 shared objects; the linker must deal with them.
484 (ppc_elf_create_linker_section): Stop setting
485 _GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
486 LINKER_SECTION_PLT stuff.
487 (ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
488 (ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
489 section, not ELF-specific calls.
490 (elf_backend_plt_not_loaded): Set to 1.
491 (elf_backend_got_symbol_offset): Set to 4.
492 * elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
493 for when ld.so fills in the PLT; and 'got_symbol_offset' member.
494 * elflink.c (_bfd_elf_create_dynamic_sections): Apply
495 plt_not_loaded member.
496 (_bfd_elf_create_got_section): Apply got_symbol_offset.
497 * elfxx-target.h (elf_backend_plt_not_loaded): Set default to
499 (elf_backend_G_O_T_offset): Set default to 0.
500 (elfNN_bed): Set added fields.
502 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
503 DT_RELENT in shared objects; should be DT_RELAENT.
505 * elf32-ppc.c (ppc_elf_relocate_section): Propagate
506 R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
507 such a reloc (in a non-shared object) refers to a symbol that's
510 Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
512 * elfcode.h (put_signed_word): Define.
513 (get_signed_word): Define.
514 (elf_swap_reloca_in): Use get_signed_word for the r_addend field.
515 (elf_swap_reloca_out): Use put_signed_word for the r_addend
517 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
518 bfd_get_signed_32 to set the r_addend field.
519 * elf64-mips.c (mips_elf64_swap_reloca_in): Use
520 bfd_h_get_signed_64 to set the r_addend field.
522 Mon Jun 16 12:31:29 1997 Ian Lance Taylor <ian@cygnus.com>
524 * elf32-i386.c (elf_i386_relocate_section): When generating a
525 shared library, do the relocation if the input section is not
528 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
529 elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
530 (elf_fix_symbol_flags): New static function, broken out of
531 elf_adjust_dynamic_symbol.
532 (elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
533 (elf_link_assign_sym_version): Likewise. Permit a symbol to be
534 forced local even if NEEDS_PLT is set. When forcing a symbol to
535 be local, clear NEEDS_PLT.
536 (elf_link_output_extsym): Remove unused local bed.
538 Wed Jun 11 22:44:20 1997 Jeffrey A Law (law@cygnus.com)
540 * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
541 for derived elf linker hash table entries. References to
542 elf_link_hash_entry changed appropriately.
543 (elf32_mn10300_link_hash_table): New structure for derived elf
545 (elf32_mn10300_hash_table): Define.
546 (elf32_mn10300_link_hash_traverse): Likewise.
547 (elf32_mn10300_link_hash_newfunc): New function.
548 (elf32_mn10300_link_hash_table_create): Likewise.
549 (elf32_mn10300_finish_hash_table_entry): Likewise.
550 (mn10300_elf_relax_section): Handle "call" -> "calls", removal
551 of prologue code, and call:32->call:16 relaxing.
552 (compute_function_info: New function.
553 (bfd_elf32_bfd_ilink_hash_table_create): Define.
555 Wed Jun 11 00:00:07 1997 Ian Lance Taylor <ian@cygnus.com>
557 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
558 for a symbol which is being forced to be local.
559 * elf32-i386.c (elf_i386_relocate_section): Write out the
560 relocation value for a GOT reloc for a symbol which is turning
562 (elf_i386_finish_dynamic_symbol): If a symbol is turning into a
563 local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
565 * elf32-m68k.c, elf32-sparc.c: Corresponding changes.
567 * elf32-i386.c (elf_i386_relocate_section): Get the relocation
568 value if the symbol is turning into a local symbol.
569 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
570 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
572 1997-06-10 22:58 Ulrich Drepper <drepper@cygnus.com>
574 * elflink.h (elf_link_add_object_symbols): Also read verneed
575 information by calling `_bfd_elf_slurp_version_tables'.
576 (elf_link_add_object_symbols): For undefined symbols look for
577 version information in the verneed records.
578 (elf_link_add_object_symbols): Use soname of shared object
579 for verneed record if it is available.
581 Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
583 * cpu-arm.c: Add prototypes for compatible and scan.
584 * cofflink.c: Add prototype for mark_relocs.
586 * archive.c (bfd_special_undocumented_glue): Change filename to
587 const pointer. Add prototype.
589 Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
591 * elflink.h (elf_link_add_object_symbols): Ignore relocations of
592 sections that will be discarded.
594 1997-06-06 22:58 Ulrich Drepper <drepper@cygnus.com>
596 * elflink.h (elf_link_find_version_dependencies): When searching
597 for known version symbol skip non-matching verdef records, not
600 Thu Jun 5 15:52:45 1997 Ian Lance Taylor <ian@cygnus.com>
602 * cofflink.c (_bfd_coff_generic_relocate_section): Write a long,
603 not a bfd_vma, to the base file, to match how dlltool reads it.
605 Tue Jun 3 16:57:45 1997 Nick Clifton <nickc@cygnus.com>
607 * reloc.c: Add thumb relocations.
609 * bfd-in2.h: Add Thumb relocations.
611 * libbfd.h: Add Thumb relocations.
613 Mon Jun 2 10:41:52 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
615 * cpu-m68k.c (arch_info_struct): Fix 68060 cpu name.
617 Fri May 30 12:46:27 1997 Ian Lance Taylor <ian@cygnus.com>
619 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Set dynindx
620 for a section even if it is not loaded.
622 * cofflink.c (coff_link_add_symbols): If PE file, don't subtract
624 (_bfd_coff_link_input_bfd): Separate section VMA handling for
625 input and output files.
626 (_bfd_coff_generic_relocate_section): Check whether input file,
627 not output file, is a PE file.
629 Wed May 28 15:48:43 1997 Nick Clifton <nickc@cygnus.com>
631 * coff-arm.c: (coff_arm_bfd_set_private_flags): Make static.
633 Wed May 28 16:16:04 1997 Ian Lance Taylor <ian@cygnus.com>
635 * coff-i386.c (coff_i386_reloc): Don't just exit if we see an
638 Wed May 28 09:48:43 1997 Nick Clifton <nickc@cygnus.com>
640 * cpu-arm.c (compatible): Add test for supersets of ARM
643 Tue May 27 19:42:03 1997 Bob Manson <manson@charmed.cygnus.com>
645 * cofflink.c (_bfd_coff_final_link): Initialize global_to_static
648 Tue May 27 14:34:08 1997 Nick Clifton <nickc@cygnus.com>
650 * coff-arm.c (coff_arm_bfd_set_private_flags): Make global. It is
651 called directly by gas/config/tc-arm.c.
653 Tue May 27 15:58:53 1997 Richard Henderson <rth@tamu.edu>
655 * elf64-alpha.c (PLT_ENTRY_*): Use a new thread-safe format.
656 (elf64_alpha_finish_dynamic_symbol): Fill it in properly.
658 Mon May 26 14:05:13 1997 Ian Lance Taylor <ian@cygnus.com>
660 * coff-ppc.c (coff_ppc_relocate_section): If PE file, don't add
663 Mon May 26 10:57:48 1997 Fred Fish <fnf@cygnus.com>
665 * peicode.h (coff_bfd_print_private_bfd_data): #undef before #define.
666 (coff_bfd_copy_private_bfd_data): Ditto.
667 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): Make static.
668 (coff_arm_bfd_print_private_bfd_data): Ditto.
669 (coff_arm_bfd_set_private_flags): Ditto.
670 (coff_arm_bfd_copy_private_bfd_data): Ditto.
672 Fri May 23 15:14:58 1997 Fred Fish <fnf@cygnus.com>
674 * libcoff-in.h (struct coff_final_link_info): Add boolean
675 global_to_static member for support of task linking.
676 (_bfd_coff_write_task_globals): Add prototype.
677 * libcoff.h: Regenerate.
678 * coffcode.h (coff_write_object_contents): Use #ifdef to
679 check RS6000COFF_C, to be consistent with all other uses
681 * cofflink.c (_bfd_coff_final_link): If doing task linking,
682 call _bfd_coff_write_task_globals.
683 (_bfd_coff_link_input_bfd): If doing task linking, convert
684 global functions to static.
685 (_bfd_coff_write_global_sym): If doing task linking, convert
686 global variables to static.
687 (_bfd_coff_write_task_globals): New function.
689 * coff-tic80.c (TIC80COFF): Define this instead of just TIC80.
690 (C_AUTOARG): #undef since it clashes with C_UEXT.
691 (C_LASTENT): #undef since it clashes with C_STATLAB.
692 * coffcode.h (coff_write_object_contents): Use TIC80COFF
694 (coff_slurp_symbol_table): Use C_SYSTEM. Hide C_AUTOARG use
695 when TIC80COFF defined (clashes with C_UEXT). Explicitly
696 recognize C_UEXT, C_STATLAB, and C_EXTLAB as unsupported.
700 Fri May 23 12:38:24 1997 Ian Lance Taylor <ian@cygnus.com>
702 * coff-tic80.c (tic80_howto_table): Change overflow check for most
703 PP relocations to complain_overflow_dont.
705 Thu May 22 20:22:14 1997 Ian Lance Taylor <ian@cygnus.com>
707 * coff-tic80.c (tic80_howto_table): Add PP relocations. Change
708 name of R_RELLONG to "RELLONG". Set rightshift and complain for
710 (ppbase_reloc, glob15_reloc): New static functions.
711 (glob16_reloc, local16_reloc): New static functions.
712 (rtype2howto): Handle all relocation types.
713 (coff_tic80_relocate_section): New static function.
714 (coff_relocate_section): Define to coff_tic80_relocate_section.
715 * Makefile.in (coff-tic80.o): Depends upon include/coff/tic80.h.
718 Wed May 21 17:15:50 1997 Ian Lance Taylor <ian@cygnus.com>
720 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE or
721 COFF_IMAGE_WITH_PE, don't subtract the section VMA from the symbol
723 * coffgen.c (fixup_symbol_value): Add abfd parameter. Change all
724 callers. If PE file, don't add section VMA.
725 (coff_write_alien_symbol): If PE file, don't add section VMA.
726 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
727 (_bfd_coff_write_global_sym): Likewise.
728 (_bfd_coff_generic_relocate_section): Likewise.
730 * peicode.h: Add & 0xffffffff when using ImageBase in case bfd_vma
733 Wed May 21 09:58:10 1997 Nick Clifton <nickc@cygnus.com>
735 * cofflink.c (mark_relocs): Add new function to mark symbols which
736 are used by relocations.
737 (_bfd_coff_link_input_bfd): Add call to mark_relocs() and code to
738 suppress the skipping of symbols that have thus been marked.
740 Tue May 20 18:45:26 1997 Ian Lance Taylor <ian@cygnus.com>
742 * coff-sh.c (sh_merge_private_data): New static function.
743 (coff_bfd_merge_private_bfd_data): Define.
746 Mon May 19 14:46:00 1997 Mark Alexander <marka@cygnus.com>
748 * coff-tic80.c: Remove unnecessary #ifdefs.
749 * config.bfd: Set targ_underscore to yes for tic80.
751 Mon May 19 14:26:36 1997 Mark Alexander <marka@cygnus.com>
753 * coff-tic80.c (NAMES_HAVE_UNDERSCORE): Define (fixes problem
754 with unresolved external symbols in GDB).
757 Fri May 16 10:23:03 1997 Jeffrey A Law (law@cygnus.com)
759 * elf-m10300.c (elf32_mn10300_relax_section): Read in all
760 the symbols associated with each BFD.
761 (mn10300_elf_relax_delete_bytes): Don't adjust the same symbol
763 * elf-m10200.c: Likewise.
764 * elf32-m32r.c: Likewise.
765 * elf32-sh.c: Likewise.
767 Fri May 16 12:10:52 1997 Ian Lance Taylor <ian@cygnus.com>
769 * elflink.h (elf_link_add_object_symbols): Don't decrease the
770 alignment of a common symbol. If two symbols that look like
771 common symbols are found in two shared libraries, and the size is
772 different, use the larger size, and warn if --warn-common. If a
773 common symbol overrides a definition in a shared library, set the
774 size to the larger size, and warn if --warn-common.
776 Thu May 15 14:31:28 1997 Nick Clifton <nickc@cygnus.com>
778 * cpu-arm.c (compatible): Allow default machine to be polymorphed
779 into any other machine type.
781 * coffcode.h (coff_set_flags): Initialise flags variable to 0.
783 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data): When merging
784 data into an unitialised destination set its machine type as well.
786 Thu May 15 16:40:20 1997 Ian Lance Taylor <ian@cygnus.com>
788 * elflink.h (elf_link_add_object_symbols): Force ELF symbol size
789 to common symbol size. Consistently treat uninitialized symbols
790 in shared objects as common symbols.
792 Fri May 9 10:15:27 1997 Nick Clifton <nickc@cygnus.com>
794 * archures.c (constants): Added new constants to identify the
795 type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
796 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and bfd_mach_arm_4T.
798 * bfd-in2.h (constants): Added new constants to identify
799 the type of the ARM architecture: bfd_mach_arm_2, bfd_mach_arm_2a,
800 bfd_mach_arm_3, bfd_mach_arm_3M, bfd_mach_arm_4 and
801 bfd_mach_arm_4T. This file is auto-magically generated from the
802 archures.c file. This update is just to save work.
804 * coff-arm.c (coff_arm_bfd_merge_private_bfd_data,
805 coff_arm_bfd_print_private_bfd_data,
806 coff_arm_bfd_set_private_flags,
807 coff_arm_bfd_copy_private_bfd_data): Added these new functions.
808 (global): Macro redefinitions set up to use these new functions.
810 * coffcode.h (coff_mkobject_hook): Added call to
811 coff_arm_bfd_set_private_flags().
812 (coff_set_arch_mach_hook): Added code to set machine type based on
813 bits stored in internal flags.
814 (coff_set_flags): Added code to set the new bits in the flags
815 field based on the machine number.
816 (function definition macros): Made all function definition macros
817 conditional so that they can be overridden by target specific
820 * cpu-arm.c (compatible): Added this function. (arch_info_struct):
821 Structure extended to include new types, one each for ARMv2,
822 ARMv2a, ARMv3, ARMv3M, ARMv4 and ARMv4T.
824 * libcoff-in.h (struct coff_tdata): Added flags field.
826 Fri May 9 17:40:02 1997 Ian Lance Taylor <ian@cygnus.com>
828 * config.bfd (i[3456]86-*-gnu*): Don't include Mach support.
830 * config.bfd: Change #if 0 around uses of host_aout_vec to #if
833 Mon May 5 13:57:32 1997 Mike Meissner <meissner@cygnus.com>
835 * coffgen.c (coff_find_nearest_line): If there are no syments,
838 Mon May 5 18:18:45 1997 Philip Blundell <pjb27@cam.ac.uk>
840 * config.bfd: cope with '*-*-linux-gnuaout' targets.
842 Thu May 1 11:31:12 1997 Ian Lance Taylor <ian@cygnus.com>
844 * targmatch.sed: Add explicit \n characters to work around bug in
845 HP/UX 10.20 sed program.
847 Wed Apr 30 12:27:03 1997 Ian Lance Taylor <ian@cygnus.com>
849 * elf.c (copy_private_bfd_data): Cast csecs to avoid sign
852 Tue Apr 22 12:06:08 1997 Ian Lance Taylor <ian@cygnus.com>
854 * Makefile.in (do_maintainer_clean): Don't remove bfd-in2.h.
856 Mon Apr 21 11:21:31 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
858 * elf32-m68k.c: Follow the last changes in elf32-i386.c:
859 (struct elf_m68k_pcrel_relocs_copied, struct
860 elf_m68k_link_hash_entry, struct elf_m68k_link_hash_table,
861 elf_m68k_link_hash_traverse, elf_m68k_hash_table,
862 elf_m68k_link_hash_newfunc, elf_m68k_link_hash_table_create,
863 elf_m68k_discard_copies, bfd_elf32_bfd_link_hash_table_create):
865 (elf_m68k_check_relocs): If linking with -Bsymbolic, don't copy
866 PC relative relocs for a global symbol defined in a regular
867 object, and count the number of PC relative relocs copied for any
869 (elf_m68k_size_dynamic_sections): If linking with -Bsymbolic,
870 traverse with elf_m68k_discard_copies.
872 Sat Apr 19 22:50:14 1997 Ian Lance Taylor <ian@cygnus.com>
874 * elf32-i386.c (elf_i386_check_relocs): Only count PC relative
875 relocs. From Jamie Lokier <jamie@rebellion.co.uk>.
877 * coffcode.h (coff_compute_section_file_positions): Force the
878 potential last byte in the file to be written out when
881 Thu Apr 17 13:46:56 1997 Per Fogelstrom <pefo@openbsd.org>
883 * configure.host (mips*-*-openbsd*): New host.
885 Thu Apr 17 11:10:54 1997 Ian Lance Taylor <ian@cygnus.com>
887 * elflink.h (elf_link_add_object_symbols): Only subtract the
888 section VMA from the symbol value if this is a fully linked file.
890 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Define.
891 (struct elf_i386_link_hash_entry): Define.
892 (struct elf_i386_link_hash_table): Define.
893 (elf_i386_link_hash_traverse): Define.
894 (elf_i386_hash_table): Define.
895 (elf_i386_link_hash_newfunc): New static function.
896 (elf_i386_link_hash_table_create): New static function.
897 (elf_i386_check_relocs): If linking with -Bsymbolic, don't copy
898 PC relative relocs for a global symbol defined in a regular
899 object, and count the number of PC relative relocs copied for any
901 (elf_i386_size_dynamic_sections): If linking with -Bsymbolic,
902 traverse with elf_i386_discard_copies.
903 (elf_i386_discard_copies): New static function.
904 (bfd_elf32_bfd_link_hash_table_create): Define.
906 From Gordon W. Ross <gwr@mc.com>:
907 * aoutf1.h (MY_entry_is_text_address): Define if not defined.
908 (sunos4_aout_backend): Use MY_entry_is_text_address.
911 Wed Apr 16 12:43:32 1997 Martin Hunt <hunt@cygnus.com>
913 * elf32-d30v.c (elf_d30v_howto_table): Changed size of
914 R_D30V_32_NORMAL to 2 (4 bytes).
917 Wed Apr 16 14:02:29 1997 Ian Lance Taylor <ian@cygnus.com>
919 From Gordon W. Ross <gwr@mc.com>:
920 * netbsd.h (N_SHARED_LIB): Define.
921 (SEGMENT_SIZE): Don't define.
922 * m68knetbsd.c (SEGMENT_SIZE): Don't define (revert change of
924 * sparcnetbsd.c (TARGET_PAGE_SIZE): Define as 0x2000.
925 (SEGMENT_SIZE): Don't define.
927 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Set .rela.bss size
928 to sizeof Rela structure, not sizeof Rel structure. From Gary
929 Thomas <g.thomas@opengroup.org>.
931 Tue Apr 15 11:50:37 1997 Ian Lance Taylor <ian@cygnus.com>
933 * aout-target.h (MY(callback)): If entry_is_text_address, adjust
934 whenever entry is larger than text address, but only by whole
935 pages. From Gordon W. Ross <gwr@mc.com>.
937 * Makefile.in (install): Depend upon installdirs. Use
938 mkinstalldirs to build $(oldincludedir).
939 (installdirs): New target.
941 * elflink.h (elf_link_add_object_symbols): Don't call check_relocs
942 if this is a debugging section which we are stripping.
944 Mon Apr 14 12:39:30 1997 Richard Henderson <rth@tamu.edu>
946 * elf64-alpha.c (elf64_alpha_object_p): Allocate the
947 alpha-specific target data struct.
949 Mon Apr 14 11:45:46 1997 Ian Lance Taylor <ian@cygnus.com>
951 From Thomas Graichen <graichen@rzpd.de>:
952 * Makefile.in: Always use $(SHELL) when running move-if-change.
953 * configure.in: Use ${CONFIG_SHELL} when running $ac_config_sub.
954 * configure: Rebuild.
956 Fri Apr 11 15:43:24 1997 Ian Lance Taylor <ian@cygnus.com>
958 * elfcode.h (elf_slurp_symbol_table): Only subtract the section
959 VMA if this is an executable file or a shared object.
961 * targets.c (netbsd_core_vec): Declare. From Gordon W. Ross
964 * libaout.h (struct aout_backend_data): Add entry_is_text_address
966 * aout-target.h (SEGMENT_SIZE): Define to TARGET_PAGE_SIZE at the
967 start of the file. Remove uses later on which switch using
969 (MY(callback)): Handle entry_is_text_address.
970 (MY_entry_is_text_address): Define if not defined.
971 (MY(backend_data)): Initialize new field.
972 * aoutf1.h (sunos4_aout_backend): Likewise.
973 * i386aout.c (MY(backend_data)): Likewise.
974 * i386mach3.c (MY(backend_data)): Likewise.
975 * mipsbsd.c (MY(backend_data)): Likewise.
976 * sparclynx.c (sparclynx_aout_backend): Likewise.
977 * netbsd.h (SEGMENT_SIZE): Define if not defined.
978 (MY_entry_is_text_address): Define.
979 * m68knetbsd.c (SEGMENT_SIZE): Define as 0x20000.
981 * xcofflink.c (bfd_xcoff_import_symbol): Handle importing a symbol
982 whose name starts with `.'.
984 Fri Apr 11 11:57:15 1997 Niklas Hallqvist <niklas@appli.se>
986 * config.bfd: (i[3456]86-*-openbsd*, m68*-*-openbsd*,
987 mips*el*-*-openbsd*, mips*-*-openbsd*, ns32k-*-openbsd*,
988 powerpc-*-*bsd*, sparc-*-openbsd*): New targets.
989 * configure.in (i[3456]86-*-openbsd*, mips*-*-openbsd*,
990 m68*-*-openbsd*, ns32k-*-openbsd*, powerpc-*-*bsd*,
991 sparc-*-openbsd*): New targets.
992 * configure: Rebuild.
994 Tue Apr 8 18:09:29 1997 Jamie Lokier <jamie@rebellion.co.uk>
996 * stabs.c (struct stab_section_info): New field
998 (_bfd_link_section_stabs): Fill the above array.
999 (_bfd_stab_section_offset): Use `cumulative_skips' to
1000 speed up offset calculation.
1002 Tue Apr 8 00:01:31 1997 Jeffrey A Law (law@cygnus.com)
1004 * elf-mn10300.c (mn10300_elf_relax_section): Don't forget the
1005 addend for non pc-relative relocations.
1007 * elf-m10300.c (bfd_elf32_mn10300_reloc): Remove prototype
1008 for non-existent function.
1010 * elf-m10300.c (mn10300_elf_relax_section): New function.
1011 (mn10300_elf_relax_delete_bytes): Likewise.
1012 (mn10300_elf_symbol_address_p): Likewise.
1013 (mn10300_elf_get_relocated_section_contents): Likewise.
1014 (bfd_elf32_bfd_relax_section): Define.
1015 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1017 Mon Apr 7 16:47:09 1997 Ian Lance Taylor <ian@cygnus.com>
1019 * configure.host: Set SHLIB_LIBS.
1020 * configure.in: Substitute SHLIB_LIBS.
1021 * configure: Rebuild.
1022 * Makefile.in (SHLIB_LIBS): New variable.
1023 ($(SHLIB)): Use $(SHLIB_LIBS).
1025 Mon Apr 7 10:53:52 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
1027 * bfd-in.h bfd-in2.h: add bfd_section_lma macro to correspond
1028 with bfd_section_vma.
1030 Fri Apr 4 11:37:15 1997 Ian Lance Taylor <ian@cygnus.com>
1032 * configure.in: Update file names for bfd_elf32_mn10[23]00_vec.
1033 Correct CPU file names for mn10[23]00.
1034 * configure: Rebuild.
1036 * bfd.c (bfd_record_phdr): Cast count to size_t before
1039 * coff-ppc.c (dump_toc): Add cast to avoid warning from SunOS cc.
1040 * coff-rs6000.c (xcoff_read_ar_hdr): Likewise.
1041 (xcoff_write_archive_contents): LIkewise.
1042 * elf32-mips.c (_bfd_mips_elf_set_section_contents): Likewise.
1043 (mips_elf_create_procedure_table): Likewise.
1044 * peicode.h (pe_print_idata): Likewise.
1045 (pe_print_edata, pe_print_pdata, pe_print_reloc): Likewise.
1046 * xcofflink.c (xcoff_get_section_contents): Likewise.
1047 (_bfd_xcoff_canonicalize_dynamic_symtab): Likewise.
1048 (xcoff_link_add_symbols): Likewise.
1049 (xcoff_link_add_symbols): Likewise.
1051 * ppcboot.c (ppcboot_set_arch_mach): Make static.
1052 (ppcboot_bfd_print_private_bfd_data): Likewise.
1054 * elf32-mips.c (elf_mips_ctor64_howto): Set complain_on_overflow
1055 to complain_overflow_signed.
1057 Thu Apr 3 11:51:54 1997 Ian Lance Taylor <ian@cygnus.com>
1059 * VERSION: Set to 2.8.1.
1061 * Branched binutils 2.8.
1063 * elf32-ppc.c (ppc_elf_check_relocs): Don't check SEC_ALLOC when
1064 deciding whether to copy a reloc into a shared object.
1065 (ppc_elf_relocate_section): Likewise. Relocate R_PPC_RELATIVE
1066 relocs in unallocated sections.
1067 * elf32-sparc.c (elf32_sparc_relocate_section): Relocate
1068 R_SPARC_RELATIVE relocs in unallocated sections.
1070 Wed Apr 2 16:19:41 1997 Mike Meissner <meissner@cygnus.com>
1072 * elf32-ppc.c (ppc_elf_check_relocs): Undo March 26 change and
1073 always create got section so that the _GLOBAL_OFFSET_TABLE_ label
1076 Wed Apr 2 10:49:07 1997 Ian Lance Taylor <ian@cygnus.com>
1078 * elflink.h (elf_link_add_object_symbols): Let a common symbol
1079 override an uninitialized symbol from a shared library with a
1082 * elf-m10200.c: Rename from elf32-mn10200.c.
1083 * elf-m10300.c: Rename from elf32-mn10300.c.
1084 * cpu-m10200.c: Rename from cpu-mn10200.c
1085 * cpu-m10300.c: Rename from cpu-mn10300.c
1086 * Makefile.in: Update accordingly.
1088 * elf32-mips.c (elf_mips_ctor64_howto): New static variable.
1089 (elf_mips_isa): Move to earlier in file.
1090 (mips_reloc_map): Remove BFD_RELOC_CTOR entry.
1091 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR
1094 * elf32-mips.c (mips16_jump_reloc): Print a warning rather than
1097 Tue Apr 1 16:18:05 1997 Klaus Kaempf <kkaempf@progis.de>
1099 * configure.com: New file.
1100 * config.h-vms: Remove file.
1101 * makefile.vms: Update for new configure scheme.
1103 Mon Mar 31 23:28:39 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
1105 * libcoff-in.h (ppc_allocate_toc_section): Declare.
1106 (ppc_process_before_allocation): Declare.
1107 * libcoff.h: Rebuild.
1109 * coffcode.h (coff_mkobject_hook): Declare if not a macro.
1111 Mon Mar 31 16:29:50 1997 Joel Sherrill <joel@oarcorp.com>
1113 * config.bfd (hppa*-*-rtems*): New target, like hppa-*-*elf*.
1115 Mon Mar 31 16:11:35 1997 Ian Lance Taylor <ian@cygnus.com>
1117 * coff-a29k.c (coff_a29k_relocate_section): Don't use symndx as a
1118 symbol index for a R_IHCONST reloc.
1120 Mon Mar 31 15:40:59 1997 Philippe De Muyter <phdm@info.ucl.ac.be>
1122 * targmatch.sed: Do not use \(\) recursively.
1124 Fri Mar 28 14:44:08 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
1126 * m68klinux.c (MACHTYPE_OK): Define.
1127 * i386linux.c (MACHTYPE_OK): Define.
1129 Fri Mar 28 11:56:15 1997 Ian Lance Taylor <ian@cygnus.com>
1131 From David S. Miller <davem@caip.rutgers.edu> and H.J. Lu
1132 <hjl@gnu.ai.mit.edu>:
1133 * sparclinux.c: New file.
1134 * bfd-in.h (bfd_sparclinux_size_dynamic_sections): Declare.
1135 * bfd-in2.h: Rebuild.
1136 * config.bfd (sparc-*-linuxaout*, sparc-*-linux*): New targets.
1137 * configure.in (sparclinux_vec): Add to list of vectors.
1138 * configure: Rebuild.
1139 * targets.c (sparclinux_vec): Declare.
1140 (bfd_target_vector): Add sparclinux_vec.
1141 * Makefile.in: Rebuild dependencies.
1142 (BFD32_BACKENDS): Add sparclinux.o.
1143 (BFD32_BACKENDS_CFILES): Add sparclinux.c.
1145 * coff-mips.c (mips_ecoff_backend_data): Initialize new
1146 bfd_coff_backend_data field.
1147 * coff-alpha.c (alpha_ecoff_backend_data): Likewise.
1149 * config.bfd: Add bfd_elf64_{big,little}mips_vec to targ_selvecs
1150 for mips*el*-*-linux* and mips*-*-linux*. From H.J. Lu
1151 <hjl@lucon.org> and Ralf Baechle <ralf@gnu.ai.mit.edu>.
1153 * bfd.c: Include "libiberty.h".
1154 (strerror): Don't declare.
1155 (bfd_errmsg): Call xstrerror rather than strerror.
1157 Thu Mar 27 12:55:42 1997 Ian Lance Taylor <ian@cygnus.com>
1159 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Generate a COPY
1160 reloc even if the symbol is in the .bss section.
1161 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1162 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1163 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
1165 * coffcode.h (bfd_coff_backend_data): Add new field
1166 _bfd_coff_default_section_alignment_power.
1167 (bfd_coff_default_section_alignment_power): Define.
1168 (bfd_coff_std_swap_table): Initialize new field.
1169 * libcoff.h: Rebuild.
1170 * cofflink.c (coff_link_add_symbols): Limit alignment of a common
1171 symbol to the default section alignment.
1173 * COPYING: Update FSF address.
1176 Thu Mar 27 00:45:57 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
1178 * elf32-d30v.c (elf_d30v_howto_table): Fix a typo in the
1179 21-bit absolute that made it act as a relative.
1182 Wed Mar 26 14:50:20 1997 Ian Lance Taylor <ian@cygnus.com>
1184 * elflink.c (_bfd_elf_create_linker_section): Don't set
1185 bss_section and rel_section from existing sections.
1187 * elf32-ppc.c (ppc_elf_check_relocs): Only create the got section
1190 Tue Mar 25 22:26:56 1997 Stu Grossman (grossman@critters.cygnus.com)
1192 * aoutx.h (some_aout_object_p): Change executable test to fix
1193 problems with embedded a.out systems.
1195 Tue Mar 25 14:35:37 1997 Ian Lance Taylor <ian@cygnus.com>
1197 * stabs.c (_bfd_stab_section_offset): New function.
1198 * libbfd-in.h (_bfd_stab_section_offset): Declare.
1199 * libbfd.h: Rebuild.
1200 * elf32-i386.c (elf_i386_relocate_section): Adjust the offset of a
1202 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1203 * elf32-mips.c (mips_elf_relocate_section): Likewise.
1204 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1205 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1206 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1208 * stabs.c (_bfd_link_section_stabs): Copy over the first header
1209 symbol. Check for memory allocation failure of *psinfo.
1210 (_bfd_write_section_stabs): Add psinfo parameter. Change all
1211 callers. Set the value of the header symbol.
1212 * libbfd-in.h (_bfd_write_section_stabs): Update declaration.
1213 * libbfd.h: Rebuild.
1215 start-sanitize-tic80
1216 Mon Mar 24 20:07:29 1997 Fred Fish <fnf@cygnus.com>
1218 * coff-tic80.c (tic80_howto_table): Add R_ABS entry.
1219 (rtype2howto): Handle R_ABS reloc type. Also abort on unhandled
1220 reloc types, rather than silently failing to generate an output file.
1223 Mon Mar 24 13:41:00 1997 Ian Lance Taylor <ian@cygnus.com>
1225 * targmatch.sed: Use the hold space to put the #ifdef around the
1226 the string constant.
1227 * targets.c (UNSUPPORTED_TARGET): Don't define.
1228 (find_target): Don't check for UNSUPPORTED_TARGET.
1229 (bfd_set_default_target): Don't try to optimize by checking for
1232 * Makefile.in: Rebuild dependencies.
1233 (ALL_MACHINES_CFILES): Add cpu-m32r.c.
1234 (BFD32_BACKENDS_CFILES): Add elf32-m32r.c.
1235 (elf32-m32r.o): Remove explicit target.
1237 * config.bfd: Don't set targ_underscore for i[3456]86-*-gnu* or
1240 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Don't
1241 count section symbols for sections that were created by the
1242 linker, or are not allocatable or not loadable.
1243 (elf32_sparc_finish_dynamic_sections): Output output section
1244 symbols for section for which we made space for them.
1246 Fri Mar 21 13:08:26 1997 Ian Lance Taylor <ian@cygnus.com>
1248 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): If there is
1249 no .rela.plt section, don't output a DT_PLTGOT dynamic entry.
1251 Fri Mar 21 12:36:46 1997 Doug Evans <dje@canuck.cygnus.com>
1253 * elf32-m32r.c (m32r_elf_howto_table): Use special function for LO16.
1254 (m32r_hi16_list): New static local.
1255 (m32r_elf_hi16_reloc): Don't perform reloc, just queue it up.
1256 (m32r_elf_do_hi16_reloc): Delete.
1257 (m32r_elf_relocate_hi16): New function.
1258 (m32r_elf_lo16_reloc): New function.
1259 (m32r_elf_relocate_section): For HI16 relocs, scan for corresponding
1262 Mon Mar 10 16:03:31 1997 Doug Evans <dje@seba.cygnus.com>
1264 * elf32-m32r.c (m32r_elf_create_linker_section): Delete.
1265 (m32r_elf_add_symbol_hook): Rewrite _SDA_BASE_ support.
1266 (m32r_elf_final_sda_base): New function.
1267 (m32r_elf_relocate_section): Rewrite sdata support.
1268 (m32r_elf_finish_dynamic_sections): Delete.
1270 Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
1272 Based on patches from Philippe De Muyter <phdm@info.ucl.ac.be>.
1273 * coff-svm68k.c: New file. Just defines some macros and includes
1275 * coff-m68k.c: Add functions to handle common addends, moved in
1276 from cf-m68klynx.c. Control them using COFF_COMMON_ADDEND macro.
1277 Control whether relocs are visible using STATIC_RELOCS.
1278 * cf-m68klynx.c: Simplify greatly: just define macros to control
1280 * coff-aux.c: Likewise. Just leave add_one_symbol routine.
1281 * targets. (m68ksysvcoff_vec): Declare.
1282 (bfd_target_vector): Add m68ksysvcoff_vec.
1283 * config.bfd (m68*-motorola-sysv*): New target.
1284 * configure.in (m68ksysvcoff_vec): New vector.
1285 * configure: Rebuild.
1286 * Makefile.in: Rebuild dependencies.
1287 (BFD32_BACKENDS): Add coff-svm68k.o.
1288 (BFD32_BACKENDS_CFILES): Add coff-svm68k.c.
1290 * binary.c (binary_set_section_contents): Don't get misled if the
1291 first section is not loadable. From Matthew L. Martin
1294 * elflink.h (elf_bfd_final_link): Set the value of a section
1295 symbol to the section address unless doing a relocateable link.
1297 Tue Mar 18 23:03:17 1997 Richard Henderson <rth@tamu.edu>
1299 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't create
1300 .plt entry if we've taken the function's address.
1301 (elf64_alpha_merge_gots): Merge collected flags info as well.
1303 Tue Mar 18 22:40:09 1997 H.J. Lu <hjl@lucon.org>
1305 * Many files: Add function prototypes.
1306 * cpu-m68k.c (bfd_default_scan_num_mach): Don't declare.
1307 * ecofflink.c: Include "libcoff.h" and "libecoff.h".
1308 * elf32-ppc.c (ppc_elf_fake_sections): Make static.
1309 * opncls.c (bfd_openstreamr): Change stream parameter to PTR.
1310 * peicode.h: Change several void * parameters to PTR.
1311 * srec.c (srec_get_symbol_info): Make static.
1312 * syms.c (bfd_symbol_is_absolute): Remove.
1313 * Makefile.in: Rebuild dependencies.
1315 Tue Mar 18 12:58:08 1997 Ian Lance Taylor <ian@cygnus.com>
1317 * elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
1318 (bfd_elf32_bfd_is_local_label): Don't define.
1320 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
1323 Mon Mar 17 11:32:53 1997 Ian Lance Taylor <ian@cygnus.com>
1325 * bfd-in.h: Don't include obstack.h.
1326 (struct bfd_hash_table): Change memory field to PTR.
1327 * bfd.c (struct _bfd): Change memory field to PTR.
1328 * bfd-in2.h: Rebuild.
1329 * libbfd-in.h (bfd_release): Declare as function, don't define as
1331 * libbfd.h: Rebuild.
1332 * opncls.c: Include "objalloc.h" rather than "obstack.h". Use
1333 objalloc routines rather than obstack routines.
1334 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
1335 (getpagesize): Don't define.
1336 (_bfd_new_bfd): Don't set _bfd_chunksize.
1337 (bfd_openr): Free new bfd and objalloc on failure.
1338 (bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
1339 (bfd_alloc_size): Remove.
1340 (bfd_release): New function.
1341 * hash.c: Include "objalloc.h" rather than "obstack.h". Use
1342 objalloc routines rather than obstack routines.
1343 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
1344 * ecofflink.c: Include "objalloc.h" rather than "obstack.h". Use
1345 objalloc routines rather than obstack routines.
1346 (obstack_chunk_alloc, obstack_chunk_free): Don't define.
1347 (struct accumulate): Change memory to struct objalloc *.
1348 * liboasys.h (oasys_data_type): Remove oasys_obstack field.
1349 * dep-in.sed: Don't remove obstack.h from dependency list.
1350 * Makefile.in: Rebuild dependencies.
1351 (BFD_H_DEPS): Remove obstack.h.
1352 (install): Don't install obstack.h.
1353 * Many files: Don't include "obstack.h".
1356 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
1357 * libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
1358 * libbfd.h: Rebuild.
1359 * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
1360 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1361 * srec.c (srec_scan): Rewrite to not use obstack_1grow.
1363 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
1364 old version of bfd_alloc.
1365 * libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
1366 * libbfd.h: Rebuild.
1367 * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
1369 Sat Mar 15 15:24:18 1997 Ian Lance Taylor <ian@cygnus.com>
1371 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
1372 ELF local label syntax as well.
1374 Sat Mar 15 10:16:42 1997 Fred Fish <fnf@cygnus.com>
1376 * config.bfd (powerpc-*-beos*): New target.
1377 * configure.in (powerpc-*-beos*): Add case that explicitly
1378 does not set COREFILE for now. A future BeOS version is
1379 expected to support core files.
1380 * configure: Regenerate with autoconf.
1382 Fri Mar 14 16:43:22 1997 Ian Lance Taylor <ian@cygnus.com>
1384 * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
1385 seen with a local symbol, rather than crashing.
1387 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
1388 version symbols if there aren't any.
1390 start-sanitize-tic80
1391 Thu Mar 13 16:38:30 1997 Fred Fish <fnf@cygnus.com>
1393 * coff-tic80.c (coff_rtype_to_howto): Define
1394 (coff_tic80_rtype_to_howto): Clone generic coff version and
1395 add code to handle the funky TI "internal relocations".
1398 Thu Mar 13 14:08:53 1997 Ian Lance Taylor <ian@cygnus.com>
1400 * elflink.h (elf_link_add_object_symbols): Don't warn about type
1401 or size changes because of a weak symbol.
1403 * cisco-core.c (SIGEMT): Define if not defined.
1405 Wed Mar 12 21:36:05 1997 Ian Lance Taylor <ian@cygnus.com>
1407 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
1408 setting ever. Sanity check the version number. Sort out copying
1409 flags and other information when adding an indirect symbol.
1410 (NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
1411 symbols added by the backend. Clear the entire contents of the
1413 (elf_export_symbol): Ignore indirect symbols.
1414 (elf_link_output_extsym): Accept a section without an owner in an
1416 * elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
1417 version count. Correct the allocation of x_versymp.
1419 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
1420 the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
1421 Don't return bfd_und_section_ptr when info->shared.
1422 (mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
1423 (mips_elf_create_dynamic_sections): Correct type: ^= for &=.
1424 (mips_elf_check_relocs): Resolve an indirect symbol in
1426 (mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
1427 SHN_MIPS_TEXT or SHN_MIPS_DATA.
1429 * elf.c (bfd_elf_print_symbol): Tweak version output slightly.
1431 Tue Mar 11 01:38:36 1997 Ian Lance Taylor <ian@cygnus.com>
1433 From Eric Youngdale <eric@andante.jic.com>:
1434 * elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
1435 * elf.c (bfd_elf_print_symbol): Correct errors in last change.
1436 * elflink.h (elf_link_add_object_symbols): Handle cases in which a
1437 versioned symbol appears in both a regular and a shared object.
1438 (elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
1439 appropriate. Improve error message.
1440 (struct elf_outext_info): Rename from elf_finfo_failed. Change
1441 all uses. Add localsyms field.
1442 (elf_bfd_final_link): When generating a shared library, call
1443 elf_link_output_extsym to output all local symbols.
1444 (elf_link_output_extsym): Handle symbols which were forced to
1447 Sun Mar 9 23:08:49 1997 Ian Lance Taylor <ian@cygnus.com>
1449 From Eric Youngdale <eric@andante.jic.com>:
1450 * elf-bfd.h (elf_symbol_type): Add version field.
1451 * elfcode.h (elf_slurp_symbol_table): Set version field.
1452 * elflink.h (elf_link_add_object_symbols): When creating an
1453 indirect symbol for a default version symbol, set DEF_DYNAMIC if
1454 appropriate. Set up an indirection from the nondefault version of
1456 (NAME(bfd_elf,size_dynamic_sections)): Call
1457 elf_link_assign_sym_version before checking whether there are any
1458 versions. Always record the version name as a dynamic symbol.
1459 Initialize counters.
1460 (elf_link_assign_sym_version): After finding a version, see if a
1461 symbol should be forced to local scope. Create a new version
1462 definition if appropriate.
1463 (elf_link_output_extsym): Correct indirect symbol handling.
1464 * elf.c (bfd_elf_print_symbol): Print version information.
1465 (bfd_section_from_shdr): Turn version sections into BFD sections.
1466 (elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
1467 if sh_info is not already set.
1468 (_bfd_elf_copy_private_section_data): Copy sh_info for version
1470 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
1471 _bfd_stringtab_add to copy the name into permanent memory if
1474 Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
1476 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
1478 Fri Mar 7 10:37:30 1997 Ian Lance Taylor <ian@cygnus.com>
1480 * coffcode.h (bfd_coff_backend_data): Change
1481 _bfd_coff_compute_section_file_positions to return a boolean
1482 value. Change all callers.
1483 (coff_compute_section_file_positions): Change return type to
1484 boolean. If the size of the last section changed, then output a
1485 zero byte at the end of the file.
1486 * libcoff.h: Rebuild.
1488 * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
1489 for at least 6 output symbols.
1490 (xcoff_write_global_symbol): When emitting TOC entry relocs, also
1491 emit a TC csect to represent the space they take up. For an XO
1492 symbol, just emit a reference, not a csect.
1494 * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
1495 Solaris doesn't like the combined options, and the -f is
1497 (stamp-tshlink, install): Likewise.
1499 * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
1500 handling when little endian.
1502 Thu Mar 6 13:51:51 1997 Jeffrey A Law (law@cygnus.com)
1504 * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
1505 (mn10300_elf_relocate_section): Likewise.
1506 (elf_backend_relocate_section): Define.
1508 * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
1509 relocs. Replace them with generic PCREL_{8,16,32} relocs.
1510 (elf32_mn10300_howto_table): Likewise.
1511 (elf32_mn10300_reloc_map): Likewise.
1512 (bfd_elf32_mn10300_reloc): Delete unused function.
1514 Thu Mar 6 12:19:59 1997 Fred Fish <fnf@cygnus.com>
1516 start-sanitize-tic80
1517 * coff-tic80.c (rtype2howto): If passed a relocation type we don't
1518 understand, just set the howto field to NULL, and the caller will
1519 print an appropriate error message.
1521 * coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
1522 code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
1523 block. Use NULL for initializations of "ptr" rather than bare 0.
1524 * coff-h8300.c: Fix typo in comment.
1525 * coff-h8500.c: Ditto.
1527 * coff-z8k.c: Ditto.
1529 Wed Mar 5 13:59:09 1997 Doug Evans <dje@seba.cygnus.com>
1531 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
1532 (m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
1533 m32r_elf_get_relocated_section_contents): First pass at relax support.
1535 Mon Mar 3 13:27:09 1997 Ulrich Drepper <drepper@rtl.cygnus.com>
1537 * elflink.h (elf_link_add_object_symbols): Use correct sh_size
1538 entry for reading verdef records.
1539 Use correct braces for computing increments of extverdaux and
1540 exteverdef record pointers.
1542 start-sanitize-tic80
1543 Sun Mar 2 22:47:54 1997 Fred Fish <fnf@cygnus.com>
1545 * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
1549 Sun Mar 2 16:25:35 1997 Ian Lance Taylor <ian@cygnus.com>
1551 * elflink.h (elf_link_find_version_dependencies): Check that
1552 DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
1555 start-sanitize-tic80
1556 Fri Feb 28 16:52:40 1997 Fred Fish <fnf@cygnus.com>
1558 * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC.
1561 Fri Feb 28 15:06:45 1997 Ian Lance Taylor <ian@cygnus.com>
1563 * targets.c (bfd_default_vector): Make non-const.
1564 (find_target): New static function, broken out of
1566 (bfd_set_default_target): New function.
1567 (bfd_find_target): Call find_target. When defaulting, use
1568 bfd_default_vector[0] if it is not NULL.
1569 * libbfd-in.h (bfd_default_vector): Adjust declaration.
1570 * bfd-in2.h, libbfd.h: Rebuild.
1572 * syms.c (bfd_is_local_label): Return false if the symbol has no
1574 * coff-i960.c (coff_i960_is_local_label_name): New function.
1575 (coff_bfd_is_local_label_name): Define.
1576 * coff-m68k.c (m68k_coff_is_local_label_name): New function.
1577 (coff_bfd_is_local_label_name): Define.
1578 * coff-rs6000.c (xcoff_is_local_label_name): New function.
1579 (coff_bfd_is_local_label_name): Define.
1580 * elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
1581 with .. or _.L_ as local.
1582 * elf32-i386.c (elf_i386_is_local_label_name): New function.
1583 (bfd_elf32_bfd_is_local_label_name): Define.
1584 * evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
1585 beginning with $ as local.
1587 Thu Feb 27 18:36:23 1997 Ian Lance Taylor <ian@cygnus.com>
1589 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
1590 rather than comparing against info->lprefix.
1591 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1592 * elflink.h (elf_link_input_bfd): Likewise.
1593 * linker.c (_bfd_generic_link_output_symbols): Likewise.
1594 * xcofflink.c (xcoff_link_input_bfd): Likewise.
1596 * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
1597 _bfd_elf_is_local_label_name if not already defined.
1598 * elf.c (_bfd_elf_is_local_label_name): New function.
1599 * elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
1601 * coff-m88k.c (coff_bfd_is_local_label_name): Define.
1602 (m88k_is_local_label_name): New static function.
1604 * coffcode.h (coff_bfd_is_local_label_name): Define as
1605 _bfd_coff_is_local_label_name if not already defined.
1606 * coffgen.c (_bfd_coff_is_local_label_name): New function.
1607 * libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
1608 * libcoff.h: Rebuild.
1610 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
1611 to _bfd_is_local_label_name.
1612 (bfd_target): Likewise.
1613 * syms.c (bfd_is_local_label): Define as function, not macro.
1614 (bfd_is_local_name): Define.
1615 * libbfd.c (bfd_generic_is_local_label_name): Rename from
1616 bfd_generic_is_local_label, and take a string rather than a
1618 * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
1619 (_bfd_nosymbols_bfd_is_local_label_name): Define.
1620 (bfd_generic_is_local_label): Don't declare.
1621 (bfd_generic_is_local_label_name): Declare.
1622 * bfd-in2.h, libbfd.h: Rebuild.
1623 * All backends: Change local_label to local_label_name.
1625 * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
1626 (mips_elf_relocate_got_local): Change return type to boolean.
1627 Don't assume that the first zero entry is unassigned; instead, use
1629 (mips_elf_relocate_section): Check return value of
1630 mips_elf_relocate_got_local.
1631 (mips_elf_create_got_section): Initialize assigned_gotno field.
1634 Wed Feb 26 15:19:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
1636 * elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
1640 Wed Feb 26 13:33:03 1997 Ian Lance Taylor <ian@cygnus.com>
1642 * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
1643 that have no contents merely because linker_mark is not set.
1645 Tue Feb 25 18:51:35 1997 Stan Shebs <shebs@andros.cygnus.com>
1647 * config.bfd (mips*-*-lnews*): New target.
1648 * coff-mips.c (mips_relocate_section): Make assert compare
1649 content byteorder instead of header byteorder.
1650 (ecoff_biglittle_vec): New BFD, big-endian headers, little-endian
1652 * targets.c (bfd_target_vector): Add ecoff_biglittle_vec.
1653 * configure.in (ecoff_biglittle_vec): Add case.
1654 * configure: Update.
1656 Tue Feb 25 00:32:49 1997 Ian Lance Taylor <ian@cygnus.com>
1658 * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
1659 name begins with ".note".
1660 (map_sections_to_segments): Add a PT_NOTE segment for any loadable
1661 section whose name begins with ".note".
1662 (get_program_header_size): Corresponding change.
1664 * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
1665 jal and for jal overflow.
1667 Mon Feb 24 17:53:14 1997 Ian Lance Taylor <ian@cygnus.com>
1669 From Eric Youngdale <eric@andante.jic.com>:
1670 * elflink.h (elf_link_add_archive_symbols): If a default symbol is
1671 not found, try looking it up again without the version name.
1672 (elf_link_add_object_symbols): Always link against the dynamic
1673 symbol table of a dynamic object. When linking against a dynamic
1674 object, include version strings in symbol names, and set up
1675 version information. Add indirect symbols for default versions.
1676 (elf_link_create_dynamic_sections): Add special version sections.
1677 (struct elf_assign_sym_version_info): Define.
1678 (struct elf_find_verdep_info): Define.
1679 (NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter. Set
1680 up version sections.
1681 (elf_adjust_dynamic_symbol): Ignore indirect symbols.
1682 (elf_link_find_version_dependencies): New static function.
1683 (elf_link_assign_sym_version): New static function.
1684 (elf_link_renumber_dynsyms): New static function.
1685 (struct elf_final_link_info): Add symver_sec field.
1686 (elf_bfd_final_link): Initialize finfo.symver_sec. Don't count
1687 local symbols of a dynamic object. Handle DT_VER* constants.
1688 (elf_link_output_extsym): Simplify BFD_ASSERT checking for a
1689 dynamic object. Skip indirect symbols from ELF objects. Remove
1690 the version name before choosing a hash bucket. Write out the
1691 version information if appropriate.
1692 (elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
1693 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1694 (bfd_elf64_size_dynamic_sections): Likewise.
1695 * bfd-in2.h: Rebuild.
1696 * elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
1697 Change elf_link_hash_flags to unsigned short.
1698 (ELF_LINK_HIDDEN): Define.
1699 (struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
1700 dynverdef_hdr, dynversym_section, dynverdef_section,
1701 dynverref_section, cverdefs, cverrefs, verdef, verref.
1702 (elf_dynversym, elf_dynverdef, elf_dynverref): Define.
1703 (_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
1704 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
1705 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
1706 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
1707 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
1708 (_bfd_elf_slurp_version_tables): Declare.
1709 * elf.c (_bfd_elf_swap_verdef_in): New function.
1710 (_bfd_elf_swap_verdef_out): Likewise.
1711 (_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
1712 (_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
1713 (_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
1714 (_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
1715 (_bfd_elf_print_private_bfd_data): Add DT_VER* constants. Print
1716 version information if there is any.
1717 (_bfd_elf_link_hash_newfunc): Initialize verinfo field.
1718 (bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
1719 (elf_fake_sections): Handle .gnu.version* section names.
1720 (assign_section_numbers): Handle SHT_GNU_ver* section types.
1721 (_bfd_elf_slurp_version_tables): New function.
1722 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
1723 version name in string entered in dynamic hash table.
1724 * elfcode.h: Include fnmatch.h.
1725 * elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
1726 symbol which was forced to become local.
1727 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1728 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1729 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1730 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1732 Fri Feb 21 16:15:18 1997 Jeffrey A Law (law@cygnus.com)
1734 * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
1736 (mn10200_elf_relax_section): Correctly compute a symbol's value
1737 when the symbol is local, but not in the same section as we are
1738 relaxing. Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
1741 Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
1743 * elf32-m32r.c: Rewrite to use ELF backend linker.
1744 Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
1745 Add small data area support (R_M32R_SDA16).
1746 * reloc.c: Document BFD_RELOC_M32R_SDA16.
1747 * bfd-in2.h,libbfd.h: Regenerated.
1749 Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
1751 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
1752 (mn10200_elf_relax_delete_bytes): Likewise.
1753 (mn10200_elf_symbol_address_p): Likewise.
1754 (mn10200_elf_get_relocated_section_contents): Likewise.
1755 (bfd_elf32_bfd_relax_section): Define.
1756 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1758 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
1759 (mn10200_elf_relocate_section): Likewise.
1760 (elf_backend_relocate_section): Define.
1763 Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
1765 * Makefile.in, archures.c, config.bfd, configure.in, elf.c,
1766 reloc.c, targets.c: New target, elf-*-D30V.
1768 * bfd-in2.h, configure, libbfd.h: Rebuilt.
1770 * cpu-d30v.c, elf32-d30v.c: New files.
1773 Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
1775 * reloc.c (struct reloc_howto_struct): Fix typo in comment.
1776 * bfd-in2.h: Regenerated.
1777 start-sanitize-tic80
1778 * coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
1779 (rtype2howto): Add function.
1780 (tic80_howto_table): Add.
1783 Tue Feb 18 11:41:00 1996 Dawn Perchik <dawn@cygnus.com>
1785 * sysdep.h: Don't define errno in MSVC if error.h is included.
1788 Tue Feb 18 10:04:13 1997 Jeffrey A Law (law@cygnus.com)
1790 * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
1791 is initialized before it is used.
1794 Mon Feb 17 11:28:40 1997 Ian Lance Taylor <ian@cygnus.com>
1796 * hp300hpux.c (convert_sym_type): Don't convert a secondary common
1797 symbol into a weak undefined symbol; leave it as a common symbol.
1799 Fri Feb 14 19:08:03 1997 Ian Lance Taylor <ian@cygnus.com>
1801 * elflink.h (elf_link_add_object_symbols): Don't issue a warning
1802 about a symbol defined in a dynamic object if it has already been
1803 defined in a regular object.
1805 Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
1807 * makefile.vms: Add gcc flags to allow compiling with current gcc
1809 (targmatch.h): New dependency.
1811 * reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
1813 * evax.h (ALPHA_R_CODEADDR): New relocation.
1814 * evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
1816 * evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
1818 * bfd-in2.h, libbfd.h: Rebuild.
1820 Restrict symbol length to 64 bytes, case preserving:
1821 * evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
1822 * evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
1823 (_bfd_evax_length_hash_symbol): Added.
1824 * evax-etir.c (_bfd_evax_write_etir): Call
1825 _bfd_evax_length_hash_symbol before output of symbol.
1826 * evax-egsd.c (_bfd_evax_write_egsd): Likewise.
1827 * evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
1829 * evax-emh.c: Output filename to object file without path.
1831 * evax-egsd.c: New sections for local and global commons.
1833 * evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
1834 evax-misc.c, evax.h: Remove 8 bit characters from copyright
1835 notices. Replace AXP with Alpha.
1837 Wed Feb 12 18:10:30 1997 Ian Lance Taylor <ian@cygnus.com>
1839 * sunos.c (sunos_create_dynamic_sections): We need the dynamic
1840 sections if we are creating a shared library.
1842 Tue Feb 11 15:45:43 1997 Doug Evans <dje@canuck.cygnus.com>
1844 * configure.host (i386-windows): Don't set host64=true.
1846 Tue Feb 11 15:27:32 1997 Ian Lance Taylor <ian@cygnus.com>
1848 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
1849 (elf_mips16_gprel_howto): New static variable.
1850 (mips16_gprel_reloc): New static function.
1851 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
1852 (mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
1853 (mips_elf_relocate_section): Handle R_MIPS16_GPREL.
1854 * reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
1855 * bfd-in2.h, libbfd.h: Rebuild.
1857 Mon Feb 10 23:25:00 1997 Doug Evans <dje@seba.cygnus.com>
1859 * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
1860 for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
1862 start-sanitize-r5900
1863 Fri Feb 7 16:20:17 1997 Gavin Koch <gavin@cygnus.com>
1865 * config.bfd: add r5900
1868 Fri Feb 7 12:39:11 1997 Ian Lance Taylor <ian@cygnus.com>
1870 * elflink.h (elf_link_input_bfd): If we've discarded a section,
1871 the output section will be the absolute section; don't print an
1872 assertion message for that case when doing a relocateable link.
1874 Thu Feb 6 16:55:43 1997 Ian Lance Taylor <ian@cygnus.com>
1876 * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
1877 (struct mips_elf_link_hash_entry): Add new fields fn_stub,
1878 need_fn_sub, call_stub, and call_fp_stub.
1879 (struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
1880 (mips_elf_link_hash_newfunc): Initialize new fields.
1881 (mips_elf_link_hash_table_create): Likewise.
1882 (mips_elf_relocate_section): Redirect relocations to use mips16
1883 stubs when appropriate.
1884 (mips_elf_check_relocs): Attach stub sections to the appropriate
1885 symbol. Set need_fn_stub when appropriate.
1886 (mips_elf_always_size_sections): New static function.
1887 (mips_elf_check_mips16_stubs): New static function.
1888 (elf_backend_always_size_sections): Define.
1889 * elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
1891 * elflink.h (elf_link_input_bfd): Discard local symbols that are
1892 attached to sections which are not being included in the link.
1894 Wed Feb 5 13:20:17 1997 Ian Lance Taylor <ian@cygnus.com>
1896 * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
1897 symbol value when computing the addend for a pc_relative
1900 Mon Feb 3 11:54:06 1997 Ian Lance Taylor <ian@cygnus.com>
1902 * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
1903 relocateable link, just skip pc_relative pcrel_offset relocs.
1904 * coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
1905 structure for an ARM26 reloc which can be resolved.
1906 (coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
1907 reloc can be resolved.
1909 * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
1910 error in overflow check for R_RELBYTE.
1912 Fri Jan 31 14:07:27 1997 Ian Lance Taylor <ian@cygnus.com>
1914 * ieee.c (ieee_slurp_section_data): Pick up the start address.
1915 From Mark Rasin <mark.rasin@telrad.co.il>.
1917 * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
1920 Wed Jan 29 00:00:49 1997 Jeffrey A Law (law@cygnus.com)
1922 * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
1923 (elf_mn10200_howto_table): Likewise.
1924 (mn10200_reloc_map): Likewise.
1926 Mon Jan 27 12:07:35 1997 Doug Evans <dje@seba.cygnus.com>
1928 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
1929 * bfd-in2.h, libbfd.h: Regenerated.
1930 * elf32-m32r.c: Add support for them.
1932 Mon Jan 27 12:25:02 1997 Ian Lance Taylor <ian@cygnus.com>
1934 * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
1935 * elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
1937 * elf32-v850.c (v850_elf_final_link_relocate): Remove used
1938 r_format and r_pcrel. Always return a value.
1940 * riscix.c (MY_final_link_callback): Define to dummy value.
1942 * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
1943 relocations against the text segment, look up the output name of
1945 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1946 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
1947 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1948 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1949 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1951 start-sanitize-tic80
1952 Wed Jan 22 15:40:28 1997 Fred Fish <fnf@cygnus.com>
1954 * coff-tic80.c (tic80coff_vec): Use correct data put/get
1955 routines for little endian data.
1956 * coffcode.h (coff_write_object_contents): Set magic to
1957 TIC80_ARCH_MAGIC for TIc80.
1959 Tue Jan 21 12:32:43 1997 Fred Fish <fnf@cygnus.com>
1961 * coff-tic80.c (tic80coff_vec): Change to little endian data
1965 Thu Jan 16 17:45:57 1997 Ian Lance Taylor <ian@cygnus.com>
1967 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
1968 auxiliary_filters parameter to be const char * const *. Accept a
1969 NULL terminated array.
1970 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
1971 (bfd_elf32_size_dynamic_sections): Update declaration.
1972 * bfd-in2.h: Rebuild.
1974 Wed Jan 15 11:21:32 1997 Ian Lance Taylor <ian@cygnus.com>
1976 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Treat a
1977 NOTYPE symbol in a text section as a FUNC symbol.
1979 * coffcode.h (coff_compute_section_file_positions): Force
1980 relocbase to be aligned to COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
1982 Tue Jan 14 08:46:33 1997 Doug Evans <dje@canuck.cygnus.com>
1984 * libaout.h (machine_type): Reserve several values for sparclet.
1986 start-sanitize-tic80
1987 Mon Jan 13 22:39:08 1997 Michael Meissner <meissner@tiktok.cygnus.com>
1989 * config.bfd (tic80-*-*): Don't require 'coff'.
1993 Mon Jan 13 19:36:25 1997 Michael Meissner <meissner@tiktok.cygnus.com>
1995 * elf32-v850.c (v850_elf_howto_table): Set the special_function
1996 table to v850_elf_reloc for all non-standard relocations.
1997 (v850_elf_check_relocs): Add check for h being non-null.
1998 (v850_elf_reloc): Add R_V850_ZDA_OFFSET support. Use switch
1999 statement instead of multiple ifs.
2000 (v850_elf_relocate_section): Fix up error message, don't just call
2004 Mon Jan 6 13:28:35 1997 Jeffrey A Law (law@cygnus.com)
2006 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
2007 Use bfd_elf_generic_reloc as special function for all relocs.
2008 (bfd_elf32_mn10200_reloc): Remove unnecessary function.
2010 * elf32-mn10200.c (elf_mn10200_howto): Set pcrel_offset for
2011 24bit pc-relative reloc.
2013 start-sanitize-tic80
2014 Fri Jan 3 16:33:00 1997 Fred Fish <fnf@cygnus.com>
2016 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
2017 * coff-tic80.c (tic80coff_vec): Data byte order is big endian and
2018 header byte order is little endian. Use correct bfd_get and
2019 bfd_put routines for little endian headers.
2020 * coffcode.h (coff_set_arch_mach_hook): Set arch to
2021 bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
2024 Fri Jan 3 16:54:08 1997 Jeffrey A Law (law@cygnus.com)
2026 * reloc.c: Add BFD_RELOC_24.
2027 * elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
2028 (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
2029 * bfd-in2.h, libbfd.h: Rebuilt.
2031 Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
2033 elf64-alpha multiple .got rewrite:
2035 * elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
2036 (bfd_elf*_mkobject): Don't define here ...
2037 * elfxx-target.h: ... but rather here. Default always_size_sections
2039 * elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
2040 what the #defines in elf-bfd.h transmuted it to anyway.
2042 * section.c: Add SEC_LINKER_CREATED flag.
2043 * bfd-in2.h: Rebuild.
2044 * elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
2045 relocation section flags.
2046 (elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
2047 SEC_IN_MEMORY to recognize generated bits.
2048 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
2050 * elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
2051 mips_elf_create_compact_rel_section, mips_elf_create_got_section,
2052 mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
2053 * elf32-ppc.c (ppc_elf_create_linker_section,
2054 ppc_elf_size_dynamic_sections): Likewise.
2055 * elf32-sparc.c (elf32_sparc_check_relocs,
2056 elf32_sparc_size_dynamic_sections): Likewise.
2057 * elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
2059 (_bfd_elf_create_dynamic_sections): Likewise.
2060 (_bfd_elf_make_linker_section_rela): Likewise.
2061 * elflink.h (elf_link_create_dynamic_sections): Likewise.
2062 (bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
2063 (elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
2064 to identify generated bits.
2065 (elf_link_input_bfd): Likewise.
2067 * elf64-alpha.c: Rewrite everything touching relocations.
2070 Fri Jan 3 11:42:53 1997 Michael Meissner <meissner@tiktok.cygnus.com>
2072 * elf32-v850.c (all functions and static variables): Go through
2073 and regularize names to be of the form v850_elf_<xxx>.
2074 (toplevel): Include <elf/v850.h>.
2075 (enum reloc_type): Move to include/elf/v850.h.
2076 (v850_elf_check_relocs): For common variables, if the variable is
2077 referenced by a R_V850_{SDA,ZDA,TDA} relocation, put the variable
2078 into the appropriate section.
2079 (elf_backend_check_relocs): Define.
2081 Tue Dec 31 15:15:28 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2083 * elf32-v850.c (elf_v850_howto_table): Fix some spacing.
2086 Tue Dec 31 14:44:50 1996 Ian Lance Taylor <ian@cygnus.com>
2088 * config.bfd (mips*el-*-linux*): New target.
2089 (mips*-*-linux*): New target.
2091 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
2092 Return a useful value.
2094 * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE.
2096 * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
2098 * configure: Rebuild.
2099 * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
2100 ac_cv_func_mmap in bfd/configure.host.
2102 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
2103 filter_shlib and auxiliary_filter_shlib parameters.
2104 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
2106 * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
2107 (bfd_elf64_size_dynamic_sections): Likewise.
2108 * bfd-in2.h: Rebuild.
2110 Mon Dec 30 18:48:52 1996 Ian Lance Taylor <ian@cygnus.com>
2112 * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
2113 symbols, don't export a symbol which is defined by an object in an
2114 archive which contains shared objects.
2116 start-sanitize-tic80
2117 Mon Dec 30 16:12:58 1996 Fred Fish <fnf@cygnus.com>
2119 * archures.c (enum bfd_architecture): Add bfd_arch_tic80
2120 for TI TMS320c80 (MVP).
2121 (bfd_archures_list): Add bfd_tic80_arch.
2122 * bfd-in2.h: Regenerate by running "make headers".
2124 Sun Dec 29 16:18:52 1996 Fred Fish <fnf@cygnus.com>
2126 * cpu-tic80.c (bfd_tic80_arch): Add struct.
2127 * configure.in (case $vec): Correct typo, "tb" not "tp".
2128 Also add cofflink.o for tic80coff_vec.
2129 * configure: Regenerate with autoconf.
2132 Mon Dec 30 11:54:56 1996 Ian Lance Taylor <ian@cygnus.com>
2134 * libbfd.c: Patch up the mmap code so that it is only built if BFD
2135 is configured with --with-mmap.
2137 start-sanitize-tic80
2138 Sun Dec 29 10:48:57 1996 Fred Fish <fnf@cygnus.com>
2140 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
2141 (ALL_MACHINES): Add cpu-tic80.o
2142 (cpu-tic80.o, coff-tic80.o): Add dependencies.
2143 * coff-tic80.c: Add skeleton, cloned from another coff config.
2144 * coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
2148 Fri Dec 27 20:56:41 1996 Fred Fish <fnf@cygnus.com>
2150 * TODO: Correct a misspelling.
2151 start-sanitize-tic80
2152 * coff-tic80.c: New file for TI TMS320C80 (MVP).
2153 * cpu-tic80.c: New file for TI TMS320C80 (MVP).
2154 * configure.in (case $vec): Add tic80coff_vec entry.
2155 * configure: Regenerate with autoconf.
2156 * archures.c (bfd_tic80_arch): Declare.
2157 * bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
2158 * config.bfd (case ${targ}): Add tic80*-*-coff* target.
2159 * targets.c (tic80coff_vec): Add decl as extern bfd_target.
2160 (bfd_target_vector): Add tic80coff_vec entry.
2163 Fri Dec 27 11:48:12 1996 H.J. Lu <hjl@lucon.org>
2165 * elflink.h (elf_buckets): Add some more values for larger
2168 Thu Dec 26 18:36:54 1996 Ian Lance Taylor <ian@cygnus.com>
2170 * Makefile.in (install): Move subdir_do out of conditional. From
2171 Fred Fish <fnf@cygnus.com>.
2173 Wed Dec 18 10:04:30 1996 Jeffrey A Law (law@cygnus.com)
2175 * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
2177 (elf_mn10200_howto_table): Likewise.
2178 (mn10200_reloc_map): Likewise.
2180 Tue Dec 17 11:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
2182 * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
2183 mips16 symbol during the link.
2184 (mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
2186 (mips_elf_link_output_symbol_hook): New static function.
2187 (elf_backend_link_output_symbol_hook): Define.
2189 * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
2192 Mon Dec 16 14:38:39 1996 Ian Lance Taylor <ian@cygnus.com>
2194 * elf.c (bfd_section_from_shdr): Don't check for reloc sections
2195 against SEC_DEBUGGING sections here (revert patch of December 5).
2196 * elfcode.h (elf_object_p): Check for them here, instead.
2198 Sun Dec 15 14:46:06 1996 Ian Lance Taylor <ian@cygnus.com>
2200 * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
2201 * elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
2203 (_bfd_elf_get_dynamic_reloc_upper_bound): New function.
2204 (_bfd_elf_canonicalize_dynamic_reloc): New function.
2205 * elf-bfd.h (struct elf_size_info): Update declaration of
2207 (_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
2208 (_bfd_elf_canonicalize_dynamic_reloc): Declare.
2209 * elfxx-target.h: Use new dynamic reloc routines by default.
2210 * elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
2213 Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
2215 * coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
2216 if NAMES_HAVE_UNDERSCORE is defined.
2218 Fri Dec 13 11:13:23 1996 Doug Evans <dje@canuck.cygnus.com>
2220 * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
2222 Thu Dec 12 15:07:20 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2224 * elf32-ppc.c (ppc_elf_check_relocs): Move R_PPC_PLTREL24 into the
2227 Thu Dec 12 14:55:41 1996 Ian Lance Taylor <ian@cygnus.com>
2229 * elflink.h (elf_link_add_object_symbols): Only add a weak
2230 symbol if the real definition is in the dynamic symbol table.
2231 After finding the real definition, then, if it is dynamic, add the
2232 weak symbol to the dynamic symbol table.
2234 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
2236 * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
2238 (ppcboot_bfd_print_private_bfd_data): Don't take the address of an
2241 Tue Dec 10 23:23:52 1996 Jeffrey A Law (law@cygnus.com)
2243 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
2245 (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
2246 (bfd_elf32_mn10300_reloc): Write data in little endian format.
2247 * reloc.c: Remove mn10300 big endian relocs.
2248 * bfd-in2.h, libbfd.h: Rebuilt.
2250 * elf32-mn10200.c: Update from elf32-mn10300.c.
2252 Fri Dec 6 15:18:05 1996 Jeffrey A Law (law@cygnus.com)
2254 * elf32-mn10300.c (elf_symbol_leading_char): Define.
2256 * elf32-mn10300.c: Add some comments.
2258 Fri Dec 6 17:16:43 1996 Ian Lance Taylor <ian@cygnus.com>
2260 * ihex.c (ihex_scan): Always initialize buf before jumping to
2262 (ihex_read_section): Likewise.
2264 Thu Dec 5 22:29:18 1996 Jeffrey A Law (law@cygnus.com)
2266 * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
2267 inplace for most relocs.
2269 Thu Dec 5 13:24:46 1996 Ian Lance Taylor <ian@cygnus.com>
2271 * elflink.h (elf_link_add_object_symbols): Calling check_relocs
2272 even if SEC_ALLOC is not set.
2273 * elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
2274 when deciding whether to copy a reloc into a shared object.
2275 (elf_i386_relocate_section): Likewise.
2276 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2277 (elf32_sparc_relocate_section): Likewise.
2278 * elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
2279 reloc section if it is not set in the source section.
2280 * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2281 * elf.c (bfd_section_from_shdr): Mark a reloc section associated
2282 with a SEC_DEBUGGING section as SEC_DEBUGGING.
2284 Wed Dec 4 14:18:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2286 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): #if 0 code that
2287 expects a .got.plt until we actually create it.
2289 Mon Dec 2 12:13:51 1996 Ian Lance Taylor <ian@cygnus.com>
2291 * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
2292 message for bfd_reloc_outofrange, rather than aborting. From
2293 Philippe De Muyter <phdm@info.ucl.ac.be>.
2295 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
2296 a relocateable link, don't try to process them. From Heinz Wrobel
2297 <wrobel@lpr.e-technik.tu-muenchen.de>.
2299 Mon Dec 2 00:39:24 1996 Jeffrey A Law (law@cygnus.com)
2301 * elf32-mn10300.c (mn10300_info_howto): Renamed from
2302 mn10300_info_howto_rel. Tweak reloc argument to be an
2303 Elf32_Internal_Rela.
2304 (USE_RELA): Define instead of USE_REL.
2305 (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
2307 Sun Dec 1 00:18:59 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
2309 * configure.in, configure: Handle mips*-sgi-irix6*.
2310 * irix-core.c (irix_core_core_file_p): Accept CORE_MAGICN32
2313 Wed Nov 27 12:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
2315 * elf32-i386.c (elf_i386_relocate_section): Warn about a
2316 relocation against a symbol defined in a section with no output
2319 Tue Nov 26 11:07:31 1996 Ian Lance Taylor <ian@cygnus.com>
2321 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
2322 * configure, config.in: Rebuild with autoconf 2.12.
2324 * elf-bfd.h (struct elf_link_hash_entry): Add other field.
2325 * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
2326 (swap_out_syms): Set st_other from existing st_other field.
2327 * elflink.h (elf_link_add_object_symbols): Store st_other in hash
2329 (elf_link_output_extsym): Set the other field from the global hash
2331 * elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
2332 (elf_mips16_jump_howto): New static variable.
2333 (mips16_jump_reloc): New static function.
2334 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
2335 (mips_info_to_howto_rel): Handle R_MIPS16_26.
2336 (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26
2338 * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
2339 * bfd-in2.h, libbfd.h: Rebuild.
2340 * cpu-mips.c (arch_info_struct): Add mips:16 entry.
2342 Mon Nov 25 11:23:32 1996 Ian Lance Taylor <ian@cygnus.com>
2344 * configure.host: Use long long for mips-sgi-irix6*.
2346 * coffswap.h (coff_swap_scnhdr_out): Make line number overflow
2347 only a warning. From Philippe De Muyter <phdemuyt@ulb.ac.be>.
2349 Mon Nov 25 08:52:29 1996 Jeffrey A Law (law@cygnus.com)
2351 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
2352 (enum reloc_type): Add more reloc types.
2353 (elf32_mn10300_howto_table): Update for new reloc types.
2354 (elf32_mn10300_reloc_map): Update for new reloc types.
2355 * reloc.c: Add some new relocs for the mn10300 series.
2356 * bfd-in2.h, libbfd.h: Rebuilt.
2358 Sat Nov 23 13:26:18 1996 Jeffrey A Law (law@cygnus.com)
2360 * som.c (setup_sections): Don't lose for a space which has
2361 no data, but some symbols.
2363 Fri Nov 22 11:32:13 1996 Ian Lance Taylor <ian@cygnus.com>
2365 * sunos.c (struct sunos_link_hash_table): Add got_needed field.
2366 (sunos_link_hash_table_create): Initialize got_needed.
2367 (sunos_create_dynamic_sections): Only set .got section size if it
2368 is not already set. Set got_needed.
2369 (bfd_sunos_size_dynamic_sections): Check got_needed. Only set
2370 sdynptr, and only handle dynamic sections, if dynamic sections are
2372 (sunos_scan_std_relocs): Pass false to create_dynamic_sections.
2373 Initialize .got section.
2374 (sunos_scan_ext_relocs): Likewise.
2375 (sunos_write_dynamic_symbol): Set up PLT entry even if this is not
2377 (sunos_finish_dynamic_link): Check got_needed. Only set up
2378 dynamic linking information if needed.
2380 Thu Nov 21 10:31:31 1996 Rob Savoye (rob@cygnus.com)
2382 * config.bfd: Added VersaDOS format to the Ericsson configuration.
2384 Wed Nov 20 16:31:31 1996 Jeffrey A Law (law@cygnus.com)
2386 * elf32-mn10300.c: Rough cut at relocs for the mn10300.
2388 Wed Nov 13 08:12:38 1996 Jeffrey A Law (law@cygnus.com)
2390 * Makefile.in (elf32-d10v.o): Don't depend on elf/d10v.h
2393 Tue Nov 12 13:30:00 1996 Dawn Perchik <dawn@cygnus.com>
2395 * filemode.c: Include sysdep.h.
2396 * ihex.c: Add casts to eliminate compiler warnings.
2397 * sunos.c: Add casts to eliminate compiler warnings.
2399 Mon Nov 11 10:37:02 1996 Michael Meissner <meissner@tiktok.cygnus.com>
2401 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Create .got.plt
2403 (ppc_elf_check_relocs): Add support for R_PPC_LOCAL24PC. Make
2404 appropriate relocations in the .so file if shared.
2405 (ppc_elf_relocate_section): Ditto.
2407 Tue Oct 29 15:03:02 1996 Doug Evans <dje@canuck.cygnus.com>
2409 * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
2410 complain_overflow_unsigned.
2412 Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
2414 * elf32-d10v.c (elf_d10v_howto_table): Don't complain on
2415 overflows for R_D10V_16 and R_D10V_18.
2417 Tue Oct 29 13:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
2419 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
2420 (do_with_relocs): Likewise.
2421 (do_as_repeat): Likewise.
2422 (copy_expression): Likewise.
2424 Fri Oct 25 16:56:40 1996 Ian Lance Taylor <ian@cygnus.com>
2426 * ieee.c (ieee_write_external_part): Correctly record whether
2427 there is an external part.
2430 Thu Oct 24 14:32:52 1996 Jeffrey A Law (law@cygnus.com)
2432 * elf32-v850.c (elf32_v850_bfd_final_link_relocate): Correctly
2433 handle tda offsets for sld.w and sst.w instructions.
2434 Fix alignment check in sld.w and sst.w tda reloc handling.
2437 Thu Oct 24 09:08:47 1996 Stu Grossman (grossman@critters.cygnus.com)
2439 * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows.
2442 Wed Oct 23 00:53:16 1996 Jeffrey A Law (law@cygnus.com)
2444 * elf32-v850.c: Add comments about assumptions about
2445 char, short & long sizes.
2446 (elf32_v850_bfd_final_link_relocate): Fix sign extension
2447 problems for several relocs.
2449 * elf32-v850.c (elf32_v850_howto_table): Fix typo in
2450 R_V850_SDA_OFFSET entry.
2453 Wed Oct 23 00:20:34 1996 Ian Lance Taylor <ian@cygnus.com>
2455 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
2456 Store import file index in ldindx.
2457 (xcoff_build_ldsyms): Assume that ldsym was not previously
2458 allocated. For an imported symbol, copy ldindx into l_ifile.
2461 Tue Oct 22 19:20:38 1996 Jeffrey A Law (law@cygnus.com)
2463 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
2464 R_V850_ZDA_OFFSET and R_V850_TDA_OFFSET. Fix various
2465 fields in R_V850_TDA_OFFSET.
2466 (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
2467 relocs to work more like other relocs. Handle R_V850_TDA_OFFSET
2470 * elf32-v850.c: Include bfdlink.h.
2471 (bfd_elf32_v850_reloc): Return an error if we get a reloc
2473 (elf32_v850_bfd_final_link_relocate): New function.
2474 (v850_elf_relocation_section): Likewise.
2475 (elf_backend_relocate_section): Define.
2478 Tue Oct 22 17:22:43 1996 Ian Lance Taylor <ian@cygnus.com>
2480 * binary.c (binary_set_section_contents): Ignore sections which
2481 don't have SEC_LOAD and SEC_ALLOC set.
2483 Mon Oct 21 12:13:05 1996 Jeffrey A Law (law@cygnus.com)
2485 * linker.c (_bfd_generic_final_link): Avoid losing static
2486 symbols in the .bss section.
2488 Mon Oct 21 10:54:58 1996 Ian Lance Taylor <ian@cygnus.com>
2490 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
2491 (mips32_64bit_reloc): New static function.
2492 (mips_reloc_map): Add entry for BFD_RELOC_64.
2493 (mips_elf_relocate_section): Handle R_MIPS_64.
2495 * linker.c (default_indirect_link_order): Print an error message
2496 when attempting to do a relocateable link with different object
2497 file formats, rather than calling abort.
2499 Thu Oct 17 10:43:29 1996 Doug Evans <dje@canuck.cygnus.com>
2501 * reloc.c (m32r relocs): Rename them.
2502 * bfd-in2.h, libbfd.h: Regenerated.
2503 * elf32-m32r.c: Update.
2504 (m32r_elf_10_pcrel_reloc): New function.
2505 (elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
2506 (elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
2508 Wed Oct 16 11:24:35 1996 Jeffrey A Law (law@cygnus.com)
2510 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
2511 all sections that will be included in the output file.
2512 (_bfd_generic_link_output_symbols): Discard symbols in sections
2513 which are being discarded.
2517 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
2518 R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
2519 (elf_v850_howto_table): Corresponding changes.
2520 (elf_v850_reloc_map): Corresponding changes.
2521 * reloc.c: Add additional V850 relocations.
2522 * bfd-in2.h, libbfd.h: Rebuilt.
2524 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
2525 no longer want in pc-relative relocs.
2527 Tue Oct 15 22:17:37 1996 Jeffrey A Law (law@cygnus.com)
2529 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
2530 accept a reloc against an undefined sybmol!
2532 Tue Oct 15 16:17:28 1996 Stu Grossman (grossman@critters.cygnus.com)
2534 * elf32-v850.c: Define elf_symbol_leading_char to be '_'.
2537 Tue Oct 15 12:40:41 1996 Ian Lance Taylor <ian@cygnus.com>
2539 * VERSION: Bump for new relocation.
2541 * hosts/i386bsd.h: If NBPG is not defined, define it as
2542 PAGE_SIZE, for recent versions of FreeBSD.
2544 Mon Oct 14 12:37:26 1996 Ian Lance Taylor <ian@cygnus.com>
2546 * configure.host: Use `long long' as the 64 bit type on a Solaris
2547 host, since both gcc and the SunPRO compilers support it.
2549 Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
2551 * reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a
2552 mistake to have reused the ECOFF LITERAL for ELF since they have
2553 different semantics.
2554 * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
2555 * bfd-in2.h, libbfd.h: Rebuild.
2557 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
2560 * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
2561 dynamic relocation for an undefweak symbol when we are building
2562 a static executable.
2564 Thu Oct 10 11:15:06 1996 Stan Shebs <shebs@andros.cygnus.com>
2566 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
2567 point explicitly to srcdir.
2568 (targmatch.h): Edit references to point explicitly to objdir.
2570 Thu Oct 10 14:14:23 1996 Ian Lance Taylor <ian@cygnus.com>
2572 * config.bfd: When setting targ_cpu, don't get confused by
2575 Tue Oct 8 08:51:19 1996 Stu Grossman (grossman@critters.cygnus.com)
2577 * configure.host: Add support for windows host (a build done
2578 under the Microsoft build environment).
2580 Tue Oct 8 11:40:16 1996 Ian Lance Taylor <ian@cygnus.com>
2582 * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
2583 definition in a dynamic object, add it to the dynamic symbol table
2584 if any dynamic object mentions it. Reverts part of last patch.
2586 * sunos.c (struct sunos_link_hash_table): Add got_base field.
2587 (sunos_link_hash_table_create): Initialize got_base.
2588 (bfd_sunos_size_dynamic_sections): If the .got section is more
2589 than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
2591 (sunos_check_dynamic_reloc): Subtract got_base from a base
2592 relative relocation.
2594 * elf32-mips.c (elf_mips_isa): New static function.
2595 (_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
2596 -mips1 and -mips2 code together, or -mips3 and -mips4 code.
2598 Mon Oct 7 11:44:17 1996 Ian Lance Taylor <ian@cygnus.com>
2600 * archive.c (do_slurp_coff_armap): Only treat archive as little
2601 endian for i960 COFF.
2603 Fri Oct 4 13:49:01 1996 Ian Lance Taylor <ian@cygnus.com>
2605 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
2606 by the change in size of the section when EXEC_P is not set.
2608 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
2609 (m68kcoff_rtype_to_howto): New static function.
2610 * cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
2611 VMA to the addend for a PC relative reloc.
2613 * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
2615 * Makefile.in: Rebuild dependencies.
2617 * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
2620 Fri Oct 4 11:41:39 1996 Jeffrey A Law (law@cygnus.com)
2622 * Makefile.in: Remove explicit dependencies for mn10200 and
2624 (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
2625 (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
2626 (dependencies): Rebuilt.
2628 Thu Oct 3 16:57:51 1996 Ian Lance Taylor <ian@cygnus.com>
2630 * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
2631 during this function.
2633 * elflink.c (_bfd_elf_create_linker_section): Only use an existing
2634 section if the flags are compatible.
2636 * configure.in: Add havevecs, and put it in tdefaults.
2637 * mpw-config.in: Likewise.
2638 * configure: Rebuild.
2639 * targmatch.sed: New file; a sed script to build targmatch.h from
2641 * config.bfd: Add #if, #endif, and comments for targmatch.h.
2642 * targets.c: Include "fnmatch.h".
2643 (struct targmatch): Define.
2644 (bfd_target_match): Define by including targmatch.h.
2645 (bfd_find_target): If the target is not found by name, search for
2646 it as a configuration triplet.
2647 * Makefile.in: Rebuild dependencies.
2648 (BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
2649 i386dynix.o, m68k4knetbsd.o, and riscix.o.
2650 (BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
2651 hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
2652 (HFILES): Add targmatch.h. Also, alphabetize and reindent.
2653 (CFILES): Remove i386dynix.c and hp300bsd.c.
2654 (targmatch.h): New target.
2655 (do_clean): Remove targmatch.h.
2657 * configure.in: Add BFD_NEED_DECLARATION(getenv).
2658 * acconfig.h: Add NEED_DECLARATION_GETENV.
2659 * configure, config.in: Rebuild.
2660 * sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
2661 * aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
2663 Thu Oct 3 09:29:09 1996 Jeffrey A Law (law@cygnus.com)
2665 * cpu-mn10x00.c, elf32-mn10x00: Removed.
2666 * cpu-mn10200.c, cpu-mn10300.c: New files.
2667 * elf32-mn10200.c, elf32-mn10300.c: New files.
2668 * Makefile.in: Break mn10x00 support into two separate
2669 configurations, mn10200 and mn10300.
2670 * archures.c, config.bfd, configure.in, elf.c, targets.c: Likewise.
2671 * bfd-in2.h, configure: Rebuilt.
2673 Thu Oct 3 15:38:19 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
2675 * Makefile.in (do_clean): Move config.log to do_distclean.
2677 Wed Oct 2 21:40:55 1996 Jeffrey A Law (law@cygnus.com)
2679 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
2680 * Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
2681 (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
2682 (elf32-mn10x00.o): Add dependencies.
2683 * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
2684 (bfd_mn10x00_arch): Declare.
2685 (bfd_archures_list): Add bfd_mn10x00_arch.
2686 * config.bfd: Add mn10x00-*-*.
2687 * configure.in: Add bfd_elf32_mn10x00_vec.
2688 * elf.c (prep_headers): Handle bfd_arch_mn10x00.
2689 * targets.c (bfd_elf32_mn10x00_vec): Declare.
2690 (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
2691 * bfd-in2.h, configure: Rebuilt.
2693 Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
2695 openVMS/Alpha: Provide filename and case_hack flags via
2696 symbol table from gas.
2697 Add case_hack code for symbol output from vax/vms.
2698 * evax-alpha.c (evax_initialize): Remove filename handling,
2699 filename is provided via symbol table.
2700 (evax_get_symtab): Use local symbol count when setting up table.
2701 * evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
2703 (_bfd_evax_write_egsd): Skip file name symbol.
2704 * evax-emh.c (get_vms_time_string): Local function now.
2705 (_bfd_evax_write_emh): Extract source filename and case_hack flags
2707 * evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
2708 through _bfd_evax_case_hack_symbol.
2709 * evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
2711 (_bfd_evax_basename): Removed.
2712 (_bfd_get_vms_time_string): Moved to evax-emh.c.
2713 * evax.h (evax_private_data_struct): Remove filename.
2714 (flag_hash_long_names, flag_show_after_trunc,
2715 flag_no_hash_mixed_case, vms_name_mapping): New flags for
2718 Wed Oct 2 12:02:02 1996 Ian Lance Taylor <ian@cygnus.com>
2720 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
2721 (N_GETMID_NET, N_GETFLAG_NET): Likewise.
2722 (NO_SWAP_MAGIC): Don't define.
2723 (SWAP_MAGIC): Define.
2725 * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
2726 no hash table entry for a global symbol.
2728 Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
2730 * config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
2732 Tue Oct 1 12:31:39 1996 Ian Lance Taylor <ian@cygnus.com>
2734 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
2735 symbol type with T_NULL. Warn if symbol type changes. Based on
2736 patch from Philippe De Muyter <phdm@info.ucl.ac.be>.
2738 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
2739 a dynamic object in the dynamic symbol table if it is referenced
2740 or defined by a regular object.
2743 Fri Sep 27 18:41:07 1996 Stu Grossman (grossman@critters.cygnus.com)
2745 * elf32-v850.c (bfd_elf32_v850_is_local_label): New function to
2746 remove dwarf local labels. Shrinks binaries by a factor of 3!
2749 Mon Sep 23 13:33:00 1996 Ian Lance Taylor <ian@cygnus.com>
2751 * elf32-ppc.c (ppc_elf_add_symbol_hook): Create the .sbss section
2752 by hand, rather than by calling bfd_make_section.
2754 Mon Sep 23 09:23:41 1996 Doug Evans <dje@seba.cygnus.com>
2756 * reloc.c: Rename m32r relocs.
2757 * bfd-in2.h, libbfd.h: Rebuilt.
2758 * elf32-m32r.c: Update.
2760 Fri Sep 20 11:43:43 1996 Ian Lance Taylor <ian@cygnus.com>
2762 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
2763 link, adjust the symbol index of a base relative reloc. Don't
2764 change the addend of a PC relative reloc if pcrel_offset is set.
2765 * sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
2766 a relocateable link.
2768 * reloc.c (bfd_perform_relocation): Apply the relocation even if
2769 it is zero, in case src_mask matters.
2770 (bfd_install_relocation): Likewise.
2772 Thu Sep 19 11:03:06 1996 Ian Lance Taylor <ian@cygnus.com>
2774 * xcofflink.c (xcoff_link_add_symbols): Always initialize
2776 (_bfd_xcoff_bfd_final_link): Don't set target_index
2777 to an uninitialized value.
2779 Tue Sep 17 14:18:31 1996 Ian Lance Taylor <ian@cygnus.com>
2781 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
2782 indices, rather than crashing.
2783 (coff_slurp_reloc_table): Likewise. Check whether the howto field
2785 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
2788 Mon Sep 16 12:39:36 1996 Ian Lance Taylor <ian@cygnus.com>
2790 * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
2792 (coff_arm_adjust_symndx): New static function.
2793 (coff_adjust_symndx): Define.
2795 * srec.c (srec_scan): Accept multiple symbols on a single line.
2796 From Pascal Martin <pmartin@alsys.com>.
2800 Fri Sep 13 14:32:42 1996 Doug Evans <dje@canuck.cygnus.com>
2802 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
2803 (sunos_merge_private_bfd_data): New function.
2805 Fri Sep 13 15:50:57 1996 Ian Lance Taylor <ian@cygnus.com>
2807 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
2809 (bfd_merge_private_bfd_data): Likewise.
2810 * section.c (bfd_copy_private_section_data): Likewise.
2811 * syms.c (bfd_copy_private_symbol_data): Likewise.
2812 * bfd-in2.h: Rebuild.
2813 * aout-target.h (MY_bfd_copy_private_section_data): Check that
2814 both BFD's are the right flavour.
2815 * ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
2816 * elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
2817 * elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
2818 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
2819 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
2820 (ppc_elf_merge_private_bfd_data): Likewise.
2821 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
2822 * peicode.h (pe_bfd_copy_private_section_data): Likewise.
2824 * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
2825 R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
2828 Thu Sep 12 11:45:57 1996 Doug Evans <dje@seba.cygnus.com>
2830 * reloc.c: Add m32r relocs.
2831 * bfd-in2.h, libbfd.h: Rebuilt.
2832 * cpu-m32r.c,elf32-m32r.c: New files.
2834 Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
2836 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'.
2838 Wed Sep 11 11:57:56 1996 Ian Lance Taylor <ian@cygnus.com>
2840 * tekhex.c (first_phase): Change type parameter from char to int.
2842 (pass_over): Change func to expect int, not char.
2844 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
2845 rather than SEC_LOAD when aligning the file offset for the first
2846 section in a segment.
2848 Tue Sep 10 16:18:30 1996 Fred Fish <fnf@cygnus.com>
2850 * syms.c (coff_section_type): Make arg const.
2851 * irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
2852 to make_bfd_asection().
2853 * elf-bfd.h (bfd_section_from_phdr): Add prototype.
2854 * elfcode.h (bfd_section_from_phdr): Remove prototype.
2855 (_bfd_elf_stringtab_init): Remove prototype.
2857 * netbsd-core.c (swap_abort): Add prototype.
2858 * aix386-core.c (swap_abort): Ditto & make static
2859 * hpux-core.c (swap_abort): Ditto & make static.
2860 * irix-core.c (swap_abort): Ditto & make static.
2861 * ptrace-core.c (swap_abort): Ditto & make static.
2862 * trad-core.c (swap_abort): Ditto & make static.
2863 * coffswap.h (coff_swap_reloc_in): Ditto.
2864 (coff_swap_reloc_out): Ditto.
2865 (coff_swap_filehdr_in): Ditto.
2866 (coff_swap_filehdr_out): Ditto.
2867 (coff_swap_sym_in): Ditto.
2868 (coff_swap_sym_out): Ditto.
2869 (coff_swap_aux_in): Ditto.
2870 (coff_swap_aux_out): Ditto.
2871 (coff_swap_lineno_in): Ditto.
2872 (coff_swap_lineno_out): Ditto.
2873 (coff_swap_aouthdr_in): Ditto.
2874 (coff_swap_aouthdr_out): Ditto.
2875 (coff_swap_scnhdr_in): Ditto.
2876 (coff_swap_scnhdr_out): Ditto.
2877 * ihex.c (ihex_sizeof_headers): Ditto.
2878 * tekhex.c (getsym): Ditto.
2879 (find_chunk): Ditto & make static.
2880 (insert_byte): Ditto.
2881 (first_phase): Ditto.
2883 (tekhex_get_symtab): Ditto & make static.
2884 (tekhex_get_symtab_upper_bound): Ditto & make static.
2885 (tekhex_mkobject): Ditto.
2886 (tekhex_object_p): Ditto.
2887 (move_section_contents): Ditto.
2888 (tekhex_get_section_contents): Ditto.
2889 (tekhex_set_arch_mach): Ditto & make static.
2890 (tekhex_set_section_contents): Ditto.
2891 (writevalue): Ditto.
2894 (tekhex_write_object_contents): Ditto.
2895 (tekhex_sizeof_headers): Ditto.
2896 (tekhex_make_empty_symbol): Ditto.
2897 (tekhex_get_symbol_info): Ditto.
2898 (tekhex_print_symbol): Ditto.
2899 * irix-core.c (make_bfd_asection): Ditto.
2900 (irix_core_core_file_p): Ditto.
2901 (irix_core_core_file_failing_command): Ditto.
2902 (irix_core_core_file_failing_signal): Ditto.
2903 (irix_core_core_file_matches_executable_p): Ditto.
2904 (irix_core_make_empty_symbol): Ditto.
2905 * coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
2906 * srec.c (srec_new_symbol): Ditto.
2907 (srec_get_section_contents): Ditto.
2908 (srec_set_arch_mach): Ditto.
2909 (srec_set_section_contents): Ditto.
2910 (internal_srec_write_object_contents): Ditto.
2911 (srec_write_object_contents): Ditto.
2912 (symbolsrec_write_object_contents): Ditto.
2913 (srec_sizeof_headers): Ditto.
2914 (srec_make_empty_symbol): Ditto.
2915 (srec_get_symtab_upper_bound): Ditto.
2916 (srec_get_symtab): Ditto.
2917 (srec_print_symbol): Ditto and make static.
2918 * elf.c (elf_read): Ditto
2919 (assign_section_numbers): Ditto.
2920 (elf_fake_sections): Ditto.
2921 (sym_is_global): Ditto.
2922 (elf_map_symbols): Ditto.
2923 (get_program_header_size): Ditto.
2924 * coffgen.c (make_a_section_from_file): Ditto.
2925 (coff_real_object_p): Ditto.
2926 (fixup_symbol_value): Ditto.
2927 (build_debug_section): Ditto.
2929 * syms.c (coff_section_type): Ditto.
2931 Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
2933 * bfd-in2.h: Rebuilt after m32r changes.
2935 Mon Sep 9 12:31:22 1996 Doug Evans <dje@canuck.cygnus.com>
2937 * config.bfd,configure.in,configure: Add m32r support.
2938 * Makefile.in,archures.c,elf.c,targets.c: Likewise.
2939 * config.bfd: Keep target list alphabetically sorted.
2942 Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
2944 * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
2945 to add in the constant part found in the instruction itself.
2946 (case R_V850_HI16_S): Likewise.
2949 Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
2951 * elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
2952 and R_D10V_18 to be 1 (word).
2954 Thu Sep 5 15:23:08 1996 Ian Lance Taylor <ian@cygnus.com>
2956 * stabs.c (_bfd_link_section_stabs): If the output_section field
2957 of either section is bfd_abs_section, then the linker is
2958 discarding the section and we should not optimize it.
2960 Tue Sep 3 12:16:20 1996 Doug Evans <dje@canuck.cygnus.com>
2962 * Makefile.in (aout-sparcle.o): New target.
2963 * aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
2964 * config.bfd (sparclet-*-aout*): Add case.
2965 * configure.in (sparcle_aout_vec): Add case.
2966 * configure: Regenerated.
2967 * targets.c (sparcle_aout_vec): Declare.
2968 (bfd_target_vector): Add sparcle_aout_vec.
2969 * aout-sparcle.c: New file.
2972 Tue Sep 3 00:57:02 1996 Jeffrey A Law (law@cygnus.com)
2974 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
2975 low order sign bit propogation for R_V850_HI16_S.
2977 * elf32-v850.c (bfd_elf32_v850_reloc): New function for
2978 handling V850 specific relocs.
2979 (elf_v850_howto_table): Use the new function for some
2980 relocations. Twiddle masks & shifts for some relocs.
2981 Set partial_inplace where needed.
2984 Mon Sep 2 12:12:34 1996 Ian Lance Taylor <ian@cygnus.com>
2986 * cpu-mips.c: Add an explicit mips:3000 entry, and change the
2987 default architecture to a machine number of 0.
2988 * elf32-mips.c (_bfd_mips_elf_object_p): Set the machine number
2990 (_bfd_mips_elf_merge_private_bfd_data): If the machine number of
2991 the output BFD is the default, set it from the first input BFD.
2994 Sun Sep 1 18:38:01 1996 Jeffrey A Law (law@cygnus.com)
2996 * elf32-v850.c (elf_v850_howto_table): All the 16bit relocs
2997 insert at bitpos zero. The HI16 relocs are shifted right
2998 by 16 bits. Fix src_mask for all relocs.
2999 (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define. The V850 is
3001 (TARGET_BIG_SYM, TARGET_BIG_NAME): Remove. The V850 is little
3005 Sun Sep 1 15:41:08 1996 Ian Lance Taylor <ian@cygnus.com>
3007 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
3008 Rewrite to use BFD file read routines and to avoid using a fixed
3009 length for the file name.
3012 Sat Aug 31 10:22:25 1996 Jeffrey A Law (law@cygnus.com)
3014 * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
3015 (elf_v850_howto_table): Add support for R_V850_{32,16,8}.
3016 (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
3017 to R_V850_{32,16,8}.
3019 Fri Aug 30 18:06:04 1996 J.T. Conklin <jtc@hippo.cygnus.com>
3021 * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
3022 (elf_v850_howto_table): Add info for HI16_S reloc.
3023 (v850_reloc_map): Add HI_16_S reloc.
3024 * reloc.c: Define BFD_RELOC_V850_* relocs.
3027 Fri Aug 30 11:49:19 1996 Ian Lance Taylor <ian@cygnus.com>
3030 * elf32-sh.c: New file.
3031 * elf.c (prep_headers): Handle bfd_arch_sh.
3032 * elfcode.h (write_relocs): Handle absolute symbol.
3033 * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
3034 (_bfd_elf64_link_read_relocs): Declare.
3035 * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
3036 elf_link_read_relocs. Make globally visible. Change all
3038 (elf_link_input_bfd): Get external symbols from cache in
3039 symtab_hdr->contents. Get contents from cache in
3041 * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
3043 * reloc.c: Define BFD_RELOC_SH_* relocs.
3044 * libbfd-in.h (_bfd_sh_align_load_span): Declare.
3045 * coff-sh.c (sh_insns_conflict): Fix a return value.
3046 (_bfd_sh_align_load_span): New globally visible function, broken
3047 out of sh_align_load.
3048 (sh_align_load): Call _bfd_sh_align_load_span.
3049 (sh_swap_insns): Change relocs parameter to PTR.
3050 * bfd-in2.h, libbfd.h: Rebuild.
3051 * targets.c (bfd_elf32_sh_vec): Declare.
3052 (bfd_elf32_shl_vec): Declare.
3053 * config.bfd (sh-*-elf*): New target.
3054 * configure.in (bfd_elf32_sh_vec): New target vector.
3055 (bfd_elf32_shl_vec): New target vector.
3056 * configure: Rebuild.
3057 * Makefile.in: Rebuild dependencies.
3058 (BFD32_BACKENDS): Add elf32-sh.o.
3059 (BFD32_BACKENDS_CFILES): Add elf32-sh.c.
3061 * elf.c (map_sections_to_segments): Check that LMA does not skip a
3062 page before checking D_PAGED.
3064 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
3065 (ihex_write_object_contents): Remove extbase; always use segbase
3068 Thu Aug 29 16:52:17 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3070 * configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
3071 * configure.host (i[345]86-*-*): Ditto.
3072 * config.bfd (i[345]86-*-*): Ditto.
3073 * configure: Regenerate.
3075 * config.bfd (i[3456]86-*-dgux*): Recognize as a synonym for x86
3078 Tue Aug 27 09:18:18 1996 Jeffrey A Law (law@cygnus.com)
3080 * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new argument.
3081 * elf32-hppa.h (hppa_elf_gen_reloc_type): Update prototype.
3082 * som.c (hppa_som_gen_reloc_type): Add new argument. If
3083 we encounter an R_DATA_ONE_SYMBOL reloc against a symbol that
3084 will have an ST_CODE type, change the symbol's type to ST_DATA.
3085 * som.c (hppa_som_gen_reloc_type): Update prototype.
3087 Tue Aug 27 00:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
3089 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
3090 R_MIPS_32 and R_MIPS_REL32. Set sgot and g as soon as possible.
3091 (mips_elf_size_dynamic_sections): Don't require .got to exist.
3092 (mips_elf_finish_dynamic_sections): Likewise.
3094 Thu Aug 22 10:54:38 1996 Ian Lance Taylor <ian@cygnus.com>
3096 * configure.host (HLDENV): New variable to set. Set it for
3097 *-*-sysv4*, since those linkers may not support -R but they always
3098 support LD_RUN_PATH.
3100 * libieee.h (NSECTIONS): Don't define.
3101 (ieee_data_struct): Change section_table to asection **. Add
3103 * ieee.c (get_section_entry): If the table isn't big enough, make
3105 (ieee_slurp_sections): Remove assertion about number of sections.
3106 (ieee_object_p): Adjust initialization of ieee to match changes to
3109 * xcofflink.c (xcoff_mark): Don't copy relocs for undefined
3110 symbols merely because we are generating a shared library.
3111 (xcoff_build_ldsyms): Don't set up global linkage code for an
3112 undefined symbol merely because we are generating a shared
3116 Tue Aug 20 15:06:05 1996 J.T. Conklin <jtc@hippo.cygnus.com>
3118 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
3119 (BFD32_BACKENDS) Add elf32-v850.o.
3120 * archures.c: Add bfd_v850_arch.
3121 * bfd-in2.h: Add bfd_v850_arch.
3122 * config.bfd (v850-*-*): New target.
3123 * configure: (bfd_elf32_v850_vec) New vector.
3124 * configure.in: (bfd_elf32_v850_vec) New vector.
3125 * cpu-v850.c: New file.
3126 * elf.c (prep_headers): Added case bfd_arch_v850.
3127 * elf32-v850.c: New file.
3128 * targets.c (bfd_elf32_v850_vec): New vector.
3131 Fri Aug 16 16:25:35 1996 Ian Lance Taylor <ian@cygnus.com>
3133 * xcofflink.c (xcoff_link_add_dynamic_symbols): Create and define
3134 a function code symbol for an XMC_XO symbol.
3136 Thu Aug 15 12:33:29 1996 Stan Shebs <shebs@andros.cygnus.com>
3138 * mpw-config.in: Update editing of autoconf vars to reflect
3139 Jul 18 configure.in change.
3140 * mpw-make.sed: Update editing of include pathnames to be
3141 more general, add @DASH_C_FLAG@ to explicit compile rule edit.
3143 Thu Aug 15 10:35:13 1996 Richard Henderson <rth@tamu.edu>
3145 * elf64-alpha.c (elf64_alpha_output_extsym): The section from
3146 which to offset to get the .plt entry address is ".plt".
3148 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
3150 * reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
3151 BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
3152 Added, for internal use by the ARM gas.
3154 * bfd-in2.h: Rebuilt
3156 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
3158 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
3159 in section dynidx start.
3161 Tue Aug 13 14:35:38 1996 Ian Lance Taylor <ian@cygnus.com>
3163 * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
3164 name begins with .gnu.linkonce as SEC_LINK_ONCE. This is an
3165 optimization for g++.
3167 Tue Aug 13 17:04:40 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3169 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): If one module has
3170 the -mrelocatable-lib bit set and the other doesn't, clear the
3171 -mrelocatable-lib bit in the header.
3173 Sat Aug 10 22:59:17 1996 Ian Lance Taylor <ian@cygnus.com>
3175 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
3176 symbol against a STT_FUNC symbol in a shared library.
3178 Fri Aug 9 12:44:57 1996 Ian Lance Taylor <ian@cygnus.com>
3180 * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
3181 symbol is found, automatically define the corresponding function
3184 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
3185 if sym.n_numaux is not zero.
3186 (_bfd_coff_link_input_bfd): Permit the symbol and the hash table
3187 entry to disagree about the number of aux entries if the symbol
3190 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
3191 section if it might be needed, not just if info->shared.
3192 (mips_elf_adjust_dynamic_symbol): Make room for a null element at
3193 the start of .rel.dyn if we are going to use it.
3194 (mips_elf_finish_dynamic_sections): Only clear the first element
3195 of .rel.dyn if the size is greater than zero.
3197 Thu Aug 8 16:24:55 1996 Ian Lance Taylor <ian@cygnus.com>
3199 * xcofflink.c (xcoff_link_input_bfd): If we already called the
3200 undefined_symbol callback for a symbol, then don't issue any more
3201 warnings about loader relocs.
3202 (_bfd_ppc_xcoff_relocate_section): Don't do any further processing
3203 after calling the undefined_symbol callback.
3205 * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
3206 (xcoff_link_add_symbols): Permit multiple definitions of a symbol
3207 as the AIX linker seems to do.
3209 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
3211 * evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
3212 (evax_initialize): Remove evax_reloc_table.
3213 (evax_close_and_cleanup): Ditto.
3215 (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
3217 (evax_bfd_reloc_type_lookup): Ditto.
3218 * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
3219 cooked_size == raw_size.
3220 * evax-emh.c (_bfd_evax_register_filename): Remove.
3221 * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
3222 * evax-misc.c (add_new_contents): Malloc section at full size.
3223 (_bfd_save_evax_section): Memcpy section contents directly.
3224 * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
3225 (evax_reloc_table): Remove.
3227 * hosts/alphavms.h (O_ACCMODE): Define if needed.
3229 * makefile.vms: Add better support for DEC C compilation
3230 Add evax.h dependencies
3232 * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
3233 (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
3234 (BFD_RELOC_ALPHA_BASEREG): Remove.
3235 * bfd-in2.h, libbfd.h: Rebuild.
3237 Thu Aug 8 08:17:32 1996 Stu Grossman (grossman@critters.cygnus.com)
3239 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
3240 getgid if _WIN32 is defined.
3241 * opncls.c (bfd_fdopenr): Remove unnecessary WINGDB ifdef.
3243 Wed Aug 7 23:19:00 1996 Stu Grossman (grossman@critters.cygnus.com)
3245 * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
3246 Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
3248 * libbfd.c: Create dummy getpagesize() macro if HAVE_GETPAGESIZE
3251 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
3253 * configure.in: Call BFD_NEEDED_DECLARATION on strstr and
3255 * acconfig.h (NEED_DECLARATION_STRSTR): New macro.
3256 (NEED_DECLARATION_REALLOC): New macro.
3257 * configure, config.in: Rebuild.
3258 * sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
3259 (realloc): Declare if NEED_DECLARATION_REALLOC.
3261 * aclocal.m4 (BFD_NEED_DECLARATION): Include <string.h> or
3262 <strings.h> if they exist.
3264 * ieee.c (ieee_set_section_contents): Cast bfd_alloc return.
3266 Wed Aug 7 12:12:03 1996 Ian Lance Taylor <ian@cygnus.com>
3268 * cpu-i386.c (i8086_arch): Architecture info for the i8086.
3270 Based on patches from Eric Valette <valette@crf.canon.fr>:
3271 * elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
3272 LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
3273 (elf_howto_table): Add entries for new relocs.
3274 (elf_i386_reloc_type_lookup): Handle new relocs.
3275 (elf_i386_info_to_howto): Just call abort.
3276 (elf_i386_info_to_howto_rel): Check that the reloc type is valid.
3277 (elf_i386_relocate_section): Likewise.
3279 Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
3281 * elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
3283 Mon Aug 5 13:42:41 1996 Ian Lance Taylor <ian@cygnus.com>
3285 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
3286 only get the LMA from the phdr if they are in the same part of the
3289 * elf.c (map_sections_to_segments): Rewrite tests for starting a
3290 new segment to make them more comprehensible. If the relationship
3291 between the LMA and the VMA changed, start a new segment. Don't
3292 check dynsec when deciding whether to start a new segment for a
3293 writeable section; -N will now handle this.
3295 Thu Aug 1 22:43:08 1996 Jeffrey A Law (law@cygnus.com)
3297 * libhppa.h: Remove "esel" changes. Not the right approach.
3298 * som.c: Corresponding changes.
3299 (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
3300 which don't have a SOM symbol type associated with them.
3301 Reverses a 1994 change.
3303 Wed Jul 31 15:50:55 1996 Ian Lance Taylor <ian@cygnus.com>
3305 Make ld -N more reasonable for ELF:
3306 * elf.c (map_sections_to_segments): If D_PAGED is not set, set
3307 phdr_in_section to false, and always use a single load segment.
3308 (elf_sort_sections): Sort sections by LMA after VMA.
3309 (assign_file_positions_for_segments): If D_PAGED is not set, don't
3310 align to maxpagesize.
3311 (assign_file_positions_except_relocs): Likewise.
3312 * elfcode.h (elf_object_p): If a section is loaded but not page
3313 aligned, clear D_PAGED.
3315 Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
3317 * reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
3318 Added, for internal use by the ARM gas.
3320 * bfd-in2.h: Rebuilt
3322 Tue Jul 30 14:14:57 1996 Jeffrey A Law (law@cygnus.com)
3324 * libhppa.h (R_HPPA_ESEL): New field selector.
3325 (e_esel): Similarly.
3326 * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
3327 then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
3328 (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
3330 Tue Jul 30 13:31:27 1996 Ian Lance Taylor <ian@cygnus.com>
3332 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
3333 archive search before looking for stripped dynamic objects.
3335 Fri Jul 26 17:51:39 1996 Ian Lance Taylor <ian@cygnus.com>
3337 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
3338 symbol a warning rather than an error.
3340 Wed Jul 24 12:02:53 1996 Ian Lance Taylor <ian@cygnus.com>
3342 * elf.c (assign_file_positions_for_segments): Track the virtual
3343 memory position separately from the file position, and use it to
3344 compute the alignment adjustment.
3346 Tue Jul 23 10:43:31 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
3348 * elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
3349 and fixed mask on R_D10V_10_PCREL_L.
3351 Mon Jul 22 15:30:30 1996 Ian Lance Taylor <ian@cygnus.com>
3353 * elf64-mips.c: Include "aout/ar.h".
3354 (mips_elf64_slurp_armap): New static function.
3355 (mips_elf64_write_armap): New static function.
3356 (bfd_elf64_archive_*): Define.
3357 * elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
3358 Use instead of bfd_generic_archive_p.
3359 (bfd_elfNN_write_archive_contents): Define if not defined. Use
3360 instead of _bfd_write_archive_contents.
3361 (bfd_elfNN_mkdarchive): Define if not defined. Use instead of
3362 _bfd_generic_mkarchive.
3363 (TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
3364 bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
3366 (TARGET_LITTLE_SYM): Likewise.
3367 * archive.c (bfd_slurp_armap): Check for and reject an archive map
3369 * Makefile.in: Rebuild dependencies.
3371 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
3372 SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
3373 SHT_MIPS_EVENTS sections.
3374 (_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
3375 SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
3377 (_bfd_mips_elf_fake_sections): Likewise.
3379 * libecoff.h (ecoff_data_type): Add rdata_in_text field.
3380 * ecoff.c (ecoff_compute_section_file_positions): Copy
3381 rdata_in_text from backend info to tdata. Clear it if any data
3382 section comes before .rdata.
3383 (_bfd_ecoff_write_object_contents): Use rdata_in_text field in
3384 tdata rather than backend info.
3386 Fri Jul 19 18:15:51 1996 Ian Lance Taylor <ian@cygnus.com>
3388 * configure.in: Fix test for whether a compiler has a 64 bit
3389 type. From Jim Wilson <wilson@cygnus.com>.
3391 Thu Jul 18 15:39:10 1996 Ian Lance Taylor <ian@cygnus.com>
3393 * configure.host (mips-sgi-irix6*): New host.
3395 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
3396 (replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
3397 BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT. Add bfd-in2.h:bfd-in2.h
3399 * configure: Rebuild.
3400 * bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
3401 (BFD_HOST_64_BIT): Define conditionally.
3402 (BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
3403 (bfd_vma): Typedef as BFD_HOST_U_64_BIT.
3404 (symvalue, bfd_size_type): Likewise.
3405 * bfd-in2.h: Rebuild.
3406 * Makefile.in (do_clean): Remove bfd-tmp.h.
3407 (do_distclean): Remove bfd-in3.h.
3408 (stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
3409 (bfd-in3.h): New target.
3411 * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
3412 Andrew Gierth <ANDREWG@microlise.co.uk>.
3414 * configure.host: Set INSTALL_SHLIB.
3415 * configure.in: Call AC_SUBST (INSTALL_SHLIB).
3416 * configure: Rebuild.
3417 * Makefile.in (install): Use @INSTALL_SHLIB@.
3419 * config.bfd (mips*-*-irix6*): New target.
3420 * configure.host: Handle Irix 6 shared library like Irix 5.
3422 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
3423 symbol for a magic name.
3424 (xcoff_link_input_bfd): Don't change the reloc symbol for an
3426 (_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
3429 Thu Jul 18 11:36:31 1996 Stan Shebs <shebs@andros.cygnus.com>
3431 * mpw-config.in: Add ELF support to mips config, create the
3432 elf32-target.h file in the object dir.
3433 * mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
3435 Wed Jul 17 18:02:32 1996 Kim Knuttila <krk@cygnus.com>
3437 * coff-ppc.c: Redid debug scheme - numerous fprintf's gone.
3438 Also removed most abort calls, in favor of using bfd reporting.
3440 Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
3442 * Makefile.in (ALL_MACHINES): Add cpu-d10v.o.
3443 (BFD32_BACKENDS) Add elf32-d10v.o.
3444 * archures.c: Add bfd_d10v_arch.
3445 * bfd-in2.h: Add bfd_d10v_arch.
3446 * config.bfd (d10v-*-*): New target.
3447 * configure: (bfd_elf32_d10v_vec) New vector.
3448 * configure.in: (bfd_elf32_d10v_vec) New vector.
3449 * cpu-d10v.c: New file.
3450 * elf.c (prep_headers): Added case bfd_arch_d10v.
3451 * elf32-d10v.c: New file.
3452 * libbfd.h: Rebuild.
3453 * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L,
3454 BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define.
3455 * targets.c (bfd_elf32_d10v_vec): New vector.
3457 Wed Jul 17 10:58:55 1996 Kim Knuttila <krk@cygnus.com>
3459 * coff-ppc.c (coff_ppc_relocate_section): Removed bogus fprintf
3461 Tue Jul 16 23:49:02 1996 Stu Grossman (grossman@critters.cygnus.com)
3463 * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
3464 bfd_mach_i386_i8086 machine types.
3466 Wed Jul 10 12:42:56 1996 Ian Lance Taylor <ian@cygnus.com>
3468 * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
3471 Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
3473 * coffcode.h (coff_set_section_contents): A/UX does not require
3474 special handling of the _LIB section.
3476 Tue Jul 9 15:52:20 1996 Jeffrey A Law (law@cygnus.com)
3478 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
3479 value for R_RELBYTE.
3481 * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
3482 array if one was allocated.
3484 Tue Jul 9 12:21:54 1996 Ian Lance Taylor <ian@cygnus.com>
3486 From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
3487 * elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
3488 use_rld_obj_head and rld_value.
3489 (mips_elf_link_hash_table_create): Initialize new fields.
3490 (mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
3492 (mips_elf_create_dynamic_sections): Create .rld_map section. If
3493 __rld_obj_head symbol not seen, create an __rld_map symbol.
3494 (mips_elf_size_dynamic_sections): Make space in .rld_map section.
3495 Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
3496 (mips_elf_finish_dynamic_symbol): Save value of __rld_map or
3497 __rld_obj_head symbol.
3498 (mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
3500 Mon Jul 8 16:18:03 1996 Ian Lance Taylor <ian@cygnus.com>
3502 * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry.
3504 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
3505 ppc_elf_addr16_ha_reloc.
3506 (ppc_elf_addr16_ha_reloc): New static function.
3508 * coff-mips.c (struct mips_hi): Define.
3509 (mips_refhi_list): New static variable.
3510 (mips_refhi_addr, mips_refhi_addend): Remove.
3511 (mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
3512 (mips_reflo_reloc): Process mips_refhi_list.
3513 (mips_relhi_list): New static variable.
3514 (mips_relhi_addr, mips_relhi_addend): Remove.
3515 (mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
3516 (mips_rello_reloc): Process mips_relhi_list.
3517 (mips_relocate_section): Permit an arbitrary number of REFHI or
3518 RELHI relocs before the associated REFLO or RELLO reloc.
3520 Fri Jul 5 19:27:49 1996 Ian Lance Taylor <ian@cygnus.com>
3522 * aout-target.h (MY(callback)): Set reloc_count fields.
3524 Thu Jul 4 12:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
3526 * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
3527 sections unless this is a SunOS link.
3529 * VERSION: Set to 2.7.1.
3531 * Released binutils 2.7.
3533 Wed Jul 3 14:59:47 1996 Ian Lance Taylor <ian@cygnus.com>
3535 * i386aout.c: Include "aout/aout64.h".
3536 (i386aout_write_object_contents): New static function.
3537 (MY_write_object_contents): Define.
3539 * netbsd.h (MY(write_object_contents)): Make sure that
3540 adjust_sizes_and_vmas is called before fiddling with the magic
3543 Tue Jul 2 23:30:39 1996 Ian Lance Taylor <ian@cygnus.com>
3545 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo.
3547 Sun Jun 30 13:34:33 1996 Ian Lance Taylor <ian@cygnus.com>
3549 * libbfd-in.h (itos, stoi): Don't define.
3550 * libbfd.h: Rebuild.
3551 * i386lynx.c (KEEPIT): Define as udata.i.
3552 (NAME(lynx,swap_std_reloc_out)): Don't use stoi.
3553 (NAME(lynx,swap_ext_reloc_out)): Likewise.
3554 * riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
3555 flags. Don't use stoi.
3557 * elf32-mips.c (ELF_MAGPAGESIZE): Change definition to 0x1000.
3559 * elf.c (map_sections_to_segments): Don't start a new segment for
3560 a writable section if it's on the same page as the previous
3561 segment. Reset the writable variable for a readonly section.
3563 Sat Jun 29 16:18:51 1996 Kim Knuttila <krk@cygnus.com>
3565 * peicode.h (coff_swap_aouthdr_in): Missing initializations of
3566 first_thunk_address, thunk_size, and import_table_size.
3567 * peicode.h: Improved some diagnostics regarding edata sections.
3569 * coff-ppc.c (coff_ppc_relocate_section): Earlier error check
3571 (coff_ppc_relocate_section): Improved diagnostic for large TOCDEFN's.
3572 (TARGET_LITTLE_SYM): Added missing D_PAGED.
3574 Fri Jun 28 13:48:45 1996 Ian Lance Taylor <ian@cygnus.com>
3576 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
3577 with XCOFF_DEF_DYNAMIC set is really defined.
3578 (xcoff_link_check_dynamic_ar_symbols): Likewise.
3579 (xcoff_link_add_symbols): Only create special sections if using an
3582 * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
3584 (bfd_install_relocation): Likewise.
3586 Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
3588 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
3590 (ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
3591 (ALPHA_ELF_LINK_HASH_LU_MEM): Define.
3592 (ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
3593 (elf64_alpha_link_hash_newfunc): Initialize flags field.
3594 (elf64_alpha_check_relocs): Record types of LITUSE entries that
3595 are found for LITERAL relocs.
3596 (elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
3597 taken, we cannot generate a .plt entry for the symbol.
3599 Thu Jun 27 11:24:29 1996 Ian Lance Taylor <ian@cygnus.com>
3601 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
3602 sysconf functions (for gprof).
3603 * configure, config.in: Rebuild.
3605 Wed Jun 26 16:29:02 1996 Ian Lance Taylor <ian@cygnus.com>
3607 * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
3608 an archive if it has a map. If the object file has the wrong
3611 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
3612 BRADDR, SREL16, SREL32, or SREL64 reloc against an external
3614 (alpha_relocate_section): Likewise.
3616 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
3617 (coff_swap_filehdr_out): Use FILHSZ, not sizeof.
3618 (coff_swap_sym_out): Use SYMESZ, not sizeof.
3619 (coff_swap_aux_out): Use AUXESZ, not sizeof.
3620 (coff_swap_lineno_out): Use LINESZ, not sizeof.
3621 (coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
3622 (coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
3623 * peicode.h: Corresponding changes.
3625 Tue Jun 25 15:28:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3627 * elflink.h (elf_create_pointer_linker_section): Comment out code
3628 dealing with making GOT pointers negative of the GOT symbol for
3631 Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
3633 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
3634 increment the .rela.plt size until after we're done creating the
3636 (elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
3637 .rela.plt offset directly rather than calculating it.
3639 Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
3641 * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
3642 Use autoconf-set values.
3643 * doc/Makefile.in (bindir, libdir, datadir, mandir, infodir,
3644 includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set
3647 * configure.in (AC_PREREQ): autoconf v2.5 or higher.
3648 * configure: Rebuilt.
3650 Mon Jun 24 22:50:35 1996 Jeffrey A Law (law@cygnus.com)
3652 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
3653 handling code > 1k away.
3655 Mon Jun 24 18:41:06 1996 Michael Meissner <meissner@tiktok.cygnus.com>
3657 * elflink.h (elf_create_pointer_linker_section): If DEBUG is
3658 defined, output whenever the symbol is updated.
3660 Mon Jun 24 17:58:12 1996 Jouke Numan <jnuman@bazis.nl>
3662 * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
3663 section to 0 if user_set_vma is set.
3664 * elflink.h (elf_bfd_final_link): Likewise.
3666 Sun Jun 23 20:42:51 1996 Doug Evans <dje@canuck.cygnus.com>
3668 Partially undo patch of Jun 20.
3669 * coffcode.h (coff_set_alignment_hook): Use COFF_IMAGE_WITH_PE.
3670 (coff_compute_section_file_positions): Likewise.
3671 (coff_write_object_contents): Likewise. Re-add deleted code, but
3672 use #ifdef COFF_WITH_PE, not COFF_OBJ_WITH_PE.
3673 * peicode.h (pe_bfd_copy_private_bfd_data): Re-add #ifdef.
3675 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
3677 * config.bfd: Add support for *-*-rtems* configurations.
3679 Fri Jun 21 15:19:59 1996 Ian Lance Taylor <ian@cygnus.com>
3681 * elf.c (prep_headers): Add bfd_arch_alpha case.
3683 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
3685 * elf64-alpha.c: New file.
3686 * config.bfd (alpha-*-linuxecoff*): New target.
3687 (alpha-*-linux*, alpha-*-elf*): New targets.
3688 * configure.in (bfd_elf64_alpha_vec): New vector.
3689 * configure: Rebuild.
3690 * targets.c (bfd_elf64_alpha_vec): Declare.
3691 (bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
3692 * reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
3693 * bfd-in2.h, libbfd.h: Rebuild.
3694 * Makefile.in: Rebuild dependencies.
3695 (BFD64_BACKENDS): Add elf64-alpha.o.
3696 (BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
3698 Thu Jun 20 18:14:25 1996 Ian Lance Taylor <ian@cygnus.com>
3700 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
3701 than relying on a right shift of 32.
3703 Thu Jun 20 11:00:57 1996 Doug Evans <dje@canuck.cygnus.com>
3705 * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
3706 ifdef to COFF_WITH_PE.
3707 (coff_compute_section_file_positions): Likewise.
3708 (coff_write_object_contents): Likewise. Delete COFF_OBJ_WITH_PE.
3709 * pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
3710 * peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
3711 COFF_IMAGE_WITH_PE, always include.
3713 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0.
3715 Wed Jun 19 11:37:52 1996 Ian Lance Taylor <ian@cygnus.com>
3717 * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
3718 approximate the correct answer if SIZEOF_HEADERS was not used.
3720 * binary.c (binary_set_section_contents): Set section file
3721 position based on LMA rather than VMA.
3723 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
3725 * linker.c (_bfd_generic_link_output_symbols): Don't output any
3726 symbols if info->strip == strip_all.
3728 Tue Jun 18 15:17:36 1996 Jeffrey A. Law <law@rtl.cygnus.com>
3730 * coff-h8300.c: Remove #if 0 code.
3731 (compatable): Don't allow mixing/matching of different architectures.
3733 * archures.c (bfd_mach_h8300s): Add.
3734 * bfd-in2.h: Rebuilt.
3735 * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too.
3737 (h8300_reloc16_estimate): Likewise.
3738 (h8300_reloc16_extra_cases): Likewise.
3739 (h8300_bfd_link_add_symbols): Likewise.
3740 * coffcode.h (coff_set_arch_mach_hook): Likewise.
3741 (coff_set_flags): Likewise.
3742 * cpu-h8300.c (h8300_scan): Likewise.
3743 Add H8/S to bfd_h8300_arch list.
3745 Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
3747 Added support for Alpha OpenVMS:
3748 * evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
3749 * evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
3750 * config.h-vms, makefile.vms: New files.
3751 * config.bfd (alpha-*-*vms*): New target.
3752 * configure.in (evax_alpha_vec): New target vector.
3753 * configure: Rebuild.
3754 * reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
3755 (BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
3756 * targets.c (bfd_target_evax_flavour): Define.
3757 (evax_alpha_vec): Declare.
3758 (bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
3759 if BFD64 is defined.
3760 * bfd-in2.h, libbfd.h: Rebuild.
3761 * Makefile.in: Rebuild dependencies.
3762 (BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
3763 evax-emh.o, and evax-misc.o.
3764 (BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
3765 evax-etir.c, evax-emh.c, and evax-misc.c.
3766 (HFILES): Add evax.h.
3768 Tue Jun 18 13:54:18 1996 Ian Lance Taylor <ian@cygnus.com>
3770 * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
3772 (h8300_bfd_link_add_symbols): Likewise.
3774 Mon Jun 17 10:06:50 1996 Jeffrey A. Law <law@rtl.cygnus.com>
3776 * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
3777 * som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
3779 Mon Jun 17 12:49:11 1996 Ian Lance Taylor <ian@cygnus.com>
3781 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
3782 for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
3784 (mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
3785 R_MIPS_32 relocs if creating a shared library.
3787 Thu Jun 13 20:14:51 1996 Doug Evans <dje@canuck.cygnus.com>
3789 * peicode.h (add_data_entry): Use pei_section_data rather than
3790 _cooked_size. Corresponds to May 13 change in coffcode.h.
3792 Thu Jun 13 10:23:40 1996 Ian Lance Taylor <ian@cygnus.com>
3794 * cofflink.c (_bfd_coff_final_link): Handle long section names.
3795 * coffcode.h (coff_write_object_contents): If there are long
3796 section names, always set the f_symptr field, even if there are no
3798 * peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
3799 if there are no symbols.
3801 * coffgen.c (make_a_section_from_file): Check return value of
3802 _bfd_coff_read_string_table.
3803 (coff_real_object_p): Check return value of
3804 make_a_section_from_file.
3805 (_bfd_coff_read_string_table): Check that there are some symbols
3806 before trying to read the string table size.
3808 Wed Jun 12 11:16:37 1996 Ian Lance Taylor <ian@cygnus.com>
3810 * xcofflink.c (xcoff_link_add_symbols): When considering whether
3811 to replace a symbol in a dynamic object with a symbol from another
3812 dynamic object, do the replacement if the existing symbol is
3813 global linkage code.
3815 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
3816 for _ptrgl, and treat it as global linkage code.
3818 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
3819 filename or N_SO symbol past the offset, and use it to indicate
3820 that there is no line number or function when appropriate.
3822 Tue Jun 11 15:24:48 1996 Ian Lance Taylor <ian@cygnus.com>
3824 * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
3825 common symbol defined by the linker. Don't export function code
3826 even if export_defineds is set.
3828 Mon Jun 10 11:57:27 1996 Jeffrey A Law (law@cygnus.com)
3830 * coff-h8300.c (howto_table): Add new entries for R_BCC_INV
3832 (rtype2howto): Handle R_BCC_INV and R_JMP_DEL.
3833 (h8300_symbol_address_p): New function.
3834 (h8300_reloc16_estimate): Eliminate jumps made unnecessary by
3837 Sun Jun 9 16:30:20 1996 Jeffrey A Law (law@cygnus.com)
3839 * coff-h8300.c (h8300_reloc16_estimate): Fix many minor spacing
3841 (h8300_reloc16_estimate, cases R_JMP1, R_JMP2): Adjust "dot"
3842 correctly for the two variants. Allow relaxing if the target
3843 is 128 bytes away since after relaxation it'll be 126 bytes away.
3844 (h8300_reloc16_estimate, case R_PCRWORD): Correctly adjust
3845 "dot" and "value". Allow relaxing if the target is 128 bytes
3846 away since after relaxation it'll be 126 bytes away.
3847 * reloc16.c (bfd_coff_reloc16_relax_section): Keep relaxing
3848 the given section until nothing changes.
3850 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
3852 * ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
3853 alignment hack--we can get the lnnoptr info another way without
3854 suddenly increasing the alignment requirements. Set the flags for
3856 (ecoff_compute_section_file_positions): Do so.
3858 Thu Jun 6 11:24:37 1996 Ian Lance Taylor <ian@cygnus.com>
3860 * ieee.c (ieee_write_object_contents): Put a timestamp in the file
3861 to keep the HP emulator database happy.
3863 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
3864 From Kevin Buettner <kev@primenet.com>.
3866 Wed Jun 5 15:16:04 1996 Ian Lance Taylor <ian@cygnus.com>
3868 * aoutx.h (translate_to_native_sym_flags): Don't try to print the
3869 name of a NULL section.
3871 Tue Jun 4 18:53:58 1996 Ian Lance Taylor <ian@cygnus.com>
3873 * linker.c (_bfd_generic_link_add_one_symbol): If notice_all is
3874 set, always call the notice callback.
3876 * VERSION: Increment for bfdlink.h change.
3878 Mon Jun 3 11:01:53 1996 Ian Lance Taylor <ian@cygnus.com>
3880 * coff-sh.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set to 4.
3881 (sh_relax_delete_bytes): Correct handling of differently sized
3882 trailing alignment reloc.
3884 * bfd-in.h: Use #error if BFD_HOST_64_BIT can not be defined.
3885 * bfd-in2.h: Rebuild.
3886 * configure.in: Warn if there is no known 64 bit type.
3887 * configure: Rebuild.
3889 * Makefile.in: Rebuild dependencies.
3890 (BFD32_BACKENDS): Add ppcboot.o.
3891 (BFD32_BACKENDS_CFILES): Add ppcboot.c.
3893 * elf32-mips.c (mips_elf_size_dynamic_sections): Initialize c.
3894 From Per Fogelstrom <per.fogelstrom@mailbox200.swipnet.se>.
3896 Sat Jun 1 21:49:58 1996 Ian Lance Taylor <ian@cygnus.com>
3898 * elf64-mips.c (bfd_mips_elf64_swap_reginfo_in)
3899 (bfd_mips_elf64_swap_reginfo_out): Move from here...
3900 * elf32-mips.c (bfd_mips_elf64_swap_reginfo_in)
3901 (bfd_mips_elf64_swap_reginfo_out): ...to here.
3903 Fri May 31 13:51:28 1996 Ian Lance Taylor <ian@cygnus.com>
3905 * elf64-mips.c: Improve reloc special_functions and handling of
3906 SHT_MIPS_OPTIONS section.
3907 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Rename from
3908 mips_elf_hi16_reloc and make globally visible.
3909 (_bfd_mips_elf_lo16_reloc): Rename from mips_elf_lo16_reloc and
3910 make globally visible.
3911 (_bfd_mips_elf_got16_reloc): Rename from mips_elf_got16_reloc and
3912 make globally visible.
3913 (_bfd_mips_elf_gprel16_reloc): Rename from mips_elf_gprel16_reloc
3914 and make globally visible.
3915 (gprel16_with_gp): Check howto->src_mask before using value in
3917 (_bfd_mips_elf_gprel32_reloc): Rename from mips_elf_gprel32_reloc
3918 and make globally visible.
3919 (gprel32_with_gp): Check howto->src_mask before fetching value.
3920 (bfd_mips_elf_swap_options_in): New function.
3921 (bfd_mips_elf_swap_options_out): New function.
3922 (_bfd_mips_elf_set_private_flags): Rename from
3923 mips_elf_set_private_flags and make globally visible.
3924 (_bfd_mips_elf_copy_private_bfd_data): Rename from
3925 mips_elf_copy_private_bfd_data and make globally visible.
3926 (_bfd_mips_elf_merge_private_bfd_data): Rename from
3927 mips_elf_merge_private_bfd_data and make globally visible.
3928 (_bfd_mips_elf_section_from_shdr): Accept .MIPS.options as a name
3929 for a SHT_MIPS_OPTIONS section.
3930 (mips_elf32_section_from_shdr): Handle SHT_MIPS_OPTIONS section.
3931 (_bfd_mips_elf_fake_sections): Consider .MIPS.options to be the
3932 name of a SHT_MIPS_OPTIONS section.
3933 (_bfd_mips_elf_set_section_contents): New function.
3934 (mips_elf32_section_processing): Set the GP value in a
3935 SHT_MIPS_OPTIONS section.
3936 (_bfd_mips_elf_find_nearest_line): Rename from
3937 mips_elf_find_nearest_line and make globally visible.
3938 (bfd_elf32_set_section_contents): Define.
3939 * elf-bfd.h (_bfd_mips_elf_hi16_reloc): Declare.
3940 (_bfd_mips_elf_lo16_reloc): Declare.
3941 (_bfd_mips_elf_gprel16_reloc): Declare.
3942 (_bfd_mips_elf_got16_reloc): Declare.
3943 (_bfd_mips_elf_gprel32_reloc): Declare.
3944 (_bfd_mips_elf_set_private_flags): Declare.
3945 (_bfd_mips_elf_copy_private_bfd_data): Declare.
3946 (_bfd_mips_elf_merge_private_bfd_data): Declare.
3947 (_bfd_mips_elf_find_nearest_line): Declare.
3948 (_bfd_mips_elf_set_section_contents): Declare.
3950 * elf32-hppa.c (elf32_hppa_info_to_howto): Rename from
3952 (elf_info_to_howto): Define.
3953 * elf32-sparc.c (elf32_sparc_info_to_howto): Rename from
3955 (elf_info_to_howto): Define.
3956 * elf64-sparc.c (sparc64_elf_info_to_howto): Rename from
3958 (elf_info_to_howto): Define.
3960 * coff-w65.c (h8300_reloc16_estimate): Rename R_MOVB[12] to
3961 R_MOV16B[12], to match change in coff/internal.h.
3963 Thu May 30 12:38:49 1996 Ian Lance Taylor <ian@cygnus.com>
3965 * elf64-mips.c: Extensive additions to provide better support for
3966 writing files and for gas.
3967 * elf32-mips.c (_bfd_mips_elf_object_p): New function, broken out
3968 of mips_elf_object_p.
3969 (mips_elf32_object_p): Rename from mips_elf_object_p; call
3970 _bfd_mips_elf_object_p.
3971 (_bfd_mips_elf_final_write_processing): Rename from
3972 mips_elf_final_write_processing and make globally visible.
3973 (_bfd_mips_elf_fake_sections): Rename from
3974 mips_elf_fake_sections and make globally visible.
3975 (_bfd_mips_elf_section_from_bfd_section): Rename from
3976 mips_elf_section_from_bfd_section and make globally visible.
3977 (_bfd_mips_elf_section_processing): New function, broken out of
3978 mips_elf_section_processing.
3979 (mips_elf32_section_processing): Rename from
3980 mips_elf_section_processing; call
3981 _bfd_mips_elf_section_processing.
3982 (_bfd_mips_elf_symbol_processing): Rename from
3983 mips_elf_symbol_processing and make globally visible.
3984 (_bfd_mips_elf_read_ecoff_info): Rename from
3985 mips_elf_read_ecoff_info and make globally visible.
3986 (mips_elf32_ecoff_debug_swap): Rename from
3987 mips_elf_ecoff_debug_swap.
3988 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Use asymbol rather than
3989 struct symbol_cache_entry.
3990 (_bfd_elf_validate_reloc): New function, moved in from
3991 elfcode.h:validate_reloc.
3992 * elfcode.h (validate_reloc): Remove; moved into elf.c and renamed
3993 to _bfd_elf_validate_reloc. Change all callers.
3994 * elf-bfd.h (bfd_section_from_shdr): Declare.
3995 (_bfd_elf_symbol_from_bfd_symbol): Declare.
3996 (_bfd_elf_validate_reloc): Declare.
3997 (_bfd_mips_elf_object_p): Declare.
3998 (_bfd_mips_elf_fake_sections): Declare.
3999 (_bfd_mips_elf_section_from_bfd_section): Declare.
4000 (_bfd_mips_elf_section_processing): Declare.
4001 (_bfd_mips_elf_symbol_processing): Declare.
4002 (_bfd_mips_elf_read_ecoff_info): Declare.
4003 (_bfd_mips_elf_final_write_processing): Declare.
4004 * elfxx-target.h (bfd_elfNN_get_reloc_upper_bound): Don't define
4007 * elf32-mips.c (mips_elf_object_p): Handle E_MIPS_ARCH_4.
4008 (mips_elf_final_write_processing): Likewise.
4010 Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
4012 64-bit MIPS ELF ABI objdump support:
4013 * elf64-mips.c: New file.
4014 * Makefile.in: Rebuild dependencies.
4015 (BFD64_BACKENDS): Add elf64-mips.o.
4016 (BFD64_BACKENDS_CFILES): Add elf64-mips.c.
4017 * config.bfd (mips*el-*-elf*) Add bfd_elf64_bigmips_vec and
4018 bfd_elf64_littlemips_vec to targ_selvecs.
4019 (mips*-*-elf*): Likewise.
4020 * confingure.in: Add bfd_elf64_bigmips_vec and
4021 bfd_elf64_littlemips_vec to vector switch.
4022 * configure: Rebuild.
4023 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): New function,
4024 broken out of mips_elf_section_from_shdr.
4025 (mips_elf32_section_from_shdr): Rename from
4026 mips_elf_section_from_shdr. Call new function.
4027 (elf_backend_section_from_shdr): Update name of renamed function.
4028 * elf-bfd.h (struct elf_size_info): Change second parameter of
4029 write_out_phdrs to be const. Likewise for second parameter of
4031 (struct bfd_elf_section_data): Add rel_hdr2 field.
4032 (bfd_elf32_swap_symbol_in): Change second parameter to be const.
4033 (bfd_elf32_swap_symbol_out): Likewise.
4034 (bfd_elf32_swap_reloc_in): Likewise.
4035 (bfd_elf32_swap_reloc_out): Likewise.
4036 (bfd_elf32_swap_reloca_in): Likewise.
4037 (bfd_elf32_swap_reloca_out): Likewise.
4038 (bfd_elf32_swap_phdr_in): Likewise.
4039 (bfd_elf32_swap_phdr_out): Likewise.
4040 (bfd_elf32_swap_dyn_in): Likewise.
4041 (bfd_elf32_swap_dyn_out): Likewise.
4042 (bfd_elf32_slurp_symbol_table): Declare.
4043 (bfd_elf32_write_shdrs_and_ehdr): Declare.
4044 (bfd_elf32_write_out_phdrs): Declare.
4045 (bfd_elf64_swap_symbol_in): Change second parameter to be const.
4046 (bfd_elf64_swap_symbol_out): Likewise.
4047 (bfd_elf64_swap_reloc_in): Likewise.
4048 (bfd_elf64_swap_reloc_out): Likewise.
4049 (bfd_elf64_swap_reloca_in): Likewise.
4050 (bfd_elf64_swap_reloca_out): Likewise.
4051 (bfd_elf64_swap_phdr_in): Likewise.
4052 (bfd_elf64_swap_phdr_out): Likewise.
4053 (bfd_elf64_swap_dyn_in): Likewise.
4054 (bfd_elf64_swap_dyn_out): Likewise.
4055 (bfd_elf64_slurp_symbol_table): Declare.
4056 (bfd_elf64_write_shdrs_and_ehdr): Declare.
4057 (bfd_elf64_write_out_phdrs): Declare.
4058 (_bfd_mips_elf_section_from_shdr): Declare.
4059 * elf.c (bfd_section_from_shdr): Remove assertion requiring
4060 SHT_REL/SHT_RELA to match use_rela_p. If there is already a reloc
4061 section for the section, add the new one to rel_hdr2. Increment
4062 reloc_count rather than setting it.
4063 * elfcode.h (elf_slurp_symbol_table): Define name as macro.
4064 Remove static declaration.
4065 (elf_write_shdrs_and_ehdr): Define name as macro.
4066 (elf_write_out_phdrs): Likewise.
4067 (elf_swap_ehdr_in, elf_swap_ehdr_out): Declare.
4068 (elf_swap_shdr_in, elf_swap_shdr_out): Declare.
4069 (elf_swap_symbol_in): Change second parameter to be const.
4070 (elf_swap_symbol_out): Likewise.
4071 (elf_swap_ehdr_in, elf_swap_ehdr_out): Likewise.
4072 (elf_swap_shdr_in, elf_swap_shdr_out): Likewise.
4073 (elf_swap_phdr_in, elf_swap_phdr_out): Likewise.
4074 (elf_swap_reloc_in, elf_swap_reloc_out): Likewise.
4075 (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
4076 (elf_write_out_phdrs): Rename from write_out_phdrs. Change second
4077 parameter to be const. Make non-static.
4078 (elf_write_shdrs_and_ehdr): Rename from write_shdrs_and_ehdr.
4080 (elf_slurp_symbol_table): Make non-static.
4081 (NAME(_bfd_elf,size_info)): Update names of renamed functions.
4082 * elfxx-target.h (elf_info_to_howto): Define if not defined.
4083 (elf_backend_size_info): Likewise.
4084 (elfNN_bed): Use elf_backend_size_info.
4085 * targets.c (bfd_elf64_bigmips_vec): Declare.
4086 (bfd_elf64_littlemips_vec): Declare.
4087 (bfd_target_vector): Add bfd_elf64_bigmips_vec and
4088 bfd_elf64_littlemips_vec if BFD64 is defined.
4090 * libbfd.c (bfd_get_file_window): Add cast to fprintf argument.
4092 Tue May 28 11:42:08 1996 Ian Lance Taylor <ian@cygnus.com>
4094 * coff-sh.c (sh_relax_delete_bytes): Insert nop instructions, not
4095 zeroes, in alignment holes.
4097 * configure: Rebuild with autoconf 2.10.
4099 * aoutx.h (NAME(aout,find_nearest_line)): Make room for the
4100 potential leading underscore in the allocated buffer.
4102 Fri May 24 14:28:38 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4104 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common
4105 symbols into .sbss if this is a relocatable link.
4107 Thu May 23 12:26:24 1996 Ian Lance Taylor <ian@cygnus.com>
4109 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about
4110 undefined symbols when creating a shared library.
4112 Fri May 17 13:54:15 1996 Ian Lance Taylor <ian@cygnus.com>
4114 * coff-sh.c: Add a bunch of new code and static const arrays to
4115 support aligning loads and stores on four byte memory boundaries.
4117 (sh_coff_howtos): Add entries for R_SH_CODE, R_SH_DATA and
4119 (sh_relax_section): Look for R_SH_CODE relocs. If we find one,
4120 call sh_align_loads.
4121 (sh_relax_delete_bytes): Don't mark R_SH_CODE or R_SH_DATA relocs
4124 Thu May 16 16:34:13 1996 Ian Lance Taylor <ian@cygnus.com>
4126 * cache.c (bfd_open_file): Unlink the file before opening it for
4127 write. From Marty Leisner <leisner@sdsp.mc.xerox.com>.
4129 * opncls.c (bfd_fdopenr): Set opened_once.
4131 Tue May 14 12:35:32 1996 Ian Lance Taylor <ian@cygnus.com>
4133 * som.c (som_slurp_reloc_table): Clear external_relocs cache after
4136 * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
4137 the code unconditionally.
4139 Mon May 13 19:51:37 1996 Ian Lance Taylor <ian@cygnus.com>
4141 * libcoff-in.h (struct pei_section_tdata): Define structure.
4142 (pei_section_data): Define macro.
4143 * libcoff.h: Rebuild.
4144 * coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
4145 store s_paddr field in pei_section_data.
4146 (coff_compute_section_file_positions): Use pei_section_data rather
4147 than _cooked_size, and don't overwrite an existing value.
4148 (coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
4149 0. If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
4150 * peicode.h (coff_bfd_copy_private_section_data): Define if
4152 (pe_bfd_copy_private_section_data): New static function if
4155 Wed May 8 16:10:38 1996 Ian Lance Taylor <ian@cygnus.com>
4157 * srec.c (srec_set_arch_mach): Write as a function rather than a
4160 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
4161 no map, just check each member in turn to see whether it is
4164 Wed May 8 09:17:34 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4166 * ppcboot.c (ppcboot_object_p): Check for type 0x41 in partition
4167 table. Call BFD_ASSERT to validate header size, instead of
4169 (ppcboot_bfd_print_private_bfd_data): Put quotes around partition
4172 Tue May 7 16:10:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4174 * ppcboot.c: New target for looking at PPCbug boot records.
4176 * config{ure.in,.bfd}: Add support for ppcboot target.
4178 * configure: Regenerate.
4180 Tue May 7 11:15:19 1996 Jeffrey A Law (law@cygnus.com)
4182 * coff-h8300.c (howto_table): Update names to match recent
4183 changes to include/coff/internal.h. Fix minor errors in the
4184 existing relocs. Add R_MOVL1 and R_MOVL2.
4185 (rtype2howto): Similarly.
4186 (h8300_reloc16_estimate): Rewrite to simplify, fix bugs in the
4187 existing relaxing code and peform more relaxing.
4188 (h8300_reloc16_extra_cases): Likewise.
4190 Mon May 6 18:24:09 1996 Jeffrey A Law (law@cygnus.com)
4192 * reloc16.c (bfd_coff_reloc16_get_value): Handle common
4195 Sat May 4 05:08:45 1996 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
4197 * elfcode.h (elf_object_p): Reject generic ELF target if
4198 e_machine matches an alternate machine code in a specific backend.
4200 * netbsd-core.c (netbsd_core_vec): Remove initializer for
4201 obsolete align_power_min field.
4203 Fri May 3 13:07:35 1996 Jeffrey A Law (law@cygnus.com)
4205 * coff-h8300.c (reloc_howto_type): Add howto entry for
4207 (rtype2howto): Handle R_PCRWORD_B.
4208 (h8300_reloc16_extra_cases): Handle R_PCRWORD_B.
4209 (h8300_reloc_16_estimate): Likewise. Try to turn a 16bit
4210 pc-relative branch (R_PCRWORD) into an 8bit pc-relative
4211 branch (R_PCWORD_B).
4213 Fri May 3 10:47:41 1996 Ian Lance Taylor <ian@cygnus.com>
4215 * aoutx.h (translate_from_native_sym_flags): Set the section for
4216 BSF_CONSTRUCTOR symbols.
4218 * cofflink.c (_bfd_coff_link_input_bfd): Correct setting of
4221 Wed May 1 18:39:32 1996 Doug Evans <dje@canuck.cygnus.com>
4223 * coffcode.h (coff_write_object_contents): In comdat section lookup,
4224 stop looking when section is found.
4226 Wed May 1 14:17:57 1996 Ian Lance Taylor <ian@cygnus.com>
4228 * coffcode.h (STRING_SIZE_SIZE): Define.
4229 (styp_to_sec_flags): Handle long symbol names when looking for the
4231 (bfd_coff_backend_data): Add _bfd_coff_long_section_names field.
4232 (bfd_coff_long_section_names): Define.
4233 (coff_write_object_contents): Handle long section names.
4234 (bfd_coff_std_swap_table): Initialize new field.
4235 * libcoff.h: Rebuild.
4236 * coffgen.c (make_a_section_from_file): Handle long section
4238 (coff_write_symbols): Handle long section names.
4239 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
4240 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4241 * pe-arm.c (COFF_LONG_SECTION_NAMES): Define.
4242 * pei-arm.c (COFF_LONG_SECTION_NAMES): Define.
4243 * pe-i386.c (COFF_LONG_SECTION_NAMES): Define.
4244 * pei-i386.c (COFF_LONG_SECTION_NAMES): Define.
4245 * pe-ppc.c (COFF_LONG_SECTION_NAMES): Define.
4246 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Define.
4248 * bout.c (b_out_callback): Set lma of sections.
4249 (b_out_bfd_get_relocated_section_contents): Rename in_abfd
4250 parameter to output_bfd. Used input_bfd instead of output_bfd in
4253 Tue Apr 30 17:56:39 1996 Ian Lance Taylor <ian@cygnus.com>
4255 * aoutx.h (translate_from_native_sym_flags): Don't create
4256 SEC_CONSTRUCTOR sections.
4257 * ecoff.c (ecoff_set_symbol_info): Likewise.
4259 * elf32-mips.c (mips_elf_copy_private_bfd_data): Copy elf_gp.
4260 From Don Bowman <bowman@waterloo.hp.com>.
4262 Tue Apr 30 17:06:32 1996 Doug Evans <dje@canuck.cygnus.com>
4264 * coff-arm.c (armcoff_little_vec): If COFF_WITH_PE is defined, add
4265 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
4267 Mon Apr 29 13:15:17 1996 Ian Lance Taylor <ian@cygnus.com>
4269 * elf32-mips.c (struct mips_elf_link_hash_entry): Add
4270 mips_32_relocs field.
4271 (mips_elf_link_hash_newfunc): Initialize mips_32_relocs field.
4272 (mips_elf_relocate_section): Copy R_MIPS_REL32 and R_MIPS_32
4273 relocs against a global symbol which is not defined in a regular
4275 (mips_elf_check_relocs): For a R_MIPS_REL32 or R_MIPS_32 reloc
4276 against a global symbol, increment mips_32_relocs.
4277 (mips_elf_adjust_dynamic_symbol): If mips_32_relocs is set, and
4278 the symbol is not defined in a regular file, make room in the
4281 Fri Apr 26 18:00:37 1996 Ian Lance Taylor <ian@cygnus.com>
4283 * ecoff.c (ecoff_compute_section_file_positions): Track the real
4284 file position and the virtual file position separately. Set
4285 filepos information bsaed on the real file position.
4286 (_bfd_ecoff_set_section_contents): Handle .lib sections like the
4287 Jan 23 change to coffcode.h.
4289 * som.c (som_slurp_symbol_table): Set the symbol count to the
4290 number of BFD symbols created.
4292 Fri Apr 26 12:34:29 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4294 * elf32-ppc.c (ppc_elf_check_relocs): Forward relocations to the
4295 output file if linking shared objects. Loop to check all relocs,
4296 rather than returning false on first error.
4298 Thu Apr 25 13:25:12 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4300 * elf32-ppc.c (ppc_elf_create_linker_section): Add PLT case.
4301 (ppc_elf_additional_program_headers): If .interp section, bump #
4302 of program headers by 1.
4303 (ppc_elf_adjust_dynamic_symbol): Flesh out support.
4304 (ppc_elf_size_dynamic_sections): Add support for .plt section.
4305 (ppc_elf_check_relocs): Print out filename in debug code. Enable
4307 (ppc_elf_finish_dynamic_symbol): Add support for PLT's, beef up
4309 (ppc_elf_relocate_section): If the output section isn't defined,
4310 don't abort, just give an error message.
4312 * elflink.c (_bfd_elf_create_dynamic_sections): If the section
4313 being created is .sdata or .sdata2, don't make the symbol dynamic.
4315 Wed Apr 24 14:04:07 1996 Ian Lance Taylor <ian@cygnus.com>
4317 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through the
4318 members of an archive for dynamic objects with no symbols, and
4319 pass them directly to check_archive_element.
4320 (xcoff_link_check_ar_symbols): Pass dynamic objects to
4321 xcoff_link_check_dynamic_ar_symbols.
4322 (xcoff_link_check_dynamic_ar_symbols): New static function.
4324 * coff-rs6000.c (rs6000coff_vec): Change BFD_JUMP_TABLE_DYNAMIC
4325 from _bfd_nodynamic to _bfd_xcoff.
4326 * libcoff-in.h (_bfd_xcoff_get_dynamic_symtab_upper_bound):
4328 (_bfd_xcoff_canonicalize_dynamic_symtab): Declare.
4329 (_bfd_xcoff_get_dynamic_reloc_upper_bound): Declare.
4330 (_bfd_xcoff_canonicalize_dynamic_reloc): Declare.
4331 * libcoff.h: Rebuild.
4332 * xcofflink.c (xcoff_swap_ldrel_in): New static function.
4333 (xcoff_get_section_contents): New static function.
4334 (_bfd_xcoff_get_dynamic_symtab_upper_bound): New function.
4335 (_bfd_xcoff_canonicalize_dynamic_symtab): New function.
4336 (_bfd_xcoff_get_dynamic_reloc_upper_bound): New function.
4337 (xcoff_dynamic_reloc): New static variable.
4338 (_bfd_xcoff_canonicalize_dynamic_reloc): New function.
4339 (xcoff_link_add_dynamic_symbols): Use xcoff_get_section_contents.
4341 Tue Apr 23 12:48:42 1996 Ian Lance Taylor <ian@cygnus.com>
4343 * coff-sparc.c (bfd_coff_generic_reloc): Return bfd_reloc_ok even
4344 if reloc_entry->addend is not 0.
4345 (CALC_ADDEND): Just set the addend to reloc.r_offset.
4347 Mon Apr 22 18:29:01 1996 Doug Evans <dje@canuck.cygnus.com>
4349 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix spelling of
4351 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4352 Add entries for R_SPARC_[56].
4353 (sparc_reloc_map): Add entries for R_SPARC_[56].
4355 Mon Apr 22 15:07:24 1996 Ian Lance Taylor <ian@cygnus.com>
4357 Optimize linking of stabs in sections as used in ELF and COFF.
4358 * stabs.c: New file.
4359 * libbfd-in.h (_bfd_link_section_stabs): Declare.
4360 (_bfd_write_section_stabs): Declare.
4361 (_bfd_write_stab_strings): Declare.
4362 * libbfd.h: Rebuild.
4363 * libcoff-in.h (struct coff_section_tdata): Add stab_info field.
4364 (struct coff_link_hash_table): Add stab_info field.
4365 * libcoff.h: Rebuild.
4366 * cofflink.c (_bfd_coff_link_hash_table_init): Initialize
4368 (coff_link_add_symbols): Call _bfd_link_section_stabs if
4370 (_bfd_coff_final_link): Write out stab strings hash table.
4371 (_bfd_coff_link_input_bfd): Handle optimized stabs sections.
4372 * coff-ppc.c (ppc_bfd_coff_final_link): Write out stab strings
4374 * elf-bfd.h (struct elf_link_hash_table): Add stab_info field.
4375 (struct bfd_elf_section_data): Add stab_info field.
4376 * elf.c (_bfd_elf_link_hash_table_init): Initialize stab_info
4378 * elflink.h (elf_link_add_object_symbols): If appropriate, call
4379 _bfd_link_section_stabs.
4380 (elf_bfd_final_link): Write out stab strings hash table.
4381 (elf_link_input_bfd): Handle optimized stabs sections.
4382 * reloc.c (_bfd_final_link_relocate): Check address against
4383 _raw_size rather than _cooked_size.
4384 * Makefile.in: Rebuild dependencies.
4385 (BFD_LIBS): Add stabs.o
4386 (BFD_LIBS_CFILES): Add stabs.c.
4388 * VERSION: Increment for bfdlink.h change.
4390 * coffgen.c (coff_renumber_symbols): Correct handling of
4391 BSF_NOT_AT_END common symbols.
4393 Fri Apr 19 19:21:56 1996 Ian Lance Taylor <ian@cygnus.com>
4395 * coff-ppc.c (record_toc): Add cast to avoid warning.
4396 (ppc_allocate_toc_section): Likewise.
4397 (coff_ppc_relocate_section): Remove ANSI C string concatenation.
4398 (ppc_coff_reloc_type_lookup): Remove unreached code.
4399 * coffcode.h (coff_write_object_contents): Don't take the address
4401 * peicode.h (pe_print_idata): Add casts to avoid warning.
4402 (pe_print_edata): Likewise.
4403 (pe_print_reloc): Remove ANSI C string concatenation.
4405 Thu Apr 18 18:51:18 1996 Ian Lance Taylor <ian@cygnus.com>
4407 * libcoff-in.h (struct coff_final_link_info): Add last_bf_index
4409 * libcoff.h: Rebuild.
4410 * coffswap.h (coff_swap_aux_in): Swap endndx field for C_FCN
4412 (coff_swap_aux_out): Likewise.
4413 * peicode.h (coff_swap_aux_in): Likewise.
4414 (coff_swap_aux_out): Likewise.
4415 * coffgen.c (coff_pointerize_aux): Check endndx field for C_FCN
4417 * cofflink.c (_bfd_coff_final_link): Initialize last_bf_index
4419 (_bfd_coff_link_input_bfd): Check endndx field for C_FCN symbols.
4420 Fix up .bf endndx link fields.
4421 * coff-ppc.c (ppc_bfd_coff_final_link): Initialize last_bf_index
4423 * xcofflink.c (xcoff_link_input_bfd): Check endndx field for C_FCN
4426 Wed Apr 17 12:08:24 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4428 * pe{,i}-ppc.c (PPC_PE): Define instead of PPC, so that compiling
4429 on Solaris PowerPC systems doesn't get confused.
4431 * ccffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
4434 * elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
4435 (elf_corefile_note): If HAVE_SYS_PROCFS_H is not defined, don't
4436 update did_reg and did_reg2.
4438 Wed Apr 17 13:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
4440 * xcofflink.c (xcoff_link_input_bfd): Check for TOC overflow.
4442 * linker.c (_bfd_generic_link_add_one_symbol): When calling the
4443 callback routines, pass h->root.string rather than name, in case
4444 copy is true and name is transient.
4446 Tue Apr 16 16:36:38 1996 Stu Grossman (grossman@lisa.cygnus.com)
4448 * elfcore.h: Add support for core files with multiple threads.
4449 (Primarily for Solaris.)
4451 Tue Apr 16 13:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
4453 * aoutx.h (NAME(aout,squirt_out_relocs)): Don't do anything if
4454 section->orelocation is NULL.
4456 * coffgen.c (bfd_coff_get_syment): New function.
4457 (bfd_coff_get_auxent): New function.
4458 * bfd-in.h (bfd_coff_get_syment): Declare.
4459 (bfd_coff_get_auxent): Declare.
4460 * bfd-in2.h: Rebuild.
4462 Mon Apr 15 19:06:59 1996 Ian Lance Taylor <ian@cygnus.com>
4464 * elf32-mips.c (struct mips_hi16): Define.
4465 (mips_hi16_addr, mips_hi16_addend): Remove.
4466 (mips_hi16_list): New static variable.
4467 (mips_elf_hi16_reloc): Maintain a list of unmatched HI16 relocs.
4468 (mips_elf_lo16_reloc): Process mips_hi16_list.
4469 (mips_elf_relocate_section): Permit an arbitrary number of HI16
4470 relocs before the associated LO16 reloc.
4472 Wed Apr 10 00:23:53 1996 Ian Lance Taylor <ian@cygnus.com>
4474 * versados.c (versados_scan): Check bfd_alloc return value.
4475 (versados_object_p): Check all bfd_read return values. Require
4476 that lang field be less than 10, to avoid confusion with Intel Hex
4479 * libaout.h (WRITE_HEADERS): Write out the relocs even if there
4481 * aoutx.h (NAME(aout,swap_std_reloc_out)): Set r_index to N_ABS,
4482 not 0, for an absolute symbol.
4483 (NAME(aout,swap_ext_reloc_out)): Likewise.
4485 * ihex.c (ihex_scan): Accept a length of 4 for record type 5.
4486 (ihex_write_object_contents): For a large start address, output
4487 the full 32 bit address in record type 5.
4489 * ieee.c (ieee_write_byte): Change second parameter from bfd_byte
4490 to int to avoid promotion problems in prototype.
4492 Tue Apr 9 11:44:21 1996 Ian Lance Taylor <ian@cygnus.com>
4494 * configure.host: Use ${srcdir} when looking for picfrag.
4496 * configure.host: Switch on ${libdir}, not $(libdir). From
4497 alan@spri.levels.unisa.edu.au (Alan Modra).
4499 * aoutx.h (aout_link_add_symbols): Always call add_dynamic_symbols
4500 entry point, not just for DYNAMIC objects.
4501 * sunos.c (sunos_add_dynamic_symbols): Always call
4502 sunos_create_dynamic_sections. If called with a non DYNAMIC
4503 object, don't do anything else.
4504 (sunos_add_one_symbol): Don't call sunos_create_dynamic_sections.
4506 Mon Apr 8 12:09:36 1996 Ian Lance Taylor <ian@cygnus.com>
4508 * configure.in: Permit --enable-shared to specify a list of
4510 * configure: Rebuild.
4512 * configure.host: Set HLDFLAGS and SHLIB_CFLAGS for *-dec-osf*
4513 host when configuring with --enable-shard.
4515 Fri Apr 5 12:24:13 1996 Ian Lance Taylor <ian@cygnus.com>
4517 * config.bfd: Add i[345]86-*-freebsdelf* target; from John Polstra
4520 * linker.c (link_action): For WARN_ROW/warn, use MWARN, not CYCLE,
4521 to avoid crashing in bfd_hash_replace.
4523 * sysdep.h: Use #ifdef, not #if.
4525 Thu Apr 4 23:32:23 1996 Ian Lance Taylor <ian@cygnus.com>
4527 * config.in: Rebuild.
4529 Thu Apr 4 18:49:09 1996 Fred Fish <fnf@cygnus.com>
4531 * configure.in (mips-sony-bsd*): Fix typo in AC_DEFINE.
4532 (AC_CHECK_HEADERS): Check for sys/time.h
4533 (AC_HEADER_TIME): Add macro.
4534 * configure: Rebuild.
4535 * sysdep.h: Use TIME_WITH_SYS_TIME and HAVE_SYS_TIME_H
4536 to control what combination of <time> and <sys/time.h>
4539 Tue Apr 2 13:11:53 1996 Doug Evans <dje@canuck.cygnus.com>
4541 * aoutf1.h (sunos_32_set_arch_mach): Handle M_SPARCLET.
4542 (aout_32_sunos4_write_object_contents): Likewise.
4543 * aoutx.h (NAME(aout,machine_type)): Handle
4544 bfd_mach_sparc_{sparclet,sparclite}.
4545 * archures.c (bfd_mach_sparc_{sparclet,sparclite}): Define.
4546 (bfd_mach_sparc_v9_p): Update.
4547 * cpu-sparc.c (arch_info_struct): Add entries for sparclet,sparclite.
4548 * libaout.h (enum machine_type): Add M_SPARCLET.
4549 * sunos.c (MACHTYPE_OK): Define.
4550 * bfd-in2.h: Regenerated.
4552 Tue Apr 2 00:33:18 1996 Ian Lance Taylor <ian@cygnus.com>
4554 * elf-bfd.h (struct elf_link_hash_table): Add hgot field.
4555 * elf.c (_bfd_elf_link_hash_table_init): Initialize hgot field.
4556 * elflink.c (_bfd_elf_create_got_section): Store the
4557 _GLOBAL_OFFSET_TABLE_ hash table entry in the hgot field.
4558 * elf32-sparc.c (elf32_sparc_check_relocs): If the size of the
4559 global offset table goes over 0x1000, set the value of
4560 _GLOBAL_OFFSET_TABLE_ to 0x1000 into the section.
4561 (elf32_sparc_relocate_section): Subtract the offset of
4562 _GLOBAL_OFFSET_TABLE_ when handling GOT relocations.
4564 * elfcode.h: Don't include <string.h>.
4566 Mon Apr 1 10:39:24 1996 Jeffrey A Law (law@cygnus.com)
4568 * linker.c (_bfd_generic_link_hash_newfunc): Renamed from
4569 generic_link_hash_newfunc. All references changed.
4570 * genlink.h (_bfd_generic_link_hash_newfunc): Declaration
4571 moved here from libbfd-in.h.
4572 * libbfd-in.h: Corresponding changes.
4573 * libbfd.h: Regenerated.
4575 Mon Apr 1 12:35:36 1996 Ian Lance Taylor <ian@cygnus.com>
4577 * aoutx.h (aout_link_input_section_std): When reporting an
4578 overflow error, use the name of the symbol in the hash table if
4580 (aout_link_input_section_ext): Likewise.
4582 * elflink.h (elf_adjust_dynamic_symbol): If a common symbol got
4583 defined in a regular file, set ELF_LINK_HASH_DEF_REGULAR.
4585 Sun Mar 31 01:58:41 1996 steve chamberlain <sac@slash.cygnus.com>
4587 * peicode.h (coff_swap_aouthdr_out): Delete test for .junk.
4588 * coffcode.h (coff_compute_section_file_positions): Likewise.
4589 (coff_write_object_contents): Likewise.
4591 Fri Mar 29 12:44:36 1996 Ian Lance Taylor <ian@cygnus.com>
4593 * section.c (SEC_LINK_ONCE): Define.
4594 (SEC_LINK_DUPLICATES): Define.
4595 (SEC_LINK_DUPLICATES_DISCARD): Define.
4596 (SEC_LINK_DUPLICATES_ONE_ONLY): Define.
4597 (SEC_LINK_DUPLICATES_SAME_SIZE): Define.
4598 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Define.
4599 * bfd-in2.h: Rebuild.
4600 * coffcode.h (sec_to_styp_flags): If COFF_WITH_PE, turn
4601 SEC_LINK_ONCE into IMAGE_SCN_LNK_COMDAT.
4602 (styp_to_sec_flags): If COFF_WITH_PE, turn IMAGE_SCN_LNK_REMOVE
4603 into SEC_EXCLUDE. If IMAGE_SCN_LNK_COMDAT is set, set
4604 SEC_LINK_ONCE, and look through the symbol table for the setting
4605 for SEC_LINK_DUPLICATES.
4606 (coff_write_object_contents): If COFF_WITH_PE, if SEC_LINK_ONCE is
4607 set for a section, find the section symbol in the symbol table,
4608 and set the aux entry based on SEC_LINK_DUPLICATES.
4609 * coffgen.c (coff_print_symbol): Add a space before "checksum".
4610 * coff-arm.c (armcoff_big_vec): If COFF_WITH_PE is defined, add
4611 SEC_LINK_ONCE and SEC_LINK_DUPLICATES to section_flags.
4612 * coff-i386.c (i386coff_vec): Likewise.
4613 * coff-ppc.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
4615 * VERSION: Bump to 2.6.1.
4616 * Makefile.in (stamp-h): Depend upon VERSION.
4618 Thu Mar 28 23:48:49 1996 Jeffrey A Law (law@cygnus.com)
4620 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.
4621 * libbfd.h: Rebuilt.
4622 * linker.c (generic_link_hash_newfunc): No longer static.
4623 * coffcode.h (coff_bfd_link_hash_create): Allow specific targets
4625 * coff-h8300.c: Add two derived hash tables and their associated
4626 funtions and #defines for use by the h8300 linker.
4627 (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in
4628 the function vector as needed. Place the address of the function
4629 vector entry in the location specified by the R_MEM_INDIRECT reloc.
4630 Rewrite the vectors section contents as necessary.
4631 (h8300_bfd_link_add_symbols): New function for the h8300 linker.
4632 (coff_bfd_link_add_symbols): Define to use h8300 specific version.
4633 (coff_bfd_link_hash_table_create): Likewise.
4635 Thu Mar 28 17:44:08 1996 Ian Lance Taylor <ian@cygnus.com>
4637 * libhppa.h: If gcc 2.7 or higher, declare all the functions with
4638 __attribute__ ((__unused__)) so that -Wall doesn't warn about
4640 (hppa_rebuild_insn): Pass pointer to correct type to
4641 low_sign_unext and dis_assemble_21.
4643 Thu Mar 28 11:00:36 1996 Doug Evans <dje@canuck.cygnus.com>
4645 * config.bfd (sparc64-{sysv4*,solaris2*}): Delete.
4646 Stick with sparc-*-{sysv4*,solaris2*}.
4648 Wed Mar 27 10:43:34 1996 Ian Lance Taylor <ian@cygnus.com>
4650 * peicode.h (coff_swap_aux_in): Swap in extra PE x_scn fields.
4651 (coff_swap_aux_out): Swap out extra PE x_scn fields.
4652 * coffswap.h (coff_swap_aux_in): Zero out extra PE x_scn fields.
4653 * coffgen.c (coff_print_symbol): If any of the extra PE x_scn
4654 fields is non-zero, print them.
4656 * coff-ppc.c (ppc_record_toc_entry): Put inside COFF_IMAGE_WITH_PE
4657 ifdef. Remove unused variables.
4658 (ppc_record_data_in_toc_entry): Ifdef out. Removed unused
4660 (ppc_mark_symbol_as_glue): Put inside COFF_IMAGE_WITH_PE ifdef.
4661 (get_symbol_value): Ifdef out.
4662 (pe_ppc_reloc): Ifdef out. Remove unused variables.
4663 (coff_ppc_relocate_section): Remove unused variables. Make
4664 fprintf strings and argument types correspond. Put before_addr in
4666 (dump_toc): Make fprintf strings and argument types correspond.
4667 (ppc_process_before_allocation): Remove unused variables. Always
4669 (ppc_reflo_reloc): Ifdef out.
4670 (ppc_addr32nb_reloc): Ifdef out.
4671 (ppc_coff_rtype2howto): Make fprintf strings and argument types
4673 (coff_ppc_rtype_to_howto): Likewise.
4674 (ppc_coff_swap_sym_in_hook): Remove unused variables.
4676 * peicode.h (pe_print_idata): Move otherwise unused variables into
4677 the #ifdef where they are used. Always return a value.
4678 (pe_print_edata): Make fprintf strings and argument types
4679 correspond. Always return a value.
4680 (pe_print_pdata): Removed unused variable addr_value. Always
4682 (pe_print_reloc): Remove unused variable onaline. Make fprintf
4683 strings and argument types correspond. Always return a value.
4685 * elf32-ppc.c (ppc_elf_fake_sections): Return true.
4686 (ppc_elf_finish_dynamic_symbol): Move definition of unused
4687 variable rela inside #if 0 section where it is used.
4689 * ns32k.h: New file.
4690 * cpu-ns32k.h: Include ns32k.h. Rename externally visible
4691 functions to start with _bfd_.
4692 * aout-ns32k.c: Include ns32k.h. Change references to renamed
4693 functions in cpu-ns32k.h.
4694 * Makefile.in: Rebuild dependencies.
4695 (HFILES): Add ns32k.h.
4697 * section.c (struct sec): Add linker_mark field. Change
4698 user_set_vma and reloc_done to be single bit fields.
4699 (STD_SECTION): Update accordingly.
4700 * bfd-in2.h: Rebuild.
4701 * aoutx.h (NAME(aout,final_link)): Mark sections included in the
4703 (aout_link_input_bfd): Don't link unmarked sections.
4704 * cofflink.c (_bfd_coff_final_link): Mark sections included in the
4706 (_bfd_coff_link_input_bfd): Don't link unmarked sections.
4707 * coff-ppc.c (ppc_bfd_coff_final_link): Mark sections included in
4709 * elflink.h (elf_bfd_final_link): Mark sections included in the
4711 (elf_link_input_bfd): Don't link unmarked sections.
4712 * xcofflink.c (_bfd_xcoff_bfd_final_link): Mark sections included
4714 (xcoff_link_input_bfd): Don't link unmarked sections.
4716 * coffswap.h (coff_swap_scnhdr_out): Include section name in
4717 overflow error messages.
4719 Tue Mar 26 15:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
4721 * bfd.c (_bfd_default_error_handler): If _bfd_error_program_name
4722 is not set, print "BFD: " before the error message.
4724 * configure.in: Use AC_CHECK_TOOL to find ar and ranlib. From
4725 Miles Bader <miles@gnu.ai.mit.edu>.
4726 * configure: Rebuild.
4728 Fri Mar 22 12:17:00 1996 Ian Lance Taylor <ian@cygnus.com>
4730 * xcofflink.c (xcoff_link_input_bfd): Fix scan for C_BINCL/C_EINCL
4733 * config.bfd: Add ieee_vec to targ_selvecs for i960 targets and
4734 m68k-aout, m68k-coff, and m68k-elf targets.
4736 Fri Mar 22 11:33:44 1996 Martin Anantharaman <martin@goofy.imech.uni-duisburg.de>
4738 * ieee.c: Changed #ifdef KEEPMINUSPCININST to #if KEEPMINUSPCININST.
4739 (ieee_generic_stat_arch_elt): Restructured to prevent
4740 ieee_object_p from being called repeatedly.
4742 Thu Mar 21 11:00:47 1996 steve chamberlain <sac@slash.cygnus.com>
4744 * coffcode.h (coff_write_object_contents): Allocate
4745 buffers large enough for any FILEHDR or AOUTHDR.
4747 Thu Mar 21 16:28:17 1996 David Mosberger-Tang <davidm@azstarnet.com>
4749 * ecofflink.c (lookup_line): New static function, renamed and
4750 slighly changed from old _bfd_ecoff_locate_line.
4751 (_bfd_ecoff_locate_line): Cache line number information. Use
4752 lookup_line for actual lookup.
4754 Thu Mar 21 14:59:11 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4756 * peicode.h (pe_print_pdata): Warn if the .pdata section is not a
4757 multiple of 20 bytes.
4759 Thu Mar 21 13:54:40 1996 Ian Lance Taylor <ian@cygnus.com>
4761 * ecoff.c (_bfd_ecoff_find_nearest_line): Use bfd_zalloc to
4762 allocate ecoff_find_line, and don't initialize by hand.
4763 * elf32-mips.c (mips_elf_find_nearest_line): Use bfd_zalloc for
4764 mips_elf_find_line, and don't call memset.
4766 * coffcode.h (coff_compute_section_file_positions): If not
4767 producing a final executable, don't consider sofar when aligning
4768 the section to the correct size.
4770 Wed Mar 20 16:53:12 1996 Ian Lance Taylor <ian@cygnus.com>
4772 * coffcode.h (coff_add_missing_symbols): Ifdef out.
4773 (coff_write_object_contents): Don't call coff_add_missing_symbols.
4774 * coffgen.c (coff_section_symbol): Ifdef out.
4776 Mon Mar 18 12:54:41 1996 Ian Lance Taylor <ian@cygnus.com>
4778 * elf32-mips.c (mips_elf_gprel32_reloc): Initialize gp if
4779 output_bfd is not NULL.
4781 Thu Mar 14 17:12:06 1996 Doug Evans <dje@charmed.cygnus.com>
4783 * coffgen.c (coff_get_normalized_symtab): Call bfd_zalloc instead
4784 of bfd_alloc (fixes fix_line not being initialized).
4785 Delete zeroing of fix_{value,tag,end,scnlen} fields.
4787 Thu Mar 14 16:06:06 1996 Jeffrey A Law (law@cygnus.com)
4789 * coffcode.h: Allow specific backends to override the
4790 bfd_link_add_symbols routine.
4792 * coff-h8300.c: Include genlink.h.
4793 (howto_table): Add R_MEM_INDIRECT.
4794 (rtype2howto): Support R_MEM_INDIRECT.
4795 (h8300_reloc16_extra_cases): Handle R_MEM_INDIRECT like R_RELBYTE
4798 Tue Mar 12 12:41:17 1996 David Mosberger-Tang <davidm@koala.azstarnet.com>
4800 * coff-alpha.c (alpha_relocate_section): Use
4801 info->callbacks_warning, rather than _bfd_error_handler, for
4802 "multiple gp" warning.
4804 Tue Mar 12 12:10:55 1996 Ian Lance Taylor <ian@cygnus.com>
4806 * linker.c (bfd_wrapped_link_hash_lookup): New function.
4807 (_bfd_generic_link_add_one_symbol): Remove BFD_ASSERT on hash
4808 table string. Use bfd_wrapped_link_hash_lookup.
4809 (_bfd_generic_link_write_global_symbol): Remove BFD_ASSERT on hash
4811 * aoutx.h (aout_link_write_symbols): Use the name from the hash
4812 table, if any, when writing out symbols.
4813 (aout_link_input_section_std): Use the name from the hash table,
4814 if any, when reporting undefined symbols.
4815 (aout_link_input_section_ext): Likewise.
4816 (aout_link_reloc_link_order): Use bfd_wrapped_link_hash_lookup.
4817 * bout.c (get_value): Likewise.
4818 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4819 * ecoff.c (ecoff_reloc_link_order): Likewise.
4820 * elflink.h (elf_link_add_object_symbols): Likewise.
4821 (elf_reloc_link_order): Likewise.
4822 * linker.c (_bfd_generic_link_output_symbols): Likewise.
4823 (_bfd_generic_reloc_link_order): Likewise.
4824 (default_indirect_link_order): Likewise.
4825 * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
4826 * sunos.c (sunos_add_one_symbol): Likewise.
4827 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4828 (bfd_xcoff_link_count_reloc): Likewise.
4829 (xcoff_reloc_link_order): Likewise.
4831 * ecoffswap.h (ecoff_swap_fdr_in): If ECOFF_64, turn 0xffffffff
4832 into -1 for intern->rss.
4834 * configure: Rebuild with autoconf 2.8.
4836 Mon Mar 11 12:28:31 1996 Ian Lance Taylor <ian@cygnus.com>
4838 * stab-syms.c (__define_stab_duplicate): Define.
4839 (bfd_get_stab_name): Rename from aout_stab_name. Rewrite to use a
4841 * bfd-in.h (bfd_get_stab_name): Declare.
4842 * bfd-in2.h: Rebuild.
4843 * Makefile.in: Rebuild dependencies.
4844 (BFD_LIBS): Add stab-syms.o.
4845 (BFD_LIBS_CFILES): Add stab-syms.c.
4846 (BFD32_BACKENDS): Remove stab-syms.o.
4847 (BFD32_BACKENDS_CFILES): Remove stab-syms.c.
4848 * configure.in: Don't list stab-syms.o in bfd_backends.
4849 * configure: Rebuild.
4850 * libaout.h (aout_stab_name): Don't declare.
4851 * aoutx.h (NAME(aout,get_symbol_info)): Call bfd_get_stab_name,
4854 Fri Mar 8 11:26:20 1996 Ian Lance Taylor <ian@cygnus.com>
4856 * elf.c (assign_file_positions_for_segments): Adjust file offset
4857 for section alignment even if SEC_LOAD is not set.
4859 Tue Mar 5 12:02:23 1996 Ian Lance Taylor <ian@cygnus.com>
4861 * configure.in: Don't set SHLIB or SHLINK to an empty string,
4862 since they appear as targets in Makefile.in.
4863 * configure: Rebuild.
4865 * sunos.c (sunos_scan_ext_relocs): If not making a shared library,
4866 don't fiddle with a symbol which is not defined anywhere.
4868 Mon Mar 4 12:49:16 1996 Ian Lance Taylor <ian@cygnus.com>
4870 * xcofflink.c (xcoff_mark): Treat undefined imported symbols as
4871 though they are defined in a shared library.
4872 (xcoff_build_ldsyms): Likewise.
4874 * coffgen.c (coff_find_nearest_line): Don't look at the line
4875 numbers for the section if section->lineno is NULL.
4877 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Print a useful error
4878 message rather than calling BFD_ASSERT.
4879 * elfcode.h (write_relocs): Check return value of
4880 _bfd_elf_symbol_from_bfd_symbol.
4882 Fri Mar 1 09:42:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
4884 * elf32-ppc.c (ppc_elf_add_symbol_hook): Don't set SEC_LOAD flag
4887 Wed Feb 28 11:25:47 1996 Jeffrey A Law (law@cygnus.com)
4889 * libhppa.h (hppa_reloc_field_selector_type): Add R_HPPA_NLSEL
4891 (e_nsel, e_nlsel, e_nlrsel): Undefine. Add to
4892 hppa_reloc_field_selector_type_alt.
4893 (hppa_field_adjust): Handle e_nlsel, e_nlrsel. Fix e_nsel handling.
4894 * som.c (hppa_som_gen_reloc_type): Handle N', NL' NLR' field
4896 (som_write_fixups): Finish handling of R_N0SEL and R_N1SEL.
4898 Wed Feb 28 11:00:24 1996 Ian Lance Taylor <ian@cygnus.com>
4900 * elf.c (assign_file_positions_for_segments): Adjust the segment
4901 memory size for the alignment of a SEC_ALLOC section, not just a
4904 Tue Feb 27 14:17:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
4906 * m68klinux.c: New file.
4907 * hosts/m68klinux.h: New file.
4908 * config.bfd (m68*-*-linuxaout*, m68*-*-linux*): New targets.
4909 * configure.in (m68*-*-linux*): New native host.
4910 (m68klinux_vec): New vector.
4911 * configure: Rebuild.
4912 * targets.c (m68klinux_vec): Declare.
4913 * i386linux.c (bfd_i386linux_size_dynamic_sections): Renamed from
4914 bfd_linux_size_dynmic_sections to avoid clash with m68klinux.c.
4915 * bfd-in.h (bfd_i386linux_size_dynamic_sections): Rename
4916 declaration from bfd_linux_size_dynamic_sections.
4917 (bfd_m68klinux_size_dynamic_sections): Declare.
4918 * bfd-in2.h: Rebuild.
4919 * Makefile.in: Rebuild dependencies.
4920 (BFD32_BACKENDS): Add m68klinux.o.
4921 (BFD32_BACKENDS_CFILES): Add m68klinux.c.
4923 Tue Feb 27 11:31:34 1996 Jeffrey A Law (law@cygnus.com)
4925 * libhppa.h (pa_arch): Add pa20.
4926 (hppa_reloc_field_selector_type): Add R_HPPA_NSEL.
4927 (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt.
4928 (hppa_field_adjust): Handle e_nsel.
4929 * som.c: Provide default definitions for many new relocs found only
4930 in hpux10 include files.
4931 (som_fixup_formats): Add several new relocs from hpux10.
4932 (som_hppa_howto_table): Add hpux10 relocs.
4933 (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs.
4935 Mon Feb 26 12:52:48 1996 Stan Shebs <shebs@andros.cygnus.com>
4937 * mpw-make.sed: Edit out recent shared library support, and
4938 rules to rebuild .h files using doc/chew.
4940 Mon Feb 26 14:48:39 1996 David Mosberger-Tang <davidm@AZStarNet.com>
4942 * ecoff.c (ecoff_compute_section_file_positions): Adjust the file
4943 size even of sections with no contents.
4945 Mon Feb 26 14:01:13 1996 Ian Lance Taylor <ian@cygnus.com>
4947 * cofflink.c (_bfd_coff_link_input_bfd): When merging, skip names
4948 starting with '$' the way we skip names starting with '.'. When
4949 updating x_endndx, don't be fooled by an index which has been
4952 * cofflink.c (_bfd_coff_link_input_bfd): Don't try to optimize a
4953 struct/union/enum type with no elements.
4955 Sat Feb 24 11:38:58 1996 Ian Lance Taylor <ian@cygnus.com>
4957 * bfd.c (bfd_errmsg): Handle a NULL return from strerror.
4959 * archive.c (bfd_generic_archive_p): If the first file in the
4960 archive can not be recognized as an object, don't assume that this
4961 is the wrong format.
4963 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
4964 format is not bfd_object.
4965 (bfd_elf_get_dt_soname): Likewise.
4967 Wed Feb 21 13:58:04 1996 Ian Lance Taylor <ian@cygnus.com>
4969 * coff-sh.c (sh_relax_delete_bytes): Correct range of R_SH_USES
4972 Tue Feb 20 16:22:44 1996 J.T. Conklin <jtc@rtl.cygnus.com>
4974 * bfd.c (tdata): Add netbsd_core_data.
4975 * bfd-in2.h: Regenerated.
4977 Tue Feb 20 16:50:02 1996 Ian Lance Taylor <ian@cygnus.com>
4979 * sunos.c (SUNOS_CONSTRUCTOR): Define.
4980 (sunos_add_one_symbol): Don't let a symbol from a dynamic object
4981 override a constructor symbol. Set SUNOS_CONSTRUCTOR when
4984 * bout.c (b_out_squirt_out_relocs): Use udata.i rather than flags
4985 to get the symbol index, matching 14 Jul 95 change.
4987 Tue Feb 20 08:26:27 1996 Fred Fish <fnf@phydeaux.cygnus.com>
4989 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4990 Remove duplicate definition of gp.
4992 Mon Feb 19 12:37:41 1996 Ian Lance Taylor <ian@cygnus.com>
4994 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Don't
4995 assume that we can set the GP value and then get the same value,
4996 since it won't be true if the output file is neither ELF nor
4998 * coff-mips.c (mips_adjust_reloc_in): Don't bother to use
4999 _bfd_get_gp_value here.
5000 (mips_gprel_reloc): Don't assume we can set and get the GP value.
5001 * elf32-mips.c (mips_elf_hi16_reloc): Get gp value from
5003 (mips_elf_lo16_reloc): Likewise.
5004 (mips_elf_final_gp): Add pgp parameter. Set it to the GP value.
5005 Don't require that the BFD be ELF.
5006 (mips_elf_gprel16_reloc): Get gp value from mips_elf_final_gp.
5007 (mips_elf_gprel32_reloc): Likewise.
5008 (mips_elf_relocate_section): Don't assume we can set and get the
5010 (mips_elf_finish_dynamic_symbol): Don't bother to use
5011 _bfd_get_gp_value here.
5013 * elf32-mips.c (mips_elf_create_procedure_table): Initialize sv.
5014 Don't change epdr between malloc and free. Be careful not to free
5015 NULL pointers. Zero out the first RPDR.
5017 * configure.host: On Linux, only pass -rpath option if $(libdir)
5018 is neither /lib nor /usr/lib. From Alan Modra
5019 <alan@mullet.Levels.UniSA.Edu.Au>.
5021 * elf-bfd.h (struct elf_obj_tdata): Rename dt_needed_name to
5023 (elf_dt_name): Rename from elf_dt_needed_name.
5024 * elf.c (bfd_elf_set_dt_needed_name): Use elf_dt_name, not
5026 (bfd_elf_get_dt_soname): New function.
5027 * elflink.h (elf_link_add_object_symbols): Use elf_dt_name, not
5028 elf_dt_needed_name. Save the SONAME back in elf_dt_name.
5029 * bfd-in.h (bfd_elf_get_dt_soname): Declare.
5030 * bfd-in2.h: Rebuild.
5032 Mon Feb 19 02:50:23 1996 Doug Evans <dje@charmed.cygnus.com>
5034 * elf32-sparc.c (elf32_sparc_reloc_type_lookup): Renamed from
5035 _bfd_sparc_elf_reloc_type_lookup.
5036 (bfd_elf32_bfd_reloc_type_lookup): Update.
5037 * elf64-sparc.c (SPARC64_OLD_RELOCS): Define.
5038 (sparc64_elf_howto_table): Define.
5039 (sparc_reloc_map): Define.
5040 (sparc64_elf_reloc_type_lookup): New function.
5041 (sparc_elf_wdisp16_reloc): New function.
5042 (elf_info_to_howto): Use sparc64_elf_howto_table.
5043 (sparc64_elf_relocate_section): Likewise.
5044 (bfd_elf64_bfd_reloc_type_lookup): Update.
5046 Sun Feb 18 15:02:25 1996 Ian Lance Taylor <ian@cygnus.com>
5048 * configure.host: Check for 'do not mix' from native linker before
5049 trying to use -rpath.
5051 Fri Feb 16 12:46:18 1996 Ian Lance Taylor <ian@cygnus.com>
5053 * bfd.c (_bfd_get_gp_value): New function.
5054 (_bfd_set_gp_value): New function.
5055 * libbfd-in.h (_bfd_get_gp_value): Declare.
5056 (_bfd_set_gp_value): Declare.
5057 * libbfd.h: Rebuild.
5058 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Use
5059 _bfd_get_gp_value and _bfd_set_gp_value rather than referring
5060 directly to the fields in the tdata information.
5061 (alpha_relocate_section): Likewise.
5062 * coff-mips.c (mips_adjust_reloc_in): Likewise.
5063 (mips_gprel_reloc): Likewise.
5064 (mips_relocate_section): Likewise.
5065 * elf32-mips.c (mips_elf_hi16_reloc): Likewise.
5066 (mips_elf_lo16_reloc): Likewise.
5067 (mips_elf_final_gp): Likewise.
5068 (mips_elf_gprel16_reloc): Likewise.
5069 (mips_elf_gprel32_reloc): Likewise.
5070 (mips_elf_relocate_section): Likewise.
5071 (mips_elf_finish_dynamic_symbol): Likewise.
5073 * bout.c (b_out_set_arch_mach): Recognize bfd_mach_i960_jx.
5075 Thu Feb 15 11:29:13 1996 Ian Lance Taylor <ian@cygnus.com>
5077 * configure.in: Call AC_PROG_CC before configure.host.
5078 * configure: Rebuild.
5079 * configure.host: Don't set information which autoconf should
5080 figure out, namely CC, CFLAGS, LDFLAGS, AR, and RANLIB.
5082 * configure.host: Remove go32 and win32 host information, since it
5083 should no longer be needed.
5085 * elf.c (map_sections_to_segments): If we have a .dynamic section,
5086 then start a new segment rather than put a writable section in a
5089 * configure.host: Set RPATH_ENVVAR.
5091 * Makefile.in: Rebuild dependencies.
5093 * elflink.c (_bfd_elf_create_linker_section): Remove unused
5094 zero_section variable.
5096 Thu Feb 15 10:39:17 1996 H.J. Lu <hjl@zoom.com>
5098 * Makefile.in ($(srcdir)/bfd-in2.h): Rename target from bfd-in2.h.
5099 ($(srcdir)/libbfd.h): Rename from libbfd.h.
5100 ($(srcdir)/libcoff.h): Rename from libcoff.h.
5102 Wed Feb 14 16:29:07 1996 Martin Anantharaman <martin@mail.imech.uni-duisburg.de>
5104 * ieee.c (ieee_write_expression): Only use an R variable for a
5105 local symbol. Don't output a zero offset. Handle a zero address.
5106 (SRC_MASK, PCREL_OFFSET): Define based on KEEPMINUSPCININST.
5107 (rel32_howto, rel16_howto, rel8_howto): Use SRC_MASK and
5109 (parse_expression): Don't try to handle multiple occurrences of a
5110 P variable. Handle I variables differently from X variables. Fix
5111 the order of minus expressions.
5112 (ieee_slurp_external_symbols): Generate an I variable for an NN
5113 record. Fix handling of ATI and ATX records.
5114 (ieee_slurp_sections): Only set minimal section attributes.
5115 Adjust them later, based on the section contents.
5116 (ieee_object_p): Read in the file until just after the ME record.
5117 Call ieee_slurp_section_data to set the section flags.
5118 (do_one): Add iterations parameter. Only repeat the first load
5119 item. Set the section and file reloc flags.
5120 (ieee_slurp_section_data): Set section flags. Pass iterations to
5122 (ieee_canonicalize_reloc): Handle I variables.
5123 (do_with_relocs): Only emit relocation size when necessary.
5124 Increase MAXRUN to 127. Change ov to be assigned, and take
5125 src_mask and pcrel_offset into account.
5126 (ieee_write_data_part): Skip sections that are not loaded.
5127 (ieee_write_external_part): Don't output optional last entry of WX
5129 (ieee_write_me_part): Make setting of me_record neater.
5130 (ieee_generic_stat_arch_elt): Get the size of an archive element.
5132 * syms.c (stt): Add entries for zerovars, vars, and code.
5134 * elfcode.h (validate_reloc): New static function.
5135 (write_relocs): Call validate_reloc for non ELF relocs.
5137 * elfxx-target.h (elf_symbol_leading_char): Define if not defined.
5138 (TARGET_BIG_SYM): Use elf_symbol_leading_char.
5139 (TARGET_LITTLE_SYM): Likewise.
5141 * config.bfd (m68*-*-psos*): New target.
5143 Tue Feb 13 15:56:22 1996 Bryan Ford <baford@snake.cs.utah.edu>
5145 * i386msdos.c: Remove some #if 0 code.
5146 (msdos_write_object_contents): Don't include empty sections in the
5147 size computation, regardless of their address.
5149 Tue Feb 13 15:36:37 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5151 * elf32-ppc.c (ppc_elf_relocate_section): Don't segfault if dynboj
5152 is NULL, ie, the -r switch is used.
5154 Tue Feb 13 14:35:15 1996 Ian Lance Taylor <ian@cygnus.com>
5156 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.
5157 (BFD_RELOC_MIPS_GOT_LO16): Define.
5158 (BFD_RELOC_MIPS_CALL_HI16, BFD_RELOC_MIPS_CALL_LO16): Define.
5159 * bfd-in2.h, libbfd.h: Rebuild.
5160 * elf32-mips.c (mips_reloc_map): Map new relocs.
5162 * configure.host: Set HDLFLAGS for *-*-hpux with --enable-shared.
5164 * Makefile.in ($(SHLINK)): Check ts against $(SHLIB), not
5167 * ieee.c (get_symbol): Set the section to bfd_abs_section.
5168 (do_with_relocs): If EXEC_P is set and there are no relocs, use a
5169 simple number for the section address, rather than an expression.
5170 Limit the number of bytes between relocs to MAXRUN.
5171 (ieee_write_me_part): Set me_record to the file offset after the
5173 (ieee_write_processor): New static function.
5174 (ieee_write_object_contents): Use ieee_write_processor.
5176 Fri Feb 9 10:53:00 1996 Ian Lance Taylor <ian@cygnus.com>
5178 * configure.host: Use ${CC-gcc} when testing for -rpath on SunOS.
5180 * coff-aux.c: Change include of aux.h to aux-coff.h.
5182 Thu Feb 8 14:01:03 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5184 * elf32-m68k.c (elf_m68k_relocate_section): For a R_68K_RELATIVE
5185 relocation put the addend both in the reloc entry and the data.
5186 (elf_m68k_finish_dynamic_symbol): Likewise. Mask out marker in
5189 * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, resolve
5190 a R_68K_PCxx reloc against a defined global symbol directly.
5191 (elf_m68k_check_relocs): Don't count such a reloc.
5193 * elf32-m68k.c (elf_m68k_check_relocs): Don't record a symbol with
5194 a PLTxx reloc as dynamic. Disallow PLTxxO reloc against a local
5195 symbol for now, otherwise always record the symbol as dynamic.
5196 (elf_m68k_adjust_dynamic_symbol): If a symbol with a PLTxx reloc
5197 is not referenced by a dynamic object, and we are not making a
5198 shared object, then don't make a PLT entry. If we do make a PLT
5199 entry, make sure the symbol has been recorded as dynamic.
5201 Wed Feb 7 13:56:06 1996 Ian Lance Taylor <ian@cygnus.com>
5203 * configure.host: When making a shared library, set HLDFLAGS to
5204 pass an appropriate -rpath option. Use the make variable SONAME
5205 as the shared library soname, rather than computing it here. On
5206 SunOS, build stamp-tshlink in place of $(SHLINK).
5207 * Makefile.in (SONAME): New variable.
5208 ($(SHLINK)): Make a link to the transformed name, as well.
5209 (stamp-tshlink): New target.
5210 (install): Skip stamp-tshlink during install.
5212 Wed Feb 7 13:37:39 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5214 * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not assume that the
5215 linker sections have been set up yet.
5217 * elf.c (make_mapping): Add an additional argument to suppress
5218 making the first section include the program headers.
5219 (map_sections_to_segments): If the user used -Ttext such that the
5220 program headers are on a different page, do not set the flags
5221 saying that this section includes the program headers.
5223 Tue Feb 6 14:04:49 1996 J.T. Conklin <jtc@rtl.cygnus.com>
5225 * configure.in (*-*-netbsd*): Set COREFILE to netbsd-core.c.
5226 don't define TRAD_HEADER.
5227 * configure: Rebuild.
5229 * netbsd-core.c: New file, support for NetBSD core files.
5230 * hosts/*nbsd.h: Removed.
5232 Tue Feb 6 11:47:49 1996 Doug Evans <dje@charmed.cygnus.com>
5234 * reloc.c (BFD_RELOC_SPARC_[567]): New reloc types.
5235 (BFD_RELOC_SPARC_LO7 reloc type): Deleted.
5236 * libbfd.h, bfd-in2.h: Regenerated.
5237 * elf32-sparc.c (_bfd_sparc_elf_reloc_type_lookup): Renamed from
5238 bfd_elf32_bfd_reloc_type_lookup.
5239 (reloc_type{,_names}): Deleted.
5240 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
5242 (sparc_reloc_map): Add sparc64 relocs.
5243 (sparc_elf_notsupported_reloc): New static function.
5244 (sparc_elf_wdisp16_reloc): New static function.
5245 (elf32_sparc_check_relocs): Handle R_SPARC_WDISP{16,19}.
5246 (elf32_sparc_relocate_section): Likewise.
5247 (bfd_elf32_bfd_reloc_type_lookup): Define.
5248 * elf64-sparc.c (sparc64_elf_wdisp16_reloc): Deleted.
5249 (reloc_type{,_names}): Deleted.
5250 (elf_sparc_howto_table): Deleted.
5251 (sparc_reloc_map): Deleted.
5252 (_bfd_sparc_elf_howto_table): Renamed from elf_sparc_howto_table.
5253 (bfd_elf64_bfd_reloc_type_lookup): Change from function to #define.
5255 Tue Feb 6 12:12:22 1996 Ian Lance Taylor <ian@cygnus.com>
5257 * configure.host: Make SHLIB_CFLAGS include $(PICFLAG) on a
5260 * Makefile.in (program_transform_name): New variable.
5261 (install): Transform library name before installing it.
5263 Mon Feb 5 10:38:27 1996 Ian Lance Taylor <ian@cygnus.com>
5265 * archures.c (bfd_mach_i960_hx): Define.
5266 * bfd-in2.h: Rebuild.
5267 * cpu-i960.c (scan_960_mach): Accept machine "hx".
5268 (MATRIX): Expand entries for HX.
5269 (arch_info_struct): Add i960:hx entry.
5270 * bout.c (b_out_set_arch_mach): Handle bfd_mach_i960_hx.
5271 * coffcode.h (coff_set_arch_mach_hook): Handle F_I960HX.
5272 (coff_set_flags): Handle bfd_mach_i960_hx.
5274 Support for building as a shared library, based on patches from
5275 Alan Modra <alan@spri.levels.unisa.edu.au>:
5276 * configure.in: Add AC_ARG_ENABLE for shared and commonbfdlib.
5277 New substitutions: ALLLIBS, PICFLAG, SHLIB, SHLIB_CC,
5278 SHLIB_CFLAGS, COMMON_SHLIB, PICLIST, SHLINK.
5279 * configure: Rebuild.
5280 * configure.host: If --enable-shared, adjust shared library stuff
5281 based on the host. If the host is SunOS, and the linker supports
5282 -rpath, set HLDFLAGS to use it.
5283 * Makefile.in (ALLLIBS): New variable.
5284 (PICFLAG, SHLIB, SHLIB_CC, SHLIB_CFLAGS): New variables.
5285 (COMMON_SHLIB, SHLINK): New variables.
5286 (.c.o): If PICFLAG is set, compile twice, once PIC, once normal.
5287 (STAGESTUFF): Remove variable.
5288 (all): Depend upon $(ALLLIBS) and @PICLIST@ rather than
5290 (stamp-ofiles): New target, like old ofiles target, but build
5291 using a temporary file and move-if-change, and touch stamp-ofiles
5293 (ofiles): Just depend upon stamp-ofiles.
5294 (stamp-piclist, piclist): New targets.
5295 ($(SHLIB), $(SHLINK)): New targets.
5296 (targets.o, archures.o): Build twice if PICFLAG is set.
5297 (do_mostlyclean): Remove pic/*.o.
5298 (do_clean): Remove stamp-ofiles, $(SHLIB), $(SHLINK), piclist, and
5300 (do_distclean): Remove pic and stamp-picdir.
5301 (install): Install shared libraries.
5302 ($(OFILES)): Depend upon stamp-picdir.
5303 (stamp-picdir): New target.
5305 * libcoff-in.h: Add comment reminding people that libcoff.h is a
5307 * libcoff.h: Rebuild.
5309 * elflink.h (elf_adjust_dynamic_symbol): Don't try to get the
5310 flavour of a section with no owner.
5312 * elf32-mips.c (mips_elf_create_dynamic_sections): Clear
5313 ELF_LINK_NON_ELF flag.
5314 (mips_elf_create_got_section): Likewise.
5316 * elf.c: Revert last change, since it breaks dynamic linking.
5317 * elf-bfd.h (struct elf_backend_data): Remove want_hdr_in_seg
5319 * elf32-mips.c (elf_backend_want_hdr_in_seg): Don't define.
5320 * elfxx-target.h (elf_backend_want_hdr_in_seg): Don't define.
5321 (elfNN_bed): Don't initialize want_hdr_in_seg field.
5323 Sun Feb 4 20:45:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5325 * elf.c (assign_file_positions_for_segments): If the backend does
5326 not want the elf header or the program headers in the address
5327 space, do not include them in the calculations.
5329 * elf32-ppc.c (ppc_elf_additional_program_headers): New hook
5330 function to determine if we need additional program headers.
5331 (ppc_elf_modify_segment_map): Define as a NOP function for now.
5332 (ppc_elf_create_linker_section): .sdata2 is a read-only section.
5334 Sat Feb 3 23:00:03 1996 Ian Lance Taylor <ian@cygnus.com>
5336 * coffcode.h: Move today's libcoff.h change into coffcode.h.
5338 Sat Feb 3 15:43:44 1996 Fred Fish <fnf@cygnus.com>
5340 * libcoff.h (bfd_coff_link_add_one_symbol): Combine macro args
5341 back into one line. Some compilers (sunos 4.1.3 for example)
5342 won't accept args split across more than one line.
5344 Fri Feb 2 11:42:15 1996 Steve Chamberlain <sac@slash.cygnus.com>
5346 * aclocal.m4 (BFD_BINARY_FOPEN): Understand cygwin32.
5347 * configure: Regenerate.
5349 Fri Feb 2 12:12:16 1996 Jeffrey A Law (law@cygnus.com)
5351 * elf32-hppa.c (elf32_hppa_backend_symbol_table_processing): Don't
5352 try to do arithmetic on a void *, cast it to a unsigned char * first.
5354 Thu Feb 1 16:04:06 1996 Ian Lance Taylor <ian@cygnus.com>
5356 * elf-bfd.h (ELF_LINK_NON_ELF): Define.
5357 * elf.c (_bfd_elf_link_hash_newfunc): Set elf_link_hash_flags to
5359 * elflink.h (elf_link_add_object_symbols): Reset ELF_LINK_NON_ELF
5360 flag for a newly defined symbol.
5361 (NAME(bfd_elf,record_link_assignment)): Likewise.
5362 (elf_adjust_dynamic_symbol): If ELF_LINK_NON_ELF is set, try to
5363 set the DEF or REF_REGULAR flags correctly.
5365 * Makefile.in (bfd-in2.h): Make bfd.h, not protos, in docdir.
5366 (libbfd.h, libcoff.h): Corresponding change.
5368 * elf32-i386.c (elf_i386_check_relocs): Don't record a symbol with
5369 a PLT32 reloc as dynamic.
5370 (elf_i386_adjust_dynamic_symbol): If a symbol with a PLT32 reloc
5371 is not referenced by a dynamic object, and we are not making a
5372 shared object, then don't make a PLT entry. If we do make a PLT
5373 entry, make sure the symbol has been recorded as dynamic.
5375 Wed Jan 31 17:23:32 1996 Steve Chamberlain <sac@slash.cygnus.com>
5377 * coff-i386.c (coff_i386_reloc_type_lookup): Add BFD_RELOC_32_PCREL.
5378 * config.bfd (i[345]86-*-win32): Becomes i[345]86-*-cygwin32.
5379 (powerpcle-*-cygwin32): New.
5380 * peicode.h (add_data_entry): Get address from vma.
5382 Wed Jan 31 16:23:57 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5384 * elflink.c (_bfd_elf_create_linker_section): If the symbol
5385 attached to the section has already been created as an undefined
5386 symbol, treat it as if it hasn't been created yet.
5388 Wed Jan 31 16:16:53 1996 Ian Lance Taylor <ian@cygnus.com>
5390 * elflink.h (elf_bfd_final_link): Don't output initial dummy
5391 symbol or section symbols if stripping all symbols and this is not
5392 a relocateable link. Don't output the symbol string table if
5393 there are no symbols.
5394 (elf_link_flush_output_syms): Don't do anything if there are no
5397 Wed Jan 31 12:55:49 1996 Richard Henderson <rth@tamu.edu>
5399 * coff-aux.c: New file.
5400 * hosts/m68kaux.h: New file.
5401 * config.bfd (m68*-apple-aux*): New target.
5402 * configure.in (m68*-apple-aux*): New native host.
5403 (m68kaux_coff_vec): New vector.
5404 * configure: Rebuild.
5405 * targets.c (m68kaux_coff_vec): Declare.
5406 * coffcode.h (bfd_coff_backend_data): Add field
5407 _bfd_coff_link_add_one_symbol.
5408 (bfd_coff_link_add_one_symbol): Define.
5409 (compare_arelent_ptr): New static function if TARG_AUX.
5410 (coff_write_relocs): If TARG_AUX, sort the relocs.
5411 (coff_write_object_contents): Set A/UX aouthdr magic number.
5412 (coff_link_add_one_symbol): Define if not defined.
5413 (bfd_coff_std_swap_table): Initialize new field.
5414 * libcoff.h: Rebuild.
5415 * cofflink.c (coff_link_add_symbols): Call
5416 bfd_coff_link_add_one_symbol rather than
5417 _bfd_generic_link_add_one_symbol.
5418 * coff-m68k.c (COFF_PAGE_SIZE): Don't define if already defined.
5419 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
5420 * coff-mips.c (mips_ecoff_backend_data): Likewise.
5421 * Makefile.in: Rebuild dependencies.
5422 (BFD32_BACKENDS): Add coff-aux.o.
5423 (BFD32_BACKENDS_CFILES): Add coff-aux.c.
5425 Wed Jan 31 11:37:46 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5427 * elf32-m68k.c (elf_m68k_relocate_section): Fix R_68K_GOT*
5428 relocation; ignore addend with R_68K_{GOT,PLT}*O relocation.
5430 Tue Jan 30 12:09:04 1996 Ian Lance Taylor <ian@cygnus.com>
5432 * Makefile.in (do_maintainer_clean): Remove $(srcdir)/bfd-in2.h,
5433 $(srcdir)/libbfd.h and $(srcdir)/libcoff.h.
5434 (maintainer-clean): Warn about deleting special files.
5435 (bfd-in2.h, libbfd.h, libcoff.h): New targets.
5437 * elf32-hppa.c (elf32_hppa_relocate_section): Handle indirect and
5438 warning symbols correctly.
5439 * elf32-i386.c (elf_i386_relocate_section): Likewise.
5440 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5441 * elf32-mips.c (mips_elf_relocate_section): Likewise.
5442 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5443 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5444 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5446 * syms.c (_bfd_stab_section_find_nearest_line): Add casts to avoid
5449 Mon Jan 29 14:27:24 1996 Kim Knuttila <krk@cygnus.com>
5451 * libcoff-in.h: aligned newly exported names with bfd naming
5452 conventions. Removed an erroneous define of POWERPC_LE_PE.
5453 * libcoff.h: Rebuild.
5454 * cofflink.c, coff-ppc.c: the above function name changes
5456 Mon Jan 29 13:06:28 1996 Ian Lance Taylor <ian@cygnus.com>
5458 From Basim Kadhim <kadhim@spock.cs.colorado.edu>:
5459 * ecoff.c (struct extsym_info): Define.
5460 (_bfd_ecoff_bfd_final_link): Pass a pointer to struct extsym_info
5461 to ecoff_link_write_external.
5462 (ecoff_link_write_external): Accept a struct extsym_info pointer.
5463 Strip symbols when appropriate.
5465 Based on patches from Ronald F. Guilmette <rfg@monkeys.com>:
5466 * syms.c (BSF_OBJECT): Define.
5467 (bfd_print_symbol_vandf): Print 'O' for BSF_OBJECT.
5468 * bfd-in2.h: Rebuild.
5469 * elfcode.h (elf_slurp_symbol_table): Set BSF_OBJECT for an
5471 * elf.c (swap_out_syms): Only set type to STT_OBJECT if BSF_OBJECT
5474 * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, when
5475 copying relocs into a shared object, treat a defined global symbol
5477 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5478 * elf32-mips.c (mips_elf_relocate_section): Likewise.
5479 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5481 * elflink.h (elf_link_add_object_symbols): Only set weakdef to a
5482 real defined symbol, not to a weak defined symbol.
5484 Mon Jan 29 11:34:36 1996 Kim Knuttila <krk@cygnus.com>
5486 * cofflink.c: removed the POWERPC_LE_PE hack, promoted some types
5487 and made a few static functions externs.
5489 * coff-ppc.c (ppc_bfd_coff_final_link): new function, replaces the
5490 POWERPC_LE_PE hack in cofflink.
5492 * libcoff-in.h: promoted the following from cofflink.c to allow
5493 _bfd_coff_final_link to be overridden - STRING_SIZE_SIZE,
5494 coff_debug_merge_element, struct coff_debug_merge_type,
5495 coff_debug_merge_hash_entry, coff_debug_merge_hash_table,
5496 coff_debug_merge_hash_table_init, coff_debug_merge_hash_table_free,
5497 coff_debug_merge_hash_lookup, coff_link_section_info,
5498 coff_final_link_info, coff_debug_merge_hash_newfunc,
5499 coff_write_global_sym, coff_link_input_bfd, coff_reloc_link_order.
5501 * libcoff.h: re-gen'd
5503 Fri Jan 26 18:33:35 1996 Ian Lance Taylor <ian@cygnus.com>
5505 * syms.c: Include "bfdlink.h".
5506 (struct stab_find_info): Define.
5507 (_bfd_stab_section_find_nearest_line): New function.
5508 * libbfd-in.h (_bfd_stab_section_find_nearest_line): Declare.
5509 * libbfd.h: Rebuild.
5510 * elf-bfd.h (struct elf_obj_tdata): Add line_info field.
5511 * elf.c (_bfd_elf_find_nearest_line): Try calling
5512 _bfd_stab_section_find_nearest_line before searching the ELF
5513 symbol table. Find the closest STT_FUNC symbol, not the last one.
5514 * libcoff-in.h (coff_data_type): Add line_info field.
5515 * libcoff.h: Rebuild.
5516 * coffgen.c (coff_find_nearest_line): Try calling
5517 _bfd_stab_section_find_nearest_line before searching the COFF
5519 * Makefile.in: Rebuild dependencies.
5521 Fri Jan 26 16:11:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5523 * elf32-ppc.c (R_PPC_EMB_SDA21 relocations): Make relocation size
5524 4 bytes, so we get the correct value when updating the register
5525 field in little endian mode.
5527 Thu Jan 25 12:14:16 1996 Ian Lance Taylor <ian@cygnus.com>
5529 * libcoff-in.h (struct xcoff_tdata): Remove toc_section and
5530 entry_section fields. Add sntoc and snentry fields.
5531 * libcoff.h: Rebuild.
5532 * coffcode.h (coff_mkobject_hook): Initialize sntoc and snentry,
5533 not toc_section and entry_section (the COFF file does not have any
5534 sections at this point).
5535 (coff_write_object_contents): Set o_snentry and o_sntoc from
5536 snentry and sntoc rather than entry_section and toc_section.
5537 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy sntoc and
5538 snentry, not toc_section and entry_section.
5539 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't set
5540 entry_section from hentry.
5541 (xcoff_link_input_bfd): If a defined symbol has XCOFF_ENTRY set,
5543 (xcoff_link_input_bfd): Set sntoc, not toc_section.
5544 (xcoff_write_global_symbol): Get toc_section from sntoc, rather
5545 than using toc_section directly.
5547 * archures.c: Add missing `.' in enum bfd_architecture.
5548 * bfd-in2.h: Rebuild.
5550 * config.bfd (i[345]86-*-sco*elf*): Use bfd_elf32_i386_vec. From
5551 Robert Lipe <robertl@arnet.com>.
5553 Thu Jan 25 12:08:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5555 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Add .rela.sdata{,2}
5556 to sections we allocate. Use bfd_zalloc to allocate initialial
5557 sections, not bfd_alloc.
5558 (ppc_elf_check_relocs): Remove BFD_ASSERTs for !shared from
5559 SDA{,2}I16 relocations.
5560 (ppc_elf_add_symbol_hook): Use the value of -G nn to determine
5561 whether to put something in .sbss or not.
5562 (ppc_elf_relocate_section): Add support for more relocations. Add
5563 in sec->output_offset where appropriate. Make error messages
5564 include the symbol name.
5566 * elflink.c (_bfd_elf_create_linker_section): Lookup symbol before
5567 trying to add it to the symbol table, so _GLOBAL_OFFSET_TABLE_
5568 doesn't get redefined messages if -shared.
5570 * elflink.h (elf_create_pointer_linker_section) Only bump RELA
5571 section if the rel_section field has been set up.
5573 Wed Jan 24 20:40:26 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5575 * elf32-ppc.c (ppc_elf_relocate_section): Fix typo in eabi
5578 Wed Jan 24 10:38:34 1996 Doug Evans <dje@charmed.cygnus.com>
5580 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Delete checking
5581 of flags, only flags used are controlled by mach number. Bump up
5582 output file mach number to highest of input file mach numbers.
5583 (elf32_sparc_object_p): Watch for EF_SPARC_SUN_US1.
5584 (elf32_sparc_final_write_processing): Set EF_SPARC_SUN_US1 if v8plusa.
5586 * config.bfd (sparc64-*-{sysv4*,solaris2*}): Comment out
5587 bfd_elf64_sparc_vec support.
5589 Tue Jan 23 14:33:05 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5591 * elf32-ppc.c (ppc_elf_copy_private_bfd_data): Don't complain if
5592 the embedded bit is set on some objects and not on others. Just
5594 (ppc_elf_relocate_section): Implement R_PPC_EMB_{SDA21,RELSDA}
5597 Tue Jan 23 14:22:45 1996 Ian Lance Taylor <ian@cygnus.com>
5599 * coffcode.h (coff_new_section_hook): Don't try to align the
5602 * coffcode.h (coff_set_section_contents): Fix the handling of the
5603 .lib section to work even if the entire section contents are
5604 written at once. From Gvran Uddeborg <gvran@uddeborg.pp.se> and
5605 Robert Lipe <robertl@arnet.com>.
5607 Mon Jan 22 18:45:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5609 * elflink.h (elf_finish_pointer_linker_section): Don't allocate
5610 memory here for contents.
5612 * elf32-ppc.c (ppc_elf_relocate_section): Bump up _SDA_BASE_ and
5613 _SDA2_BASE_ by 32768.
5614 (ppc_elf_size_dynamic_sections): #if out PLT code which we haven't
5615 started using. Allocate contents for .sdata and .sdata2 sections
5617 (ppc_elf_check_relocs): Use bfd_get_section_name in debug message,
5619 (ppc_elf_finish_dynamic_symbol): Remove code that attempted to
5620 size _SDA{,2}_BASE_.
5621 (ppc_elf_relocate_section): Change how sdata{,2} relocations are
5624 Mon Jan 22 08:52:04 1996 Doug Evans <dje@charmed.cygnus.com>
5626 * elflink.h (elf_finish_pointer_linker_section): Fix typo.
5628 * archures.c (bfd_mach_sparc_v9): Renamed from bfd_mach_sparc64.
5629 (bfd_mach_sparc_{v8plus,v8plusa}): Define.
5630 (bfd_mach_sparc_v9a): Define.
5631 (bfd_mach_sparc_v9_p): Define.
5632 * bfd-in2.h: Regenerated.
5633 * aoutx.h (aout,machine_type): bfd_mach_sparc64 renamed to
5635 * elf64-sparc.c (sparc64_elf_object_p): Likewise.
5636 * config.bfd (sparc64-*-sysv4*,sparc64-*-solaris2*): Set targ_defvec
5637 to bfd_elf32_sparc_vec.
5638 * cpu-sparc.c (arch_info_struct): Renamed from sparc_arch_info.
5639 Add v8plus{,a} support.
5641 (sparc_compatible): New function.
5642 * elf32-sparc.h: #include "elf/sparc.h".
5643 (elf32_sparc_merge_private_bfd_data, elf32_sparc_object_p,
5644 elf32_sparc_final_write_processing): New functions.
5645 (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_object_p,
5646 elf_backend_final_write_processing): Define.
5648 Mon Jan 22 11:21:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5650 * elf-bfd.h (struct elf_link_hash_entry): Add
5651 linker_section_pointer field.
5652 (enum elf_linker_section_enum): Enumeration for new way of
5653 creating linker dynamic sections and symbols.
5654 (elf_linker_section{,_pointers}): New structures for creating
5655 dynamic sections and symbols.
5656 (elf_obj_tdata): Add linker_section_pointers and linker_section
5658 (elf_local_ptr_offsets,elf_linker_section): New accessor macros.
5659 (_bfd_elf_create_linker_section): New declarations.
5660 (_bfd_elf_find_pointer_linker_section): Ditto.
5661 (bfd_elf{32,64}_{create,finish}_pointer_linker_section): Ditto.
5662 (_bfd_elf_make_linker_section_rela): Ditto.
5664 * elf.c (_bfd_elf_link_hash_newfunc): Initialize new fields.
5666 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Delete.
5667 (ppc_elf_create_linker_section): New function to create the
5668 sections .got, .sdata, and .sdata2.
5669 (ppc_elf_size_dynamic_sections): Zap .rela.{sdata,sdata2} if
5671 (ppc_elf_check_relocs): Support more of the eabi relocations.
5672 (ppc_elf_relocate_section): Ditto.
5673 (ppc_elf_finish_dynamic_symbols): Adjust _SDA{,2}_BASE_ by 32768
5674 if the .sdata{,2} + .sbss{,2} section size is > 32k.
5676 * elflink.h (elf_create_pointer_linker_section): New function to
5677 create initialized pointers in dynamic linker sections.
5678 (elf_finish_pointer_linker_section): Actually intialize the
5679 pointers created above.
5681 * elfcode.h (bfd_elf{32,64}_create_pointer_linker_section): New
5682 macros to provide both 32 and 64 bit versions of
5683 elf_create_pointer_linker_section.
5684 (bfd_elf{32,64}_finish_pointer_linker_section): New macros to
5685 provide both 32 and 64 bit versions of
5686 elf_finish_pointer_linker_section.
5688 * elflink.c (_bfd_elf_create_linker_section): New function to
5689 create a linker section.
5690 (_bfd_elf_find_pointer_linker_section): Find a unique pointer to a
5691 given address in the linker pointer offsets created for a given
5693 (_bfd_elf_make_linker_section_rela): Make a RELA section
5694 corresponding to the generated linker section.
5696 Sat Jan 20 08:36:10 1996 Doug Evans <dje@canuck.cygnus.com>
5698 * elf32-sparc.c (ELF_MACHINE_ALT1): Define.
5700 Thu Jan 18 18:25:34 1996 Kim Knuttila <krk@cygnus.com>
5702 * coff-ppc.c (coff_ppc_relocate_section): changed TOCDEFN relocs.
5703 (coff_ppc_relocate_section): Handle special values for gcc built dlls.
5704 (dump_toc): fix diagnosing code to identify out-of-toc-bounds entries.
5705 Also begin the toc at 4 as an eye catcher ('31313131' marks the first
5706 toc entry in an objdump) for now.
5707 (ppc_do_last, ppc_get_last): New function - needed to save processing
5708 the toc owner to the end.
5709 (ppc_coff_swap_sym_in_hook): Removed an incorrect hack for doing the
5712 * cofflink.c (_bfd_coff_final_link): Added a new hack to keep the
5713 toc owner from being done till last. Must define POWERPC_LE_PC
5716 * coffcode.h (coff_set_alignment_hook): alignment setting for .stab
5718 * peicode.h (coff_swap_scnhdr_out): set section flags for stab/str
5720 (coff_swap_aouthdr_out): Removed a non-working hack for computing the
5721 SizeOfImage for PowerPC. Ignore the size of the .junk section.
5723 Thu Jan 18 17:42:12 1996 Ian Lance Taylor <ian@cygnus.com>
5725 * elfcore.h: Include <signal.h> before <sys/procfs.h>.
5727 Wed Jan 17 12:40:14 1996 Ian Lance Taylor <ian@cygnus.com>
5729 * cpu-powerpc.c (arch_info_struct): Change last entry to not point
5731 (bfd_powerpc_arch): Point at first entry in arch_info_struct.
5733 Tue Jan 16 15:10:49 1996 Ian Lance Taylor <ian@cygnus.com>
5735 * elf.c (assign_file_positions_for_segments): Don't increment file
5736 offset for a segment which contains no loadable sections.
5738 Mon Jan 15 17:46:27 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5740 * reloc.c: Add new PowerPC relocations.
5741 * {bfd-in2,libbfd}.h: Regenerate.
5743 * elf32-ppc.c (ppc_elf_howto_raw): Add more PPC relocations.
5744 (ppc_elf_reloc_type_lookup): Lookup new relocations.
5746 Mon Jan 15 14:29:44 1996 Ian Lance Taylor <ian@cygnus.com>
5748 * aoutx.h (howto_table_ext): Fix RELOC_BASE10 and RELOC_BASE22
5751 * sunos.c (sunos_scan_ext_relocs): Don't fail assert if
5754 * coffgen.c (coff_find_nearest_line): Don't try to cache
5755 information in sections that are not owned by a BFD. From Richard
5756 Henderson <richard@atheist.tamu.edu>.
5758 * elf32-mips.c: Numerous changes to dynamic linking code, mostly
5759 from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
5760 * elflink.h (elf_link_output_extsym): Remove special check for
5763 * ecoffswap.h: Add prototypes for static functions.
5765 Sun Jan 14 21:36:08 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5767 * elf32-ppc.c (ppc_elf_{unsupported,std}_reloc): Remove functions.
5768 (ppc_elf_howto_raw): Remove ppc_elf_{unsupported,std}_reloc
5770 (ppc_elf_relocate_section): No longer allow .sdata/.sbss sections
5771 to satisfy a TOC16 relocation. Rewrite unsupported relocation
5772 support. Begin support for R_PPC_SDA{2,}REL.
5774 Sat Jan 13 09:36:52 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5776 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New function to
5777 create the .got and .got.neg sections.
5778 (ppc_elf_size_dynamic_sections): Call it.
5779 (ppc_elf_check_relocs): Call it.
5780 (ppc_elf_size_dynamic_sections): Support .got.neg, just like .got.
5781 (ppc_elf_check_relocs): Add error messages for relocations we
5782 don't yet support. Do not include R_PPC_SDAREL16 like a GOT
5785 Fri Jan 12 15:27:59 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5787 * elf32-ppc.c (ppc_elf_fake_sections): Define, and handle the new
5788 section flags for V.4 and eabi.
5790 Fri Jan 12 13:59:16 1996 Ian Lance Taylor <ian@cygnus.com>
5792 * elf.c (assign_file_positions_for_segments): If a segment
5793 contains no sections, don't mark it as readable.
5795 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Declare.
5796 * elfcode.h (_bfd_elf_section_from_bfd_section): Don't declare.
5798 * elf.c (_bfd_elf_print_private_bfd_data): Dump contents of
5799 dynamic section, if there is one.
5800 * elf-bfd.h (struct elf_size_info): Add swap_dyn_in field.
5801 (bfd_elf32_swap_dyn_in): Change type of second parameter to PTR.
5802 (bfd_elf64_swap_dyn_in): Likewise.
5803 * elfcode.h (elf_swap_dyn_in): Change type of second parameter to
5805 (NAME(_bfd_elf,size_info)): Initialize swap_dyn_in field.
5807 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't create a
5808 DT_TEXTREL entry because of .rel.plt. From Martin Pirker
5809 <pirker@eiunix.tuwien.ac.at>.
5811 Thu Jan 11 17:06:14 1996 Michael Meissner <meissner@tiktok.cygnus.com>
5813 * section.c (SEC_{EXCLUDE,SORT_ENTRIES}): New section flags for
5814 PowerPC V.4 and eabi.
5815 * bfd-in2.h: Regenerate.
5816 * libfd.h: Regenerate.
5818 * elfxx-target.h (TARGET_{BIG,LITTLE}_SYM): Add new flags.
5820 * elf32-ppc.c (ppc_elf_section_from_shdr): Support SHT_ORDERED
5821 section type and SHF_EXCLUDE section flag, turning them into the
5822 appropriate bfd section flag.
5824 Thu Jan 11 11:23:30 1996 Ian Lance Taylor <ian@cygnus.com>
5826 * xcofflink.c (xcoff_link_add_symbols): Create the special
5827 sections if we see a DYNAMIC object, in case that is the only
5828 XCOFF input object we see.
5830 * elf32-mips.c: Extensive changes for a start at dynamic linking
5831 support, from Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>.
5833 * elf-bfd.h (struct elf_backend_data): Add type_change_ok field.
5834 (struct elf_backend_data): Remove
5835 elf_backend_create_program_headers field. Add
5836 elf_backend_additional_program_headers and
5837 elf_backend_modify_segment_map fields.
5838 * elfxx-target.h (elf_backend_type_change_ok): Define if not
5840 (elf_backend_additional_program_headers): Likewise.
5841 (elf_backend_modify_segment_map): Likewise.
5842 (elf_backend_create_program_headers): Don't define.
5843 (elfNN_bed): Change to account for field changes.
5844 * elf.c (assign_file_positions_for_segments): Call new
5845 modify_segment_map backend function. Don't call old
5846 create_program_headers backend function.
5847 (get_program_header_size): Call additional_program_headers rather
5848 than create_program_headers.
5849 * elflink.h (elf_link_add_object_symbols): Initialize
5850 type_change_ok from new backend field.
5851 (elf_link_output_extsym): Don't warn if _rld_new_interface is
5853 (elf_reloc_link_order): Treat a reloc against a defined symbol as
5854 a reloc against the appropriate section.
5856 * elf-bfd.h (struct bfd_elf_section_data): Add tdata field.
5857 (struct elf_obj_tdata): Rename ppc_flags_init field to flags_init.
5858 (elf_flags_init): Rename from elf_ppc_flags_init.
5859 * elf32-ppc.c (ppc_elf_set_private_flags): Use elf_flags_init, not
5861 (ppc_elf_copy_private_bfd_data): Likewise.
5862 (ppc_elf_merge_private_bfd_data): Likewise.
5864 * elf32-m68k.c (howto_table): Change src_mask to 0 for all
5867 Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>
5869 * coff-alpha.c (alpha_relocate_section): During final link, allow
5870 output .lita section to be bigger than 64k by adjusting gp value
5871 on a per-input section basis.
5872 * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning
5874 (struct ecoff_section_tdata): Add gp field.
5876 Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com>
5878 Handle Alpha ECOFF changes in OSF/1 3.2.
5879 * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos
5881 * coff-alpha.c: Include "aout/ar.h".
5882 (alpha_ecoff_get_relocated_section_contents): Don't require an
5883 ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1
5884 3.2 doesn't generate one.
5885 (alpha_relocate_section): Likewise.
5886 (alpha_ecoff_slurp_armap): Define.
5887 (alpha_ecoff_slurp_extended_name_table): Define.
5888 (alpha_ecoff_construct_extended_name_table): Define.
5889 (alpha_ecoff_truncate_arname): Define.
5890 (alpha_ecoff_write_armap): Define.
5891 (alpha_ecoff_generic_stat_arch_elt): Define.
5892 (alpha_ecoff_update_armap_timestamp): Define.
5894 (alpha_ecoff_read_ar_hdr): New static function.
5895 (alpha_ecoff_get_elt_at_filepos): New static function.
5896 (alpha_ecoff_openr_next_archived_file): New static function.
5897 (alpha_ecoff_get_elt_at_index): New static function.
5898 (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field.
5899 (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from
5900 _bfd_ecoff to alpha_ecoff.
5901 * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos
5902 field from backend structure, rather than always calling
5903 _bfd_get_elt_at_filepos.
5904 * coff-mips.c (mips_ecoff_backend_data): Initialize
5905 get_elt_at_filepos field.
5906 * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied
5907 from _bfd_generic_read_ar_hdr with minor changes.
5908 (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag.
5909 * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare.
5910 * libbfd.h: Rebuild.
5912 * bfd-in.h (BFD_IN_MEMORY): Define.
5913 * libbfd-in.h (struct bfd_in_memory): Define.
5914 * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag.
5915 (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file.
5916 (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set.
5917 (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag.
5918 * bfd.c (struct _bfd): Change iostream field from char * to PTR.
5919 (bfd_get_size): Handle BFD_IN_MEMORY flag.
5920 * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files.
5921 (bfd_open_file): Cast to PTR, not char *, when setting iostream.
5922 (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set.
5923 * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting
5925 (bfd_openstreamr): Likewise.
5926 * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if
5927 BFD_IN_MEMORY is not set.
5928 * riscix.c (riscix_some_aout_object_p): Likewise.
5929 * bfd-in2.h, libbfd.h: Rebuild.
5931 * targets.c (bfd_target): Add _bfd_get_elt_at_index field.
5932 (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index.
5933 (bfd_get_elt_at_index): Define.
5934 * archive.c (_bfd_generic_get_elt_at_index): Rename from
5935 bfd_get_elt_at_index. Change index parameter from int to
5937 * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare.
5938 (_bfd_noarchive_get_elt_at_index): Define.
5939 (_bfd_archive_bsd_get_elt_at_index): Define.
5940 (_bfd_archive_coff_get_elt_at_index): Define.
5941 * bfd-in2.h, libbfd.h: Rebuild.
5942 * aout-target.h (MY_get_elt_at_index): Define if not defined.
5943 * coff-rs6000.c (xcoff_get_elt_at_index): Define.
5944 * ieee.c (ieee_get_elt_at_index): Define.
5945 * libecoff.h (_bfd_ecoff_get_elt_at_index): Define.
5946 * oasys.c (oasys_get_elt_at_index): Define.
5947 * som.c (som_get_elt_at_index): Define.
5949 * ecoff.c (_bfd_ecoff_find_nearest_line): Don't restrict line
5950 numbers to the .text section.
5952 Mon Jan 8 17:00:57 1996 Ian Lance Taylor <ian@cygnus.com>
5954 * ieee.c (ieee_write_debug_part): Change return type to boolean.
5955 If there is a SEC_DEBUGGING section, get the contents of the debug
5956 information part from it.
5957 (ieee_set_section_contents): Store the contents of a SEC_DEBUGGING
5959 (ieee_write_object_contents): Check ieee_write_debug_part return.
5961 Thu Jan 4 17:12:37 1996 Fred Fish <fnf@cygnus.com>
5963 * config.bfd (i[345]86-*-freebsd*): Add target.
5964 * configure.in (i386freebsd_vec): Add vec.
5965 * configure: Regenerate.
5966 * Makefile.in (BFD32_BACKENDS): Add i386freebsd.o.
5967 (BFD32_BACKENDS_CFILES): Add i386freebsd.c.
5968 Rebuild dependencies..
5969 * freebsd.h: New file.
5970 * i386freebsd.c: New file.
5971 * targets.c (i386freebsd_vec): Declare.
5972 (bfd_target_vector): Add i386freebsd_vec.
5973 * i386linux.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
5974 * i386netbsd.c (SEGMENT_SIZE): Define as TARGET_PAGE_SIZE
5976 Thu Jan 4 16:27:46 1996 Ian Lance Taylor <ian@cygnus.com>
5978 * ieee.c (ieee_slurp_debug): New static function.
5979 (ieee_object_p): Call it.
5980 (ieee_slurp_section_data): Skip debugging sections.
5981 (ieee_get_reloc_upper_bound): Likewise.
5982 (ieee_get_section_contents): Likewise.
5983 (ieee_canonicalize_reloc): Likewise.
5984 (ieee_write_section_part): Likewise.
5985 (ieee_write_debug_part): Likewise.
5986 (ieee_write_data_part): Likewise.
5987 (init_for_output): Likewise.
5989 Wed Jan 3 19:42:47 1996 Michael Meissner <meissner@wogglebug.tiac.net>
5991 * elf32-ppc.c (ppc_elf_relocate_section): Make @GOT relocations
5993 (ppc_elf_howto_raw): Just use bfd_elf_generic_reloc for all howto
5994 relocs, since ppc_elf_relocate_section handles the linker case.
5995 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_reloc): Delete, no longer
5997 (ppc_elf_{addr16_ha,got16,toc16,brtaken}_inner): Merge these into
5998 ppc_elf_relocate_section since that is now the only caller.
5999 (ppc_elf_relocate_section): Ditto.
6001 Wed Jan 3 15:11:30 1996 Ian Lance Taylor <ian@cygnus.com>
6003 * coffcode.h (coff_write_object_contents): If we don't know the
6004 section of the entry point for an XCOFF executable, always set the
6005 entry address to -1.
6007 Tue Jan 2 14:17:15 1996 Michael Meissner <meissner@tiktok.cygnus.com>
6009 * elf.c (bfd_section_from_shdr): Add support for note sections.
6011 Tue Jan 2 13:10:25 1996 Ian Lance Taylor <ian@cygnus.com>
6013 * bfd-in.h (struct _symbol_info): Add stab_type field.
6014 * bfd-in2.h: Rebuild.
6015 * aoutx.h (NAME(aout,get_symbol_info)): Set stab_type.
6017 * elf32-ppc.c: Remove trailing newline from calls to
6019 (ppc_elf_merge_private_bfd_data): Only warn about endianness
6020 difference if target endianness is known.
6022 Thu Dec 21 12:43:49 1995 Michael Meissner <meissner@tiktok.cygnus.com>
6024 * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
6025 old style TOC16 references without using R_PPC_GOT.
6026 (ppc_reloc_type): Ditto.
6027 (ppc_elf_reloc_type_lookup): Add support for TOC16.
6028 (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
6029 (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
6030 (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
6031 (ppc_elf_check_relocs): New function for GOT/PLT support that is
6033 (ppc_elf_adjust_dynamic_symbol): Ditto.
6034 (ppc_elf_adjust_dynindx): Ditto.
6035 (ppc_elf_size_dynamic_sections): Ditto.
6036 (ppc_elf_finish_dynamic_symbol): Ditto.
6037 (ppc_elf_finish_dynamic_sections): Ditto.
6038 (ELF_DYNAMIC_INTERPRETER): Define.
6040 Wed Dec 20 19:14:18 1995 Ken Raeburn <raeburn@cygnus.com>
6042 * elf.c (copy_private_bfd_data): When attaching sections to
6043 segments ignore sections that won't be allocated. Patch from
6046 Tue Dec 19 20:01:43 1995 Ken Raeburn <raeburn@cygnus.com>
6048 * config.bfd: Match on m68k-cbm-* only if OS doesn't match
6051 Tue Dec 19 16:38:59 1995 Ian Lance Taylor <ian@cygnus.com>
6053 * coff-i960.c (CALC_ADDEND): Define.
6054 (coff_i960_relocate_section): Add the input section VMA to the
6055 addend for PC relative relocs.
6057 Sun Dec 17 20:11:55 1995 Kim Knuttila <krk@cygnus.com>
6059 * peicode.h (pe_print_pdata): Must test the entire entry for zero
6060 to correctly terminate.
6062 Fri Dec 15 12:05:57 1995 Ian Lance Taylor <ian@cygnus.com>
6064 * targets.c (enum bfd_endian): Define.
6065 (bfd_target): Rename byteorder_big_p to byteorder, and change it
6066 from boolean to enum bfd_endian. Change header_byteorder_big_p
6068 * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
6069 (bfd_header_big_endian, bfd_header_little_endian): New macros.
6070 * bfd-in2.h: Rebuild.
6071 * All targets: Change initialization of byteorder and
6072 header_byteorder to use enum bfd_endian values rather than
6074 * All files: Change all references to byteorder_big_p and
6075 header_byteorder_big_p to use new bfd_*_endian macros.
6077 * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
6079 * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
6081 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6083 Fri Dec 15 07:32:09 1995 steve chamberlain <sac@slash.cygnus.com>
6085 * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
6087 Thu Dec 14 13:45:37 1995 Ian Lance Taylor <ian@cygnus.com>
6089 * ieee.c: Lots of minor cleanups. Make many functions return
6090 errors rather than calling abort. Also:
6091 (ieee_write_twobyte): Remove; change callers to call existing
6092 ieee_write_2bytes function.
6093 (ieee_write_expression): Don't output the section twice when
6094 outputting a local symbol. Don't emit an extraneous zero if there
6096 (ieee_slurp_sections): Set the lma as well as the vma.
6097 (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
6099 * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
6100 a recognized one or bfd_arch_unknown.
6101 (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
6103 (ihex_get_symtab): Likewise.
6105 Wed Dec 13 15:44:06 1995 Ian Lance Taylor <ian@cygnus.com>
6107 * aoutx.h: Include <ctype.h>.
6108 (struct aout_link_includes_table): Define.
6109 (struct aout_link_includes_totals): Define.
6110 (struct aout_link_includes_entry): Define.
6111 (aout_link_includes_lookup): Define macro.
6112 (struct aout_final_link_info): Add includes field.
6113 (aout_link_includes_newfunc): New static function.
6114 (NAME(aout,final_link)): Initialize includes hash table.
6115 (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
6117 Wed Dec 13 10:52:14 1995 Stan Shebs <shebs@andros.cygnus.com>
6119 * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
6121 Wed Dec 13 11:07:45 1995 Kim Knuttila <krk@cygnus.com>
6123 * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
6125 Tue Dec 12 17:42:06 1995 Kim Knuttila <krk@cygnus.com>
6127 * peicode.h (pe_print_reloc): New function to dump the .reloc section.
6128 (pe_print_private_bfd_data): call pe_print_reloc.
6129 * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
6130 * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
6131 up some debugging as well.
6133 Tue Dec 12 11:34:23 1995 Ian Lance Taylor <ian@cygnus.com>
6135 * config.bfd: Handle sparc-*-elf*. From Ronald F. Guilmette
6138 Fri Dec 8 17:47:07 1995 Ian Lance Taylor <ian@cygnus.com>
6140 * elflink.h (elf_link_add_object_symbols): Set section_count to 0
6141 when setting sections to NULL.
6143 Wed Dec 6 17:05:37 1995 Ian Lance Taylor <ian@cygnus.com>
6145 * xcofflink.c (struct xcoff_loader_info): Add export_defineds
6147 (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
6148 (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
6150 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
6151 * bfd-in2.h: Rebuild.
6153 Mon Dec 4 16:40:47 1995 Kim Knuttila <krk@cygnus.com>
6155 * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
6157 Mon Dec 4 11:25:39 1995 Ian Lance Taylor <ian@cygnus.com>
6159 * ihex.c (ihex_scan): Handle record types 4 and 5.
6160 (ihex_object_p): Permit types 4 and 5.
6161 (ihex_set_section_contents): Remove check for out of range
6163 (ihex_write_object_contents): Generate types 4 and 5.
6165 * elflink.h (elf_link_output_extsym): Just ignore warning and
6166 indirect references to symbols which don't really exist.
6168 Sun Dec 3 19:00:27 1995 Kim Knuttila <krk@cygnus.com>
6170 * peicode.h (pe_print_idata): Minor format fixes
6171 (pe_print_edata): New function. Under private printing, this formats
6172 the edata section of a PE file.
6173 (pe_print_private_bfd_data): Added call to pe_print_edata.
6175 Sun Dec 3 16:46:54 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
6177 * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
6178 index, don't call stoi.
6180 Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
6182 * srec.c (srec_scan): Set lma as well as vma.
6184 * ihex.c: New file; support for Intel Hex format.
6185 * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
6186 (ihex_vec): Declare.
6187 (bfd_target_vector): Always include ihex_vec.
6188 * bfd.c (struct _bfd): Add ihex_data field to tdata union.
6189 * Makefile.in: Rebuild dependencies.
6190 (BFD_LIBS): Add ihex.o
6191 (BFD_LIBS_CFILES): Add ihex.c.
6192 * bfd-in2.h: Rebuild.
6194 * elf.c (assign_file_positions_for_segments): Sort the sections in
6196 (get_program_header_size): Return the right size if segment_map is
6198 (copy_private_bfd_data): Don't bother to sort the sections.
6200 * bfd.c (bfd_record_phdr): New function.
6201 * bfd-in.h (bfd_record_phdr): Declare.
6202 * bfd_in2.h: Rebuild.
6204 * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
6207 * libbfd.c (bfd_malloc, bfd_realloc): New functions.
6208 (bfd_zmalloc): Return PTR, not char *. Take size_t, not
6210 * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
6211 (bfd_zmalloc): Change declaration.
6212 * libbfd.h: Rebuild.
6213 * Many files: Use bfd_malloc and bfd_realloc rather than malloc
6214 and realloc. Don't set bfd_error_no_memory if they fail.
6216 Thu Nov 30 19:32:26 1995 Kim Knuttila <krk@cygnus.com>
6218 * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
6219 uses as well. Added a new howto to deal with TOCREL16 relocs that
6220 are TOCDEFN as well.
6221 (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
6222 to handle RVA relocs from dlltool.
6223 (ppc_coff_rtype2howto): TOCDEFN reloc addition.
6224 (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
6225 (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
6227 * coffcode.h (coff_set_alignment_hook): check idata$X sections
6228 to get the right section alignment.
6230 Thu Nov 30 16:48:18 1995 Ian Lance Taylor <ian@cygnus.com>
6232 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6233 p_paddr if p_paddr is zero.
6234 (make_mapping): Set includes_filehdr and includes_phdrs for first
6236 (map_sections_to_segments): Set includes_phdrs for PT_PHDR
6238 (assign_file_positions_for_segments): Handle includes_filehdr and
6239 includes_phdrs. Remove special handling of PT_PHDR and first
6241 (copy_private_bfd_data): Set includes_filehdr and includes_phdr
6242 when appropriate. Remove special handling of PT_PHDR segment.
6243 Use a more complex condition for when a section is included in a
6244 segment to handle Solaris linker oddities.
6246 Thu Nov 30 11:17:33 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
6248 * coff-m88k.c (howto_table): Reformatted for easier reading;
6249 special_function now points to new function m88k_special_reloc.
6250 (howto_hvrt16): Function previously used for handling HVRT16 relocs
6252 (rtype2howto): Do not add reloc's r_offset to the addend, this will
6253 be done correctly by m88k_special_reloc.
6254 (reloc_processing): New function to be used by RELOC_PROCESSING.
6255 (RELOC_PROCESSING): Define to call reloc_processing.
6257 Wed Nov 29 12:42:36 1995 Ian Lance Taylor <ian@cygnus.com>
6259 * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
6260 (pe_print_pdata): Likewise.
6262 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
6263 obstack_alloc fails.
6264 (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
6266 * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
6267 * Many files: don't set bfd_error_no_memory if one of the above
6270 * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
6271 if p_paddr_valid is set.
6272 (copy_private_bfd_data): New static function.
6273 (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
6275 * elf.c (assign_file_positions_for_segments): Fix case where extra
6276 program headers were allocated.
6278 * elf.c (_bfd_elf_print_private_bfd_data): New function.
6279 * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
6280 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
6281 _bfd_elf_print_private_bfd_data.
6283 * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
6284 r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
6285 Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
6286 (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
6287 RELOC_SECTION_LITA for ALPHA_R_IGNORE.
6288 (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
6289 RELOC_SECTION_ABS to RELOC_SECTION_NONE.
6291 Tue Nov 28 16:59:50 1995 Ian Lance Taylor <ian@cygnus.com>
6293 * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
6294 * elf.c (make_mapping): New static function.
6295 (map_sections_to_segments): New static function.
6296 (elf_sort_sections): New static function.
6297 (assign_file_positions_for_segments): New static function.
6298 (map_program_segments): Remove.
6299 (get_program_header_size): Remove sorted_hdrs, count, and
6300 maxpagesize parameters. Simplify.
6301 (assign_file_positions_except_relocs): When generating an
6302 executable, use assign_file_positions_for_segments.
6303 (elf_sort_hdrs): Remove.
6304 (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
6305 to get_program_header_size.
6307 Mon Nov 27 12:27:46 1995 Ian Lance Taylor <ian@cygnus.com>
6309 * hp300hpux.c (MY(callback)): Set lma as well as vma.
6311 * configure, config.in: Regenerate with autoconf 2.7.
6313 * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
6314 * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
6316 Wed Nov 22 12:02:09 1995 Ian Lance Taylor <ian@cygnus.com>
6318 * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
6319 (ecoff_sec_to_styp_flags): Likewise.
6320 (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
6321 (ecoff_set_symbol_info): Handle scRConst.
6322 (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
6323 (ecoff_compute_section_file_positions): Handle .rconst section.
6324 (_bfd_ecoff_write_object_contents): Likewise.
6325 (ecoff_link_check_archive_element): Handle scRConst.
6326 (ecoff_link_add_externals): Likewise.
6327 (ecoff_link_write_external): Handle .rconst section.
6328 (ecoff_reloc_link_order): Likewise.
6329 * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
6330 * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
6332 (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
6334 * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
6335 DEF_DYNAMIC flag is set.
6337 Tue Nov 21 13:25:29 1995 Ken Raeburn <raeburn@cygnus.com>
6339 * host-aout.c: If TRAD_HEADER is defined, include it.
6341 Tue Nov 21 13:03:57 1995 Ian Lance Taylor <ian@cygnus.com>
6343 * aclocal.m4 (AC_PROG_CC): Remove local definition.
6344 (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
6345 (BFD_NEED_DECLARATION): New function.
6346 * configure.in: Use BFD_NEED_DECLARATION.
6347 * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
6348 * configure, config.in: Rebuild with autoconf 2.6.
6350 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
6351 special_sections before returning when called with a non XCOFF
6354 * coffgen.c (coff_renumber_symbols): Sort common symbols with
6357 * coffcode.h (coff_compute_section_file_positions): Only pad the
6358 previous section to force file alignment when creating an
6361 Mon Nov 20 14:54:09 1995 Ian Lance Taylor <ian@cygnus.com>
6363 * coffcode.h (coff_compute_section_file_positions): If
6364 RS6000COFF_C, set up the .debug section.
6366 * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
6367 if it is not large enough to accomodate the entire TOC area with
6368 signed 16 bit offsets.
6369 (xcoff_write_global_symbol): Handle negative TOC offsets in global
6371 (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
6372 TOC anchor to use the TOC value used in the output file.
6374 Sat Nov 18 18:01:41 1995 Ian Lance Taylor <ian@cygnus.com>
6376 * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
6377 (_bfd_coff_read_string_table): Likewise.
6379 Sat Nov 18 19:43:04 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
6381 * pe-arm.c: Fix typos.
6382 * coff-arm.c: Likewise.
6384 Fri Nov 17 16:22:04 1995 Kim Knuttila <krk@cygnus.com>
6386 * coff-ppc.c (list_ele): Added "cat"egory member.
6387 (record_toc): New category parameter (priv or pub).
6388 (ppc_record_toc_entry): Check to see if toc bounds exceeded.
6389 (ppc_process_before_allocation): Removed embrionic data-in-toc from
6390 the mainline. It addes extra toc cells in error.
6391 (ppc_coff_swap_sym_in_hook): Added some documentation.
6392 (dump_toc): Can now diagnose "virtual toc" chicanery.
6394 Fri Nov 17 10:41:25 1995 Philippe De Muyter <phdm@info.ucl.ac.be>
6396 * elf-bfd.h (struct elf_link_hash_table): Change type of
6397 dynsymcount and bucketcount fields from size_t to bfd_size_type.
6399 Fri Nov 17 10:02:58 1995 Ian Lance Taylor <ian@cygnus.com>
6401 * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
6402 pointerize C_LEAFSTAT or C_LEAFEXT entries.
6404 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
6405 DT_INIT and DT_FINI entries if the _init or _fini symbol is
6406 defined or mentioned in a regular file.
6408 Thu Nov 16 15:16:42 1995 Kim Knuttila <krk@cygnus.com>
6410 * coff-ppc.c (ppc_record_data_in_toc_entry): new function
6411 (coff_ppc_relocate_section): Handle TOCDEFN attribute
6412 (coff_ppc_relocate_section): Correct REL24 handling
6413 (ppc_process_before_allocation): Correct TOCDEFN handling
6415 * peicode.h (dir_names): Added name descriptions
6417 Thu Nov 16 03:38:03 1995 Ken Raeburn <raeburn@cygnus.com>
6419 * VERSION: Updated to cygnus-2.6.
6421 Wed Nov 15 19:30:07 1995 Ken Raeburn <raeburn@cygnus.com>
6423 * targets.c (m68k4knetbsd_vec): Declare.
6425 Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
6427 * targets.c (bfd_target): Change type of second argument to
6428 _bfd_print_private_bfd_data from void * to PTR.
6429 * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
6430 using PTR rather than void *.
6431 * bfd-in2, libbfd.h: Rebuild.
6432 * peicode.h (pe_print_private_bfd_data): Change vfile from void *
6434 * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
6435 _bfd_generic_bfd_print_private_bfd_data rather than casting
6438 Wed Nov 15 04:09:14 1995 Ken Raeburn <raeburn@cygnus.com>
6440 * Makefile.in (.dep1): Fix stupid typo in last change. Remove any
6441 "DO NOT DELETE" lines or blank lines that mkdep writes on some
6443 (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
6444 BFD64_BACKENDS_CFILES): New variables.
6447 Tue Nov 14 11:52:23 1995 Ian Lance Taylor <ian@cygnus.com>
6449 * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
6450 not at the file position of the first section.
6451 * coffcode.h (coff_compute_section_file_positions): Avoid using
6453 (coff_write_object_contents): When generating a PPC PE executable
6454 with no symbols, round up the file size to a COFF_PAGE_SIZE
6456 * cofflink.c (_bfd_coff_final_link): If there are no symbols,
6457 don't write out a string table.
6459 * elf.c (bfd_section_from_shdr): When using a different section
6460 header, pass the new one to _bfd_elf_make_section_from_shdr.
6461 (elf_fake_sections): Don't set sh_info and sh_entsize fields.
6462 (elf_map_symbols): Add section VMA to symbol value when comparing
6464 (_bfd_elf_compute_section_file_positions): Only build symbol table
6465 if there are some symbols. Set file offset of symtab and strtab
6467 (assign_file_positions_except_relocs): Remove dosyms parameter.
6468 Change all callers. Never set file offset of symtab and strtab
6470 (_bfd_elf_copy_private_section_data): New function.
6471 (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
6472 (_bfd_elf_copy_private_symbol_data): New function.
6473 (swap_out_syms): Check for special mapping of st_shndx created by
6474 copy_private_symbol_data.
6475 * elfxx-target.h: Use new copy routines.
6476 * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
6477 (_bfd_elf_copy_private_section_data): Declare.
6479 * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
6481 * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
6484 * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
6485 _bfd_dummy_target, matching the recent change to archive
6488 Mon Nov 13 13:24:38 1995 Ian Lance Taylor <ian@cygnus.com>
6490 * libbfd.c (bfd_get_file_window): Use casts to avoid doing
6491 arithmetic on PTR types.
6493 * aout-target.h (MY(callback)): Set the lma of the sections.
6495 * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
6496 symbol into a reloc against the section.
6498 Mon Nov 13 07:31:35 1995 Kim Knuttila <krk@cygnus.com>
6500 * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
6501 glue for the relocs: IMGLUE and IFGLUE.
6502 (record_toc): new function - tracks toc contents
6503 (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
6504 (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
6505 (ppc_coff_rtype2howto): removed invalid IMGLUE hack
6506 (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
6507 (ppc_record_toc_entry): Removed a debug define (duh)
6509 * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
6510 (pe_print_idata): New function - formats the idata section data
6511 (pe_print_pdata): New function - formats the pdata section data
6512 (pe_print_private_bfd_data): calls to above
6514 Sun Nov 12 12:23:24 1995 Stan Shebs <shebs@andros.cygnus.com>
6516 * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
6517 * coff-rs6000.c (rs6000coff_vec): Add conditional defines
6518 TARGET_SYM and TARGET_NAME for vector and BFD name.
6519 * coff-pmac.c (pmac_xcoff_vec): Remove.
6520 (TARGET_SYM, TARGET_NAME): Define.
6521 * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
6522 machine to 0, not all PowerMacs are 601s.
6524 Fri Nov 10 12:10:14 1995 Ian Lance Taylor <ian@cygnus.com>
6526 * elfcode.h (elf_object_p): Read in any program headers.
6527 * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
6528 based on the program headers, if any.
6529 (elf_fake_sections): Set sh_addr from the vma, not the lma.
6530 (map_program_segments): Set p_paddr of program headers based on
6533 Thu Nov 9 13:01:31 1995 Ian Lance Taylor <ian@cygnus.com>
6535 * archive.c (bfd_generic_archive_p): Preserve tdata in case of
6538 * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
6539 trying to do a relocateable link with a non-a.out object file.
6541 * archive.c (bfd_generic_archive_p): Check the first object file
6542 in an archive even if target_defaulted is set. If the object file
6543 has the wrong xvec, reject it.
6545 * aoutx.h (NAME(aout,set_section_contents)): If a section can not
6546 be represented, report the name via _bfd_error_handler.
6547 (translate_to_native_sym_flags): Likewise.
6548 * elf32-mips.c (mips_elf_final_link): Likewise.
6549 * oasys.c (oasys_write_sections): Likewise.
6551 * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
6552 which checks for STYP_OVRFLO sections.
6553 (coff_compute_section_file_positions): If RS6000COFF_C, handle
6554 reloc and lineno count overflows.
6555 (coff_write_object_contents): Call coff_count_linenumbers before
6556 coff_compute_section_file_positions. If RS6000COFF_C, handle
6557 reloc and lineno count overflows.
6558 * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
6559 relocs before dealing with .pad sections. Count overflow section
6560 headers when handling .pad sections.
6562 * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
6565 * xcofflink.c (XCOFF_DESCRIPTOR): Define.
6566 (struct xcoff_link_hash_table): Add descriptor_section and
6567 special_sections fields.
6568 (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
6569 (xcoff_link_add_symbols): Set linkage section alignment. Create
6570 descriptor section. Check for magic symbol names (_text, etc.),
6571 and record them in special_sections if found. Set
6572 XCOFF_DESCRIPTOR flag for a function descriptor, and set its
6573 descriptor field to point back to the function code symbol.
6574 (xcoff_sweep): Always mark the special descriptor_section.
6575 (bfd_xcoff_export_symbol): Check whether the symbol might be a
6576 function descriptor, and mark it if it is.
6577 (bfd_xcoff_size_dynamic_sections): Add new special_sections
6578 parameter, and fill it in. Allocate space for the descriptor
6580 (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
6581 global linkage code. If an undefined function descriptor is
6582 exported, arrange to define it. Warn about any other undefined
6584 (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
6585 (xcoff_write_global_symbol): Create a function descriptor when
6587 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
6588 * bfd-in2.h: Rebuild.
6590 Thu Nov 9 08:40:23 1995 Kim Knuttila <krk@cygnus.com>
6592 * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
6593 (ppc_coff_link_hash_table): new types for hashing
6594 (ppc_coff_link_hash_newfunc): hash entry constructor
6595 (ppc_coff_link_hash_table_init): hash table initializer
6596 (ppc_coff_link_hash_table_create): hash table constructor
6597 (ppc_record_toc_entry): changed references to hash table
6598 (coff_ppc_relocate_section): changed references to hash table
6600 * libcoff-in.h (coff_link_hash_entry): removed toc_offset
6601 * libcoff.h: Rebuild
6603 * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
6604 (coff_link_add_symbols): removed toc_offset init
6606 Thu Nov 9 04:00:38 1995 Ken Raeburn <raeburn@cygnus.com>
6608 * Makefile.in (.dep1): Make sure the file mkdep is to write exists
6611 * configure.in: Added new option --with[out]-mmap. Set USE_MMAP
6612 if it is given and mmep is available.
6613 * acconfig.h: Undef USE_MMAP.
6614 * configure, config.in: Regenerated.
6615 * aoutx.h: If USE_MMAP is not defined, do all symbol and string
6616 table handling the old way.
6617 (aout_get_external_symbols): Don't complain if last byte of string
6619 * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
6620 (bfd_free_window) [! USE_MMAP]: Don't define.
6621 (bfd_get_file_window,
6622 _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
6624 Wed Nov 8 20:03:44 1995 Eric Freudenthal <freudenthal@nyu.edu>
6626 * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
6629 Wed Nov 8 11:31:11 1995 Ian Lance Taylor <ian@cygnus.com>
6631 * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
6632 compatible with AMD generated COFF files. Try to support both AMD
6633 and GNU formats simultaneously.
6634 (coff_a29k_relocate_section): Likewise.
6636 * libbfd.c (bfd_get_file_window): Change writable parameter from
6637 int to boolean; update all callers. Pass MAP_SHARED if not
6638 writable--it's required on Solaris. Cast fprintf argument to
6640 * bfd-in.h (bfd_get_file_window): Update declaration.
6641 * bfd-in2.h: Rebuild.
6642 * aoutx.h: Update calls to bfd_get_file_window.
6644 * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
6646 (xcoff_swap_ldhdr_in): New static function.
6647 (xcoff_swap_ldsym_in): New static function.
6648 (xcoff_find_reloc): Handle the case of a single reloc correctly.
6649 (xcoff_link_add_symbols): If we just created a descriptor, pass it
6650 to _bfd_generic_link_add_one_symbol, to save a hash lookup.
6651 Handle XTY_ER/XMC_XO symbols correctly.
6652 (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
6653 rather than normal symbol table.
6654 (bfd_xcoff_import_symbol): It's not an error if the symbol is
6655 already defined with the same absolute value.
6656 (xcoff_mark): When considering called symbols, check whether the
6657 descriptor is from a dynamic object, rather than the symbol
6659 (xcoff_build_ldsyms): Likewise.
6661 * libbfd.c (bfd_get_file_window): Change return type to boolean.
6662 Cast realloc and malloc return values. If malloc or realloc fail,
6663 set bfd_error_no_memory.
6664 * bfd-in.h (bfd_get_file_window): Change type to boolean.
6665 * bfd-in2.h: Rebuild.
6667 Tue Nov 7 11:53:48 1995 Kim Knuttila <krk@cygnus.com>
6669 * coff-ppc.c (ppc_record_toc_entry): new function.
6670 (in_reloc_p): changed return value.
6671 (coff_ppc_relocate_section): much rework.
6672 (ppc_allocate_toc_section): new function.
6673 (ppc_process_before_allocation): new function.
6674 (ppc_coff_swap_sym_in_hook): new function.
6676 * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
6677 (coff_link_add_symbols): initialize toc_offset.
6679 * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
6680 (coff_swap_aouthdr_out): Added more sections to the data
6681 dictionary for the pe file header. Also changed linker version
6682 number on the ppc side.
6683 (dir_names): small improvements to the dictionary printing.
6684 (pe_mkobject_hook): save the file level flags.
6686 * libcoff-in.h (coff_link_hash_entry): added toc_offset field
6687 (pe_tdata): added real_flags field
6688 (coff_tdata): added local_toc_sym_map and access macro
6690 * libcoff.h (coff_link_hash_entry): added toc_offset field
6691 (pe_tdata): added real_flags field
6692 (coff_tdata): added local_toc_sym_map and access macro
6694 * coffcode.h (coff_set_alignment_hook): added hook for PE.
6695 (coff_mkobject): init for local_toc_sym_map
6696 (coff_write_object_contents): set the internal_a.magic to
6697 IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
6700 Tue Nov 7 13:48:58 1995 Ian Lance Taylor <ian@cygnus.com>
6702 * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
6703 entries until both the line number address and the function name
6704 address are too large.
6706 * configure.in: Call AC_CHECK_PROG to find and cache AR.
6707 * configure: Rebuilt.
6709 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
6710 is defined in the environment.
6712 Tue Nov 7 10:57:24 1995 Jeffrey A Law (law@cygnus.com)
6714 * som.c (som_get_section_contents_in_window): Define to use
6717 Mon Nov 6 17:13:15 1995 Harry Dolan <dolan@ssd.intel.com>
6719 * coff-i860.c: New file, based on coff-i386.c.
6720 * cpu-i860.c: New file, based on cpu-i386.c.
6721 * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
6722 * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
6723 targets, using i860coff_vec.
6724 * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
6725 trad-core.o and hosts/i860mach3.h.
6726 (i860coff_vec): Use coff-i860.o and cofflink.o.
6727 * configure: Rebuild.
6728 * Makefile.in: Rebuild dependencies.
6729 (ALL_MACHINES): Add cpu-i860.o.
6730 (BFD32_BACKENDS): Add coff-i860.o.
6731 (CFILES): Add cpu-i860.c and coff-i860.c.
6732 * targets.c (i860coff_vec): Declare.
6733 (bfd_target_vector): Add &i860coff_vec.
6734 * archures.c (bfd_i860_arch): Declare.
6735 (bfd_archures_list): Add &bfd_i860_arch.
6736 * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
6737 (coff_set_flags): Handle bfd_arch_i860.
6738 (coff_write_object_contents): Handle I860 a.out magic number.
6740 Mon Nov 6 14:34:07 1995 Ian Lance Taylor <ian@cygnus.com>
6742 * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
6743 the created .tc section to 2.
6744 (xcoff_mark): Don't keep a .loader reloc for a call to an
6745 undefined symbol when creating a shared library.
6746 (xcoff_build_ldsyms): When creating a shared library, generate
6747 global linkage code for a call to an undefined symbol.
6749 Sun Nov 5 21:44:13 1995 Ken Raeburn <raeburn@cygnus.com>
6751 * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
6752 BFD32_BACKENDS, BFD64_BACKENDS.
6753 (.dep1): Put mkdep output in a separate file.
6754 Rebuilt dependencies.
6756 * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
6759 Permit use of mmap when available:
6761 * configure.in: Check for mmap, madvise, mprotect.
6762 * config.in, configure: Regenerated.
6764 * libbfd.c (struct _bfd_window_internal): Define type.
6765 (bfd_init_window, bfd_free_window, bfd_get_file_window): New
6767 (ok_to_map): New static variable for debugging.
6768 (_bfd_generic_get_section_contents_in_window): New function.
6769 * bfd-in.h (bfd_window_internal): Declare type.
6770 (bfd_window): Define type.
6771 (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
6772 * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
6775 * libaout.h (struct aoutdata): Add two window fields.
6776 (obj_aout_sym_window, obj_aout_string_window): New macros.
6777 * aoutx.h (some_aout_object_p): Initialize windows.
6778 (aout_get_external_symbols): Get symbol data and strings in
6779 windows instead of explicitly allocated buffers.
6780 (slurp_symbol_table): Free window instead of memory.
6781 (bfd_free_cached_info): Release windows instead of freeing storage
6783 (aout_link_free_symbols): Ditto.
6785 * targets.c (bfd_target): Add new field for
6786 get_section_contents_in_window.
6787 (BFD_JUMP_TABLE_GENERIC): Updated.
6788 * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
6789 coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
6790 libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
6791 macros for get_section_contents_in_window field.
6793 Sat Nov 4 12:23:26 1995 Fred Fish <fnf@cygnus.com>
6795 * core.c: Renamed to corefile.c
6796 * makefile.dos (OBJS): Change core.o to corefile.o
6797 * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
6800 Sat Nov 4 10:16:54 1995 Stu Grossman (grossman@cygnus.com)
6802 * config.bfd (mips*-*-magic*): Add bfd_elf32_bigmips_vec to
6803 targ_selvecs to allow debugging under Irix-5 native.
6806 Fri Nov 3 15:54:59 1995 Ian Lance Taylor <ian@cygnus.com>
6808 * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
6809 to o. Clobber and restore the list of new csects around the call
6810 to _bfd_generic_link_add_one_symbol, in case it wants to report a
6811 linker error and the linker wants to read the symbol table. Reset
6812 the line number count of a real section even if it has no relocs.
6813 (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
6815 * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
6818 Thu Nov 2 23:16:39 1995 Ian Lance Taylor <ian@cygnus.com>
6820 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
6821 an undefined symbol in a shared link.
6823 * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
6824 oldtype from bfd_link_order_type to bfd_link_hash_type. From
6825 phdm@info.ucl.ac.be (Philippe De Muyter).
6827 Wed Nov 1 14:26:02 1995 Manfred Hollstein KS/EF4A 60/1F/110 #40283 <manfred@lts.sel.alcatel.de>
6829 * coff-m88k.c (rtype2howto): New static function.
6830 (RTYPE2HOWTO): Use it rather than a macro definition.
6832 * coffcode.h (coff_write_object_contents): set internal_a.magic
6833 to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
6835 * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
6836 define TRAD_HEADER to new file hosts/delta68.h.
6837 m88*-motorola-sysv*, however, does use ptrace-core.o.
6838 * hosts/delta68.h: New file.
6840 * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
6841 bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
6843 Wed Nov 1 13:51:54 1995 Ken Raeburn <raeburn@cygnus.com>
6845 * i386linux.c (MY(vec)): Declare before use.
6847 Wed Nov 1 11:45:07 1995 Ian Lance Taylor <ian@cygnus.com>
6849 * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
6850 Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
6852 * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
6853 BFD is not of the right type.
6854 (bfd_elf_get_needed_list): Likewise.
6855 * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
6856 * sunos.c (bfd_sunos_get_needed_list): Likewise.
6857 * xcofflink.c (XCOFF_XVECP): Define.
6858 (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
6860 (bfd_xcoff_import_symbol): Likewise.
6861 (bfd_xcoff_export_symbol): Likewise.
6862 (bfd_xcoff_link_count_reloc): Likewise.
6863 (bfd_xcoff_record_link_assignment): Likewise.
6864 (bfd_xcoff_size_dynamic_sections): Likewise.
6866 * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
6867 table index against the number of symbols for a base relative
6870 * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
6872 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
6873 full_aouthdr flag here...
6874 (_bfd_xcoff_bfd_final_link): ...not here.
6876 Tue Oct 31 12:52:02 1995 Fred Fish <fnf@cygnus.com>
6878 * libelf.h: Rename to elf-bfd.h to avoid conflict with
6879 systems that have a system <libelf.h>.
6880 * Makefile.in: Globally replace libelf.h with elf-bfd.h.
6881 * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
6882 elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
6883 elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
6884 elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
6885 elfxx-target.h: Include elf-bfd.h rather than libelf.h.
6886 * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
6888 Tue Oct 31 15:30:07 1995 David Mosberger-Tang <davidm@azstarnet.com>
6890 * ecoff.c (ecoff_set_symbol_info): Add new parameter weak. If
6891 set, set BSF_WEAK in symbol. Change all callers.
6892 (ecoff_get_extr): Set weakext based on BSF_WEAK.
6893 (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
6894 _bfd_generic_link_add_one_symbol.
6895 (ecoff_indirect_link_order): Check that the section tdata relocs
6896 are not NULL before using them.
6898 * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
6899 define TRAD_HEADER as hosts/alphalinux.h.
6900 * configure: Rebuild.
6901 * hosts/alphalinux.h: New file.
6902 * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
6905 Tue Oct 31 12:34:11 1995 Ian Lance Taylor <ian@cygnus.com>
6907 * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
6908 C_ECOMM storage classes.
6910 * xcofflink.c (xcoff_mark_symbol): New static function, broken out
6912 (xcoff_mark): Call xcoff_mark_symbol.
6913 (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
6914 (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
6916 (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
6918 Mon Oct 30 14:53:48 1995 Ian Lance Taylor <ian@cygnus.com>
6920 * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
6922 (xcoff_find_reloc): New static function.
6923 (xcoff_link_add_symbols): Use it.
6924 (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
6925 (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL. Don't
6926 relocate the value of C_DECL.
6928 * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
6930 Sat Oct 28 01:25:34 1995 steve chamberlain <sac@slash.cygnus.com>
6932 * cofflink.c (_bfd_coff_generic_relocate_section): Make
6933 callback decide what goes in .relocs.
6934 * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
6935 * peicode.h (pe_mkobject_hook): Only copy aouthdr if
6938 Sat Oct 28 01:51:02 1995 Ian Lance Taylor <ian@cygnus.com>
6940 * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
6943 Fri Oct 27 18:14:39 1995 Ian Lance Taylor <ian@cygnus.com>
6945 * xcofflink.c: More improvements, mostly to fix handling of
6946 constructors and a few other special cases.
6947 * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
6948 zero, reverting yesterday's change.
6949 * bfd-in.h (bfd_xcoff_link_record_set): Declare.
6950 (bfd_xcoff_link_count_reloc): Declare.
6951 (bfd_xcoff_record_link_assignment): Declare.
6952 * bfd-in2.h: Rebuild.
6954 Fri Oct 27 14:42:15 1995 Niklas Hallqvist <niklas@appli.se>
6956 * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
6957 aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
6958 i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
6959 i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
6960 ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
6961 Change PAGE_SIZE to TARGET_PAGE_SIZE.
6963 * m68knetbsd.c: Ditto as well as add support for the m68k4k object
6966 * netbsd.h: Double ditto (incl. m68k4k support). NetBSD's text
6967 segments includes the a.out header. See to that the magic number
6968 *always* is big-endian.
6970 * config.bfd: Add m68*-hp*-netbsd* case. Cross-pollinate m68k and
6971 m68k4k NetBSD configurations.
6973 * configure.in, configure: Separate i386 & mips NetBSD
6974 configurations from other BSD ones. Don't assume DEC is the only
6975 thing NetBSD/mips run on. Add {m68k,ns32k,sparc}-*-netbsd*
6976 configurations. Add support for m68k4k NetBSD object format.
6978 * libaout.h: Added M_68K4K_NETBSD magic.
6980 * m68k4knetbsd.c: New file.
6982 * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
6984 * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
6987 * hosts/mipsnbsd.h: New file.
6990 Fri Oct 27 09:41:51 1995 Stu Grossman (grossman@cygnus.com)
6992 * config.bfd: Add config stuff for mips*-*-magic* to set
6993 targ_defvec to ecoff_big_vec.
6996 Thu Oct 26 14:16:47 1995 Ian Lance Taylor <ian@cygnus.com>
6998 * xcofflink.c: Numerous changes to get closer to a working XCOFF
7000 * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
7001 toc_section, and entry_section fields.
7002 (struct xcoff_section_tdata): Remove ldrel_count field.
7003 * libcoff.h: Rebuild.
7004 * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
7006 (coff_compute_section_file_positions): If RS6000COFF_C, generate
7007 full a.out header if full_aouthdr is set in xcoff_data.
7008 (coff_write_object_contents): Likewise. Set o_snentry and o_sntoc
7009 based on sections stored in xcoff_data.
7010 * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
7012 (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
7013 (rs6000coff_vec): Set symbol_leading_char to '.'.
7014 * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
7015 value stored in ret rather than returning a pointer value.
7017 Wed Oct 25 23:10:39 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7019 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
7022 Wed Oct 25 16:19:27 1995 Jeffrey A Law (law@cygnus.com)
7024 * som.c (som_slurp_string_table): Allocate the strings with malloc
7025 since they're free'd by free_cached_info.
7026 (som_slurp_symbol_table): Similarly for the symbol table.
7028 Wed Oct 25 14:59:22 1995 Per Bothner <bothner@kalessin.cygnus.com>
7030 * Makefile.in (diststuff): Don't make headers.
7032 Wed Oct 25 11:32:54 1995 Ian Lance Taylor <ian@cygnus.com>
7034 * Makefile.in: Rebuild dependencies.
7036 * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
7037 output_bfd is not SunOS.
7038 (bfd_sunos_size_dynamic_sections): Likewise. Don't scan relocs of
7039 non-SunOS input files.
7041 * xcofflink.c: Extensive changes to support linking shared objects
7042 and generating a .loader section.
7043 * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
7044 (struct xcoff_section_tdata): Add lineno_count, first_symndx,
7045 last_symndx, and ldrel_count fields.
7046 * libcoff.h: Rebuild.
7047 * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
7048 * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
7050 * bfd-in.h (bfd_xcoff_import_symbol): Declare.
7051 (bfd_xcoff_export_symbol): Declare.
7052 (bfd_xcoff_size_dynamic_sections): Declare.
7053 * bfd-in2.h: Rebuild.
7055 Tue Oct 24 17:44:20 1995 Stan Shebs <shebs@andros.cygnus.com>
7057 * configure.in: Add xcofflink.o to pmac_xcoff_vec.
7058 * configure: Rebuild.
7059 * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
7060 * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
7062 (pmac_xcoff_vec): Update to use new xcoff support.
7063 * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
7064 (xcoff_write_armap): Declare buf as unsigned char.
7065 * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
7067 * mpw-make.sed: Generalize subdir_do edit.
7069 Tue Oct 24 10:25:01 1995 Jeffrey A Law (law@cygnus.com)
7071 * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
7072 correctly. Don't initialize asect->vma.
7074 Fri Oct 20 13:23:48 1995 Ken Raeburn <raeburn@cygnus.com>
7076 * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
7077 something a little less than the page size.
7079 Thu Oct 19 13:06:09 1995 Ian Lance Taylor <ian@cygnus.com>
7081 * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
7083 Wed Oct 18 16:20:08 1995 steve chamberlain <sac@slash.cygnus.com>
7085 * coff-i386.c (coff_i386_reloc_type_lookup): New.
7086 * coffcode.h (coff_write_object_contents): If .bss is before
7087 .data us that as data_start.
7088 * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
7090 * peicode.h (add_data_entry): Use _cooked_size of data directory.
7091 (coff_swap_outhdr_out): Hardwire in version number.
7093 Wed Oct 18 16:50:54 1995 Ken Raeburn <raeburn@cygnus.com>
7095 * sunos.c (sunos_add_dynamic_symbols): Rename local variables
7096 major and minor to *_vno, since the former are also macros in
7097 SunOS header files. Cast result of bfd_alloc to appropriate
7100 * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
7101 before assigning to sec_data.
7103 Wed Oct 18 13:25:17 1995 Ian Lance Taylor <ian@cygnus.com>
7105 * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
7106 now relative to the section, not absolute.
7107 * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
7108 get the file name when there is a N_SO directory name. When
7109 handling stabs, remember that section->vma was added to the
7112 Tue Oct 17 18:24:54 1995 Ian Lance Taylor <ian@cygnus.com>
7114 * sunos.c (struct sunos_link_hash_table): Add needed field.
7115 (sunos_link_hash_table_create): Call bfd_release, not free.
7116 (sunos_link_hash_table_create): Initialize needed field.
7117 (sunos_add_dynamic_symbols): Record needed objects.
7118 (bfd_sunos_get_needed_list): New function.
7119 * bfd-in.h (bfd_sunos_get_needed_list): Declare.
7120 * bfd-in2.h: Rebuild.
7122 Mon Oct 16 14:43:59 1995 steve chamberlain <sac@slash.cygnus.com>
7124 * libcoff-in.h (pe_data_type.in_reloc_p): New.
7126 Mon Oct 16 10:52:50 1995 Ian Lance Taylor <ian@cygnus.com>
7128 * bfd-in.h (struct bfd_link_needed_list): Rename from
7129 bfd_elf_link_needed_list.
7130 * bfd-in2.h: Rebuild.
7131 * elf.c, elflink.h, libelf.h: Corresponding changes.
7133 Add start at AIX linker support; no shared libraries yet.
7134 * xcofflink.c: New file.
7135 * configure.in (rs600coff_vec): Use xcofflink.o.
7136 * configure: Rebuild.
7137 * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
7139 (struct xcoff_section_tdata): Define.
7140 (xcoff_section_data): Define macro.
7141 (_bfd_xcoff_bfd_link_hash_table_create): Declare.
7142 (_bfd_xcoff_bfd_link_add_symbols): Declare.
7143 (_bfd_xcoff_bfd_final_link): Declare.
7144 (_bfd_ppc_xcoff_relocate_section): Declare.
7145 * libcoff.h: Rebuild.
7146 * coff-rs6000.c: Clean up a bit.
7147 (xcoff_mkobject): Default modtype to 1L, not RE. Initialize
7148 cputype, csects, and debug_indices.
7149 (xcoff_copy_private_bfd_data): Copy cputype.
7150 (xcoff_howto_table): Rename from rs6000coff_howto_table.
7151 (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
7152 (xcoff_reloc_type_lookup): Rename from
7153 rs6000coff_reloc_type_lookup.
7154 (coff_relocate_section): Define.
7155 (_bfd_xcoff_sizeof_headers): Define.
7156 (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
7157 (_bfd_xcoff_bfd_relax_section): Define.
7158 (_bfd_xcoff_bfd_link_split_section): Define.
7159 (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
7161 * coffcode.h (coff_compute_section_file_positions): If AIX,
7162 increment sofar by SMALL_AOUTSZ if not executable.
7163 (coff_write_object_contents): If AIX, always output an a.out
7164 header; if not executable, header size of SMALL_AOUTSZ.
7165 * hash.c (struct bfd_strtab_hash): Add xcoff field.
7166 (_bfd_stringtab_init): Initialize xcoff field.
7167 (_bfd_xcoff_stringtab_init): New function.
7168 (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
7169 (_bfd_stringtab_emit): In XCOFF mode, write out length.
7170 * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
7171 * libbfd.h: Rebuild.
7172 * Makefile.in: Rebuild dependencies.
7173 (BFD32_BACKENDS): Add xcofflink.o.
7174 (CFILES): Add xcofflink.c.
7176 * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
7177 SEC_NO_FLAGS, for .acommon section. From Peter Schauer
7178 <Peter.Schauer@Regent.E-Technik.TU-Muenchen.DE>.
7180 Sat Oct 14 21:36:02 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7182 * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
7184 Fri Oct 13 17:48:43 1995 Ken Raeburn <raeburn@cygnus.com>
7186 * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
7187 * config.in: Regenerated.
7189 * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
7190 (_bfd_chunksize): New variable.
7191 (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
7192 for obstack chunk size.
7193 * configure.in: Check for getpagesize.
7194 * configure: Regenerated.
7196 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7198 * trad-core.c (rawptr): Make it a local variable of
7199 ptrace_unix_core_file_p.
7201 Fri Oct 13 11:22:01 1995 steve chamberlain <sac@slash.cygnus.com>
7203 * coff-arm.c (in_reloc_p): New.
7204 * coff-i386.c (in_reloc_p): New.
7205 * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
7206 (coff_write_object_contents): Only set has_reloc_section
7208 * cofflink.c (_bfd_coff_generic_relocate_section): Call
7209 in_reloc_p to decide if reloc should be emitted.
7210 * libcoff.h (pe_data_type.in_reloc_p): New.
7211 * peicode.h (pe_mkobject): Initialize in_reloc_p.
7213 Wed Oct 11 00:49:29 1995 Ian Lance Taylor <ian@cygnus.com>
7215 * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
7216 (_bfd_coff_read_internal_relocs): Likewise.
7217 * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
7218 (_bfd_coff_read_internal_relocs): Likewise.
7220 * elflink.h (elf_link_add_object_symbols): Correct conditions
7221 under which type and size change warnings are issued.
7223 Tue Oct 10 18:32:46 1995 Ian Lance Taylor <ian@cygnus.com>
7225 * coffgen.c (coff_count_linenumbers): Don't count line numbers for
7226 a symbol which is not in a real section.
7227 (coff_write_native_symbol): Corresponding change.
7229 * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
7230 coff_link_hash_newfunc and make non-static.
7231 (_bfd_coff_link_hash_table_init): New function, broken out of
7232 _bfd_coff_link_hash_table_create.
7233 (_bfd_coff_link_hash_table_create): Use it.
7234 (process_embedded_commands): Make static.
7235 * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
7236 (_bfd_coff_link_hash_table_init): Declare.
7237 * libcoff.h: Rebuild.
7239 * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
7240 field in XCOFF tdata.
7241 (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
7242 U802ROMAGIC, for clarity. Try to set arch and machine correctly
7243 based on cputype stored in a.out header, or in n_type of initial
7245 (coff_write_object_contents): Set cputype correctly in a.out
7247 (coff_slurp_symbol_table): Add casts to file_ptr to avoid
7249 * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
7250 (coff_swap_aouthdr_out): Swap out cputype field. Don't clear
7252 * libcoff-in.h (struct xcoff_tdata): Add cputype field.
7253 * libcoff.h: Rebuild.
7255 * cpu-rs6000.c (rs6000_compatible): New static function.
7256 (bfd_rs6000_arch): Use it.
7257 * cpu-powerpc.c (powerpc_compatible): New static function.
7258 (arch_info_struct): Define various flavours of PowerPC.
7259 (bfd_powerpc_arch): Use powerpc_compatible. Point at
7262 Tue Oct 10 10:50:46 1995 Fred Fish <fnf@cygnus.com>
7264 * Makefile.in (FLAGS_TO_PASS): Remove BISON.
7266 Tue Oct 10 01:28:29 1995 Ian Lance Taylor <ian@cygnus.com>
7268 * elflink.h (elf_link_add_object_symbols): Don't warn about
7269 changing the size or type if the old definition was weak.
7271 Mon Oct 9 11:24:08 1995 Ian Lance Taylor <ian@cygnus.com>
7273 * coffcode.h (combined_entry_type): Add fix_line field.
7274 (coff_slurp_line_table): Warn if we try to set the lineno field of
7276 (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
7277 C_EINCL by setting fix_line. Fix C_BSTAT symbol value.
7278 * coffgen.c (coff_mangle_symbols): Handle fix_line.
7279 (coff_write_symbol): Only use N_DEBUG if the symbol is in the
7281 (coff_print_symbol): Print fix_value symbols in a useful fashion.
7282 * libcoff.h: Rebuild.
7284 * libcoff-in.h (struct xcoff_tdata): Define.
7285 (xcoff_data): Define.
7286 * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
7287 * bfd-in2.h, libcoff.h: Rebuild.
7288 * coff-rs6000.c (xcoff_mkobject): New static function.
7289 (coff_mkobject): Define.
7290 (xcoff_copy_private_bfd_data): New static function.
7291 (coff_bfd_copy_private_bfd_data): Define.
7292 (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
7294 (rs6000coff_vec): Add DYNAMIC to object_flags.
7295 * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
7296 .loader sections specially.
7297 (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
7298 section alignment from the XCOFF tdata information.
7299 (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
7300 F_SHROBJ, and copy the extra a.out header information into the
7301 XCOFF tdata structure.
7302 (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
7303 F_DYNLOAD and the extra a.out header information.
7304 (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
7305 C_HIDEXT symbol with attached csect information.
7306 * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
7307 in the o_maxdata field.
7308 (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
7309 * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
7310 end if BSF_NOT_AT_END is set.
7312 * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
7313 _bfd_read_ar_hdr_fn.
7314 * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
7315 * bfd-in2.h, libbfd.h: Rebuild.
7316 * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
7318 (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
7319 (bfd_slurp_bsd_armap_f2): Likewise.
7320 (_bfd_slurp_extended_name_table): Likewise.
7322 Fri Oct 6 16:18:35 1995 Ken Raeburn <raeburn@cygnus.com>
7324 Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7326 * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
7327 when the symbol table is empty.
7329 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
7330 space for section symbols, since we don't output them either.
7331 (elf_m68k_adjust_dynindx): Removed.
7333 * ptrace-core.c (rawptr): Make it a local variable of
7334 ptrace_unix_core_file_p.
7336 Fri Oct 6 12:24:47 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7338 * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
7341 * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
7342 Mac object file formats.
7344 Fri Oct 6 12:04:02 1995 Ian Lance Taylor <ian@cygnus.com>
7346 * coffgen.c (coff_fix_symbol_name): Don't try to set up file
7347 auxent if there isn't one.
7348 (coff_write_symbols): If there is no file auxent, use SYMNMLEN
7349 rather than FILNMLEN as the maximum name length.
7351 * coffcode.h (bfd_coff_backend_data): Add new field
7352 _bfd_coff_print_aux.
7353 (bfd_coff_print_aux): New static function.
7354 (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
7355 scnlen field of an XTY_LD csect aux entry.
7356 (coff_print_aux): New static function.
7357 (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
7358 in coff_pointerize_aux_hook.
7359 (bfd_coff_std_swap_table): Initialize new field.
7360 * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
7361 * libcoff.h: Rebuild.
7362 * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
7363 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7365 * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
7366 if there are symbols, for native AIX ld compatibility.
7368 * coffcode.h (bfd_coff_backend_data): Add new field
7369 _bfd_coff_pointerize_aux_hook.
7370 (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
7371 or I960, and as 0 otherwise.
7372 (bfd_coff_std_swap_table): Initialize new field.
7373 * libcoff.h: Rebuild.
7374 * coffgen.c (coff_pointerize_aux): Change parameters to take
7375 symbol pointer instead of type and class, and to take aux index.
7376 Call _bfd_coff_pointerize_aux_hook if it is defined.
7377 (coff_get_normalized_symtab): Always call coff_pointerize_aux.
7378 * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
7379 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7381 * coff-rs6000.c: Add full support for AIX archives. Rewrite old
7382 read-only/host-only support.
7384 * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
7386 (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
7389 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. Modify
7390 BFD_JUMP_TABLE_ARCHIVE accordingly.
7391 * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
7392 (_bfd_compute_and_write_armap): Declare.
7393 (_bfd_generic_read_ar_hdr): Declare.
7394 (_bfd_read_ar_hdr): Define.
7395 (_bfd_noarchive_read_ar_hdr): Define.
7396 (_bfd_archive_bsd_read_ar_hdr): Define.
7397 (_bfd_archive_coff_read_ar_hdr): Define.
7398 * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
7399 _bfd_read_ar_hdr instead.
7400 (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
7401 (_bfd_compute_and_write_armap): Rename from
7402 compute_and_write_armap. Make non-static. Change all callers.
7403 * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
7404 than _bfd_snarf_ar_hdr.
7405 * aout-target.h (MY_read_ar_hdr): Define if not defined.
7406 * ieee.c (ieee_read_ar_hdr): Define.
7407 * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
7408 * oasys.c (oasys_read_ar_hdr): Define.
7409 * som.c (som_read_ar_hdr): Define.
7410 * bfd-in2.h, libbfd.h: Rebuild.
7412 Thu Oct 5 14:04:07 1995 steve chamberlain <sac@slash.cygnus.com>
7414 * peicode.c (coff_swap_filehdr_in): If symptr is
7415 zero, there aren't any symbols, even if nsyms is set.
7417 Thu Oct 5 11:45:02 1995 Ian Lance Taylor <ian@cygnus.com>
7419 * libecoff.h (struct ecoff_backend_data): Add adjust_headers
7421 * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
7422 sections, and set styp correctly for them: .got, .hash, .dynamic,
7423 .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
7424 (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
7426 (ecoff_sort_hdrs): New static function.
7427 (ecoff_compute_section_file_positions): Return boolean, not void.
7428 Sort the sections by VMA before looking through them. Put the
7429 first non SEC_ALLOC section on a new page. Put every SEC_ALLOC
7430 section on an appropriate boundary within the page.
7431 (ecoff_compute_reloc_file_positions): Check return value of
7432 ecoff_compute_section_file_positions.
7433 (_bfd_ecoff_set_section_contents): Likewise.
7434 (_bfd_ecoff_write_object_contents): Check for various Alpha
7435 section types when incrementing text_size and data_size. Call
7436 adjust_headers backend function if it exists.
7437 * coff-alpha.c (alpha_adjust_headers): New static function.
7438 (alpha_ecoff_backend_data): Initialize adjust_headers field.
7439 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7441 * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
7443 Wed Oct 4 18:15:02 1995 Jeff Law (law@hurl.cygnus.com)
7445 * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
7446 of ALTERNATE_AIX_CORE_FORMAT.
7447 * configure.in (aix4): No longer need CORE_FLAGS.
7448 * configure: Updated.
7450 Wed Oct 4 15:36:36 1995 Ken Raeburn <raeburn@cygnus.com>
7452 NS32k changes from Ian Dall:
7453 * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
7455 (aout_link_input_section_std, aout_link_input_section_ext,
7456 aout_link_reloc_link_order): Call them instead of _bfd_*
7458 * aout-target.h (MY_exec_header_not_counted): New macro, defaults
7460 (backend_data): Use it instead of hardcoded zero.
7462 * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
7463 (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
7465 * ns32knetbsd.c: Include bfd.h.
7466 (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
7467 (MY_bfd_reloc_type_lookup): Declare function too.
7468 * pc532-mach.c (set_sizes): Don't declare.
7469 (MY_text_includes_header, MY_exec_header_not_counted): Define.
7470 (backend_data, MY_backend_data): Don't define.
7472 * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
7473 ns32k-*-lites* like ns32k-*-netbsd*.
7475 * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
7478 Wed Oct 4 14:15:52 1995 Ian Lance Taylor <ian@cygnus.com>
7480 * coffcode.h (coff_write_object_contents): Restore setting
7481 f_timdat to 0, deleted on August 22.
7483 Tue Oct 3 16:28:32 1995 steve chamberlain <sac@slash.cygnus.com>
7485 * coffcode.h (coff_bfd_copy_private_symbol_data,
7486 coff_bfd_copy_private_section_data,
7487 coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
7488 * peicode.h (coff_bfd_copy_private_bfd_data): New
7489 (pe_bfd_copy_private_bfd_data): New.
7490 (coff_swap_scnhdr_in): Swap bss size into the right place.
7491 (pe_print_private_bfd_data): Add some newlines.
7493 Tue Oct 3 11:53:04 1995 Jeff Law (law@hurl.cygnus.com)
7495 * som.c (setup_sections): Don't die if a space has no subspaces.
7497 Mon Oct 2 14:08:55 1995 Ian Lance Taylor <ian@cygnus.com>
7499 * elflink.h (elf_link_add_object_symbols): Don't let a weak
7500 dynamic symbol override a common symbol. Don't change the size or
7501 type if they have been set and the new symbol is not a definition.
7502 Warn if the size or type changes.
7504 Sun Oct 1 01:34:41 1995 Jeff Law (law@hurl.cygnus.com)
7506 * som.c (som_begin_writing): Don't write the symbol table or
7508 (som_finish_writing): Write them here. Place them after the
7509 subspace data, but before the relocs.
7511 Fri Sep 29 11:01:55 1995 Ian Lance Taylor <ian@cygnus.com>
7513 * sunos.c (sunos_add_one_symbol): Just pass false, not
7514 info->shared_library, to sunos_create_dynamic_sections.
7515 (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
7517 (sunos_check_dynamic_reloc): Remove .text section assertion.
7519 Thu Sep 28 18:48:47 1995 Stan Shebs <shebs@andros.cygnus.com>
7521 * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
7522 * configure, configure.in: Add pmac_xcoff_vec case.
7523 * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
7524 * coff-pmac.c: New file, PowerMac XCOFF support.
7525 * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
7526 * targets.c (pmac_xcoff_vec): Declare.
7528 * mpw-config.in: Various changes to be compatible with the
7529 autoconf-based configury.
7530 * mpw-make.sed: New file, sed commands to translate Unix
7531 makefile into MPW syntax.
7532 * mpw-make.in: Remove.
7533 * hosts/mpw.h: Remove.
7534 * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
7535 true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
7537 Thu Sep 28 17:06:23 1995 steve chamberlain <sac@slash.cygnus.com>
7539 * binary.c (binary_get_symtab): Return an empty string on error.
7540 * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
7542 Thu Sep 28 15:30:44 1995 Kim Knuttila <krk@nellie>
7544 * coff-ppc.c: Reformatted according to gnu conventions
7545 Removed irrelevant "if 0" code
7547 Thu Sep 28 11:19:53 1995 Ian Lance Taylor <ian@cygnus.com>
7549 * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
7550 symbols rather than as indirect symbols.
7551 (MY(slurp_symbol_table)): Don't do anything special about
7554 * coffcode.h (coff_new_section_hook): Make sure that the alignment
7555 of .ctors and .dtors sections is no larger than 2.
7557 * sunos.c (sunos_add_one_symbol): Don't change
7558 bfd_link_hash_common to bfd_link_hash_new, since it may be on the
7560 (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
7561 dynamic symbols when creating a shared library.
7562 (sunos_scan_ext_relocs): Handle relocs correctly when creating a
7564 (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
7565 written even if it is not defined in a regular object.
7566 (sunos_write_dynamic_symbol): Use plt_offset for the address of
7567 the jump table reloc. Add an assertion. Use RELOC_JMP_SLOT
7568 rather than the constant 22.
7569 (sunos_check_dynamic_reloc): Handle creating a shared library.
7570 (sunos_finish_dynamic_link): Set the first entry in the GOT to
7571 zero when creating a shared library.
7572 * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
7573 write it out at the start of the symbol table.
7575 * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
7577 Thu Sep 28 00:58:05 1995 Doug Evans <dje@deneb.cygnus.com>
7579 * config.bfd: Add arm-*-coff.
7580 * configure.in, configure: Add armcoff_{little,big}_vec.
7581 * targets.c (armcoff_{little,big}_vec): Declare.
7582 (bfd_target_vector): Add armcoff_{little,big}_vec.
7583 * coff-arm.c (armcoff_{little,big}_vec): Always define.
7585 Wed Sep 27 10:37:14 1995 Ian Lance Taylor <ian@cygnus.com>
7587 * targets.c (bfd_find_target): Remove debugging code.
7589 Wed Sep 27 07:23:39 1995 Kim Knuttila <krk@nellie>
7591 * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
7593 * Makefile.in: added *-ppc files
7594 * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
7595 allow pe based .o's to be shared with other tools on ppc/NT
7596 * config.bfd: added powerpc[le]-[pe|winnt] config support
7597 * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
7598 * peicode.h: Added more section flags for PE on ppc
7599 Added coff_swap_filehdr_out to allow peicode.h to be
7600 used for non-image PE files on ppc.
7601 Check for image, or not, before copying pe_opthdr
7602 * targets.c: Added new bfd's
7603 * targets.c: Removed two inactive bfds that shouldn't have made it this
7606 Tue Sep 26 14:06:41 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7608 * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
7609 explicit values to initialize all relocs. Change all users.
7610 (ppc_elf_brtaken_inner): New function to handle branch predicition
7612 (ppc_elf_brtaken_reloc): Ditto.
7613 (ppc_elf_howto_raw): Use new functions. Make sure all unsupported
7614 relocs use ppc_elf_unsupported_reloc.
7615 (ppc_elf_merge_private_bfd_data): Keep track of whether an error
7616 needs to be reported.
7617 (ppc_elf_relocate_section): Support branch prediction relocs.
7619 Tue Sep 26 12:48:05 1995 Ian Lance Taylor <ian@cygnus.com>
7621 * bfd.c (bfd_assert): Remove \n from string passed to
7624 * coff-i386.c: (TWO_DATA_SECS): Don't define.
7625 * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
7626 (bfd_coff_make_section_hook): Don't define.
7627 (coff_make_section_hook): Remove.
7628 (sec_to_styp_flags): Remove TWO_DATA_SECS case.
7629 (styp_to_sec_flags): Likewise.
7630 (coff_write_object_contents): Likewise.
7631 (bfd_coff_std_swap_table): Don't initialize make_section_hook
7633 * libcoff.h: Rebuild.
7634 * coffgen.c (make_a_section_from_file): Just call
7635 bfd_make_section_anyway, not bfd_make_section or
7636 bfd_coff_make_section_hook.
7637 * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
7638 * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
7639 * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
7640 make_section_hook field.
7641 * coff-mips.c (mips_ecoff_backend_data): Likewise.
7643 * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
7644 pointers into value field for warning and indirect symbols; just
7645 leave the value field alone.
7646 * linker.c (generic_link_add_symbol_list): Use next symbol for
7647 warning and indirect symbols, rather than looking in symbol value.
7648 * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
7649 parameter. Change all callers. Remove support for indirect
7650 symbols; it didn't work anyhow.
7651 (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
7652 * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
7653 * bfd-in2.h: Rebuild.
7655 Mon Sep 25 16:04:09 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7657 * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
7658 go back to telling the tools this reloc operates on 32 bits.
7660 Mon Sep 25 11:48:02 1995 Ian Lance Taylor <ian@cygnus.com>
7662 * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
7663 rather than a direct fprintf.
7664 * archive.c (_bfd_write_archive_contents): Likewise.
7665 * coffcode.h (coff_slurp_symbol_table): Likewise.
7666 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
7667 (ppc_elf_unsupported_reloc): Likewise.
7668 (ppc_elf_relocate_section): Likewise.
7669 * i386linux.c (linux_tally_symbols): Likewise.
7670 (linux_finish_dynamic_link): Likewise.
7671 * osf-core.c (osf_core_core_file_p): Likewise.
7672 * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
7673 * som.c (som_sizeof_headers): Likewise.
7674 * srec.c (srec_bad_byte): Likewise.
7675 * bfd.c (bfd_assert): Likewise. Also change file to be const.
7676 * libbfd-in.h (bfd_assert): Declare first parameter const.
7677 * libbfd.h: Rebuild.
7678 * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
7679 bfd_reloc_overflow is enough.
7680 * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
7681 * coff-h8500.c (rtype2howto): Likewise.
7682 * coff-z8k.c (rtype2howto): Likewise.
7683 * coffcode.h (dummy_reloc16_extra_cases): Likewise.
7684 * elf.c (_bfd_elf_get_lineno): Likewise.
7685 (_bfd_elf_no_info_to_howto): Likewise.
7686 (_bfd_elf_no_info_to_howto_rel): Likewise.
7687 * hp300hpux.c (convert_sym_type): Likewise.
7688 (MY(swap_std_reloc_in)): Likewise.
7689 * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
7691 * libaout.h (struct aoutdata): Add line_buf field.
7692 * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
7693 and filename_buffer. Instead, use a malloc buffer stored in the
7694 new line_buf field. Remove length restrictions.
7696 * coffgen.c (string_size): Remove static variable.
7697 (debug_string_size, debug_string_section): Likewise.
7698 (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
7699 and debug_string_size_p parameters. Use them instead of the
7700 global variables. Change all callers.
7701 (coff_write_symbol): Likewise.
7702 (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
7703 (coff_write_symbols): Add local variables to replace removed
7706 * libcoff-in.h (struct coff_section_tdata): Add offset, i,
7707 function, and line_base fields.
7708 * libcoff.h: Rebuild.
7709 * coffgen.c (coff_find_nearest_line): Use section tdata to cache
7710 information, rather than using static variables.
7712 * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
7713 file. From Peter DeWolf <pld@amt.tay1.dec.com>.
7715 * init.c (initialized): Remove static variable.
7716 (bfd_init): Don't bother setting initialized.
7717 (bfd_check_init): Remove.
7718 * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
7719 * libbfd.h: Rebuild.
7721 Sat Sep 23 01:22:23 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
7723 * rs6000-core.c (rs6000coff_core_p): Don't check the core file
7724 size for full core dumps. Copy core file header to private data.
7725 (rs6000coff_core_file_failing_command,
7726 rs6000coff_core_file_failing_signal): New functions to extract
7727 the file name and terminating signal from the core file.
7728 * coff-rs6000.c: Use them.
7730 Fri Sep 22 17:44:47 1995 Ian Lance Taylor <ian@cygnus.com>
7732 Change arch info to be const, initialized at compile time.
7733 * archures.c: Reindent many functions. Change CONST to const.
7734 (bfd_arch_info_type): Make arch_name const. Remove disassemble;
7735 nothing set it anyhow. Make next const.
7736 (bfd_arch_info_list): Remove.
7737 (bfd_archures_list): Rename from archures_init_table. Change from
7738 a table of function pointers to a table of bfd_arch_info_type
7739 structure addresses.
7740 (bfd_scan_arch): Rewrite accordingly. Return a const pointer.
7741 (bfd_lookup_arch): Likewise.
7742 (bfd_set_arch_info): Rewrite accordingly. Change argument to be a
7744 (bfd_default_arch_struct): Make const.
7745 (bfd_arch_init, bfd_arch_linkin): Remove.
7746 (bfd_get_arch_info): Return a const pointer.
7747 * init.c (bfd_init): Don't call bfd_arch_init.
7748 * bfd.c (struct _bfd): Make arch_info const.
7749 * bfd-in2.h: Rebuild.
7750 * libbfd.h: Rebuild.
7751 * configure.in: Put & before everything in $selarchs.
7752 * configure: Rebuild.
7753 * cpu-*.c: Change bfd_*_arch from a function which calls
7754 bfd_arch_linkin to a const structure.
7755 * ieee.c (ieee_object_p): Make arch const.
7757 Fri Sep 22 16:23:18 1995 Michael Meissner <meissner@tiktok.cygnus.com>
7759 * reloc.c (bfd_reloc_code_type): Add relocations to support all of
7761 * bfd-in2.h: Regenerate.
7762 * libbfd.h: Regenerate.
7764 * elf32-ppc.c (reloc_type): Update names to match current draft.
7765 (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
7766 relative. Update names to current V.4 draft.
7767 (ppc_elf_reloc_type_lookup): Add support for more relocations.
7768 (ppc_elf_relocate_section): Rename relocations to match draft.
7770 Thu Sep 21 21:53:18 1995 Michael Meissner <meissner@cygnus.com>
7772 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
7773 compiled with -mrelocatable-lib to be linked with either normal
7774 modules or -mrelocatable modules.
7776 Wed Sep 20 12:03:26 1995 Ian Lance Taylor <ian@cygnus.com>
7778 * coffcode.h (coff_write_object_contents): Clear the vstamp field
7779 in the a.out header.
7781 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
7782 a reloc against a local symbol, even if it's not a section.
7784 Tue Sep 19 17:02:26 1995 Ian Lance Taylor <ian@cygnus.com>
7786 * targets.c (bfd_target): Remove unused align_power_min field.
7787 * bfd-in2.h: Rebuild.
7788 * All backends: Remove initialization of align_power_min.
7790 Tue Sep 19 14:02:21 1995 steve chamberlain <sac@slash.cygnus.com>
7792 * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
7794 Mon Sep 18 14:35:01 1995 Arne H. Juul <arnej@pvv.unit.no>
7796 * config.bfd (mips-dec-netbsd*): New target.
7797 * configure.host (mips-dec-netbsd*): New host.
7798 * configure.in (mips-dec-netbsd*): New native.
7799 * configure: Rebuild.
7801 Fri Sep 15 10:24:36 1995 Ian Lance Taylor <ian@cygnus.com>
7803 Make the COFF backend linker merge common types:
7804 * cofflink.c (struct coff_debug_merge_element): Define.
7805 (struct coff_debug_merge_type): Define.
7806 (struct coff_debug_merge_hash_entry): Define.
7807 (struct coff_debug_merge_hash_table): Define.
7808 (coff_debug_merge_hash_table_init): Define.
7809 (coff_debug_merge_hash_table_free): Define.
7810 (coff_debug_merge_hash_lookup): Define.
7811 (struct coff_final_link_info): Add debug_merge field.
7812 (coff_debug_merge_hash_newfunc): New static function.
7813 (_bfd_coff_final_link): Allocate and free debug_merge table.
7814 (coff_link_input_bfd): Merge identical enum, struct and union
7817 Thu Sep 14 14:53:58 1995 Ian Lance Taylor <ian@cygnus.com>
7819 Convert i960 COFF to use COFF backend linker.
7820 * coff-i960.c (coff_i960_relocate): Use a coff_section_data
7821 structure to store the symbol being used.
7822 (coff_i960_start_final_link): New static function.
7823 (coff_i960_relocate_section): New static function.
7824 (coff_i960_adjust_symndx): New static function.
7825 (coff_start_final_link): Define.
7826 (coff_relocate_section): Define.
7827 (coff_adjust_symndx): Define.
7828 * coffcode.h (bfd_coff_backend_data): Add new callback function
7829 _bfd_coff_start_final_link.
7830 (bfd_coff_start_final_link): Define.
7831 (coff_start_final_link): Define if not defined.
7832 (bfd_coff_std_swap_table): Add coff_start_final_link.
7833 * cofflink.c (_bfd_coff_internal_syment_name): Make globally
7835 (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
7836 function callback is not NULL.
7837 * libcoff-in.h (struct coff_section_tdata): Add tdata field.
7838 (_bfd_coff_internal_syment_name): Declare.
7839 * libcoff.h: Rebuild.
7840 * configure.in (icoff_big_vec): Add cofflink.o.
7841 (icoff_little_vec): Likewise.
7842 * configure: Rebuild.
7844 Wed Sep 13 17:38:23 1995 Fred Fish <fnf@rtl.cygnus.com>
7846 * Makefile.in (clean-info): Remove extraneous tab from line
7849 Wed Sep 13 13:27:53 1995 Ian Lance Taylor <ian@cygnus.com>
7851 * cofflink.c (coff_link_input_bfd): Fail if a section with no
7852 contents has relocs.
7854 Thu Sep 12 12:45:34 1995 steve chamberlain <sac@slash.cygnus.com>
7856 * coffcode.h (coff_compute_section_file_positions): Keep the
7858 (coff_write_object_contents): Remember if it's a relocatable
7860 * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
7861 * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
7862 if relocatable file. Swap out saved raw size.
7864 Tue Sep 12 12:14:33 1995 Ian Lance Taylor <ian@cygnus.com>
7866 * Makefile.in (do_maintainer_clean): Rename from do_realclean.
7867 (maintainer-clean): Rename from realclean, passing
7868 maintainer-clean down to subdirectories, but leave realclean as a
7871 * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
7874 * dep-in.sed: Remove config.h from generated dependencies.
7876 * sunos.c (sunos_slurp_dynamic_symtab): New static function,
7877 broken out of sunos_canonicalize_dynamic_symtab.
7878 (sunos_canonicalize_dynamic_symtab): Call new function
7879 sunos_slurp_dynamic_symtab.
7880 (sunos_add_dynamic_symbols): Add three new parameters. Return the
7881 dynamic symbol table to the caller.
7882 * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
7883 callback to override the symbols being read.
7884 * libaout.h (struct aout_backend_data): Add three new parameters
7885 to add_dynamic_symbols callback.
7887 Extensive minor changes to avoid various gcc warnings. Also:
7888 * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
7889 * archures.c (bfd_arch_info_type): Change mach field from long to
7891 (bfd_lookup_arch): Change machine parameter from long to unsigned
7894 Mon Sep 11 10:55:47 1995 Ian Lance Taylor <ian@cygnus.com>
7896 * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
7897 a symbol with a non-zero plt_offset.
7899 Fri Sep 8 11:47:24 1995 Ian Lance Taylor <ian@cygnus.com>
7901 * elfcode.h (align_file_position): Remove; not used.
7903 * configure.in: Only check for <sys/procfs.h> on a native system,
7904 and make sure it defines prstatus_t.
7905 * configure: Rebuild.
7907 Thu Sep 7 12:48:01 1995 Ian Lance Taylor <ian@cygnus.com>
7909 * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
7911 * config.in: Rename from config.h.in.
7912 * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
7913 Check for config.h:config.in when creating stamp-h.
7914 * configure: Rebuild.
7915 * Makefile.in (stamp-h): Depend upon config.in rather than
7916 config.h.in. Set CONFIG_HEADERS to config.h:config.in when
7917 calling config.status.
7919 * Makefile.in (do_distclean): Remove config.h and stamp-h.
7920 (Makefile): Just rebuild Makefile.
7921 (config.h, stamp-h): New targets.
7922 * configure.in: Create stamp-h when rebuilding config.h.
7923 * configure: Rebuild.
7925 Wed Sep 6 15:00:33 1995 Ian Lance Taylor <ian@cygnus.com>
7927 * configure.in: Call AC_CONFIG_HEADER. Substitute
7928 HOST_64BIT_LONG. Check that various header files exist. Check
7929 that fcntl exists. Call BFD_BINARY_FOPEN. Check whether malloc
7930 and/or free need to be declared. Don't make a link to sysdep.h.
7931 Define TRAD_HEADER for various hosts.
7932 * configure: Rebuild.
7933 * configure.host: Don't set my_host. Add definitions taken from
7934 host header files for various entries. Remove entries which now
7936 * acconfig.h: New file.
7937 * config.h.in: New file, built by autoheader.
7938 * sysdep.h: New file.
7939 * Makefile.in (do_distclean): Don't remove sysdep.h.
7941 (LOCAL_H_DEPS): New variable.
7942 ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
7944 ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
7945 ($(OPTIONAL_BACKENDS)): Likewise.
7946 (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
7947 looking through sysdep.h.
7948 * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
7949 (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
7950 (fprintf_vma, sprintf_vma): Likewise.
7951 (int64_type, uint64_type): Don't define.
7952 * bfd-in2.h: Rebuild.
7953 * archures.c, bfd.c, srec.c: Include <ctype.h>.
7954 * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
7955 * lynx-core.c: Include stuff from old hosts/lynx.h.
7956 * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
7957 rather than NO_FCNTL.
7958 * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
7959 rather than NATIVE_HPPAHPUX_COMPILER.
7960 * trad-core.c: Don't include <errno.h>. Include TRAD_HEADER if it
7962 * hosts/*.h: Remove all header files which merely include,
7963 declare, and define things. Leave header files which define
7964 information needed by trad-core.c.
7966 * aclocal.m4 (BFD_BINARY_FOPEN): Define.
7967 (BFD_CC_FOR_BUILD): Define.
7968 * configure.in: Use BFD_CC_FOR_BUILD.
7969 * configure: Rebuild.
7971 Tue Sep 5 19:35:28 1995 Ian Lance Taylor <ian@cygnus.com>
7973 * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
7974 * configure: Rebuild.
7976 * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
7979 Tue Sep 5 12:48:26 1995 Jason Molenda (crash@phydeaux.cygnus.com)
7981 * config.bfd: i386pe_ve -> i386pe_vec.
7983 Mon Sep 4 14:02:43 1995 Ian Lance Taylor <ian@cygnus.com>
7985 * configure.host: Incorporate host Makefile fragments by setting
7987 * configure.in: Call AC_PROG_CC. Substitute CFLAGS, HDEFINES and
7988 AR. Call AC_PROG_INSTALL. Substitute CC_FOR_BUILD, choosing a
7989 value based on whether the code is being compiled by a cross
7990 compiler. Don't substitute host_makefile_frag or frags.
7991 * aclocal.m4: New file to define local AC_PROG_CC.
7992 * configure: Rebuild.
7993 * Makefile.in (INSTALL): Set to @INSTALL@.
7994 (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
7995 (INSTALL_DATA): Set to @INSTALL_DATA@.
7997 (CC): Define as @CC@.
7998 (CFLAGS): Set to @CFLAGS@.
7999 (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
8000 (@host_makefile_frag@): Remove.
8001 (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@. Move $(CFLAGS)
8002 after other options.
8003 (config.status): Remove dependency upon @frags@.
8004 * config/*.mh, config/README: Remove.
8006 * config.bfd: Rewrite to incorporate the contents of the Makefile
8007 fragments by setting shell variables, rather than merely returning
8008 the name of a Makefile fragment.
8009 * configure.in: Use shell variables set by config.bfd rather than
8010 looking at the target Makefile fragment files. Don't substitute
8011 target_makefile_frag. Do substitute TDEFINES.
8012 * configure: Rebuild.
8013 * Makefile.in (@target_makefile_frag@): Remove.
8014 (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
8015 * config/*.mt: Remove.
8017 Mon Sep 4 03:13:28 1995 Ken Raeburn <raeburn@cygnus.com>
8019 * configure.in: Put changequote lines around "i[345]86" patterns
8020 section of core file support.
8022 Sun Sep 3 11:31:58 1995 Jeff Law (law@snake.cs.utah.edu)
8024 * som.c (som_bfd_print_private_bfd_data): Define to use the
8027 Fri Sep 1 17:08:40 1995 steve chamberlain <sac@slash.cygnus.com>
8029 * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
8030 entry, text_start and data_start.
8032 Fri Sep 1 18:06:28 1995 Ian Lance Taylor <ian@cygnus.com>
8034 * Makefile.in (OFILES): Remove $(TDEPFILES).
8035 * config/apollo.mt (TDEPFILES): Remove.
8036 * config/README: Update.
8038 * configure.in: For a native configuration, set COREFILE and
8039 COREFLAG based on the canonical host name.
8040 * configure: Rebuild.
8041 * Makefile.in: Rebuild dependencies.
8042 (ALL_CFLAGS): Add @COREFLAG@.
8043 (OFILES): Replace $(HDEPFILES) with @COREFILE@.
8044 * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
8045 support routines. Check LYNX_CORE rather than HOST_LYNX.
8046 * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
8047 * i386lynx.c: Likewise.
8048 * m68klynx.c: Likewise.
8049 * sparclynx.c: Likewise.
8050 * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
8051 * *-core.c: Comment changes.
8052 * config/decstation.mh (HDEPFILES): Remove.
8053 (HDEFINES): Remove -DTRAD_CORE.
8054 * config/irix3.mh (RANLIB): Remove.
8055 * config/irix4.mh (HDEPFILES, RANLIB): Remove.
8056 (HDEFINES): Remove -DIRIX_CORE.
8057 * config/riscos.mh (RANLIB, HDEPFILES): Remove.
8058 (HDEFINES): Remove -DTRAD_CORE.
8059 * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
8060 * config/ultra3.mh (RANLIB): Remove.
8061 * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
8062 * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
8063 * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
8064 * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
8065 * config/hppahpux.mh, config/hppaosf.mh: Remove.
8066 * config/i386aix.mh, config/i386bsd.mh: Remove.
8067 * config/i386linux.mh, config/i386mach3.mh: Remove.
8068 * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
8069 * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
8070 * config/mipsmach3.mh, config/news-mips.mh: Remove.
8071 * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
8072 * config/rs600.mh, config/rs6000lynx.mh: Remove.
8073 * config/solaris2.mh, config/stratus.mh: Remove.
8074 * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
8075 * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
8077 Fri Sep 1 15:18:50 1995 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
8079 * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
8080 DT_FINI entry if the appropriate symbol is not in the hash table.
8082 * libelf.h (struct elf_backend_data): Add create_program_headers
8083 and want_hdr_in_seg fields.
8084 * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
8086 (elf_backend_create_program_headers): Likewise.
8087 (elfNN_bed): Initialize create_program_headers and
8089 * elf.c (get_program_header_size): Call create_program_headers
8091 (map_program_segments): Check want_hdr_in_seg backend field. Call
8092 create_program_headers backend routine.
8094 * elf.c (assign_file_positions_except_relocs): Align non allocated
8095 sections when creating an executable.
8097 * elfcode.h (elf_swap_phdr_in): Make non static.
8098 (elf_swap_phdr_out): Make non static.
8099 * libelf.h (bfd_elf32_swap_phdr_in): Declare.
8100 (bfd_elf32_swap_phdr_out): Declare.
8101 (bfd_elf64_swap_phdr_in): Declare.
8102 (bfd_elf64_swap_phdr_out): Declare.
8104 * ecofflink.c (ecoff_collect_shuffle): New static function.
8105 (_bfd_ecoff_get_accumulated_pdr): New function.
8106 (_bfd_ecoff_get_accumulated_sym): New function.
8107 (_bfd_ecoff_get_accumulated_ss): New function.
8108 * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
8109 (_bfd_ecoff_get_accumulated_sym): Declare.
8110 (_bfd_ecoff_get_accumulated_ss): Declare.
8111 * libbfd.h: Rebuild.
8113 Fri Sep 1 13:20:25 1995 Ian Lance Taylor <ian@cygnus.com>
8115 * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
8117 * elflink.h (elf_link_add_object_symbols): Handle indirect and
8118 warning symbols. If any section is named .gnu.warning.XXX, treat
8119 the contents as a warning to be issued if the symbol XXX is
8121 (elf_link_output_extsym): For an indirect or warning symbol, just
8122 output the symbol it points to.
8124 * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
8125 if bfd_hash_allocate fails, since it will already be set.
8126 (generic_link_hash_newfunc): Likewise.
8127 (archive_hash_newfunc): Likewise.
8128 (hash_entry_bfd): New static function.
8129 (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
8130 callback. Allocate a new warning using the hash table newfunc.
8131 Use bfd_hash_replace to update the entry in the hash table, rather
8132 than assuming we can copy the fields with structure assignment.
8134 * hash.c (bfd_hash_replace): New function.
8135 * bfd-in.h (bfd_hash_replace): Declare.
8136 * bfd-in2.h: Rebuild.
8138 Fri Sep 1 08:12:50 1995 James G. Smith <jsmith@beauty.cygnus.com>
8140 * config.bfd: Add mips*vr4300-*-elf* target.
8141 * config/mipsbvr4300.mt: Added.
8143 See file ChangeLog.2
8150 version-control: never