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