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