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