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