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