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