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