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