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