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