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