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