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