OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [bfd/] [ChangeLog-9495] - Blame information for rev 160

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 khays
Thu Dec 21 12:43:49 1995  Michael Meissner  
2
 
3
        * elf32-ppc.c (ppc_elf_howto_raw): Add a phony reloc to handle the
4
        old style TOC16 references without using R_PPC_GOT.
5
        (ppc_reloc_type): Ditto.
6
        (ppc_elf_reloc_type_lookup): Add support for TOC16.
7
        (ppc_elf_toc16_inner): Renamed from ppc_elf_got16_inner.
8
        (ppc_elf_toc16_reloc): Renamed from ppc_elf_toc16_reloc.
9
        (ppc_elf_got16_{inner,reloc}): Stubs for real GOT support.
10
        (ppc_elf_check_relocs): New function for GOT/PLT support that is
11
        work in progress.
12
        (ppc_elf_adjust_dynamic_symbol): Ditto.
13
        (ppc_elf_adjust_dynindx): Ditto.
14
        (ppc_elf_size_dynamic_sections): Ditto.
15
        (ppc_elf_finish_dynamic_symbol): Ditto.
16
        (ppc_elf_finish_dynamic_sections): Ditto.
17
        (ELF_DYNAMIC_INTERPRETER): Define.
18
 
19
Wed Dec 20 19:14:18 1995  Ken Raeburn  
20
 
21
        * elf.c (copy_private_bfd_data): When attaching sections to
22
        segments ignore sections that won't be allocated.  Patch from
23
        Andreas Schwab.
24
 
25
Tue Dec 19 20:01:43 1995  Ken Raeburn  
26
 
27
        * config.bfd: Match on m68k-cbm-* only if OS doesn't match
28
        anything else.
29
 
30
Tue Dec 19 16:38:59 1995  Ian Lance Taylor  
31
 
32
        * coff-i960.c (CALC_ADDEND): Define.
33
        (coff_i960_relocate_section): Add the input section VMA to the
34
        addend for PC relative relocs.
35
 
36
Sun Dec 17 20:11:55 1995  Kim Knuttila  
37
 
38
        * peicode.h (pe_print_pdata): Must test the entire entry for zero
39
        to correctly terminate.
40
 
41
Fri Dec 15 12:05:57 1995  Ian Lance Taylor  
42
 
43
        * targets.c (enum bfd_endian): Define.
44
        (bfd_target): Rename byteorder_big_p to byteorder, and change it
45
        from boolean to enum bfd_endian.  Change header_byteorder_big_p
46
        correspondingly.
47
        * bfd-in.h (bfd_big_endian, bfd_little_endian): New macros.
48
        (bfd_header_big_endian, bfd_header_little_endian): New macros.
49
        * bfd-in2.h: Rebuild.
50
        * All targets: Change initialization of byteorder and
51
        header_byteorder to use enum bfd_endian values rather than
52
        booleans.
53
        * All files: Change all references to byteorder_big_p and
54
        header_byteorder_big_p to use new bfd_*_endian macros.
55
 
56
        * coffgen.c (make_a_section_from_file): Set lma to s_paddr, not
57
        s_vaddr.
58
        * coffcode.h (coff_write_object_contents): Set s_paddr to lma, not
59
        vma.
60
        * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
61
 
62
Fri Dec 15 07:32:09 1995  steve chamberlain  
63
 
64
        * pe[i]-i386.c (TARGET_UNDERSCORE): Define to '_'.
65
 
66
Thu Dec 14 13:45:37 1995  Ian Lance Taylor  
67
 
68
        * ieee.c: Lots of minor cleanups.  Make many functions return
69
        errors rather than calling abort.  Also:
70
        (ieee_write_twobyte): Remove; change callers to call existing
71
        ieee_write_2bytes function.
72
        (ieee_write_expression): Don't output the section twice when
73
        outputting a local symbol.  Don't emit an extraneous zero if there
74
        is only one term.
75
        (ieee_slurp_sections): Set the lma as well as the vma.
76
        (ieee_archive_p): Use bfd_alloc_grow rather than an obstack.
77
 
78
        * ihex.c (ihex_set_arch_mach): Don't accept any architecture, just
79
        a recognized one or bfd_arch_unknown.
80
        (ihex_get_symtab_upper_bound): Define as bfd_0l, to permit objcopy
81
        to succeed.
82
        (ihex_get_symtab): Likewise.
83
 
84
Wed Dec 13 15:44:06 1995  Ian Lance Taylor  
85
 
86
        * aoutx.h: Include .
87
        (struct aout_link_includes_table): Define.
88
        (struct aout_link_includes_totals): Define.
89
        (struct aout_link_includes_entry): Define.
90
        (aout_link_includes_lookup): Define macro.
91
        (struct aout_final_link_info): Add includes field.
92
        (aout_link_includes_newfunc): New static function.
93
        (NAME(aout,final_link)): Initialize includes hash table.
94
        (aout_link_write_symbols): Eliminate duplicate N_BINCL entries.
95
 
96
Wed Dec 13 10:52:14 1995  Stan Shebs  
97
 
98
        * mpw-config.in: Match on mips-*-* instead of mips-idt-ecoff.
99
 
100
Wed Dec 13 11:07:45 1995  Kim Knuttila  
101
 
102
        * coff-ppc.c (coff_ppc_relocate_section): removed debugging code.
103
 
104
Tue Dec 12 17:42:06 1995  Kim Knuttila  
105
 
106
        * peicode.h (pe_print_reloc): New function to dump the .reloc section.
107
        (pe_print_private_bfd_data): call pe_print_reloc.
108
        * coffcode.h (coff_set_alignment_hook): .reloc section alignment.
109
        * coff-ppc.c (in_reloc_p): Added missing non-eligible relocs. Spiffed
110
        up some debugging as well.
111
 
112
Tue Dec 12 11:34:23 1995  Ian Lance Taylor  
113
 
114
        * config.bfd: Handle sparc-*-elf*.  From Ronald F. Guilmette
115
        .
116
 
117
Fri Dec  8 17:47:07 1995  Ian Lance Taylor  
118
 
119
        * elflink.h (elf_link_add_object_symbols): Set section_count to 0
120
        when setting sections to NULL.
121
 
122
Wed Dec  6 17:05:37 1995  Ian Lance Taylor  
123
 
124
        * xcofflink.c (struct xcoff_loader_info): Add export_defineds
125
        field.
126
        (bfd_xcoff_size_dynamic_sections): Add export_defineds parameter.
127
        (xcoff_build_ldsyms): If export_defineds is set, set XCOFF_EXPORT
128
        for all symbols.
129
        * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
130
        * bfd-in2.h: Rebuild.
131
 
132
Mon Dec  4 16:40:47 1995  Kim Knuttila  
133
 
134
        * coffcode.h (coff_set_alignment_hook): Removed some debugging printf's
135
 
136
Mon Dec  4 11:25:39 1995  Ian Lance Taylor  
137
 
138
        * ihex.c (ihex_scan): Handle record types 4 and 5.
139
        (ihex_object_p): Permit types 4 and 5.
140
        (ihex_set_section_contents): Remove check for out of range
141
        addresses.
142
        (ihex_write_object_contents): Generate types 4 and 5.
143
 
144
        * elflink.h (elf_link_output_extsym): Just ignore warning and
145
        indirect references to symbols which don't really exist.
146
 
147
Sun Dec  3 19:00:27 1995  Kim Knuttila  
148
 
149
        * peicode.h (pe_print_idata): Minor format fixes
150
        (pe_print_edata): New function. Under private printing, this formats
151
        the edata section of a PE file.
152
        (pe_print_private_bfd_data): Added call to pe_print_edata.
153
 
154
Sun Dec  3 16:46:54 1995  Richard Earnshaw (rearnsha@armltd.co.uk)
155
 
156
        * aout-arm.c (MY_swap_std_reloc_out): Use KEEPIT to get the symbol
157
        index, don't call stoi.
158
 
159
Fri Dec  1 14:46:51 1995  Ian Lance Taylor  
160
 
161
        * srec.c (srec_scan): Set lma as well as vma.
162
 
163
        * ihex.c: New file; support for Intel Hex format.
164
        * targets.c (enum bfd_flavour): Add bfd_target_ihex_flavour.
165
        (ihex_vec): Declare.
166
        (bfd_target_vector): Always include ihex_vec.
167
        * bfd.c (struct _bfd): Add ihex_data field to tdata union.
168
        * Makefile.in: Rebuild dependencies.
169
        (BFD_LIBS): Add ihex.o
170
        (BFD_LIBS_CFILES): Add ihex.c.
171
        * bfd-in2.h: Rebuild.
172
 
173
        * elf.c (assign_file_positions_for_segments): Sort the sections in
174
        each segment.
175
        (get_program_header_size): Return the right size if segment_map is
176
        not NULL.
177
        (copy_private_bfd_data): Don't bother to sort the sections.
178
 
179
        * bfd.c (bfd_record_phdr): New function.
180
        * bfd-in.h (bfd_record_phdr): Declare.
181
        * bfd-in2.h: Rebuild.
182
 
183
        * elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
184
        BFD_ASSERT.
185
 
186
        * libbfd.c (bfd_malloc, bfd_realloc): New functions.
187
        (bfd_zmalloc): Return PTR, not char *.  Take size_t, not
188
        bfd_size_type.
189
        * libbfd-in.h (bfd_malloc, bfd_realloc): Declare.
190
        (bfd_zmalloc): Change declaration.
191
        * libbfd.h: Rebuild.
192
        * Many files: Use bfd_malloc and bfd_realloc rather than malloc
193
        and realloc.  Don't set bfd_error_no_memory if they fail.
194
 
195
Thu Nov 30 19:32:26 1995  Kim Knuttila  
196
 
197
        * coff-ppc.c: Added macros to tidy up toc cell treatment. Numerous
198
        uses as well. Added a new howto to deal with TOCREL16 relocs that
199
        are TOCDEFN as well.
200
        (coff_ppc_relocate_section): Expanded treatment of ADDR32NB relocs
201
        to handle RVA relocs from dlltool.
202
        (ppc_coff_rtype2howto): TOCDEFN reloc addition.
203
        (coff_ppc_rtype_to_howto): TOCDEFN reloc addition.
204
        (ppc_coff_reloc_type_lookup): TOCDEFN reloc addition.
205
 
206
        * coffcode.h (coff_set_alignment_hook): check idata$X sections
207
        to get the right section alignment.
208
 
209
Thu Nov 30 16:48:18 1995  Ian Lance Taylor  
210
 
211
        * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
212
        p_paddr if p_paddr is zero.
213
        (make_mapping): Set includes_filehdr and includes_phdrs for first
214
        PT_LOAD segment.
215
        (map_sections_to_segments): Set includes_phdrs for PT_PHDR
216
        segment.
217
        (assign_file_positions_for_segments): Handle includes_filehdr and
218
        includes_phdrs.  Remove special handling of PT_PHDR and first
219
        PT_LOAD segments.
220
        (copy_private_bfd_data): Set includes_filehdr and includes_phdr
221
        when appropriate.  Remove special handling of PT_PHDR segment.
222
        Use a more complex condition for when a section is included in a
223
        segment to handle Solaris linker oddities.
224
 
225
Thu Nov 30 11:17:33 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  
226
 
227
        * coff-m88k.c (howto_table): Reformatted for easier reading;
228
        special_function now points to new function m88k_special_reloc.
229
        (howto_hvrt16): Function previously used for handling HVRT16 relocs
230
        removed.
231
        (rtype2howto): Do not add reloc's r_offset to the addend, this will
232
        be done correctly by m88k_special_reloc.
233
        (reloc_processing): New function to be used by RELOC_PROCESSING.
234
        (RELOC_PROCESSING): Define to call reloc_processing.
235
 
236
Wed Nov 29 12:42:36 1995  Ian Lance Taylor  
237
 
238
        * peicode.h (pe_print_idata): Call malloc rather than xmalloc.
239
        (pe_print_pdata): Likewise.
240
 
241
        * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory if
242
        obstack_alloc fails.
243
        (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish
244
        fails.
245
        * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails.
246
        * Many files: don't set bfd_error_no_memory if one of the above
247
        routines fails.
248
 
249
        * elf.c (assign_file_positions_for_segments): Don't adjust p_paddr
250
        if p_paddr_valid is set.
251
        (copy_private_bfd_data): New static function.
252
        (_bfd_elf_copy_private_section_data): Call copy_private_bfd_data.
253
 
254
        * elf.c (assign_file_positions_for_segments): Fix case where extra
255
        program headers were allocated.
256
 
257
        * elf.c (_bfd_elf_print_private_bfd_data): New function.
258
        * elf-bfd.h (_bfd_elf_print_private_bfd_data): Declare.
259
        * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define to
260
        _bfd_elf_print_private_bfd_data.
261
 
262
        * coff-alpha.c (alpha_ecoff_swap_reloc_in): Don't abort if
263
        r_symndx is RELOC_SECTION_NONE for an ALPHA_R_IGNORE reloc.
264
        Change a RELOC_SECTION_LITA symndx to RELOC_SECTION_ABS.
265
        (alpha_ecoff_swap_reloc_out): Change RELOC_SECTION_ABS to
266
        RELOC_SECTION_LITA for ALPHA_R_IGNORE.
267
        (alpha_adjust_reloc_out): For ALPHA_R_IGNORE, don't change
268
        RELOC_SECTION_ABS to RELOC_SECTION_NONE.
269
 
270
Tue Nov 28 16:59:50 1995  Ian Lance Taylor  
271
 
272
        * elf-bfd.h (struct elf_obj_tdata): Add segment_map field.
273
        * elf.c (make_mapping): New static function.
274
        (map_sections_to_segments): New static function.
275
        (elf_sort_sections): New static function.
276
        (assign_file_positions_for_segments): New static function.
277
        (map_program_segments): Remove.
278
        (get_program_header_size): Remove sorted_hdrs, count, and
279
        maxpagesize parameters.  Simplify.
280
        (assign_file_positions_except_relocs): When generating an
281
        executable, use assign_file_positions_for_segments.
282
        (elf_sort_hdrs): Remove.
283
        (_bfd_elf_sizeof_headers): Remove eliminated parameters from call
284
        to get_program_header_size.
285
 
286
Mon Nov 27 12:27:46 1995  Ian Lance Taylor  
287
 
288
        * hp300hpux.c (MY(callback)): Set lma as well as vma.
289
 
290
        * configure, config.in: Regenerate with autoconf 2.7.
291
 
292
        * elf32-i386.c (elf_backend_plt_readonly): Set correctly, to 1.
293
        * elf32-sparc.c (elf_backend_plt_readonly): Set correctly, to 0.
294
 
295
Wed Nov 22 12:02:09 1995  Ian Lance Taylor  
296
 
297
        * ecoff.c (_bfd_ecoff_new_section_hook): Handle .rconst section.
298
        (ecoff_sec_to_styp_flags): Likewise.
299
        (_bfd_ecoff_styp_to_sec_flags): Handle STYP_RCONST.
300
        (ecoff_set_symbol_info): Handle scRConst.
301
        (ecoff_slurp_reloc_table): Handle RELOC_SECTION_RCONST.
302
        (ecoff_compute_section_file_positions): Handle .rconst section.
303
        (_bfd_ecoff_write_object_contents): Likewise.
304
        (ecoff_link_check_archive_element): Handle scRConst.
305
        (ecoff_link_add_externals): Likewise.
306
        (ecoff_link_write_external): Handle .rconst section.
307
        (ecoff_reloc_link_order): Likewise.
308
        * ecofflink.c (bfd_ecoff_debug_accumulate): Handle scRConst.
309
        * coff-alpha.c (alpha_convert_external_reloc): Handle .rconst
310
        section.
311
        (alpha_relocate_section): Handle RELOC_SECTION_RCONST.
312
 
313
        * sunos.c (sunos_scan_dynamic_symbol): Only set written if the
314
        DEF_DYNAMIC flag is set.
315
 
316
Tue Nov 21 13:25:29 1995  Ken Raeburn  
317
 
318
        * host-aout.c: If TRAD_HEADER is defined, include it.
319
 
320
Tue Nov 21 13:03:57 1995  Ian Lance Taylor  
321
 
322
        * aclocal.m4 (AC_PROG_CC): Remove local definition.
323
        (BFD_BINARY_FOPEN): Require AC_CANONICAL_SYSTEM.
324
        (BFD_NEED_DECLARATION): New function.
325
        * configure.in: Use BFD_NEED_DECLARATION.
326
        * acconfig.h: Put NEED_DECLARATION_* in @TOP@ section.
327
        * configure, config.in: Rebuild with autoconf 2.6.
328
 
329
        * xcofflink.c (bfd_xcoff_size_dynamic_sections): Clear
330
        special_sections before returning when called with a non XCOFF
331
        BFD.
332
 
333
        * coffgen.c (coff_renumber_symbols): Sort common symbols with
334
        global symbols.
335
 
336
        * coffcode.h (coff_compute_section_file_positions): Only pad the
337
        previous section to force file alignment when creating an
338
        executable.
339
 
340
Mon Nov 20 14:54:09 1995  Ian Lance Taylor  
341
 
342
        * coffcode.h (coff_compute_section_file_positions): If
343
        RS6000COFF_C, set up the .debug section.
344
 
345
        * xcofflink.c (xcoff_link_input_bfd): Adjust the TOC anchor value
346
        if it is not large enough to accomodate the entire TOC area with
347
        signed 16 bit offsets.
348
        (xcoff_write_global_symbol): Handle negative TOC offsets in global
349
        linkage code.
350
        (_bfd_ppc_xcoff_relocate_section): Adjust relocations against a
351
        TOC anchor to use the TOC value used in the output file.
352
 
353
Sat Nov 18 18:01:41 1995  Ian Lance Taylor  
354
 
355
        * coffgen.c (_bfd_coff_get_external_symbols): Cast malloc return.
356
        (_bfd_coff_read_string_table): Likewise.
357
 
358
Sat Nov 18 19:43:04 1995  Richard Earnshaw (rearnsha@armltd.co.uk)
359
 
360
        * pe-arm.c: Fix typos.
361
        * coff-arm.c: Likewise.
362
 
363
Fri Nov 17 16:22:04 1995  Kim Knuttila  
364
 
365
        * coff-ppc.c (list_ele): Added "cat"egory member.
366
        (record_toc): New category parameter (priv or pub).
367
        (ppc_record_toc_entry): Check to see if toc bounds exceeded.
368
        (ppc_process_before_allocation): Removed embrionic data-in-toc from
369
        the mainline. It addes extra toc cells in error.
370
        (ppc_coff_swap_sym_in_hook): Added some documentation.
371
        (dump_toc): Can now diagnose "virtual toc" chicanery.
372
 
373
Fri Nov 17 10:41:25 1995  Philippe De Muyter  
374
 
375
        * elf-bfd.h (struct elf_link_hash_table): Change type of
376
        dynsymcount and bucketcount fields from size_t to bfd_size_type.
377
 
378
Fri Nov 17 10:02:58 1995  Ian Lance Taylor  
379
 
380
        * coffcode.h (coff_pointerize_aux_hook): I960 version: don't
381
        pointerize C_LEAFSTAT or C_LEAFEXT entries.
382
 
383
        * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Only create
384
        DT_INIT and DT_FINI entries if the _init or _fini symbol is
385
        defined or mentioned in a regular file.
386
 
387
Thu Nov 16 15:16:42 1995  Kim Knuttila  
388
 
389
        * coff-ppc.c (ppc_record_data_in_toc_entry): new function
390
        (coff_ppc_relocate_section): Handle TOCDEFN attribute
391
        (coff_ppc_relocate_section): Correct REL24 handling
392
        (ppc_process_before_allocation): Correct TOCDEFN handling
393
 
394
        * peicode.h (dir_names): Added name descriptions
395
 
396
Thu Nov 16 03:38:03 1995  Ken Raeburn  
397
 
398
        * VERSION: Updated to cygnus-2.6.
399
 
400
Wed Nov 15 19:30:07 1995  Ken Raeburn  
401
 
402
        * targets.c (m68k4knetbsd_vec): Declare.
403
 
404
Wed Nov 15 18:05:52 1995  Ian Lance Taylor  
405
 
406
        * targets.c (bfd_target): Change type of second argument to
407
        _bfd_print_private_bfd_data from void * to PTR.
408
        * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): Cast
409
        using PTR rather than void *.
410
        * bfd-in2.h, libbfd.h: Rebuild.
411
        * peicode.h (pe_print_private_bfd_data): Change vfile from void *
412
        to PTR.
413
        * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): Define as
414
        _bfd_generic_bfd_print_private_bfd_data rather than casting
415
        bfd_true.
416
 
417
Wed Nov 15 04:09:14 1995  Ken Raeburn  
418
 
419
        * Makefile.in (.dep1): Fix stupid typo in last change.  Remove any
420
        "DO NOT DELETE" lines or blank lines that mkdep writes on some
421
        systems.
422
        (BFD_LIBS_CFILES, ALL_MACHINES_CFILES, BFD32_BACKENDS_CFILES,
423
        BFD64_BACKENDS_CFILES): New variables.
424
        (CFILES): Use them.
425
 
426
Tue Nov 14 11:52:23 1995  Ian Lance Taylor  
427
 
428
        * peicode.h (coff_swap_aouthdr_out): For PPC PE, start isize at 0,
429
        not at the file position of the first section.
430
        * coffcode.h (coff_compute_section_file_positions): Avoid using
431
        unportable #elif.
432
        (coff_write_object_contents): When generating a PPC PE executable
433
        with no symbols, round up the file size to a COFF_PAGE_SIZE
434
        boundary.
435
        * cofflink.c (_bfd_coff_final_link): If there are no symbols,
436
        don't write out a string table.
437
 
438
        * elf.c (bfd_section_from_shdr): When using a different section
439
        header, pass the new one to _bfd_elf_make_section_from_shdr.
440
        (elf_fake_sections): Don't set sh_info and sh_entsize fields.
441
        (elf_map_symbols): Add section VMA to symbol value when comparing
442
        against 0.
443
        (_bfd_elf_compute_section_file_positions): Only build symbol table
444
        if there are some symbols.  Set file offset of symtab and strtab
445
        sections.
446
        (assign_file_positions_except_relocs): Remove dosyms parameter.
447
        Change all callers.  Never set file offset of symtab and strtab
448
        sections.
449
        (_bfd_elf_copy_private_section_data): New function.
450
        (MAP_ONESYMTAB, MAP_DYNSYMTAB, MAP_STRTAB, MAP_SHSTRTAB): Define.
451
        (_bfd_elf_copy_private_symbol_data): New function.
452
        (swap_out_syms): Check for special mapping of st_shndx created by
453
        copy_private_symbol_data.
454
        * elfxx-target.h: Use new copy routines.
455
        * elf-bfd.h (_bfd_elf_copy_private_symbol_data): Declare.
456
        (_bfd_elf_copy_private_section_data): Declare.
457
 
458
        * config.bfd (sh-*-*): Set targ_defvec to shcoff_vec.
459
 
460
        * coffcode.h (coff_slurp_symbol_table): If COFF_WITH_PE, handle
461
        C_NT_WEAK.
462
 
463
        * coff-sh.c (shlcoff_vec): Use _bfd_generic_archive_p, not
464
        _bfd_dummy_target, matching the recent change to archive
465
        recognition.
466
 
467
Mon Nov 13 13:24:38 1995  Ian Lance Taylor  
468
 
469
        * libbfd.c (bfd_get_file_window): Use casts to avoid doing
470
        arithmetic on PTR types.
471
 
472
        * aout-target.h (MY(callback)): Set the lma of the sections.
473
 
474
        * ecoff.c (ecoff_reloc_link_order): Turn a reloc against a defined
475
        symbol into a reloc against the section.
476
 
477
Mon Nov 13 07:31:35 1995  Kim Knuttila  
478
 
479
        * coff-ppc.c (ppc_coff_link_hash_entry): added support for inline
480
        glue for the relocs: IMGLUE and IFGLUE.
481
        (record_toc): new function - tracks toc contents
482
        (ppc_mark_symbol_as_glue): new function - supports the IMGLUE reloc
483
        (coff_ppc_relocate_section): Added support and fixes for IMGLUE/IFGLUE
484
        (ppc_coff_rtype2howto): removed invalid IMGLUE hack
485
        (coff_ppc_rtype_to_howto): removed invalid IMGLUE hack
486
        (ppc_record_toc_entry): Removed a debug define (duh)
487
 
488
        * peicode.h (coff_swap_scnhdr_out): Fixed invalid strcmp for ".reldata"
489
        (pe_print_idata): New function - formats the idata section data
490
        (pe_print_pdata): New function - formats the pdata section data
491
        (pe_print_private_bfd_data): calls to above
492
 
493
Sun Nov 12 12:23:24 1995  Stan Shebs  
494
 
495
        * Makefile.in (bfd_libs_here, etc): Provide empty definitions.
496
        * coff-rs6000.c (rs6000coff_vec): Add conditional defines
497
        TARGET_SYM and TARGET_NAME for vector and BFD name.
498
        * coff-pmac.c (pmac_xcoff_vec): Remove.
499
        (TARGET_SYM, TARGET_NAME): Define.
500
        * coffcode.h (coff_set_arch_mach_hook) [POWERMAC]: Set the
501
        machine to 0, not all PowerMacs are 601s.
502
 
503
Fri Nov 10 12:10:14 1995  Ian Lance Taylor  
504
 
505
        * elfcode.h (elf_object_p): Read in any program headers.
506
        * elf.c (_bfd_elf_make_section_from_shdr): Adjust section lma
507
        based on the program headers, if any.
508
        (elf_fake_sections): Set sh_addr from the vma, not the lma.
509
        (map_program_segments): Set p_paddr of program headers based on
510
        the lma.
511
 
512
Thu Nov  9 13:01:31 1995  Ian Lance Taylor  
513
 
514
        * archive.c (bfd_generic_archive_p): Preserve tdata in case of
515
        failure.
516
 
517
        * aoutx.h (NAME(aout,final_link)): Report a reasonable error when
518
        trying to do a relocateable link with a non-a.out object file.
519
 
520
        * archive.c (bfd_generic_archive_p): Check the first object file
521
        in an archive even if target_defaulted is set.  If the object file
522
        has the wrong xvec, reject it.
523
 
524
        * aoutx.h (NAME(aout,set_section_contents)): If a section can not
525
        be represented, report the name via _bfd_error_handler.
526
        (translate_to_native_sym_flags): Likewise.
527
        * elf32-mips.c (mips_elf_final_link): Likewise.
528
        * oasys.c (oasys_write_sections): Likewise.
529
 
530
        * coffcode.h (coff_set_alignment_hook): Write RS6000COFF_C version
531
        which checks for STYP_OVRFLO sections.
532
        (coff_compute_section_file_positions): If RS6000COFF_C, handle
533
        reloc and lineno count overflows.
534
        (coff_write_object_contents): Call coff_count_linenumbers before
535
        coff_compute_section_file_positions.  If RS6000COFF_C, handle
536
        reloc and lineno count overflows.
537
        * xcofflink.c (_bfd_xcoff_bfd_final_link): Count line numbers and
538
        relocs before dealing with .pad sections.  Count overflow section
539
        headers when handling .pad sections.
540
 
541
        * coffcode.h (coff_write_object_contents): Set a.out vstamp to 1
542
        if RS6000COFF_C.
543
 
544
        * xcofflink.c (XCOFF_DESCRIPTOR): Define.
545
        (struct xcoff_link_hash_table): Add descriptor_section and
546
        special_sections fields.
547
        (_bfd_xcoff_bfd_link_hash_table_create): Initialize new fields.
548
        (xcoff_link_add_symbols): Set linkage section alignment.  Create
549
        descriptor section.  Check for magic symbol names (_text, etc.),
550
        and record them in special_sections if found.  Set
551
        XCOFF_DESCRIPTOR flag for a function descriptor, and set its
552
        descriptor field to point back to the function code symbol.
553
        (xcoff_sweep): Always mark the special descriptor_section.
554
        (bfd_xcoff_export_symbol): Check whether the symbol might be a
555
        function descriptor, and mark it if it is.
556
        (bfd_xcoff_size_dynamic_sections): Add new special_sections
557
        parameter, and fill it in.  Allocate space for the descriptor
558
        section.
559
        (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR flag when defining
560
        global linkage code.  If an undefined function descriptor is
561
        exported, arrange to define it.  Warn about any other undefined
562
        exported symbol.
563
        (_bfd_xcoff_bfd_final_link): Write out the descriptor section.
564
        (xcoff_write_global_symbol): Create a function descriptor when
565
        necessary.
566
        * bfd-in.h (bfd_xcoff_size_dynamic_sections): Update declaration.
567
        * bfd-in2.h: Rebuild.
568
 
569
Thu Nov  9 08:40:23 1995  Kim Knuttila  
570
 
571
        * coff-ppc.c (ppc_coff_link_hash_entry): new types for hashing
572
        (ppc_coff_link_hash_table): new types for hashing
573
        (ppc_coff_link_hash_newfunc): hash entry constructor
574
        (ppc_coff_link_hash_table_init): hash table initializer
575
        (ppc_coff_link_hash_table_create): hash table constructor
576
        (ppc_record_toc_entry): changed references to hash table
577
        (coff_ppc_relocate_section): changed references to hash table
578
 
579
        * libcoff-in.h (coff_link_hash_entry): removed toc_offset
580
        * libcoff.h: Rebuild
581
 
582
        * cofflink.c (_bfd_coff_link_hash_newfunc): removed toc_offset init
583
        (coff_link_add_symbols): removed toc_offset init
584
 
585
Thu Nov  9 04:00:38 1995  Ken Raeburn  
586
 
587
        * Makefile.in (.dep1): Make sure the file mkdep is to write exists
588
        first.
589
 
590
        * configure.in: Added new option --with[out]-mmap.  Set USE_MMAP
591
        if it is given and mmep is available.
592
        * acconfig.h: Undef USE_MMAP.
593
        * configure, config.in: Regenerated.
594
        * aoutx.h: If USE_MMAP is not defined, do all symbol and string
595
        table handling the old way.
596
        (aout_get_external_symbols): Don't complain if last byte of string
597
        table is nonzero.
598
        * libbfd.c [HAVE_MADVISE]: Include sys/types.h and sys/mman.h.
599
        (bfd_free_window) [! USE_MMAP]: Don't define.
600
        (bfd_get_file_window,
601
        _bfd_generic_get_section_contents_in_window) [! USE_MMAP]: Abort.
602
 
603
Wed Nov  8 20:03:44 1995  Eric Freudenthal 
604
 
605
        * coff-a29k.c (SIGN_EXTEND_HWORD): Use ~0xffff rather than
606
        0xffff0000.
607
 
608
Wed Nov  8 11:31:11 1995  Ian Lance Taylor  
609
 
610
        * coff-a29k.c (a29k_reloc): Change handling of R_IREL reloc to be
611
        compatible with AMD generated COFF files.  Try to support both AMD
612
        and GNU formats simultaneously.
613
        (coff_a29k_relocate_section): Likewise.
614
 
615
        * libbfd.c (bfd_get_file_window): Change writable parameter from
616
        int to boolean; update all callers.  Pass MAP_SHARED if not
617
        writable--it's required on Solaris.  Cast fprintf argument to
618
        avoid warning.
619
        * bfd-in.h (bfd_get_file_window): Update declaration.
620
        * bfd-in2.h: Rebuild.
621
        * aoutx.h: Update calls to bfd_get_file_window.
622
 
623
        * xcofflink.c (XCOFF_DEF_DYNAMIC): Rename from XCOFF_REF_DYNAMIC.
624
        Change all uses.
625
        (xcoff_swap_ldhdr_in): New static function.
626
        (xcoff_swap_ldsym_in): New static function.
627
        (xcoff_find_reloc): Handle the case of a single reloc correctly.
628
        (xcoff_link_add_symbols): If we just created a descriptor, pass it
629
        to _bfd_generic_link_add_one_symbol, to save a hash lookup.
630
        Handle XTY_ER/XMC_XO symbols correctly.
631
        (xcoff_link_add_dynamic_symbols): Rewrite to read .loader symbols
632
        rather than normal symbol table.
633
        (bfd_xcoff_import_symbol): It's not an error if the symbol is
634
        already defined with the same absolute value.
635
        (xcoff_mark): When considering called symbols, check whether the
636
        descriptor is from a dynamic object, rather than the symbol
637
        itself.
638
        (xcoff_build_ldsyms): Likewise.
639
 
640
        * libbfd.c (bfd_get_file_window): Change return type to boolean.
641
        Cast realloc and malloc return values.  If malloc or realloc fail,
642
        set bfd_error_no_memory.
643
        * bfd-in.h (bfd_get_file_window): Change type to boolean.
644
        * bfd-in2.h: Rebuild.
645
 
646
Tue Nov  7 11:53:48 1995  Kim Knuttila  
647
 
648
        * coff-ppc.c (ppc_record_toc_entry): new function.
649
        (in_reloc_p): changed return value.
650
        (coff_ppc_relocate_section): much rework.
651
        (ppc_allocate_toc_section): new function.
652
        (ppc_process_before_allocation): new function.
653
        (ppc_coff_swap_sym_in_hook): new function.
654
 
655
        * cofflink.c (_bfd_coff_link_hash_newfunc): initialize toc_offset.
656
        (coff_link_add_symbols): initialize toc_offset.
657
 
658
        * peicode.h (coff_swap_sym_in): Added coff_swap_sym_in_hook
659
        (coff_swap_aouthdr_out): Added more sections to the data
660
        dictionary for the pe file header. Also changed linker version
661
        number on the ppc side.
662
        (dir_names): small improvements to the dictionary printing.
663
        (pe_mkobject_hook): save the file level flags.
664
 
665
        * libcoff-in.h (coff_link_hash_entry): added toc_offset field
666
        (pe_tdata): added real_flags field
667
        (coff_tdata): added local_toc_sym_map and access macro
668
 
669
        * libcoff.h (coff_link_hash_entry): added toc_offset field
670
        (pe_tdata): added real_flags field
671
        (coff_tdata): added local_toc_sym_map and access macro
672
 
673
        * coffcode.h (coff_set_alignment_hook): added hook for PE.
674
        (coff_mkobject): init for local_toc_sym_map
675
        (coff_write_object_contents): set the internal_a.magic to
676
        IMAGE_NT_OPTIONAL_HDR_MAGIC which appears to be what other
677
        ppc compilers use.
678
 
679
Tue Nov  7 13:48:58 1995  Ian Lance Taylor  
680
 
681
        * ecofflink.c (_bfd_ecoff_locate_line): Keep looking through stabs
682
        entries until both the line number address and the function name
683
        address are too large.
684
 
685
        * configure.in: Call AC_CHECK_PROG to find and cache AR.
686
        * configure: Rebuilt.
687
 
688
        * aclocal.m4 (BFD_CC_FOR_BUILD): Don't define CC_FOR_BUILD if it
689
        is defined in the environment.
690
 
691
Tue Nov  7 10:57:24 1995  Jeffrey A Law  (law@cygnus.com)
692
 
693
        * som.c (som_get_section_contents_in_window): Define to use
694
        generic version.
695
 
696
Mon Nov  6 17:13:15 1995  Harry Dolan  
697
 
698
        * coff-i860.c: New file, based on coff-i386.c.
699
        * cpu-i860.c: New file, based on cpu-i386.c.
700
        * hosts/i860mach3.h: New file, based on hosts/i386mach3.h.
701
        * config.bfd (i860-*-mach3*, i860-*-osf1*, i860-*-coff*): New
702
        targets, using i860coff_vec.
703
        * configure.in (i860-*-mach3*, i860-*-osf1*): New hosts, using
704
        trad-core.o and hosts/i860mach3.h.
705
        (i860coff_vec): Use coff-i860.o and cofflink.o.
706
        * configure: Rebuild.
707
        * Makefile.in: Rebuild dependencies.
708
        (ALL_MACHINES): Add cpu-i860.o.
709
        (BFD32_BACKENDS): Add coff-i860.o.
710
        (CFILES): Add cpu-i860.c and coff-i860.c.
711
        * targets.c (i860coff_vec): Declare.
712
        (bfd_target_vector): Add &i860coff_vec.
713
        * archures.c (bfd_i860_arch): Declare.
714
        (bfd_archures_list): Add &bfd_i860_arch.
715
        * coffcode.h (coff_set_arch_mach_hook): Handle I860 magic number.
716
        (coff_set_flags): Handle bfd_arch_i860.
717
        (coff_write_object_contents): Handle I860 a.out magic number.
718
 
719
Mon Nov  6 14:34:07 1995  Ian Lance Taylor  
720
 
721
        * xcofflink.c (xcoff_link_add_symbols): Set the alignment power of
722
        the created .tc section to 2.
723
        (xcoff_mark): Don't keep a .loader reloc for a call to an
724
        undefined symbol when creating a shared library.
725
        (xcoff_build_ldsyms): When creating a shared library, generate
726
        global linkage code for a call to an undefined symbol.
727
 
728
Sun Nov  5 21:44:13 1995  Ken Raeburn  
729
 
730
        * Makefile.in (CFILES): Rebuild list from BFD_LIBS, ALL_MACHINES,
731
        BFD32_BACKENDS, BFD64_BACKENDS.
732
        (.dep1): Put mkdep output in a separate file.
733
        Rebuilt dependencies.
734
 
735
        * ecoff.c (_bfd_ecoff_slurp_armap): Cast _bfd_read_ar_hdr return
736
        value.
737
 
738
        Permit use of mmap when available:
739
 
740
        * configure.in: Check for mmap, madvise, mprotect.
741
        * config.in, configure: Regenerated.
742
 
743
        * libbfd.c (struct _bfd_window_internal): Define type.
744
        (bfd_init_window, bfd_free_window, bfd_get_file_window): New
745
        functions.
746
        (ok_to_map): New static variable for debugging.
747
        (_bfd_generic_get_section_contents_in_window): New function.
748
        * bfd-in.h (bfd_window_internal): Declare type.
749
        (bfd_window): Define type.
750
        (bfd_init_window, bfd_free_window, bfd_get_file_window): Declare.
751
        * libbfd-in.h (_bfd_generic_get_section_contents_in_window):
752
        Declare.
753
 
754
        * libaout.h (struct aoutdata): Add two window fields.
755
        (obj_aout_sym_window, obj_aout_string_window): New macros.
756
        * aoutx.h (some_aout_object_p): Initialize windows.
757
        (aout_get_external_symbols): Get symbol data and strings in
758
        windows instead of explicitly allocated buffers.
759
        (slurp_symbol_table): Free window instead of memory.
760
        (bfd_free_cached_info): Release windows instead of freeing storage
761
        directly.
762
        (aout_link_free_symbols): Ditto.
763
 
764
        * targets.c (bfd_target): Add new field for
765
        get_section_contents_in_window.
766
        (BFD_JUMP_TABLE_GENERIC): Updated.
767
        * aout-adobe.c, aout-target.h, binary.c, bout.c, coff-alpha.c,
768
        coff-mips.c, elfxx-target.h, i386msdos.c, i386os9k.c, ieee.c,
769
        libcoff-in.h, oasys.c, srec.c, tekhex.c, versados.c: Added new
770
        macros for get_section_contents_in_window field.
771
 
772
Sat Nov  4 12:23:26 1995  Fred Fish  
773
 
774
        * core.c: Renamed to corefile.c
775
        * makefile.dos (OBJS): Change core.o to corefile.o
776
        * Makefile.in (CFILES, BFD_LIBS): Use corefile.c instead of core.c
777
 
778
Fri Nov  3 15:54:59 1995  Ian Lance Taylor  
779
 
780
        * xcofflink.c (xcoff_link_add_symbols): Rename local variable sub
781
        to o.  Clobber and restore the list of new csects around the call
782
        to _bfd_generic_link_add_one_symbol, in case it wants to report a
783
        linker error and the linker wants to read the symbol table.  Reset
784
        the line number count of a real section even if it has no relocs.
785
        (_bfd_xcoff_bfd_final_link): If shared, set the DYNAMIC flag.
786
 
787
        * coffgen.c (_bfd_coff_read_string_table): Warn if the string size
788
        is too small.
789
 
790
Thu Nov  2 23:16:39 1995  Ian Lance Taylor  
791
 
792
        * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Don't warn about
793
        an undefined symbol in a shared link.
794
 
795
        * linker.c (_bfd_generic_link_add_one_symbol): Correct type of
796
        oldtype from bfd_link_order_type to bfd_link_hash_type.  From
797
        phdm@info.ucl.ac.be (Philippe De Muyter).
798
 
799
Wed Nov  1 14:26:02 1995  Manfred Hollstein KS/EF4A 60/1F/110 #40283  
800
 
801
        * coff-m88k.c (rtype2howto): New static function.
802
        (RTYPE2HOWTO): Use it rather than a macro definition.
803
 
804
        * coffcode.h (coff_write_object_contents): set internal_a.magic
805
        to PAGEMAGICPEXECPAGED #if defined (M68) && !defined (LYNXOS).
806
 
807
        * configure.in: m68*-motorola-sysv* does not use ptrace-core.o;
808
        define TRAD_HEADER to new file hosts/delta68.h.
809
        m88*-motorola-sysv*, however, does use ptrace-core.o.
810
        * hosts/delta68.h: New file.
811
 
812
        * ptrace-core.c (ptrace_unix_core_file_p): change bfd_zmalloc to
813
        bfd_zalloc; provide proper parm abfd to calls to bfd_zalloc.
814
 
815
Wed Nov  1 13:51:54 1995  Ken Raeburn  
816
 
817
        * i386linux.c (MY(vec)): Declare before use.
818
 
819
Wed Nov  1 11:45:07 1995  Ian Lance Taylor  
820
 
821
        * reloc16.c (bfd_coff_reloc16_get_relocated_section_contents):
822
        Pass input_bfd, not in_bfd, to bfd_coff_reloc16_extra_cases.
823
 
824
        * elf.c (bfd_elf_set_dt_needed_name): Don't do anything if the
825
        BFD is not of the right type.
826
        (bfd_elf_get_needed_list): Likewise.
827
        * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
828
        * sunos.c (bfd_sunos_get_needed_list): Likewise.
829
        * xcofflink.c (XCOFF_XVECP): Define.
830
        (bfd_xcoff_link_record_set): Don't do anything if the BFD is not
831
        of the right type.
832
        (bfd_xcoff_import_symbol): Likewise.
833
        (bfd_xcoff_export_symbol): Likewise.
834
        (bfd_xcoff_link_count_reloc): Likewise.
835
        (bfd_xcoff_record_link_assignment): Likewise.
836
        (bfd_xcoff_size_dynamic_sections): Likewise.
837
 
838
        * sunos.c (sunos_scan_ext_relocs): Only check the reloc symbol
839
        table index against the number of symbols for a base relative
840
        reloc.
841
 
842
        * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Change from macro to
843
        static function.
844
        * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Set
845
        full_aouthdr flag here...
846
        (_bfd_xcoff_bfd_final_link): ...not here.
847
 
848
Tue Oct 31 12:52:02 1995  Fred Fish  
849
 
850
        * libelf.h:  Rename to elf-bfd.h to avoid conflict with
851
        systems that have a system .
852
        * Makefile.in: Globally replace libelf.h with elf-bfd.h.
853
        * bfd.c, elf.c, elf32-arc.c, elf32-gen.c, elf32-hppa.c,
854
        elf32-hppa.h, elf32-i386.c, elf32-i860.c, elf32-m68k.c,
855
        elf32-m88k.c, elf32-mips.c, elf32-ppc.c, elf32-sparc.c,
856
        elf64-gen.c, elf64-sparc.c, elfcode.h, elflink.c,
857
        elfxx-target.h: Include elf-bfd.h rather than libelf.h.
858
        * elfxx-target.h: Change libelf.h reference to elf-bfd.h.
859
 
860
Tue Oct 31 15:30:07 1995  David Mosberger-Tang  
861
 
862
        * ecoff.c (ecoff_set_symbol_info): Add new parameter weak.  If
863
        set, set BSF_WEAK in symbol.  Change all callers.
864
        (ecoff_get_extr): Set weakext based on BSF_WEAK.
865
        (ecoff_link_add_externals): If weakext is set, pass BSF_WEAK to
866
        _bfd_generic_link_add_one_symbol.
867
        (ecoff_indirect_link_order): Check that the section tdata relocs
868
        are not NULL before using them.
869
 
870
        * configure.in (alpha*-*-linux*): Set COREFILE to trad-core.o and
871
        define TRAD_HEADER as hosts/alphalinux.h.
872
        * configure: Rebuild.
873
        * hosts/alphalinux.h: New file.
874
        * trad-core.c (trad_unix_core_file_p): Cast u.u_ar0 to bfd_vma,
875
        not int.
876
 
877
Tue Oct 31 12:34:11 1995  Ian Lance Taylor  
878
 
879
        * coffcode.h (coff_slurp_symbol_table): Accept C_BCOMM and
880
        C_ECOMM storage classes.
881
 
882
        * xcofflink.c (xcoff_mark_symbol): New static function, broken out
883
        of xcoff_mark.
884
        (xcoff_mark): Call xcoff_mark_symbol.
885
        (bfd_xcoff_export_symbol): Call xcoff_mark_symbol.
886
        (bfd_xcoff_link_count_reloc): Call xcoff_mark_symbol rather than
887
        doing it by hand.
888
        (xcoff_build_ldsyms): Build a .loader symbol for an export symbol.
889
 
890
Mon Oct 30 14:53:48 1995  Ian Lance Taylor  
891
 
892
        * xcofflink.c (struct xcoff_final_link_info): Add new line_filepos
893
        field.
894
        (xcoff_find_reloc): New static function.
895
        (xcoff_link_add_symbols): Use it.
896
        (_bfd_xcoff_bfd_final_link): Set finfo.line_filepos.
897
        (xcoff_link_input_bfd): Handle C_BINCL and C_EINCL.  Don't
898
        relocate the value of C_DECL.
899
 
900
        * elf.c (elf_fake_sections): Remove bogus BFD_ASSERT.
901
 
902
Sat Oct 28 01:25:34 1995  steve chamberlain  
903
 
904
        * cofflink.c (_bfd_coff_generic_relocate_section): Make
905
        callback decide what goes in .relocs.
906
        * pe[i]-i386.c (TARGET_UNDERSCORE): Define.
907
        * peicode.h (pe_mkobject_hook): Only copy aouthdr if
908
        there is one.
909
 
910
Sat Oct 28 01:51:02 1995  Ian Lance Taylor  
911
 
912
        * xcofflink.c (xcoff_link_add_symbols): Handle csects in the
913
        absolute section.
914
 
915
Fri Oct 27 18:14:39 1995  Ian Lance Taylor  
916
 
917
        * xcofflink.c: More improvements, mostly to fix handling of
918
        constructors and a few other special cases.
919
        * coff-rs6000.c (rs6000coff_vec): Set symbol_leading_char back to
920
        zero, reverting yesterday's change.
921
        * bfd-in.h (bfd_xcoff_link_record_set): Declare.
922
        (bfd_xcoff_link_count_reloc): Declare.
923
        (bfd_xcoff_record_link_assignment): Declare.
924
        * bfd-in2.h: Rebuild.
925
 
926
Fri Oct 27 14:42:15 1995  Niklas Hallqvist  
927
 
928
        * PORTING, aout-arm.c, aout-encap.c, aout-target.h,
929
        aoutx.h, gen-aout.c, host-aout.c, hp300bsd.c, i386aout.c
930
        i386bsd.c, i386dynix.c, i386linux.c, i386lynx.c, i386mach3.c,
931
        i386netbsd.c, m68klynx.c, m88kmach3.c, mipsbsd.c, newsos3.c,
932
        ns32knetbsd.c, pc532-mach.c, riscix.c, sparclynx.c, sparcnetbsd.c:
933
        Change PAGE_SIZE to TARGET_PAGE_SIZE.
934
 
935
        * m68knetbsd.c: Ditto as well as add support for the m68k4k object
936
        format.
937
 
938
        * netbsd.h: Double ditto (incl. m68k4k support).  NetBSD's text
939
        segments includes the a.out header.  See to that the magic number
940
        *always* is big-endian.
941
 
942
        * config.bfd: Add m68*-hp*-netbsd* case.  Cross-pollinate m68k and
943
        m68k4k NetBSD configurations.
944
 
945
        * configure.in, configure: Separate i386 & mips NetBSD
946
        configurations from other BSD ones.  Don't assume DEC is the only
947
        thing NetBSD/mips run on.  Add {m68k,ns32k,sparc}-*-netbsd*
948
        configurations.  Add support for m68k4k NetBSD object format.
949
 
950
        * libaout.h: Added M_68K4K_NETBSD magic.
951
 
952
        * m68k4knetbsd.c: New file.
953
 
954
        * hosts/{m68k,sparc}nbsd.h: Don't define HOST_BIG_ENDIAN_P.
955
 
956
        * hosts/nbsd.h: Define HOST_BIG_ENDIAN_P according to
957
        .
958
 
959
        * hosts/mipsnbsd.h: New file.
960
 
961
Thu Oct 26 14:16:47 1995  Ian Lance Taylor  
962
 
963
        * xcofflink.c: Numerous changes to get closer to a working XCOFF
964
        linker.
965
        * libcoff-in.h (struct xcoff_tdata): Add full_aouthdr,
966
        toc_section, and entry_section fields.
967
        (struct xcoff_section_tdata): Remove ldrel_count field.
968
        * libcoff.h: Rebuild.
969
        * coffcode.h (coff_mkobject_hook): Initialize new xcoff_data
970
        fields.
971
        (coff_compute_section_file_positions): If RS6000COFF_C, generate
972
        full a.out header if full_aouthdr is set in xcoff_data.
973
        (coff_write_object_contents): Likewise.  Set o_snentry and o_sntoc
974
        based on sections stored in xcoff_data.
975
        * coff-rs6000.c (xcoff_copy_private_bfd_data): Copy new xcoff_data
976
        fields.
977
        (xcoff_reloc_type_lookup): Handle BFD_RELOC_CTOR.
978
        (rs6000coff_vec): Set symbol_leading_char to '.'.
979
        * coffgen.c (coff_get_symbol_info): If fix_value is set, fix the
980
        value stored in ret rather than returning a pointer value.
981
 
982
Wed Oct 25 23:10:39 1995  Michael Meissner  
983
 
984
        * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Remove MAC
985
        format for now.
986
 
987
Wed Oct 25 16:19:27 1995  Jeffrey A Law  (law@cygnus.com)
988
 
989
        * som.c (som_slurp_string_table): Allocate the strings with malloc
990
        since they're free'd by free_cached_info.
991
        (som_slurp_symbol_table): Similarly for the symbol table.
992
 
993
Wed Oct 25 14:59:22 1995  Per Bothner  
994
 
995
        * Makefile.in (diststuff):  Don't make headers.
996
 
997
Wed Oct 25 11:32:54 1995  Ian Lance Taylor  
998
 
999
        * Makefile.in: Rebuild dependencies.
1000
 
1001
        * sunos.c (bfd_sunos_record_link_assignment): Don't do anything if
1002
        output_bfd is not SunOS.
1003
        (bfd_sunos_size_dynamic_sections): Likewise.  Don't scan relocs of
1004
        non-SunOS input files.
1005
 
1006
        * xcofflink.c: Extensive changes to support linking shared objects
1007
        and generating a .loader section.
1008
        * libcoff-in.h (struct xcoff_tdata): Add import_file_id field.
1009
        (struct xcoff_section_tdata): Add lineno_count, first_symndx,
1010
        last_symndx, and ldrel_count fields.
1011
        * libcoff.h: Rebuild.
1012
        * coff-rs6000.c (xcoff_howto_table): Correct reloc names.
1013
        * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD
1014
        is set.
1015
        * bfd-in.h (bfd_xcoff_import_symbol): Declare.
1016
        (bfd_xcoff_export_symbol): Declare.
1017
        (bfd_xcoff_size_dynamic_sections): Declare.
1018
        * bfd-in2.h: Rebuild.
1019
 
1020
Tue Oct 24 17:44:20 1995  Stan Shebs  
1021
 
1022
        * configure.in: Add xcofflink.o to pmac_xcoff_vec.
1023
        * configure: Rebuild.
1024
        * mpw-config.in: Add xcofflink.c.o to powerpc-apple-macos.
1025
        * coff-pmac.c: Include coff-rs6000.c instead of duplicating its
1026
        contents.
1027
        (pmac_xcoff_vec): Update to use new xcoff support.
1028
        * coff-rs6000.c (xcoff_generic_stat_arch_elt): Make static.
1029
        (xcoff_write_armap): Declare buf as unsigned char.
1030
        * xcofflink.c (xcoff_link_add_symbols): Declare a local as PTR.
1031
 
1032
        * mpw-make.sed: Generalize subdir_do edit.
1033
 
1034
Tue Oct 24 10:25:01 1995  Jeffrey A Law  (law@cygnus.com)
1035
 
1036
        * hppabsd-core.c (make_bfd_asection): Initialize asect->filepos
1037
        correctly.  Don't initialize asect->vma.
1038
 
1039
Fri Oct 20 13:23:48 1995  Ken Raeburn  
1040
 
1041
        * opncls.c (_bfd_new_bfd): If _bfd_chunksize wasn't preset, use
1042
        something a little less than the page size.
1043
 
1044
Thu Oct 19 13:06:09 1995  Ian Lance Taylor  
1045
 
1046
        * coff-i960.c (coff_i960_adjust_symndx): Clear *adjustedp.
1047
 
1048
Wed Oct 18 16:20:08 1995  steve chamberlain  
1049
 
1050
        * coff-i386.c (coff_i386_reloc_type_lookup): New.
1051
        * coffcode.h (coff_write_object_contents): If .bss is before
1052
        .data us that as data_start.
1053
        * cofflink.c (_bfd_coff_generic_relocate_section): Get reloc
1054
        calc correct.
1055
        * peicode.h (add_data_entry): Use _cooked_size of data directory.
1056
        (coff_swap_outhdr_out): Hardwire in version number.
1057
 
1058
Wed Oct 18 16:50:54 1995  Ken Raeburn  
1059
 
1060
        * sunos.c (sunos_add_dynamic_symbols): Rename local variables
1061
        major and minor to *_vno, since the former are also macros in
1062
        SunOS header files.  Cast result of bfd_alloc to appropriate
1063
        type.
1064
 
1065
        * coffgen.c (coff_find_nearest_line): Cast used_by_bfd value
1066
        before assigning to sec_data.
1067
 
1068
Wed Oct 18 13:25:17 1995  Ian Lance Taylor  
1069
 
1070
        * ecoff.c (_bfd_ecoff_find_nearest_line): The offset argument is
1071
        now relative to the section, not absolute.
1072
        * ecofflink.c (_bfd_ecoff_locate_line): Use the right symbol to
1073
        get the file name when there is a N_SO directory name.  When
1074
        handling stabs, remember that section->vma was added to the
1075
        offset.
1076
 
1077
Tue Oct 17 18:24:54 1995  Ian Lance Taylor  
1078
 
1079
        * sunos.c (struct sunos_link_hash_table): Add needed field.
1080
        (sunos_link_hash_table_create): Call bfd_release, not free.
1081
        (sunos_link_hash_table_create): Initialize needed field.
1082
        (sunos_add_dynamic_symbols): Record needed objects.
1083
        (bfd_sunos_get_needed_list): New function.
1084
        * bfd-in.h (bfd_sunos_get_needed_list): Declare.
1085
        * bfd-in2.h: Rebuild.
1086
 
1087
Mon Oct 16 14:43:59 1995  steve chamberlain  
1088
 
1089
        * libcoff-in.h (pe_data_type.in_reloc_p): New.
1090
 
1091
Mon Oct 16 10:52:50 1995  Ian Lance Taylor  
1092
 
1093
        * bfd-in.h (struct bfd_link_needed_list): Rename from
1094
        bfd_elf_link_needed_list.
1095
        * bfd-in2.h: Rebuild.
1096
        * elf.c, elflink.h, libelf.h: Corresponding changes.
1097
 
1098
        Add start at AIX linker support; no shared libraries yet.
1099
        * xcofflink.c: New file.
1100
        * configure.in (rs600coff_vec): Use xcofflink.o.
1101
        * configure: Rebuild.
1102
        * libcoff-in.h (struct xcoff_tdata): Add csects and debug_indices
1103
        fields.
1104
        (struct xcoff_section_tdata): Define.
1105
        (xcoff_section_data): Define macro.
1106
        (_bfd_xcoff_bfd_link_hash_table_create): Declare.
1107
        (_bfd_xcoff_bfd_link_add_symbols): Declare.
1108
        (_bfd_xcoff_bfd_final_link): Declare.
1109
        (_bfd_ppc_xcoff_relocate_section): Declare.
1110
        * libcoff.h: Rebuild.
1111
        * coff-rs6000.c: Clean up a bit.
1112
        (xcoff_mkobject): Default modtype to 1L, not RE.  Initialize
1113
        cputype, csects, and debug_indices.
1114
        (xcoff_copy_private_bfd_data): Copy cputype.
1115
        (xcoff_howto_table): Rename from rs6000coff_howto_table.
1116
        (xcoff_rtype2howto): Rename from rs6000coff_rtype2howto.
1117
        (xcoff_reloc_type_lookup): Rename from
1118
        rs6000coff_reloc_type_lookup.
1119
        (coff_relocate_section): Define.
1120
        (_bfd_xcoff_sizeof_headers): Define.
1121
        (_bfd_xcoff_bfd_get_relocated_section_contents): Define.
1122
        (_bfd_xcoff_bfd_relax_section): Define.
1123
        (_bfd_xcoff_bfd_link_split_section): Define.
1124
        (rs6000coff_vec): For BFD_JUMP_TABLE_LINK, use _bfd_xcoff, not
1125
        coff.
1126
        * coffcode.h (coff_compute_section_file_positions): If AIX,
1127
        increment sofar by SMALL_AOUTSZ if not executable.
1128
        (coff_write_object_contents): If AIX, always output an a.out
1129
        header; if not executable, header size of SMALL_AOUTSZ.
1130
        * hash.c (struct bfd_strtab_hash): Add xcoff field.
1131
        (_bfd_stringtab_init): Initialize xcoff field.
1132
        (_bfd_xcoff_stringtab_init): New function.
1133
        (_bfd_stringtab_add): In XCOFF mode, leave two bytes for length.
1134
        (_bfd_stringtab_emit): In XCOFF mode, write out length.
1135
        * libbfd-in.h (_bfd_xcoff_stringtab_init): Declare.
1136
        * libbfd.h: Rebuild.
1137
        * Makefile.in: Rebuild dependencies.
1138
        (BFD32_BACKENDS): Add xcofflink.o.
1139
        (CFILES): Add xcofflink.c.
1140
 
1141
        * elf32-mips.c (mips_elf_symbol_processing): Set SEC_ALLOC, not
1142
        SEC_NO_FLAGS, for .acommon section.  From Peter Schauer
1143
        .
1144
 
1145
Sat Oct 14 21:36:02 1995  Michael Meissner  
1146
 
1147
        * coff-ppc.c (in_reloc_p): Add, clone from coff-i386.c.
1148
 
1149
Fri Oct 13 17:48:43 1995  Ken Raeburn  
1150
 
1151
        * acconfig.h (HAVE_SYS_PROCFS_H): Undef, with comment.
1152
        * config.in: Regenerated.
1153
 
1154
        * opncls.c (getpagesize) [!HAVE_GETPAGESIZE]: Define as 2048.
1155
        (_bfd_chunksize): New variable.
1156
        (_bfd_new_bfd): Set it to getpagesize() if negative, and use it
1157
        for obstack chunk size.
1158
        * configure.in: Check for getpagesize.
1159
        * configure: Regenerated.
1160
 
1161
        Mon Sep 25 22:49:32 1995  Andreas Schwab  
1162
 
1163
        * trad-core.c (rawptr): Make it a local variable of
1164
        ptrace_unix_core_file_p.
1165
 
1166
Fri Oct 13 11:22:01 1995  steve chamberlain  
1167
 
1168
        * coff-arm.c (in_reloc_p): New.
1169
        * coff-i386.c (in_reloc_p): New.
1170
        * coffcode.h: Allways include peicode.h if COFF_WITH_PE.
1171
        (coff_write_object_contents): Only set has_reloc_section
1172
        if PE_IMAGE.
1173
        * cofflink.c (_bfd_coff_generic_relocate_section): Call
1174
        in_reloc_p to decide if reloc should be emitted.
1175
        * libcoff.h (pe_data_type.in_reloc_p): New.
1176
        * peicode.h (pe_mkobject): Initialize in_reloc_p.
1177
 
1178
Wed Oct 11 00:49:29 1995  Ian Lance Taylor  
1179
 
1180
        * cofflink.c (_bfd_coff_internal_syment_name): Move to coffgen.c.
1181
        (_bfd_coff_read_internal_relocs): Likewise.
1182
        * coffgen.c (_bfd_coff_internal_syment_name): Copy from coffgen.c.
1183
        (_bfd_coff_read_internal_relocs): Likewise.
1184
 
1185
        * elflink.h (elf_link_add_object_symbols): Correct conditions
1186
        under which type and size change warnings are issued.
1187
 
1188
Tue Oct 10 18:32:46 1995  Ian Lance Taylor  
1189
 
1190
        * coffgen.c (coff_count_linenumbers): Don't count line numbers for
1191
        a symbol which is not in a real section.
1192
        (coff_write_native_symbol): Corresponding change.
1193
 
1194
        * cofflink.c (_bfd_coff_link_hash_newfunc): Rename from
1195
        coff_link_hash_newfunc and make non-static.
1196
        (_bfd_coff_link_hash_table_init): New function, broken out of
1197
        _bfd_coff_link_hash_table_create.
1198
        (_bfd_coff_link_hash_table_create): Use it.
1199
        (process_embedded_commands): Make static.
1200
        * libcoff-in.h ((_bfd_coff_link_hash_newfunc): Declare.
1201
        (_bfd_coff_link_hash_table_init): Declare.
1202
        * libcoff.h: Rebuild.
1203
 
1204
        * coffcode.h (coff_mkobject_hook): If RS6000COFF_C, set cputype
1205
        field in XCOFF tdata.
1206
        (coff_set_arch_mach_hook): Check ifdef RS6000COFF_C, not ifdef
1207
        U802ROMAGIC, for clarity.  Try to set arch and machine correctly
1208
        based on cputype stored in a.out header, or in n_type of initial
1209
        .file symbol.
1210
        (coff_write_object_contents): Set cputype correctly in a.out
1211
        header.
1212
        (coff_slurp_symbol_table): Add casts to file_ptr to avoid
1213
        warnings.
1214
        * coffswap.h (coff_swap_aouthdr_in): Swap in cputype field.
1215
        (coff_swap_aouthdr_out): Swap out cputype field.  Don't clear
1216
        old resv1 field.
1217
        * libcoff-in.h (struct xcoff_tdata): Add cputype field.
1218
        * libcoff.h: Rebuild.
1219
 
1220
        * cpu-rs6000.c (rs6000_compatible): New static function.
1221
        (bfd_rs6000_arch): Use it.
1222
        * cpu-powerpc.c (powerpc_compatible): New static function.
1223
        (arch_info_struct): Define various flavours of PowerPC.
1224
        (bfd_powerpc_arch): Use powerpc_compatible.  Point at
1225
        arch_info_struct.
1226
 
1227
Tue Oct 10 10:50:46 1995  Fred Fish  
1228
 
1229
        * Makefile.in (FLAGS_TO_PASS):  Remove BISON.
1230
 
1231
Tue Oct 10 01:28:29 1995  Ian Lance Taylor  
1232
 
1233
        * elflink.h (elf_link_add_object_symbols): Don't warn about
1234
        changing the size or type if the old definition was weak.
1235
 
1236
Mon Oct  9 11:24:08 1995  Ian Lance Taylor  
1237
 
1238
        * coffcode.h (combined_entry_type): Add fix_line field.
1239
        (coff_slurp_line_table): Warn if we try to set the lineno field of
1240
        a symbol twice.
1241
        (coff_slurp_symbol_table): If RS6000COFF_C, handle C_BINCL and
1242
        C_EINCL by setting fix_line.  Fix C_BSTAT symbol value.
1243
        * coffgen.c (coff_mangle_symbols): Handle fix_line.
1244
        (coff_write_symbol): Only use N_DEBUG if the symbol is in the
1245
        absolute section.
1246
        (coff_print_symbol): Print fix_value symbols in a useful fashion.
1247
        * libcoff.h: Rebuild.
1248
 
1249
        * libcoff-in.h (struct xcoff_tdata): Define.
1250
        (xcoff_data): Define.
1251
        * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union.
1252
        * bfd-in2.h, libcoff.h: Rebuild.
1253
        * coff-rs6000.c (xcoff_mkobject): New static function.
1254
        (coff_mkobject): Define.
1255
        (xcoff_copy_private_bfd_data): New static function.
1256
        (coff_bfd_copy_private_bfd_data): Define.
1257
        (rs6000coff_howto_table): Change R_TOC complain_on_overflow from
1258
        signed to bitfield.
1259
        (rs6000coff_vec): Add DYNAMIC to object_flags.
1260
        * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and
1261
        .loader sections specially.
1262
        (coff_new_section_hook): If RS6000COFF_C, get the .text and .data
1263
        section alignment from the XCOFF tdata information.
1264
        (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on
1265
        F_SHROBJ, and copy the extra a.out header information into the
1266
        XCOFF tdata structure.
1267
        (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ,
1268
        F_DYNLOAD and the extra a.out header information.
1269
        (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or
1270
        C_HIDEXT symbol with attached csect information.
1271
        * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap
1272
        in the o_maxdata field.
1273
        (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields.
1274
        * coffgen.c (coff_renumber_symbols): Don't move any symbol to the
1275
        end if BSF_NOT_AT_END is set.
1276
 
1277
        * targets.c (bfd_target): Rename _bfd_read_ar_hdr field to
1278
        _bfd_read_ar_hdr_fn.
1279
        * libbfd-in.h (_bfd_read_ar_hdr): Update accordingly.
1280
        * bfd-in2.h, libbfd.h: Rebuild.
1281
        * archive.c (_bfd_get_elt_at_filepos): Cast _bfd_read_ar_hdr
1282
        return value.
1283
        (do_slurp_bsd_armap, do_slurp_coff_armap): Likewise.
1284
        (bfd_slurp_bsd_armap_f2): Likewise.
1285
        (_bfd_slurp_extended_name_table): Likewise.
1286
 
1287
Fri Oct  6 16:18:35 1995  Ken Raeburn  
1288
 
1289
        Mon Sep 25 22:49:32 1995  Andreas Schwab  
1290
 
1291
        * archive.c (bfd_get_next_mapent): Return BFD_NO_MORE_SYMBOLS
1292
        when the symbol table is empty.
1293
 
1294
        * elf32-m68k.c (elf_m68k_size_dynamic_sections): Don't reserve
1295
        space for section symbols, since we don't output them either.
1296
        (elf_m68k_adjust_dynindx): Removed.
1297
 
1298
        * ptrace-core.c (rawptr): Make it a local variable of
1299
        ptrace_unix_core_file_p.
1300
 
1301
Fri Oct  6 12:24:47 1995  Michael Meissner  
1302
 
1303
        * coff-rs6000.c (xcoff_write_archive_contents): Return false, not
1304
        NULL.
1305
 
1306
        * config.bfd (powerpc{,le}-{elf,sysv4,eabi,solaris2}): Add NT, and
1307
        Mac object file formats.
1308
 
1309
Fri Oct  6 12:04:02 1995  Ian Lance Taylor  
1310
 
1311
        * coffgen.c (coff_fix_symbol_name): Don't try to set up file
1312
        auxent if there isn't one.
1313
        (coff_write_symbols): If there is no file auxent, use SYMNMLEN
1314
        rather than FILNMLEN as the maximum name length.
1315
 
1316
        * coffcode.h (bfd_coff_backend_data): Add new field
1317
        _bfd_coff_print_aux.
1318
        (bfd_coff_print_aux): New static function.
1319
        (coff_pointerize_aux_hook (RS6000COFF_C version)): Pointerize the
1320
        scnlen field of an XTY_LD csect aux entry.
1321
        (coff_print_aux): New static function.
1322
        (coff_slurp_symbol_table): Don't pointerize scnlen field; now done
1323
        in coff_pointerize_aux_hook.
1324
        (bfd_coff_std_swap_table): Initialize new field.
1325
        * coffgen.c (coff_print_symbol): Call bfd_coff_print_aux.
1326
        * libcoff.h: Rebuild.
1327
        * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
1328
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
1329
 
1330
        * coffcode.h (coff_write_object_contents): On AIX, clear F_RELFLG
1331
        if there are symbols, for native AIX ld compatibility.
1332
 
1333
        * coffcode.h (bfd_coff_backend_data): Add new field
1334
        _bfd_coff_pointerize_aux_hook.
1335
        (coff_pointerize_aux_hook): Define as a function if RS6000COFF_C
1336
        or I960, and as 0 otherwise.
1337
        (bfd_coff_std_swap_table): Initialize new field.
1338
        * libcoff.h: Rebuild.
1339
        * coffgen.c (coff_pointerize_aux): Change parameters  to take
1340
        symbol pointer instead of type and class, and to take aux index.
1341
        Call _bfd_coff_pointerize_aux_hook if it is defined.
1342
        (coff_get_normalized_symtab): Always call coff_pointerize_aux.
1343
        * coff-alpha.c (alpha_ecoff_backend_data): Initialize all fields.
1344
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
1345
 
1346
        * coff-rs6000.c: Add full support for AIX archives.  Rewrite old
1347
        read-only/host-only support.
1348
 
1349
        * coffcode.h (coff_slurp_symbol_table): Set C_HIDEXT symbols to be
1350
        BSF_LOCAL.
1351
        (OTHER_GLOBAL_CLASS): Do not define to be C_HIDEXT if
1352
        RS6000COFF_C.
1353
 
1354
        * targets.c (bfd_target): Add _bfd_read_ar_hdr field.  Modify
1355
        BFD_JUMP_TABLE_ARCHIVE accordingly.
1356
        * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare.
1357
        (_bfd_compute_and_write_armap): Declare.
1358
        (_bfd_generic_read_ar_hdr): Declare.
1359
        (_bfd_read_ar_hdr): Define.
1360
        (_bfd_noarchive_read_ar_hdr): Define.
1361
        (_bfd_archive_bsd_read_ar_hdr): Define.
1362
        (_bfd_archive_coff_read_ar_hdr): Define.
1363
        * archive.c: Change all callers of _bfd_snarf_ar_hdr to call
1364
        _bfd_read_ar_hdr instead.
1365
        (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr.
1366
        (_bfd_compute_and_write_armap): Rename from
1367
        compute_and_write_armap.  Make non-static.  Change all callers.
1368
        * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather
1369
        than _bfd_snarf_ar_hdr.
1370
        * aout-target.h (MY_read_ar_hdr): Define if not defined.
1371
        * ieee.c (ieee_read_ar_hdr): Define.
1372
        * libecoff.h (_bfd_ecoff_read_ar_hdr): Define.
1373
        * oasys.c (oasys_read_ar_hdr): Define.
1374
        * som.c (som_read_ar_hdr): Define.
1375
        * bfd-in2.h, libbfd.h: Rebuild.
1376
 
1377
Thu Oct  5 14:04:07 1995  steve chamberlain  
1378
 
1379
        * peicode.c (coff_swap_filehdr_in): If symptr is
1380
        zero, there aren't any symbols, even if nsyms is set.
1381
 
1382
Thu Oct  5 11:45:02 1995  Ian Lance Taylor  
1383
 
1384
        * libecoff.h (struct ecoff_backend_data): Add adjust_headers
1385
        field.
1386
        * ecoff.c (ecoff_sec_to_styp_flags): Check for various Alpha
1387
        sections, and set styp correctly for them: .got, .hash, .dynamic,
1388
        .liblist, .rel.dyn, .conflic, .dynstr, .dynsym, .comment.
1389
        (_bfd_ecoff_styp_to_sec_flags): Check for various Alpha section
1390
        types.
1391
        (ecoff_sort_hdrs): New static function.
1392
        (ecoff_compute_section_file_positions): Return boolean, not void.
1393
        Sort the sections by VMA before looking through them.  Put the
1394
        first non SEC_ALLOC section on a new page.  Put every SEC_ALLOC
1395
        section on an appropriate boundary within the page.
1396
        (ecoff_compute_reloc_file_positions): Check return value of
1397
        ecoff_compute_section_file_positions.
1398
        (_bfd_ecoff_set_section_contents): Likewise.
1399
        (_bfd_ecoff_write_object_contents): Check for various Alpha
1400
        section types when incrementing text_size and data_size.  Call
1401
        adjust_headers backend function if it exists.
1402
        * coff-alpha.c (alpha_adjust_headers): New static function.
1403
        (alpha_ecoff_backend_data): Initialize adjust_headers field.
1404
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
1405
 
1406
        * hosts/i386bsd.h: Restore file incorrectly deleted on Sep 6.
1407
 
1408
Wed Oct  4 18:15:02 1995  Jeff Law  (law@hurl.cygnus.com)
1409
 
1410
        * rs6000-core.c (CORE_VERSION_1): Use CORE_VERSION_1 instead
1411
        of ALTERNATE_AIX_CORE_FORMAT.
1412
        * configure.in (aix4): No longer need CORE_FLAGS.
1413
        * configure: Updated.
1414
 
1415
Wed Oct  4 15:36:36 1995  Ken Raeburn  
1416
 
1417
        NS32k changes from Ian Dall:
1418
        * aoutx.h (MY_final_link_relocate, MY_relocate_contents): New
1419
        macros.
1420
        (aout_link_input_section_std, aout_link_input_section_ext,
1421
        aout_link_reloc_link_order): Call them instead of _bfd_*
1422
        versions.
1423
        * aout-target.h (MY_exec_header_not_counted): New macro, defaults
1424
        to zero.
1425
        (backend_data): Use it instead of hardcoded zero.
1426
 
1427
        * aout-ns32k.c (CTOR_TABLE_RELOC_HOWTO): New macro.
1428
        (MY_swap_std_reloc_out): Use udata.i for KEEPIT, don't call stoi.
1429
 
1430
        * ns32knetbsd.c: Include bfd.h.
1431
        (MY_text_includes_header, MY_bfd_reloc_type_lookup): New macros.
1432
        (MY_bfd_reloc_type_lookup): Declare function too.
1433
        * pc532-mach.c (set_sizes): Don't declare.
1434
        (MY_text_includes_header, MY_exec_header_not_counted): Define.
1435
        (backend_data, MY_backend_data): Don't define.
1436
 
1437
        * config.bfd: Treat ns32k-pc532-ux* like ns32k-pc532-mach*, and
1438
        ns32k-*-lites* like ns32k-*-netbsd*.
1439
 
1440
        * hosts/nbsd.h: Swap order of sys/vmparam.h and sys/param.h, to
1441
        compile on lites.
1442
 
1443
Wed Oct  4 14:15:52 1995  Ian Lance Taylor  
1444
 
1445
        * coffcode.h (coff_write_object_contents): Restore setting
1446
        f_timdat to 0, deleted on August 22.
1447
 
1448
Tue Oct  3 16:28:32 1995  steve chamberlain  
1449
 
1450
        * coffcode.h (coff_bfd_copy_private_symbol_data,
1451
        coff_bfd_copy_private_section_data,
1452
        coff_bfd_copy_private_bfd_data): ifdef to allow overrides.
1453
        * peicode.h (coff_bfd_copy_private_bfd_data): New
1454
        (pe_bfd_copy_private_bfd_data): New.
1455
        (coff_swap_scnhdr_in): Swap bss size into the right place.
1456
        (pe_print_private_bfd_data): Add some newlines.
1457
 
1458
Tue Oct  3 11:53:04 1995  Jeff Law  (law@hurl.cygnus.com)
1459
 
1460
        * som.c (setup_sections): Don't die if a space has no subspaces.
1461
 
1462
Mon Oct  2 14:08:55 1995  Ian Lance Taylor  
1463
 
1464
        * elflink.h (elf_link_add_object_symbols): Don't let a weak
1465
        dynamic symbol override a common symbol.  Don't change the size or
1466
        type if they have been set and the new symbol is not a definition.
1467
        Warn if the size or type changes.
1468
 
1469
Sun Oct  1 01:34:41 1995  Jeff Law  (law@hurl.cygnus.com)
1470
 
1471
        * som.c (som_begin_writing): Don't write the symbol table or
1472
        symbol  strings.
1473
        (som_finish_writing): Write them here.  Place them after the
1474
        subspace data, but before the relocs.
1475
 
1476
Fri Sep 29 11:01:55 1995  Ian Lance Taylor  
1477
 
1478
        * sunos.c (sunos_add_one_symbol): Just pass false, not
1479
        info->shared_library, to sunos_create_dynamic_sections.
1480
        (sunos_scan_ext_relocs): Don't warn about a reloc in the .text
1481
        section.
1482
        (sunos_check_dynamic_reloc): Remove .text section assertion.
1483
 
1484
Thu Sep 28 18:48:47 1995  Stan Shebs  
1485
 
1486
        * config.bfd: Add powerpc-*-macos*, powerpc-*-mpw*.
1487
        * configure, configure.in: Add pmac_xcoff_vec case.
1488
        * Makefile.in (BFD32_BACKENDS): Add coff-pmac.o.
1489
        * coff-pmac.c: New file, PowerMac XCOFF support.
1490
        * coffcode.h (coff_set_arch_mach_hook): Add PowerMac case.
1491
        * targets.c (pmac_xcoff_vec): Declare.
1492
 
1493
        * mpw-config.in: Various changes to be compatible with the
1494
        autoconf-based configury.
1495
        * mpw-make.sed: New file, sed commands to translate Unix
1496
        makefile into MPW syntax.
1497
        * mpw-make.in: Remove.
1498
        * hosts/mpw.h: Remove.
1499
        * bfd-in.h, bfd-in2.h: If MPW, include the file that defines
1500
        true and false as enums, then define TRUE_FALSE_ALREADY_DEFINED.
1501
 
1502
Thu Sep 28 17:06:23 1995  steve chamberlain  
1503
 
1504
        * binary.c (binary_get_symtab): Return an empty string on error.
1505
        * opncls.c (bfd_fdpenr): Change WIN32 restriction to WINGDB.
1506
 
1507
Thu Sep 28 15:30:44 1995  Kim Knuttila  
1508
 
1509
        * coff-ppc.c: Reformatted according to gnu conventions
1510
                      Removed irrelevant "if 0" code
1511
 
1512
Thu Sep 28 11:19:53 1995  Ian Lance Taylor  
1513
 
1514
        * hp300hpux.c (convert_sym_type): Treat secondary symbols as weak
1515
        symbols rather than as indirect symbols.
1516
        (MY(slurp_symbol_table)): Don't do anything special about
1517
        secondary symbols.
1518
 
1519
        * coffcode.h (coff_new_section_hook): Make sure that the alignment
1520
        of .ctors and .dtors sections is no larger than 2.
1521
 
1522
        * sunos.c (sunos_add_one_symbol): Don't change
1523
        bfd_link_hash_common to bfd_link_hash_new, since it may be on the
1524
        undef list.
1525
        (bfd_sunos_record_link_assignment): Don't put __DYNAMIC in the
1526
        dynamic symbols when creating a shared library.
1527
        (sunos_scan_ext_relocs): Handle relocs correctly when creating a
1528
        shared library.
1529
        (sunos_scan_dynamic_symbol): Don't mark the __DYNAMIC symbol as
1530
        written even if it is not defined in a regular object.
1531
        (sunos_write_dynamic_symbol): Use plt_offset for the address of
1532
        the jump table reloc.  Add an assertion.  Use RELOC_JMP_SLOT
1533
        rather than the constant 22.
1534
        (sunos_check_dynamic_reloc): Handle creating a shared library.
1535
        (sunos_finish_dynamic_link): Set the first entry in the GOT to
1536
        zero when creating a shared library.
1537
        * aoutx.h (NAME(aout,final_link)): If there is a symbol __DYNAMIC,
1538
        write it out at the start of the symbol table.
1539
 
1540
        * Makefile.in (BFD32_BACKENDS): Add coff-arm.o.
1541
 
1542
Thu Sep 28 00:58:05 1995  Doug Evans  
1543
 
1544
        * config.bfd: Add arm-*-coff.
1545
        * configure.in, configure: Add armcoff_{little,big}_vec.
1546
        * targets.c (armcoff_{little,big}_vec): Declare.
1547
        (bfd_target_vector): Add armcoff_{little,big}_vec.
1548
        * coff-arm.c (armcoff_{little,big}_vec): Always define.
1549
 
1550
Wed Sep 27 10:37:14 1995  Ian Lance Taylor  
1551
 
1552
        * targets.c (bfd_find_target): Remove debugging code.
1553
 
1554
Wed Sep 27 07:23:39 1995  Kim Knuttila  
1555
 
1556
        * coff-ppc.c, pe-ppc.c, pei-ppc.c: Initial bfd for coff/PE
1557
        support on powerpc.
1558
        * Makefile.in: added *-ppc files
1559
        * coffcode.h: ppc MAGIC, and use peicode.h rather than coffswap.h to
1560
        allow pe based .o's to be shared with other tools on ppc/NT
1561
        * config.bfd: added powerpc[le]-[pe|winnt] config support
1562
        * configure, configure.in: added bfd_powerpc[le]_pe[i]_vec
1563
        * peicode.h: Added more section flags for PE on ppc
1564
                     Added coff_swap_filehdr_out to allow peicode.h to be
1565
                     used for non-image PE files on ppc.
1566
                     Check for image, or not, before copying pe_opthdr
1567
        * targets.c: Added new bfd's
1568
        * targets.c: Removed two inactive bfds that shouldn't have made it this
1569
                     far.
1570
 
1571
Tue Sep 26 14:06:41 1995  Michael Meissner  
1572
 
1573
        * elf32-ppc.c (ppc_reloc_type): Rename from reloc_type, and use
1574
        explicit values to initialize all relocs.  Change all users.
1575
        (ppc_elf_brtaken_inner): New function to handle branch predicition
1576
        relocs.
1577
        (ppc_elf_brtaken_reloc): Ditto.
1578
        (ppc_elf_howto_raw): Use new functions.  Make sure all unsupported
1579
        relocs use ppc_elf_unsupported_reloc.
1580
        (ppc_elf_merge_private_bfd_data): Keep track of whether an error
1581
        needs to be reported.
1582
        (ppc_elf_relocate_section): Support branch prediction relocs.
1583
 
1584
Tue Sep 26 12:48:05 1995  Ian Lance Taylor  
1585
 
1586
        * bfd.c (bfd_assert): Remove \n from string passed to
1587
        _bfd_error_handler.
1588
 
1589
        * coff-i386.c: (TWO_DATA_SECS): Don't define.
1590
        * coffcode.h (bfd_coff_backend_data): Remove _bfd_make_section_hook.
1591
        (bfd_coff_make_section_hook): Don't define.
1592
        (coff_make_section_hook): Remove.
1593
        (sec_to_styp_flags): Remove TWO_DATA_SECS case.
1594
        (styp_to_sec_flags): Likewise.
1595
        (coff_write_object_contents): Likewise.
1596
        (bfd_coff_std_swap_table): Don't initialize make_section_hook
1597
        field.
1598
        * libcoff.h: Rebuild.
1599
        * coffgen.c (make_a_section_from_file): Just call
1600
        bfd_make_section_anyway, not bfd_make_section or
1601
        bfd_coff_make_section_hook.
1602
        * ecoff.c (_bfd_ecoff_make_section_hook): Remove.
1603
        * libecoff.h (_bfd_ecoff_make_section_hook): Don't declare.
1604
        * coff-alpha.c (alpha_ecoff_backend_data): Don't initialize
1605
        make_section_hook field.
1606
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
1607
 
1608
        * aoutx.h (translate_from_native_sym_flags): Don't try to stuff
1609
        pointers into value field for warning and indirect symbols; just
1610
        leave the value field alone.
1611
        * linker.c (generic_link_add_symbol_list): Use next symbol for
1612
        warning and indirect symbols, rather than looking in symbol value.
1613
        * ecoff.c (ecoff_set_symbol_info): Remove indirect_ptr_ptr
1614
        parameter.  Change all callers.  Remove support for indirect
1615
        symbols; it didn't work anyhow.
1616
        (_bfd_ecoff_slurp_symbol_table): Remove indirect_ptr variable.
1617
        * syms.c: Change comments about BSF_WARNING and BSF_INDIRECT.
1618
        * bfd-in2.h: Rebuild.
1619
 
1620
Mon Sep 25 16:04:09 1995  Michael Meissner  
1621
 
1622
        * elf32-ppc.c (ppc_elf_howto_raw): For all 14-bit branch relocs,
1623
        go back to telling the tools this reloc operates on 32 bits.
1624
 
1625
Mon Sep 25 11:48:02 1995  Ian Lance Taylor  
1626
 
1627
        * aout-adobe.c (aout_adobe_callback): Use _bfd_error_handler
1628
        rather than a direct fprintf.
1629
        * archive.c (_bfd_write_archive_contents): Likewise.
1630
        * coffcode.h (coff_slurp_symbol_table): Likewise.
1631
        * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Likewise.
1632
        (ppc_elf_unsupported_reloc): Likewise.
1633
        (ppc_elf_relocate_section): Likewise.
1634
        * i386linux.c (linux_tally_symbols): Likewise.
1635
        (linux_finish_dynamic_link): Likewise.
1636
        * osf-core.c (osf_core_core_file_p): Likewise.
1637
        * rs6000-core.c (rs6000coff_get_section_contents): Likewise.
1638
        * som.c (som_sizeof_headers): Likewise.
1639
        * srec.c (srec_bad_byte): Likewise.
1640
        * bfd.c (bfd_assert): Likewise.  Also change file to be const.
1641
        * libbfd-in.h (bfd_assert): Declare first parameter const.
1642
        * libbfd.h: Rebuild.
1643
        * coff-a29k.c (a29k_reloc): Don't bother to fprintf; returning
1644
        bfd_reloc_overflow is enough.
1645
        * coff-h8300.c (rtype2howto): Don't bother to fprintf; just abort.
1646
        * coff-h8500.c (rtype2howto): Likewise.
1647
        * coff-z8k.c (rtype2howto): Likewise.
1648
        * coffcode.h (dummy_reloc16_extra_cases): Likewise.
1649
        * elf.c (_bfd_elf_get_lineno): Likewise.
1650
        (_bfd_elf_no_info_to_howto): Likewise.
1651
        (_bfd_elf_no_info_to_howto_rel): Likewise.
1652
        * hp300hpux.c (convert_sym_type): Likewise.
1653
        (MY(swap_std_reloc_in)): Likewise.
1654
        * elf.c (bfd_section_from_shdr): Remove #if 0 sections.
1655
 
1656
        * libaout.h (struct aoutdata): Add line_buf field.
1657
        * aoutx.h (NAME(aout,find_nearest_line)): Remove statics buffer
1658
        and filename_buffer.  Instead, use a malloc buffer stored in the
1659
        new line_buf field.  Remove length restrictions.
1660
 
1661
        * coffgen.c (string_size): Remove static variable.
1662
        (debug_string_size, debug_string_section): Likewise.
1663
        (coff_fix_symbol_name): Add string_size_p, debug_string_section_p,
1664
        and debug_string_size_p parameters.  Use them instead of the
1665
        global variables.  Change all callers.
1666
        (coff_write_symbol): Likewise.
1667
        (coff_write_alien_symbol, coff_write_native_symbol): Likewise.
1668
        (coff_write_symbols): Add local variables to replace removed
1669
        global variables.
1670
 
1671
        * libcoff-in.h (struct coff_section_tdata): Add offset, i,
1672
        function, and line_base fields.
1673
        * libcoff.h: Rebuild.
1674
        * coffgen.c (coff_find_nearest_line): Use section tdata to cache
1675
        information, rather than using static variables.
1676
 
1677
        * sunos.c (sunos_read_dynamic_info): Adjust offsets in an NMAGIC
1678
        file.  From Peter DeWolf .
1679
 
1680
        * init.c (initialized): Remove static variable.
1681
        (bfd_init): Don't bother setting initialized.
1682
        (bfd_check_init): Remove.
1683
        * opncls.c (_bfd_new_bfd): Don't call bfd_check_init.
1684
        * libbfd.h: Rebuild.
1685
 
1686
Sat Sep 23 01:22:23 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
1687
 
1688
        * rs6000-core.c (rs6000coff_core_p):  Don't check the core file
1689
        size for full core dumps. Copy core file header to private data.
1690
        (rs6000coff_core_file_failing_command,
1691
        rs6000coff_core_file_failing_signal):  New functions to extract
1692
        the file name and terminating signal from the core file.
1693
        * coff-rs6000.c:  Use them.
1694
 
1695
Fri Sep 22 17:44:47 1995  Ian Lance Taylor  
1696
 
1697
        Change arch info to be const, initialized at compile time.
1698
        * archures.c: Reindent many functions.  Change CONST to const.
1699
        (bfd_arch_info_type): Make arch_name const.  Remove disassemble;
1700
        nothing set it anyhow.  Make next const.
1701
        (bfd_arch_info_list): Remove.
1702
        (bfd_archures_list): Rename from archures_init_table.  Change from
1703
        a table of function pointers to a table of bfd_arch_info_type
1704
        structure addresses.
1705
        (bfd_scan_arch): Rewrite accordingly.  Return a const pointer.
1706
        (bfd_lookup_arch): Likewise.
1707
        (bfd_set_arch_info): Rewrite accordingly.  Change argument to be a
1708
        const pointer.
1709
        (bfd_default_arch_struct): Make const.
1710
        (bfd_arch_init, bfd_arch_linkin): Remove.
1711
        (bfd_get_arch_info): Return a const pointer.
1712
        * init.c (bfd_init): Don't call bfd_arch_init.
1713
        * bfd.c (struct _bfd): Make arch_info const.
1714
        * bfd-in2.h: Rebuild.
1715
        * libbfd.h: Rebuild.
1716
        * configure.in: Put & before everything in $selarchs.
1717
        * configure: Rebuild.
1718
        * cpu-*.c: Change bfd_*_arch from a function which calls
1719
        bfd_arch_linkin to a const structure.
1720
        * ieee.c (ieee_object_p): Make arch const.
1721
 
1722
Fri Sep 22 16:23:18 1995  Michael Meissner  
1723
 
1724
        * reloc.c (bfd_reloc_code_type): Add relocations to support all of
1725
        PowerPC V.4.
1726
        * bfd-in2.h: Regenerate.
1727
        * libbfd.h: Regenerate.
1728
 
1729
        * elf32-ppc.c (reloc_type): Update names to match current draft.
1730
        (ppc_elf_howto_raw): Mark 14 bit relocs as short sized and PC
1731
        relative.  Update names to current V.4 draft.
1732
        (ppc_elf_reloc_type_lookup): Add support for more relocations.
1733
        (ppc_elf_relocate_section): Rename relocations to match draft.
1734
 
1735
Thu Sep 21 21:53:18 1995  Michael Meissner  
1736
 
1737
        * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Allow modules
1738
        compiled with -mrelocatable-lib to be linked with either normal
1739
        modules or -mrelocatable modules.
1740
 
1741
Wed Sep 20 12:03:26 1995  Ian Lance Taylor  
1742
 
1743
        * coffcode.h (coff_write_object_contents): Clear the vstamp field
1744
        in the a.out header.
1745
 
1746
        * aoutx.h (NAME(aout,swap_ext_reloc_out)): Don't set r_extern for
1747
        a reloc against a local symbol, even if it's not a section.
1748
 
1749
Tue Sep 19 17:02:26 1995  Ian Lance Taylor  
1750
 
1751
        * targets.c (bfd_target): Remove unused align_power_min field.
1752
        * bfd-in2.h: Rebuild.
1753
        * All backends: Remove initialization of align_power_min.
1754
 
1755
Tue Sep 19 14:02:21 1995  steve chamberlain  
1756
 
1757
        * peicode.h (coff_swap_scnhdr_out): Get sizes for BSS right.
1758
 
1759
Mon Sep 18 14:35:01 1995  Arne H. Juul  
1760
 
1761
        * config.bfd (mips-dec-netbsd*): New target.
1762
        * configure.host (mips-dec-netbsd*): New host.
1763
        * configure.in (mips-dec-netbsd*): New native.
1764
        * configure: Rebuild.
1765
 
1766
Fri Sep 15 10:24:36 1995  Ian Lance Taylor  
1767
 
1768
        Make the COFF backend linker merge common types:
1769
        * cofflink.c (struct coff_debug_merge_element): Define.
1770
        (struct coff_debug_merge_type): Define.
1771
        (struct coff_debug_merge_hash_entry): Define.
1772
        (struct coff_debug_merge_hash_table): Define.
1773
        (coff_debug_merge_hash_table_init): Define.
1774
        (coff_debug_merge_hash_table_free): Define.
1775
        (coff_debug_merge_hash_lookup): Define.
1776
        (struct coff_final_link_info): Add debug_merge field.
1777
        (coff_debug_merge_hash_newfunc): New static function.
1778
        (_bfd_coff_final_link): Allocate and free debug_merge table.
1779
        (coff_link_input_bfd): Merge identical enum, struct and union
1780
        types.
1781
 
1782
Thu Sep 14 14:53:58 1995  Ian Lance Taylor  
1783
 
1784
        Convert i960 COFF to use COFF backend linker.
1785
        * coff-i960.c (coff_i960_relocate): Use a coff_section_data
1786
        structure to store the symbol being used.
1787
        (coff_i960_start_final_link): New static function.
1788
        (coff_i960_relocate_section): New static function.
1789
        (coff_i960_adjust_symndx): New static function.
1790
        (coff_start_final_link): Define.
1791
        (coff_relocate_section): Define.
1792
        (coff_adjust_symndx): Define.
1793
        * coffcode.h (bfd_coff_backend_data): Add new callback function
1794
        _bfd_coff_start_final_link.
1795
        (bfd_coff_start_final_link): Define.
1796
        (coff_start_final_link): Define if not defined.
1797
        (bfd_coff_std_swap_table): Add coff_start_final_link.
1798
        * cofflink.c (_bfd_coff_internal_syment_name): Make globally
1799
        visible.
1800
        (_bfd_coff_final_link): Call bfd_coff_start_final_link if the
1801
        function callback is not NULL.
1802
        * libcoff-in.h (struct coff_section_tdata): Add tdata field.
1803
        (_bfd_coff_internal_syment_name): Declare.
1804
        * libcoff.h: Rebuild.
1805
        * configure.in (icoff_big_vec): Add cofflink.o.
1806
        (icoff_little_vec): Likewise.
1807
        * configure: Rebuild.
1808
 
1809
Wed Sep 13 17:38:23 1995  Fred Fish  
1810
 
1811
        * Makefile.in (clean-info): Remove extraneous tab from line
1812
        following action.
1813
 
1814
Wed Sep 13 13:27:53 1995  Ian Lance Taylor  
1815
 
1816
        * cofflink.c (coff_link_input_bfd): Fail if a section with no
1817
        contents has relocs.
1818
 
1819
Thu Sep 12 12:45:34 1995  steve chamberlain  
1820
 
1821
        * coffcode.h (coff_compute_section_file_positions): Keep the
1822
        raw size safe.
1823
        (coff_write_object_contents): Remember if it's a relocatable
1824
        file.
1825
        * libcoff-in.h (pe_data_type): New member 'has_reloc_section'
1826
        * peicode.h (coff_swap_filehdr_out): Clear not-reloc flag
1827
        if relocatable file. Swap out saved raw size.
1828
 
1829
Tue Sep 12 12:14:33 1995  Ian Lance Taylor  
1830
 
1831
        * Makefile.in (do_maintainer_clean): Rename from do_realclean.
1832
        (maintainer-clean): Rename from realclean, passing
1833
        maintainer-clean down to subdirectories, but leave realclean as a
1834
        synonym.
1835
 
1836
        * linker.c (_bfd_generic_link_add_one_symbol): Pass symbol name to
1837
        warning callback.
1838
 
1839
        * dep-in.sed: Remove config.h from generated dependencies.
1840
 
1841
        * sunos.c (sunos_slurp_dynamic_symtab): New static function,
1842
        broken out of sunos_canonicalize_dynamic_symtab.
1843
        (sunos_canonicalize_dynamic_symtab): Call new function
1844
        sunos_slurp_dynamic_symtab.
1845
        (sunos_add_dynamic_symbols): Add three new parameters.  Return the
1846
        dynamic symbol table to the caller.
1847
        * aoutx.h (aout_link_add_symbols): Permit add_dynamic_symbols
1848
        callback to override the symbols being read.
1849
        * libaout.h (struct aout_backend_data): Add three new parameters
1850
        to add_dynamic_symbols callback.
1851
 
1852
        Extensive minor changes to avoid various gcc warnings.  Also:
1853
        * Makefile.in (BFD32_BACKENDS): Remove coff-arm.o.
1854
        * archures.c (bfd_arch_info_type): Change mach field from long to
1855
        unsigned long.
1856
        (bfd_lookup_arch): Change machine parameter from long to unsigned
1857
        long.
1858
 
1859
Mon Sep 11 10:55:47 1995  Ian Lance Taylor  
1860
 
1861
        * sunos.c (sunos_scan_std_relocs): Fix BFD_ASSERT: it's OK to find
1862
        a symbol with a non-zero plt_offset.
1863
 
1864
Fri Sep  8 11:47:24 1995  Ian Lance Taylor  
1865
 
1866
        * elfcode.h (align_file_position): Remove; not used.
1867
 
1868
        * configure.in: Only check for  on a native system,
1869
        and make sure it defines prstatus_t.
1870
        * configure: Rebuild.
1871
 
1872
Thu Sep  7 12:48:01 1995  Ian Lance Taylor  
1873
 
1874
        * sunos.c (sunos_write_dynamic_symbol): Correct m68k abort test.
1875
 
1876
        * config.in: Rename from config.h.in.
1877
        * configure.in: Call AC_CONFIG_HEADER with config.h:config.in.
1878
        Check for config.h:config.in when creating stamp-h.
1879
        * configure: Rebuild.
1880
        * Makefile.in (stamp-h): Depend upon config.in rather than
1881
        config.h.in.  Set CONFIG_HEADERS to config.h:config.in when
1882
        calling config.status.
1883
 
1884
        * Makefile.in (do_distclean): Remove config.h and stamp-h.
1885
        (Makefile): Just rebuild Makefile.
1886
        (config.h, stamp-h): New targets.
1887
        * configure.in: Create stamp-h when rebuilding config.h.
1888
        * configure: Rebuild.
1889
 
1890
Wed Sep  6 15:00:33 1995  Ian Lance Taylor  
1891
 
1892
        * configure.in: Call AC_CONFIG_HEADER.  Substitute
1893
        HOST_64BIT_LONG.  Check that various header files exist.  Check
1894
        that fcntl exists.  Call BFD_BINARY_FOPEN.  Check whether malloc
1895
        and/or free need to be declared.  Don't make a link to sysdep.h.
1896
        Define TRAD_HEADER for various hosts.
1897
        * configure: Rebuild.
1898
        * configure.host: Don't set my_host.  Add definitions taken from
1899
        host header files for various entries.  Remove entries which now
1900
        do nothing.
1901
        * acconfig.h: New file.
1902
        * config.h.in: New file, built by autoheader.
1903
        * sysdep.h: New file.
1904
        * Makefile.in (do_distclean): Don't remove sysdep.h.
1905
        (RECONFIG): Remove.
1906
        (LOCAL_H_DEPS): New variable.
1907
        ($(BFD_LIBS)): Use $(LOCAL_H_DEPS) rather than libbfd.h and
1908
        $(RECONFIG).
1909
        ($(BFD_MACHINES), $(BFD_BACKENDS)): Likewise.
1910
        ($(OPTIONAL_BACKENDS)): Likewise.
1911
        (stmp-bfd.h): Just substitute for BFD_HOST_64BIT_LONG, rather than
1912
        looking through sysdep.h.
1913
        * bfd-in.h (BFD_HOST_64BIT_LONG): Define; set by Makefile.
1914
        (BFD_HOST_64_BIT): Define based on BFD_HOST_64BIT_LONG.
1915
        (fprintf_vma, sprintf_vma): Likewise.
1916
        (int64_type, uint64_type): Don't define.
1917
        * bfd-in2.h: Rebuild.
1918
        * archures.c, bfd.c, srec.c: Include .
1919
        * elfcore.h: Check HAVE_SYS_PROCFS_H rather than HAVE_PROCFS.
1920
        * lynx-core.c: Include stuff from old hosts/lynx.h.
1921
        * opncls.c (bfd_fdopenr): Check HAVE_FNCTL and defined (F_GETFL),
1922
        rather than NO_FCNTL.
1923
        * targets.c (bfd_target_list): Check HOST_HPPAHPUX and ! __STDC__
1924
        rather than NATIVE_HPPAHPUX_COMPILER.
1925
        * trad-core.c: Don't include .  Include TRAD_HEADER if it
1926
        is defined.
1927
        * hosts/*.h: Remove all header files which merely include,
1928
        declare, and define things.  Leave header files which define
1929
        information needed by trad-core.c.
1930
 
1931
        * aclocal.m4 (BFD_BINARY_FOPEN): Define.
1932
        (BFD_CC_FOR_BUILD): Define.
1933
        * configure.in: Use BFD_CC_FOR_BUILD.
1934
        * configure: Rebuild.
1935
 
1936
Tue Sep  5 19:35:28 1995  Ian Lance Taylor  
1937
 
1938
        * aclocal.m4: Don't try to grep ../Makefile if it doesn't exist.
1939
        * configure: Rebuild.
1940
 
1941
        * coff-sparc.c (CALC_ADDEND): Don't set the addend to the value of
1942
        a global symbol.
1943
 
1944
Tue Sep  5 12:48:26 1995  Jason Molenda   (crash@phydeaux.cygnus.com)
1945
 
1946
        * config.bfd: i386pe_ve -> i386pe_vec.
1947
 
1948
Mon Sep  4 14:02:43 1995  Ian Lance Taylor  
1949
 
1950
        * configure.host: Incorporate host Makefile fragments by setting
1951
        shell variables.
1952
        * configure.in: Call AC_PROG_CC.  Substitute CFLAGS, HDEFINES and
1953
        AR.  Call AC_PROG_INSTALL.  Substitute CC_FOR_BUILD, choosing a
1954
        value based on whether the code is being compiled by a cross
1955
        compiler.  Don't substitute host_makefile_frag or frags.
1956
        * aclocal.m4: New file to define local AC_PROG_CC.
1957
        * configure: Rebuild.
1958
        * Makefile.in (INSTALL): Set to @INSTALL@.
1959
        (INSTALL_PROGRAM): Set to @INSTALL_PROGRAM@.
1960
        (INSTALL_DATA): Set to @INSTALL_DATA@.
1961
        (AR): Set to @AR@.
1962
        (CC): Define as @CC@.
1963
        (CFLAGS): Set to @CFLAGS@.
1964
        (CC_FOR_BUILD): Set to @CC_FOR_BUILD@.
1965
        (@host_makefile_frag@): Remove.
1966
        (ALL_CFLAGS): Change $(HDEFINES) to @HDEFINES@.  Move $(CFLAGS)
1967
        after other options.
1968
        (config.status): Remove dependency upon @frags@.
1969
        * config/*.mh, config/README: Remove.
1970
 
1971
        * config.bfd: Rewrite to incorporate the contents of the Makefile
1972
        fragments by setting shell variables, rather than merely returning
1973
        the name of a Makefile fragment.
1974
        * configure.in: Use shell variables set by config.bfd rather than
1975
        looking at the target Makefile fragment files.  Don't substitute
1976
        target_makefile_frag.  Do substitute TDEFINES.
1977
        * configure: Rebuild.
1978
        * Makefile.in (@target_makefile_frag@): Remove.
1979
        (ALL_CFLAGS): Change $(TDEFINES) to @TDEFINES@.
1980
        * config/*.mt: Remove.
1981
 
1982
Mon Sep  4 03:13:28 1995  Ken Raeburn  
1983
 
1984
        * configure.in: Put changequote lines around "i[345]86" patterns
1985
        section of core file support.
1986
 
1987
Sun Sep  3 11:31:58 1995  Jeff Law  (law@snake.cs.utah.edu)
1988
 
1989
        * som.c (som_bfd_print_private_bfd_data): Define to use the
1990
        generic version.
1991
 
1992
Fri Sep  1 17:08:40 1995  steve chamberlain  
1993
 
1994
        * peicode.h (coff_swap_aouthdr_in): Add ImageBase to
1995
        entry, text_start and data_start.
1996
 
1997
Fri Sep  1 18:06:28 1995  Ian Lance Taylor  
1998
 
1999
        * Makefile.in (OFILES): Remove $(TDEPFILES).
2000
        * config/apollo.mt (TDEPFILES): Remove.
2001
        * config/README: Update.
2002
 
2003
        * configure.in: For a native configuration, set COREFILE and
2004
        COREFLAG based on the canonical host name.
2005
        * configure: Rebuild.
2006
        * Makefile.in: Rebuild dependencies.
2007
        (ALL_CFLAGS): Add @COREFLAG@.
2008
        (OFILES): Replace $(HDEPFILES) with @COREFILE@.
2009
        * coff-rs6000.c: Check AIX_CORE rather than HOST_AIX for core file
2010
        support routines.  Check LYNX_CORE rather than HOST_LYNX.
2011
        * lynx-core.c: Check LYNX_CORE rather than HOST_LYNX.
2012
        * i386lynx.c: Likewise.
2013
        * m68klynx.c: Likewise.
2014
        * sparclynx.c: Likewise.
2015
        * rs6000-core.c: Check AIX_CORE rather than HOST_AIX.
2016
        * *-core.c: Comment changes.
2017
        * config/decstation.mh (HDEPFILES): Remove.
2018
        (HDEFINES): Remove -DTRAD_CORE.
2019
        * config/irix3.mh (RANLIB): Remove.
2020
        * config/irix4.mh (HDEPFILES, RANLIB): Remove.
2021
        (HDEFINES): Remove -DIRIX_CORE.
2022
        * config/riscos.mh (RANLIB, HDEPFILES): Remove.
2023
        (HDEFINES): Remove -DTRAD_CORE.
2024
        * config/ncr3000.mh (AR_FLAGS, RANLIB): Remove.
2025
        * config/ultra3.mh (RANLIB): Remove.
2026
        * config/aix4.mh, config/alphaosf.mh, config/amix.mh: Remove.
2027
        * config/apollo.mh, config/delta68.mh, config/delta88.mh: Remove.
2028
        * config/dpx2.mh, config/esix.mh, config/harris.mh: Remove.
2029
        * config/hp300.mh, config/hp300bsd.mh, config/hppabsd.mh: Remove.
2030
        * config/hppahpux.mh, config/hppaosf.mh: Remove.
2031
        * config/i386aix.mh, config/i386bsd.mh: Remove.
2032
        * config/i386linux.mh, config/i386mach3.mh: Remove.
2033
        * config/i386sco.mh, config/i386v.mh, config/i386v4.mh: Remove.
2034
        * config/irix5.mh, config/m88kmach3.mh, config/mipsbsd.mh: Remove.
2035
        * config/mipsmach3.mh, config/news-mips.mh: Remove.
2036
        * config/news.mh, config/pc532mach.mh, config/riscix.mh: Remove.
2037
        * config/rs600.mh, config/rs6000lynx.mh: Remove.
2038
        * config/solaris2.mh, config/stratus.mh: Remove.
2039
        * config/symmetry.mh, config/sysv4.mh, config/tahoe.mh: Remove.
2040
        * config/vaxbsd.mh, config/vaxult.mh, config/vaxult2.mh: Remove.
2041
 
2042
Fri Sep  1 15:18:50 1995  Kazumoto Kojima  
2043
 
2044
        * elflink.h (elf_bfd_final_link): Don't change a DT_INIT or
2045
        DT_FINI entry if the appropriate symbol is not in the hash table.
2046
 
2047
        * libelf.h (struct elf_backend_data): Add create_program_headers
2048
        and want_hdr_in_seg fields.
2049
        * elfxx-target.h (elf_backend_want_hdr_in_seg): Define if not
2050
        defined.
2051
        (elf_backend_create_program_headers): Likewise.
2052
        (elfNN_bed): Initialize create_program_headers and
2053
        want_hdr_in_seg.
2054
        * elf.c (get_program_header_size): Call create_program_headers
2055
        backend routine.
2056
        (map_program_segments): Check want_hdr_in_seg backend field.  Call
2057
        create_program_headers backend routine.
2058
 
2059
        * elf.c (assign_file_positions_except_relocs): Align non allocated
2060
        sections when creating an executable.
2061
 
2062
        * elfcode.h (elf_swap_phdr_in): Make non static.
2063
        (elf_swap_phdr_out): Make non static.
2064
        * libelf.h (bfd_elf32_swap_phdr_in): Declare.
2065
        (bfd_elf32_swap_phdr_out): Declare.
2066
        (bfd_elf64_swap_phdr_in): Declare.
2067
        (bfd_elf64_swap_phdr_out): Declare.
2068
 
2069
        * ecofflink.c (ecoff_collect_shuffle): New static function.
2070
        (_bfd_ecoff_get_accumulated_pdr): New function.
2071
        (_bfd_ecoff_get_accumulated_sym): New function.
2072
        (_bfd_ecoff_get_accumulated_ss): New function.
2073
        * libbfd-in.h (_bfd_ecoff_get_accumulated_pdr): Declare.
2074
        (_bfd_ecoff_get_accumulated_sym): Declare.
2075
        (_bfd_ecoff_get_accumulated_ss): Declare.
2076
        * libbfd.h: Rebuild.
2077
 
2078
Fri Sep  1 13:20:25 1995  Ian Lance Taylor  
2079
 
2080
        * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): Fix typo.
2081
 
2082
        * elflink.h (elf_link_add_object_symbols): Handle indirect and
2083
        warning symbols.  If any section is named .gnu.warning.XXX, treat
2084
        the contents as a warning to be issued if the symbol XXX is
2085
        referenced.
2086
        (elf_link_output_extsym): For an indirect or warning symbol, just
2087
        output the symbol it points to.
2088
 
2089
        * linker.c (_bfd_link_hash_newfunc): Don't bother to set bfd_error
2090
        if bfd_hash_allocate fails, since it will already be set.
2091
        (generic_link_hash_newfunc): Likewise.
2092
        (archive_hash_newfunc): Likewise.
2093
        (hash_entry_bfd): New static function.
2094
        (_bfd_generic_link_add_one_symbol): Pass new arguments to warning
2095
        callback.  Allocate a new warning using the hash table newfunc.
2096
        Use bfd_hash_replace to update the entry in the hash table, rather
2097
        than assuming we can copy the fields with structure assignment.
2098
 
2099
        * hash.c (bfd_hash_replace): New function.
2100
        * bfd-in.h (bfd_hash_replace): Declare.
2101
        * bfd-in2.h: Rebuild.
2102
 
2103
Fri Sep  1 08:12:50 1995  James G. Smith  
2104
 
2105
        * config.bfd: Add mips*vr4300-*-elf* target.
2106
        * config/mipsbvr4300.mt: Added.
2107
 
2108
Thu Aug 31 16:00:53 1995  steve chamberlain  
2109
 
2110
        * Makefile.in: Update dependencies.
2111
        * aout-target.h (MY_bfd_print_private_bfd_data): New.
2112
        * bfd-in.h (PE STUFF): Deleted.
2113
        * bfd.c (tdata->pe_obj_data): New.
2114
        (bfd_print_private_bfd_data): New.
2115
        * coff-i386.c, coff-arm.c (coff_*-rtype_to_howto): Get image base from
2116
        new place.
2117
        * libcoff.h, libbfd.h, bfd-in2.h: Rebuilt.
2118
        * coffcode.h (pe_value): Delete
2119
        (coff_mkobject, coff_mkobject_hook): Conditionally build.
2120
        (coff_compute_section_file_positions): Look in new place.
2121
        (add_data_entry, fill_pe_header_info): Deleted.
2122
        (coff_write_object_contents): Remove PE stuff.
2123
        (coff_bfd_print_private_bfd_data): New.
2124
        * coffswap.h: Remove PE stuff.
2125
        * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): New.
2126
        * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): New.
2127
        * libcoff-in.h (pe_data_type): New.
2128
        * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): New.
2129
        * targets.c (_bfd_print_private_bfd_data): New.
2130
        * peicode.h: New file.
2131
 
2132
Thu Aug 31 11:49:21 1995  Ian Lance Taylor  
2133
 
2134
        * bfd-in.h: Add extern "C" if __cplusplus.
2135
        * bfd-in2.h: Rebuild.
2136
 
2137
        * coff-mips.c (mips_relocate_section): Don't convert a reloc
2138
        against an absolute symbol into a reloc against a section.
2139
 
2140
Thu Aug 31 08:00:14 1995  steve chamberlain  
2141
 
2142
        * coff-arm.c (coff_arm_reloc): Fix common size problem.
2143
        (i3coff_object_p): Delete.
2144
 
2145
Wed Aug 30 20:41:27 1995  steve chamberlain  
2146
 
2147
        * coff-arm.c (deletemeacoff_arm_reloc): Deleted.
2148
        (arm26): Not partial inplace.
2149
        * coffcode.h (coff_compute_section_file_positions): Don't
2150
        do page aligning if COFF_PAGE_SIZE isn't defined.
2151
        * coffswap.h (coff_swap_scnhdr_in): Update image base correctly.
2152
 
2153
Tue Aug 29 13:50:21 1995  steve chamberlain  
2154
 
2155
        * coffcode.h (coff_compute_section_file_positions):
2156
        Compile even if COFF_PAGE_SIZE isn't defined.
2157
        * cofflink.c (_bfd_coff_generate_reloc_section): Write
2158
        base file info as rvas.
2159
        * coff-arm.c (coff_rtype_to_howto): Deal with reloc 11.
2160
        * coffcode.h (coff_write_object_contents): Remove #if0ed code
2161
        Only remove empty sections in PE inmage files.
2162
        * libbfd.h, bfd-in2.h: regenerated.
2163
        * coff-arm.c (aoutarm_std_relo): New entry at 11.
2164
        (arm_reloc_type_lookup) : Understand type 11.
2165
        * coff-i386.c (howto_table): fix name of rva type.
2166
        (coff-i386_rtype_to_howto): Understand R_IMAGEBASE type.
2167
        * coffcode.h (sec_to_styp_flags): .edata is data.
2168
        (coff_compute_section_file_positions): Get page size right for PE.
2169
        Pagesize info is only valid in PE image files.
2170
        (fill_pe_header_info): Fix fields.
2171
        (coff_write_object_contents): Remove end_of_image calc.
2172
        (_bfd_coff_generate_reloc_section): Remove orphaned comment.
2173
        * coffswap.h (coff_swap_scnhdr_in): Don't always add IMAGE_BASE.
2174
        Swap in PE header.
2175
        (coff_swap_scnhdr_out): Setup PE flags correctly.
2176
        * reloc.c (BFD_RELOC_RVA): New field.
2177
 
2178
Thu Aug 24 17:49:59 1995  Ian Lance Taylor  (ian@cygnus.com)
2179
 
2180
        * cofflink.c (coff_link_input_bfd): Don't include line numbers for
2181
        a section if its output section has no contents.
2182
 
2183
Wed Aug 23 16:48:52 1995  Ian Lance Taylor  (ian@cygnus.com)
2184
 
2185
        * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Add parentheses to FIX
2186
        expression to avoid compiler bug on HP-UX 9.01.
2187
 
2188
Wed Aug 23 09:49:39 1995  Steve Chamberlain  
2189
 
2190
        * coffcode.h (pe_value): Unansify.
2191
 
2192
Mon Aug 21 17:49:28 1995  steve chamberlain  
2193
 
2194
        * bfd-in.h (bfd_link_subsystem): Turn enum into #defines.
2195
        (bfd_link_pe_info_dval): New
2196
        (bfd_link_stack_heap): Renamed and massaged into bfd_link_pe_info.
2197
        * bfd-in2.h: rebuilt.
2198
        * bfd.c (NT_subsystem, NT_stack_heap): Deleted.
2199
        * coffcode.h (pe_value): New function.
2200
        (fill_pe_header_info): New function.
2201
        (coff_write_object_contents): Use new function.
2202
        (coff_write_object_contents): Initialze link_data if not set.
2203
        * cofflink.c (coff_final_link_info): Remove pe randomness.
2204
        (dores_com): Update info in bfd_link_pe_info_dval.
2205
        (process_embedded_commands): Use the bfd_link_pe_info_dval.
2206
        (_bfd_coff_final_link): Remove PE stuff, initialize
2207
        coff_data->link_info.
2208
        * coffswap.h (coff_swap_[aout|filehdr]_out): Use indirect PE pointer.
2209
        (coff_swap_scnhdr_out): Use real imagebase.
2210
        * libcoff-in.h (coff_data_type.link_info): New field.
2211
 
2212
Mon Aug 21 11:10:32 1995  Ian Lance Taylor  
2213
 
2214
        * linker.c (link_action): If an undefined reference follows an
2215
        undefined weak reference, change the type to undefined.
2216
        * elflink.h (elf_link_add_archive_symbols): Don't record an
2217
        undefined weak reference as defined, in case it turns into a real
2218
        undefined reference later in the same archive.
2219
 
2220
Thu Aug 17 16:29:09 1995  Ken Raeburn  
2221
 
2222
        * coff-sh.c (sh_relax_section): Cast value for used_by_bfd field
2223
        to PTR, not coff_section_tdata pointer, since PTR is the real type
2224
        of the field.
2225
        * cofflink.c (_bfd_coff_read_internal_relocs): Ditto.
2226
 
2227
Thu Aug 17 14:44:26 1995  Ian Lance Taylor  
2228
 
2229
        Add support for linking SPARC SunOS PIC compiled code.
2230
        * sunos.c (SPARC_PLT_PIC_WORD0): Define.
2231
        (SPARC_PLT_PIC_WORD1, SPARC_PLT_PIC_WORD2): Define.
2232
        (struct sunos_link_hash_entry): Add got_offset and plt_offset
2233
        fields.
2234
        (struct sunos_link_hash_table): Add dynamic_sections_created and
2235
        dynamic_sections_needed fields.
2236
        (sunos_link_hash_newfunc): Initialize new fields.
2237
        (sunos_link_hash_table_create): Initialize new fields.
2238
        (sunos_create_dynamic_sections): New static function, broken out
2239
        of sunos_add_dynamic_symbols.
2240
        (sunos_add_dynamic_symbols): Call sunos_create_dynamic_sections.
2241
        (sunos_add_one_symbol): Call sunos_create_dynamic_sections.
2242
        (bfd_sunos_size_dynamic_sections): Call sunos_scan_relocs before
2243
        checking whether we need to set up the dynamic link information.
2244
        Define __GLOBAL_OFFSET_TABLE if anything referred to it.
2245
        (sunos_scan_std_relocs): Call sunos_create_dynamic_sections.  Use
2246
        plt_offset field; only put symbol in .plt if it is not defined by
2247
        a regular object.
2248
        (sunos_scan_ext_relocs): Likewise.  Handle base relative relocs.
2249
        (sunos_scan_dynamic_symbol): Store dynobj in local variable.
2250
        (sunos_write_dynamic_symbol): Check plt_offset rather than
2251
        checking whether symbol is in .plt section.  If symbol is defined
2252
        in a regular object file, use SPARC_PLT_PIC_WORD[012], and don't
2253
        add a JMP_TBL reloc.
2254
        (sunos_check_dynamic_reloc): Add contents and relocationp fields.
2255
        If plt_offset is set, redirect relocation to PLT.  If this is a
2256
        base relative reloc, redirect relocation to GOT.  Check
2257
        dynamic_sections_needed field rather than whether dynobj is set.
2258
        (sunos_finish_dynamic_link): Check dynamic_sections_needed field
2259
        rather than whether dynobj is set.  Don't die if .need and .rules
2260
        sections were not created.
2261
        * aoutx.h (howto_table_ext): Mark PC10, PC22, and JMP_TBL entries
2262
        PC relative.  Mark PC10 complain_overflow_dont.  Mark PC22 and
2263
        JMP_TBL complain_overflow_signed.
2264
        (NAME(aout,final_link)): If info->shared is set, set DYNAMIC.
2265
        (aout_link_input_section_std): Call check_dynamic_reloc for all
2266
        relocs.  Pass contents and &relocation.  Don't warn about an
2267
        undefined symbol until check_dynamic_reloc has been called.  Don't
2268
        warn about an undefined symbol for a base relative reloc.
2269
        (aout_link_input_section_ext): Likewise.  For a base relative
2270
        reloc, always treat r_index as an index into the symbol table.
2271
        * libaout.h (struct aout_backend_data): Add contents and
2272
        relocation argument to check_dynamic_reloc entry point.
2273
        (struct aoutdata): Add local_got_offsets field.
2274
 
2275
Wed Aug 16 01:03:07 1995  Ian Lance Taylor  
2276
 
2277
        * elf32-i386.c (elf_i386_check_relocs): Fix bug in last change.
2278
 
2279
Mon Aug 14 11:39:24 1995  Ian Lance Taylor  
2280
 
2281
        * aoutx.h (NAME(aout,machine_type)): Handle a machine of
2282
        bfd_mach_sparc or bfd_mach_sparc64.
2283
 
2284
        * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
2285
        definition, add it to the dynamic symbol table if any dynamic
2286
        object mentions it.  If we do add it, make sure we add the
2287
        corresponding real symbol.
2288
        (elf_adjust_dynamic_symbol): Adjust a weak defined symbol which we
2289
        put in the dynamic symbol table, even if no regular object refers
2290
        to it.
2291
        * elf32-i386.c (elf_i386_check_relocs): When creating a shared
2292
        library, don't allocate space for a PC relative reloc against a
2293
        local symbol.
2294
        * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
2295
        * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
2296
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Change assertion
2297
        to accept symbol with weakdef set.
2298
        * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
2299
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
2300
        * elf32-m68k.c (elf_m68k_relocate_section): When creating a shared
2301
        libary, don't copy over a PC relative reloc against a local
2302
        symbol.
2303
        * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2304
 
2305
Sun Aug 13 00:40:58 1995  Jeff Law  (law@snake.cs.utah.edu)
2306
 
2307
        * som.h (R_HPPA_BEGIN_BRTAB): Define.
2308
        (R_HPPA_END_BRTAB): Likewise.
2309
        * som.c (som_write_fixups): Handle R_BEGIN_BRTAB and R_END_BRTAB.
2310
 
2311
Thu Aug 10 15:53:29 1995  Ian Lance Taylor  
2312
 
2313
        * coffswap.h (coff_swap_aux_in): Swap the array dimensions
2314
        whenever x_fcnary is not being used for something else, rather
2315
        than only for an array.
2316
        (coff_swap_aux_out): Likewise.
2317
 
2318
Tue Aug  8 16:34:57 1995  steve chamberlain  
2319
 
2320
        * cofflink.c (_bfd_coff_generic_relocate_section): Remove most
2321
        of special case stuff for PE.  Now handled by relocs.
2322
        * coff-i386.c (coff_i386_reloc): Special case of PE type 7s.
2323
        (howto_table): Type 7 is dir32-rva.
2324
 
2325
Tue Aug  8 10:15:43 1995  Jeffrey A. Law  
2326
 
2327
        * configure.host: Recognize aix4 explicitly.
2328
        * rs6000-core.c (CORE_DATA_SIZE_FIELD): New macro to get a the size
2329
        of a core dump's data section.  Provide alternate definition for aix4.
2330
        (SAVE_FIELD): Similarly for save state field (register info).
2331
        (STACK_END_ADDR): Provide definition suitable for aix4.
2332
        * config/{aix4.mh,aix4.mt}: New configuration files.
2333
        * hosts/aix4.h: Likewise.
2334
 
2335
Mon Aug  7 23:03:21 1995  Ian Lance Taylor  
2336
 
2337
        * som.c (som_bfd_copy_private_symbol_data): Cast initializations
2338
        to avoid warnings.
2339
 
2340
Mon Aug  7 14:51:08 1995  Jeff Law  (law@snake.cs.utah.edu)
2341
 
2342
        * som.c (som_decode_symclass): Handle absolute symbols by checking
2343
        the SOM type (since they will rarely if ever be in the absolute
2344
        section).
2345
 
2346
Wed Aug  6 09:12:50 1995  Doug Evans  
2347
 
2348
        * archures.c (bfd_mach_sparc, bfd_mach_sparc64): Define.
2349
        * bfd-in2.h: Regenerated.
2350
        * cpu-sparc.c (sparc_arch_info): Renamed from arch_info_struct.
2351
        (sparc64_arch_info): New static variable.
2352
        (bfd_sparc_arch): Link in sparc64_arch_info.
2353
        * elf64-sparc.c (sparc64_elf_xxx): Renamed from elf64_xxx.
2354
        (sparc64_elf_object_p): New static function.
2355
        (elf_backend_object_p): Define.
2356
        * config/sparc64-elf.mt (SELECT_VECS): Add bfd_elf32_sparc_vec.
2357
 
2358
Sat Aug  5 00:04:08 1995  Jeff Law  (law@snake.cs.utah.edu)
2359
 
2360
        * som.c (som_get_reloc_upper_bound): Return -1 on error.  Compute
2361
        return value with sizeof (arelent *), not sizeof (arelent).
2362
 
2363
Wed Aug  2 12:32:21 1995  Ian Lance Taylor  
2364
 
2365
        * elf.c (bfd_section_from_shdr): If the section pointed to by the
2366
        sh_link field of a reloc section is not a symbol table, and the
2367
        file contains a single symbol table, clobber the sh_link field of
2368
        the reloc section to point to the symbol table.
2369
 
2370
Tue Aug  1 10:09:01 1995  Doug Evans  
2371
 
2372
        * coff-arm.c (howto reloc ARM26): Change size from 3 to 2.
2373
        (howto reloc ARM26D): Likewise.
2374
 
2375
Mon Jul 24 14:17:50 1995  Ian Lance Taylor  
2376
 
2377
        * aoutx.h (NAME(aout,find_nearest_line)): Use the line just before
2378
        the offset, not the one just after.  Break out of the loop after
2379
        finding a function past the offset, not merely when finding a
2380
        function with a line defined.
2381
 
2382
        * ecofflink.c (_bfd_ecoff_locate_line): When handling stabs:
2383
        correct setting of sym_ptr_end to consider symbols skipped when
2384
        setting sym_ptr; don't leave loop early unless an N_FUN is found
2385
        with a larger value.
2386
 
2387
        * coff-sh.c (sh_coff_howtos): Mark R_SH_PCDISP8BY2 and R_SH_PCDISP
2388
        as PC relative.  Describe R_SH_IMM16.  Add entries for
2389
        R_SH_SWITCH16, R_SH_SWITCH32, R_SH_USES, R_SH_COUNT, and
2390
        R_SH_ALIGN.
2391
        (SWAP_IN_RELOC_OFFSET): Define.
2392
        (SWAP_OUT_RELOC_OFFSET): Define.
2393
        (CALC_ADDEND): Define.
2394
        (sh_reloc): Change sym_value and addr to type bfd_vma.  Skip reloc
2395
        types other than R_SH_IMM32 and R_SH_PCDISP on an external symbol.
2396
        (coff_bfd_relax_section): Define.
2397
        (coff_bfd_get_relocated_section_contents): Define.
2398
        (sh_relax_section): New static function.
2399
        (sh_relax_delete_bytes): New static function.
2400
        (sh_relocate_section): Handle R_SH_PCDISP on an external symbol.
2401
        (sh_coff_get_relocated_section_contents): New static function.
2402
 
2403
        * cofflink.c (coff_link_add_object_symbols): Call
2404
        _bfd_coff_get_external_symbols, not coff_link_get_symbols.  Call
2405
        _bfd_coff_free_symbols, not coff_link_free_symbols.  Call
2406
        _bfd_coff_read_string_table, not coff_read_string_table.
2407
        (coff_link_check_archive_element): Likewise.
2408
        (coff_link_input_bfd): Likewise.
2409
        (coff_link_get_symbols): Move to coffgen.c.
2410
        (coff_read_string_table): Likewise.
2411
        (coff_link_free_symbols): Likewise.
2412
        (_bfd_coff_internal_syment_name): New static function.
2413
        (coff_link_check_ar_symbols): Use _bfd_coff_internal_syment_name.
2414
        (coff_link_add_symbols): Likewise.
2415
        (coff_link_input_bfd): Likewise.
2416
        (_bfd_coff_generic_relocate_section): Likewise.
2417
        (_bfd_coff_read_internal_relocs): New function.
2418
        (coff_link_input_bfd): Use cached section contents if available.
2419
        Use _bfd_coff_read_internal_relocs.
2420
        * coffcode.h (coff_slurp_symbol_table): Don't call bfd_seek.
2421
        (coff_bfd_get_relocated_section_contents): Only define if not
2422
        already defined.
2423
        (coff_bfd_relax_section): Likewise.
2424
        * coffgen.c (build_string_table): Remove.
2425
        (_bfd_coff_get_external_symbols): New function, moved in from old
2426
        coff_link_get_symbols in cofflink.c.
2427
        (_bfd_coff_read_string_table): New function, moved in from old
2428
        coff_read_string_table in cofflink.c.
2429
        (_bfd_coff_free_symbols): New function, moved in frmo old
2430
        coff_link_free_symbols in cofflink.c.
2431
        (coff_get_normalized_symtab): Use _bfd_coff_get_external_symbols
2432
        rather than reading the symbols directly.  To free them, call
2433
        _bfd_coff_free_symbols.  Use _bfd_coff_read_string_table rather
2434
        than build_string_table.
2435
        * libcoff-in.h (obj_coff_keep_syms): Define.
2436
        (obj_coff_keep_strings): Define.
2437
        (coff_data_type): Add fields keep_syms and keep_strings.
2438
        (coff_section_tdata): Define new structure.
2439
        (coff_section_data): Define.
2440
        (_bfd_coff_get_external_symbols): Declare.
2441
        (_bfd_coff_read_string_table): Declare.
2442
        (_bfd_coff_free_symbols): Declare.
2443
        (_bfd_coff_read_internal_relocs): Declare.
2444
        * libcoff.h: Rebuild.
2445
 
2446
Fri Jul 21 22:32:54 1995  Michael Meissner  
2447
 
2448
        * elf32-ppc.c (ppc_elf_howto_raw): Add support for R_PPC_SDAREL
2449
        relocation.
2450
        (ppc_elf_reloc_type_lookup): Ditto.
2451
        (ppc_elf_got16_inner): Ditto.
2452
        (ppc_elf_relocate_section): Ditto.
2453
 
2454
Thu Jul 20 19:19:06 1995  Jeff Law  (law@snake.cs.utah.edu)
2455
 
2456
        * elf32-hppa.c (hppa_elf_gen_reloc_type): Add new (ignored)
2457
        argument.
2458
        * elf32-hppa.h: Corresponding change.
2459
 
2460
Thu Jul 20 19:01:07 1995  Ken Raeburn  
2461
 
2462
        * libaout.h (set_aout_section_data): New macro.
2463
        * sunos.c (sunos_scan_relocs): Use it.
2464
 
2465
        * aout-ns32k.c (MY_swap_std_reloc_out): Undef KEEPIT before
2466
        defining it.
2467
 
2468
Thu Jul 20 13:48:00 1995  Fred Fish  
2469
 
2470
        * hosts/i386v4.h (getgid, getuid):  Change prototypes to be
2471
        compatible with Unixware 1.x and Unixware 2.x, and probably other
2472
        i386 svr4 versions as well.
2473
 
2474
Thu Jul 20 13:41:21 1995  Ken Raeburn  
2475
 
2476
        * targets.c (bfd_target_vector): Since armpe and armpei have been
2477
        split into big- and little-endian variants, list all of them,
2478
        instead of the now-nonexistant armpe[i]_vec.
2479
 
2480
Thu Jul 20 00:06:39 1995  Ian Lance Taylor  
2481
 
2482
        * elf.c (bfd_section_from_phdr): Set lma based on p_paddr.
2483
        (elf_fake_sections): Set sh_addr based on lma, not vma.
2484
 
2485
Wed Jul 19 15:52:01 1995  Doug Evans  
2486
 
2487
        * coff-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
2488
        * configure.in (armpe_vec, armpei_vec): Add bi-endian support.
2489
        * configure: "regenerated".
2490
        * pe-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
2491
        (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Replaces TARGET_NAME.
2492
        * pei-arm.c (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Replaces TARGET_SYM.
2493
        (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Replaces TARGET_NAME.
2494
        * targets.c (armpe_vec, armpei_vec): Deleted.
2495
        (armpe_little_vec, armpe_big_vec, armpei_little_vec, armpei_big_vec):
2496
        Added.
2497
        * config/arm-pe.mt (DEFAULT_VECTOR): Default is armpe_little_vec.
2498
        (SELECT_VECS): Add bi-endian support.
2499
 
2500
Wed Jul 19 10:47:25 1995  Ian Lance Taylor  
2501
 
2502
        * coff-sh.c: Clean up and comment.
2503
        (r_imm32): Remove.
2504
        (sh_coff_howtos): New static array.
2505
        (SH_COFF_HOWTO_COUNT): Define.
2506
        (get_symbol_value): Make relocation bfd_vma rather than long.
2507
        (RTYPE2HOWTO): Rewrite to use sh_coff_howtos.
2508
        (coff_relocate_section): Define to sh_relocate_section.
2509
        (sh_relocate_section): New static function.
2510
 
2511
Sat Jul 15 01:02:53 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
2512
 
2513
        * configure.host:  Add support for generic m68k SVR4 host.
2514
 
2515
Fri Jul 14 13:13:55 1995  Ian Lance Taylor  
2516
 
2517
        * aoutx.h (KEEPIT): Change definition to udata.i.
2518
        (KEEPITTYPE): Remove.
2519
        (NAME(aout,reloc_type_lookup)): Add cases to the
2520
        extended reloc type switch: SPARC_GOT10, SPARC_GOT13, SPARC_GOT22,
2521
        SPARC_PC10, SPARC_PC22, SPARC_WPLT30.
2522
        (NAME(aout,swap_std_reloc_out)): Don't bother to use stoi when
2523
        retrieving KEEPIT value.
2524
        (NAME(aout,swap_ext_reloc_out)): Likewise.  Also, only add in
2525
        output section VMA for section symbols, and check BSF_SECTION_SYM
2526
        to control whether to set r_extern to 1.
2527
 
2528
        * syms.c: Fix comments so that `make info' works.
2529
 
2530
        * elf32-mips.c (mips_elf_find_nearest_line): Set SEC_HAS_CONTENTS
2531
        in .mdebug section, in case backend linker has cleared it.
2532
 
2533
Fri Jul 14 11:58:34 1995  Michael Meissner  
2534
 
2535
        * elf32-ppc.c (ppc_elf_addr16_ha_inner): Rewrite to take just one
2536
        argument, the final relocated address.
2537
        (ppc_elf_addr16_ha_inner): Adjust ppc_elf_addr16_ha_inner caller.
2538
        (ppc_elf_relocate_section): Ditto.
2539
 
2540
Thu Jul 13 17:22:03 1995  Jeff Law  (law@snake.cs.utah.edu)
2541
 
2542
        * som.c (hppa_som_gen_reloc_type): Choose a reasonable field
2543
        selector relocation for the difference of two symbols.
2544
 
2545
Thu Jul 13 10:33:25 1995  Ian Lance Taylor  
2546
 
2547
        * aoutx.h (NAME(aout,slurp_reloc_table)): Cast argument to size_t
2548
        for malloc.
2549
        * coff-mips.c (mips_relocate_section): Likewise, for memmove.
2550
        (mips_relax_section): Likewise, for malloc.
2551
        * cofflink.c (process_embedded_commands): Likewise.
2552
        (_bfd_coff_final_link): Likewise.
2553
        * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
2554
        (ecoff_final_link_debug_accumulate): Likewise.
2555
        (ecoff_indirect_link_order): Likewise, for memcpy and malloc.
2556
        (ecoff_reloc_link_order): Likewise, for malloc.
2557
        * ecofflink.c (ecoff_align_debug): Likewise, for memset.
2558
        (ecoff_write_symhdr): Likewise, for malloc.
2559
        * elf32-hppa.c (elf32_hppa_read_symext_info): Likewise.
2560
        * elf.c (assign_file_positions_except_relocs): Likewise, for
2561
        qsort.
2562
        * elf32-mips.c (mips_elf_read_ecoff_info): Likewise, for malloc.
2563
        * elfcode.h (elf_slurp_reloc_table): Likewise.
2564
        * elfcore.h (elf_corefile_note): Likewise.
2565
        * elflink.h (elf_link_add_object_symbols): Likewise.
2566
        (elf_link_read_relocs): Likewise.
2567
        (NAME(bfd_elf,size_dynamic_sections)): Likewise, for memset.
2568
        * i386linux.c (bfd_linux_size_dynamic_sections): Likewise.
2569
        * ieee.c (do_with_relocs): Likewise.
2570
        * linker.c (default_indirect_link_order): Likewise, for malloc.
2571
        * nlmcode.h (nlm_object_p): Likewise.
2572
        (nlm_write_object_contents): Likewise.
2573
        * oasys.c (oasys_set_section_contents): Likewise, for memcpy.
2574
        * reloc.c (bfd_generic_get_relocated_section_contents): Likewise,
2575
        for malloc.
2576
        * section.c (bfd_get_section_contents): Likewise, for memcpy.
2577
        * srec.c (srec_get_section_contents): Likewise.
2578
        (srec_set_section_contents): Likewise.
2579
        * sunos.c (bfd_sunos_size_dynamic_sections): Likewise, for
2580
        realloc and memset.
2581
        (sunos_scan_relocs): Likewise, for malloc.
2582
        (sunos_scan_dynamic_symbol): Likewise, for realloc.
2583
        * syms.c (_bfd_generic_read_minisymbols): Likewise, for malloc.
2584
        * versados.c (versados_get_section_contents): Likewise, for
2585
        memcpy.
2586
 
2587
        * libbfd.c (real_read): Add prototype.  Change argument types from
2588
        int to size_t.
2589
        (bfd_read): Cast real_read argument to size_t, not int.
2590
        (bfd_write): Cast fwrite argument to size_t, not int.
2591
 
2592
        * elf64-gen.c (elf_info_to_howto): Fix definition for recent elf.c
2593
        changes.
2594
 
2595
        * configure.in: Fix typo: change {$enableval} to ${enableval}.
2596
        * configure: Rebuild.
2597
 
2598
        * Makefile.in (BFD32_BACKENDS): Add elflink.o.
2599
 
2600
        * targets.c (bfd_target): Add fields _read_minisymbols and
2601
        _minisymbol_to_symbol.
2602
        (BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and
2603
        _minisymbol_to_symbol.
2604
        (bfd_read_minisymbols): Define.
2605
        (bfd_minisymbol_to_symbol): Define.
2606
        * syms.c (_bfd_generic_read_minisymbols): Define.
2607
        (_bfd_generic_minisymbol_to_symbol): Define.
2608
        * libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define.
2609
        (_bfd_nosymbols_minisymbol_to_symbol): Define.
2610
        (_bfd_generic_read_minisymbols): Declare.
2611
        (_bfd_generic_minisymbol_to_symbol): Declare.
2612
        * bfd-in2.h: Rebuild.
2613
        * libbfd.h: Rebuild.
2614
        * aoutx.h (MINISYM_THRESHOLD): Define.
2615
        (NAME(aout,read_minisymbols)): New function.
2616
        (NAME(aout,minisymbol_to_symbol)): New function.
2617
        * libaout.h (NAME(aout,read_minisymbols)): Declare.
2618
        (NAME(aout,minisymbol_to_symbol)): Declare.
2619
        * aout-target.h (MY_read_minisymbols): Define.
2620
        (MY_minisymbol_to_symbol): Define.
2621
        * All targets: Define read_minisymbols and minisymbol_to_symbol.
2622
 
2623
Wed Jul 12 17:55:55 1995  Ken Raeburn  
2624
 
2625
        * elflink.h (elf_link_add_object_symbols): Cast return value from
2626
        bfd_alloc.
2627
 
2628
        * elfcode.h (size_info): Don't use "&" before function names.
2629
 
2630
Wed Jul 12 00:16:48 1995  Ken Raeburn  
2631
 
2632
        * libelf.h (elf_backend_data): Use unsigned, not unsigned char,
2633
        for bitfields.
2634
 
2635
Tue Jul 11 15:19:53 1995  Ian Lance Taylor  
2636
 
2637
        * elf.c (bfd_section_from_shdr): In case SHT_REL[A], only get the
2638
        BFD section for the sh_link section if it is a SYMTAB section.
2639
 
2640
        * aoutx.h (NAME(aout,link_add_symbols)): Don't bother to check
2641
        that archives hold a.out objects.
2642
        * cf-i386lynx.c (coff_bfd_link_add_symbols): Don't define.
2643
        (lynx_link_add_symbols): Remove.
2644
        * cf-m68klynx.c (coff_bfd_link_add_symbols): Don't define.
2645
        (lynx_link_add_symbols): Remove.
2646
        * elflink.h (elf_bfd_link_add_symbols): Don't bother to check that
2647
        archives hold ELF objects.
2648
 
2649
        * archive.c (bfd_generic_archive_p): If the archive has a map, and
2650
        the target was defaulted, but the first object in the archive can
2651
        not be matched with that target, then return a bad format error.
2652
 
2653
        * elf64-sparc.c (elf_sparc_howto_table): Set howto for WDISP16 to
2654
        elf64_wdisp16_reloc.
2655
        (elf64_wdisp16_reloc): New static function.
2656
        (elf64_sparc_relocate_section): New static function.
2657
        (elf_backend_relocate_section): Define.
2658
 
2659
        * libelf.h (struct elf_size_info): Change type of last argument to
2660
        swap_symbol_out from char * to PTR.
2661
        (bfd_elf32_swap_symbol_out): Update declaration.
2662
        (bfd_elf64_swap_symbol_out): Likewise.
2663
        * elfcode.h (elf_swap_symbol_out): Change type of cdst from char *
2664
        to PTR.
2665
        * elf.c (swap_out_syms): Cast to PTR, not char *, when calling
2666
        swap_symbol_out routine.
2667
        * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2668
        (elf_link_output_sym): Likewise.
2669
        (elf_link_output_extsym): Likewise.
2670
        * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Likewise.
2671
 
2672
Tue Jul 11 12:29:49 1995  Rick Sladkey  
2673
 
2674
        * elf.c (_bfd_elf_find_nearest_line): Handle the simple case where
2675
        there is no debugging information.
2676
 
2677
Mon Jul 10 11:45:55 1995  Ken Raeburn  
2678
 
2679
        * makefile.dos (OBJS): Add binary.o and tekhex.o.  From DJ
2680
        Delorie.
2681
 
2682
Mon Jul 10 11:09:58 1995  Ian Lance Taylor  
2683
 
2684
        * linker.c (set_symbol_from_hash): bfd_link_hash_new case: Don't
2685
        abort; it can happen for constructor symbols when not building
2686
        constructors.
2687
 
2688
        * coff-i960.c (coff_i960_relocate): Correct typo: use ! on strcmp,
2689
        not on string.
2690
        * cofflink.c (_bfd_coff_generic_relocate_section): Remove unused
2691
        local i.
2692
        * coff-arm.c (coff_arm_rtype_to_howto): Don't declare.
2693
        (PCRELOFFSET): Define if not already defined.
2694
        * Makefile.in: Rebuild dependencies.
2695
        (BFD32_BACKENDS): Add coff-arm.o
2696
        (CFILES): Add coff-arm.c, pe-arm.c, pei-arm.c.
2697
 
2698
        * aoutx.h (NAME(aout,link_hash_table_create)): Allocate hash table
2699
        using bfd_alloc, not malloc.
2700
        * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
2701
        * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2702
        * i386linux.c (linux_link_hash_table_create): Likewise.
2703
        * linker.c (_bfd_generic_link_hash_table_create): Likewise.
2704
        * sunos.c (sunos_link_hash_table_create): Likewise.
2705
 
2706
        Based on patches from Eric Youngdale :
2707
        * elflink.h (NAME(bfd_elf,size_dynamic_sections)): If -Bsymbolic,
2708
        output a DT_SYMBOLIC dynamic entry.
2709
        (elf_adjust_dynamic_symbol): If -Bsymbolic, don't require a PLT
2710
        entry for a locally defined symbol.
2711
        * elf32-i386.c (elf_i386_relocate_section): If -Bsymbolic, do warn
2712
        about undefined symbols, and fill in the GOT entry for a symbol
2713
        defined in a regular object file.
2714
        (elf_i386_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
2715
        reloc rather than a GLOB_DAT reloc for a symbol defined in a
2716
        regular object file.
2717
        * elf32-m68k.c (elf_m68k_relocate_section): If -Bsymbolic, do warn
2718
        about undefined symbols, and fill in the GOT entry for a symbol
2719
        defined in a regular object file.
2720
        (elf_m68k_finish_dynamic_symbol): If -Bsymbolic, output a RELATIVE
2721
        reloc rather than a GLOB_DAT reloc for a symbol defined in a
2722
        regular object file.
2723
        * elf32-sparc.c (elf32_sparc_relocate_section): If -Bsymbolic, do
2724
        warn about undefined symbols, and fill in the GOT entry for a
2725
        symbol defined in a regular object file.
2726
        (elf32_sparc_finish_dynamic_symbol): If -Bsymbolic, output a
2727
        RELATIVE reloc rather than a GLOB_DAT reloc for a symbol defined
2728
        in a regular object file.
2729
 
2730
        * config/m68k-coff.mt (SELECT_VECS): Rename from SELECT_VECTORS.
2731
        Correct elements to be actual BFD vector names.
2732
 
2733
        * Makefile.in (Makefile): Don't depend upon @frags@.
2734
        (config.status): Depend upon @frags@.
2735
 
2736
Fri Jul  7 17:36:44 1995  Ian Lance Taylor  
2737
 
2738
        * coffgen.c (coff_renumber_symbols): Sort defined symbols that are
2739
        neither BSF_FUNCTION not BSF_NOT_AT_END just before undefined
2740
        symbols.
2741
        * coffcode.h (coff_slurp_symbol_table): Set BSF_FUNCTION as well
2742
        as BSF_NOT_AT_END.
2743
 
2744
Fri Jul  7 17:16:15 1995  Ken Raeburn  
2745
 
2746
        * Makefile.in (do_mostlyclean): Remove config.log.
2747
        (do_distclean): Remove config.cache.
2748
 
2749
Thu Jul  6 14:37:43 1995  Ian Lance Taylor  
2750
 
2751
        * elf32-i386.c (elf_i386_relocate_section): Revert May 24 patch.
2752
        Don't copy PC32 reloc against section into shared object.
2753
 
2754
        * Makefile.in: Rebuild dependencies.
2755
        (CFILES): Added elflink.c.
2756
        (Makefile): Depend upon config.status, not configure.in.
2757
        (config.status): New target; depend upon configure configure.host
2758
        and config.bfd.
2759
 
2760
Wed Jul  5 20:17:14 1995  Ken Raeburn  
2761
 
2762
        * elfcore.h, elflink.h, elfcode.h, elf.c, elflink.c: Moved some
2763
        primarily size-independent code from elfcode.h to elf.c and new
2764
        file elflink.c; moved out other core- or linker-related routines
2765
        into other new .h files for clarity.  Renamed many routines to
2766
        start with bfd_elf or _bfd_elf.  Added a structure of
2767
        size-dependent but target-independent info to elfcode.h.
2768
        * Makefile.in: Build elflink.o.  Update dependencies.
2769
        * libelf.h: Updated some declarations.  Added a definition for the
2770
        new structure in elfcode.h.  Added more fields to elf backend data
2771
        structure.
2772
        * elfxx-target.h: Refer to the appropriate size-dependent info.
2773
        * elf32-*.c: Changed some function names.  Moved common
2774
        create_dynamic_sections code from m68k, sparc, and i386 support
2775
        into elflink.c.  Define some new macros to fill in new fields of
2776
        back end data.  Also clean up some "gcc -Wall" warnings regarding
2777
        unused or uninitialized variables.
2778
 
2779
        * Makefile.in (BFD_LIBS): No, don't put elflink.o here.
2780
        * configure.in: Include it here whenever elf.o is specified.
2781
 
2782
Wed Jul  5 10:31:47 1995  Ian Lance Taylor  
2783
 
2784
        * elf32-mips.c (mips_elf_object_p): Unconditionally set
2785
        elf_bad_symtab, since sometimes the symbol table is messed up and
2786
        the last symbol is global.
2787
 
2788
        * ecoff.c (_bfd_ecoff_bfd_is_local_label): New function.
2789
        * libecoff.h (_bfd_ecoff_bfd_is_local_label): Declare.
2790
        * elf32-mips.c (mips_elf_is_local_label): New static function.
2791
        (bfd_elf32_bfd_is_local_label): Define.
2792
 
2793
        * configure.in: Use $ac_config_sub, not $configsub.
2794
        * configure: Likewise.
2795
 
2796
        Permit --enable-targets=ieee:
2797
        * config.bfd (*-*-ieee*): New target.
2798
        * config/ieee.mt: New file.
2799
 
2800
Wed Jul  5 04:16:35 1995  Ken Raeburn  
2801
 
2802
        * config/i386aix.mh (HDEFINES): Remove -DFASCIST_FDOPEN.
2803
 
2804
        Autoconfiscation:
2805
        * configure.in, Makefile.in, doc/Makefile.in: Switch from Cygnus
2806
        configure to autoconf ways of processing --enable arguments,
2807
        setting up symlinks, incorporating makefile fragments, printing
2808
        messages at configuration time, setting variables in Makefile.
2809
        Deleted some unused variables.  Check for ranlib via autoconf.
2810
        For now, configure script removes doc/config.status.
2811
        * configure: New file.
2812
        * dep-in.sed: Use @SRCDIR@ instead of @srcdir@, so Makefile.in
2813
        line doesn't get broken by configure.
2814
        * doc/configure.in: Removed.
2815
 
2816
Tue Jul  4 12:22:21 1995  Ian Lance Taylor  
2817
 
2818
        * archive.c (_bfd_construct_extended_name_table): If
2819
        BFD_TRADITIONAL_FORMAT is set, limit the length of all file names
2820
        to ar_max_namelen.
2821
        (bfd_dont_truncate_arname): If BFD_TRADITIONAL_FORMAT is set, call
2822
        bfd_bsd_truncate_arname.
2823
        (_bfd_write_archive_contents): Revert June 1 change.
2824
 
2825
        * elfcode.h (NAME(bfd_elf,record_link_assignment)): Add provide
2826
        argument.
2827
        * bfd-in.h (bfd_elf32_record_link_assignment): Update prototype.
2828
        (bfd_elf64_record_link_assignment): Likewise.
2829
        * bfd-in2.h: Rebuild.
2830
 
2831
        * libelf.h (struct elf_link_hash_table): Add needed field.  Remove
2832
        saw_needed field.
2833
        * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
2834
        is an empty string, don't make a DT_NEEDED entry in the output
2835
        file.  Record all DT_NEEDED entries found in input dynamic
2836
        objects.
2837
        (elf_link_output_extsym): Don't check saw_needed when issuing
2838
        warnings.
2839
        * elf.c (_bfd_elf_link_hash_table_init): Initialize needed, not
2840
        saw_needed.
2841
        (bfd_elf_get_needed_list): New function.
2842
        * bfd-in.h (struct bfd_elf_link_needed_list): Define.
2843
        (bfd_elf_get_needed_list): Define.
2844
        * bfd-in2.h: Rebuild.
2845
 
2846
        * ecoff.c (_bfd_ecoff_find_nearest_line): Also initialize
2847
        find_buffer and fdrtab_len fields of newly allocated
2848
        find_line_info structure.
2849
 
2850
Mon Jul  3 17:03:52 1995  Jeff Law  (law@snake.cs.utah.edu)
2851
 
2852
        * som.c (hppa_som_gen_reloc_type): New argument "sym_diff",
2853
        nonzero when we're generating relocations for an expression
2854
        using the difference of two symbols.  All callers changed.
2855
        Handle difference of symbols for both R_HPPA and R_COMPLEX
2856
        cases.
2857
        (som_write_fixups): Handle R_COMP1, R_COMP2 and R_CODE_EXPR
2858
        fixups.
2859
 
2860
Mon Jul  3 13:55:18 1995  Steve Chamberlain  
2861
 
2862
        * config.bfd (win32): New configuration.
2863
        * configure.host (pe): Changed to i386win32.
2864
        * config/i386pe.mh: Deleted.
2865
        * config/i386win32.mh: New file.
2866
 
2867
Mon Jul  3 11:30:45 1995  Ian Lance Taylor  
2868
 
2869
        * ecoff.c (_bfd_ecoff_find_nearest_line): If we allocate
2870
        find_line_info, clear the fdrtab field.
2871
 
2872
        * targets.c (enum bfd_flavour): Add bfd_target_msdos_flavour here,
2873
        rather than in bfd-in2.h.
2874
 
2875
        * bfd.c (enum bfd_error): Define bfd_error_no_armap.
2876
        (bfd_errmsgs): Add string for bfd_error_no_armap.
2877
        * bfd-in2.h: Rebuild.
2878
        * ecoff.c (ecoff_link_add_archive_symbols): If an archive has no
2879
        armap, set bfd_error_no_armap rather than bfd_error_no_symbols.
2880
        * elfcode.h (elf_link_add_archive_symbols): Likewise.
2881
        * linker.c (_bfd_generic_link_add_archive_symbols): Likewise.
2882
 
2883
        * elfcode.h (elf_link_add_object_symbols): Permit common and
2884
        indirect symbols in weakdefs BFD_ASSERT.
2885
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Simplify
2886
        BFD_ASSERT to permit some legal, but odd, cases.
2887
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
2888
        * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
2889
 
2890
        * Makefile.in: Rebuild dependencies.
2891
        (BFD32_BACKENDS): Add versados.o.
2892
        (CFILES): Add pe-i386.c, pei-i386.c, and versados.c.
2893
 
2894
Sun Jul  2 17:49:32 1995  Ian Lance Taylor  
2895
 
2896
        * cofflink.c (_bfd_coff_generic_relocate_section): Cast base_file
2897
        to FILE * before using it.
2898
        * stab-syms.c: Revert yesterday's patch.
2899
 
2900
Sat Jul  1 12:10:42 1995  Fred Fish  
2901
 
2902
        * stab-syms.c (stdio.h):  Include prior to libaout.h, which
2903
        includes bfdlink.h, which now uses FILE.
2904
 
2905
Sat Jul  1 00:11:08 1995  Ken Raeburn  
2906
 
2907
        * elfxx-target.h: New file.
2908
 
2909
        * libelf.h (struct elf_backend_data): Remove elf_64_p field.
2910
        * elfxx-target.h (elfNN_bed): Don't set it.
2911
 
2912
        * elf32-target.h, elf64-target.h: Deleted.
2913
        * Makefile.in (elf32-target.h, elf64-target.h): Build them from
2914
        elfxx-target.h.
2915
 
2916
Fri Jun 30 16:07:18 1995  Steve Chamberlain  
2917
 
2918
        * cofflink.c (_bfd_coff_generic_relocate_section): Compare
2919
        the full text of .reloc or .edata section names.
2920
 
2921
Fri Jun 30 15:47:37 1995  Fred Fish  
2922
 
2923
        * cofflink.c (_bfd_coff_generic_relocate_section):
2924
        Remove extra '+'.
2925
 
2926
Thu Jun 29 17:24:52 1995  Steve Chamberlain  
2927
 
2928
        * coff-h8300.c (COFF_LONG_FILENAMES): Define.
2929
 
2930
Wed Jun 28 18:04:42 1995  Steve Chamberlain  
2931
 
2932
        * Makefile.in: versados.o is now conditionally built.
2933
        * coffcode.h (add_data_entry): New function.
2934
        (coff_write_object_contents): Clean up. Calculate
2935
        data entries.
2936
        * cofflink.c (_bfd_coff_generic_relocate_section):
2937
        .reloc and .edata sections are IMAGE_BASED too.
2938
        If there's a base_file then write out base information.
2939
        * configure.host (i386-*-pe): New.
2940
        * syms.c (coff_section_type): Only scan prefixes.
2941
        * targets.c (bfd_target_vector): Versados is now conditionally
2942
        built.
2943
        * config/m68k-coff.mt: Build versados.o
2944
        * hosts/i386pe.h: New file.
2945
 
2946
Mon Jun 26 13:53:49 1995  Jeff Law  (law@snake.cs.utah.edu)
2947
 
2948
        * elf32-hpa.c (elf32_hppa_relocate_section): Close comment before
2949
        R_PARISC_DPREL21L handling.
2950
 
2951
Thu Jun 22 19:28:36 1995  Ken Raeburn  
2952
 
2953
        Sun May  7 11:53:41 MDT 1995  Bryan Ford  
2954
 
2955
        * config/i386-moss.mt: created.
2956
 
2957
Thu Jun 22 08:56:10 1995  Steve Chamberlain  
2958
 
2959
        * reloc.c (bfd_perform_relocation): Add case for -ve words.
2960
 
2961
Wed Jun 21 13:13:49 1995  Jeff Law  (law@snake.cs.utah.edu)
2962
 
2963
        * elf32-hppa.c (elf32_hppa_relocate_section): Don't try to apply a
2964
        relocation against an undefined symbols.
2965
 
2966
Wed Jun 21 10:16:10 1995  Steve Chamberlain  
2967
 
2968
        * versados.c: Second pass/rewrite.
2969
 
2970
Mon Jun 19 08:40:45 1995  Steve Chamberlain  
2971
 
2972
        * syms.c (coff_section_type): Compare only the front part
2973
        of a section name.
2974
 
2975
Sat Jun 17 09:40:44 1995  Jeff Law  (law@snake.cs.utah.edu)
2976
 
2977
        * elf32-hppa.c (elf32_hppa_size_stubs): Set the size of the stub
2978
        section if we get an error.
2979
 
2980
        * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Don't mess
2981
        with the operands of an R_PARISC_DPREL21L relocation if the insn
2982
        is not "addil ,%r27".
2983
 
2984
Fri Jun 16 15:04:47 1995  Stan Shebs  
2985
 
2986
        * bfd-in.h (NT_subsystem, NT_stack_heap): Declare but don't
2987
        define.
2988
        * bfd-in2.h: Rebuilt.
2989
        * bfd.c (NT_subsystem, NT_stack_heap): Define.
2990
 
2991
Fri Jun 16 00:07:25 1995  Jeff Law  (law@snake.cs.utah.edu)
2992
 
2993
        * elf32-hppa.c (elf32_hppa_bfd_link_link_relocate): Use the right
2994
        type field (there are two!) when checking to see if $global$ is
2995
        defined.
2996
 
2997
Thu Jun 15 14:03:47 1995  Stan Shebs  
2998
 
2999
        * bfd-in.h, bfd-in2.h (bfd_boolean): Rename bfd_true, bfd_false
3000
        to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
3001
        * coffswap.h (coff_swap_scnhdr_out): Remove version that was
3002
        hacked for MPW C.
3003
        * mpw-config.in: Set shell vars instead of pasting to makefile
3004
        for each configuration, edit coffswap.h to make MPW C not choke.
3005
        (i386-unknown-coff, sh-hitachi-hms): Recognize.
3006
        * mpw-make.in (BFD_LIBS): Add versados.c.o.
3007
 
3008
        * versados.c (versados_scan): Properly cast results from bfd_alloc.
3009
 
3010
Wed Jun 14 15:27:32 1995  Steve Chamberlain  
3011
 
3012
        * cofflink.c (process_embedded_commands): New function
3013
        reads and handles .drectve sections for PE.
3014
        (coff_link_input_bfd): Call new function if PE.
3015
 
3016
Mon Jun 12 12:09:39 1995  Jeff Law  (law@snake.cs.utah.edu)
3017
 
3018
        * bfd-in.h (bfd_set_section_vma): Case true to a boolean.
3019
        (bfd_set_cacheable): Likewise.
3020
        * bfd-in2.h: Rebuilt.
3021
 
3022
Fri Jun  9 12:20:28 1995  Steve Chamberlain  
3023
 
3024
        * elfcode.h (elf_sort_hdrs): Rewrite to be symmetrical.
3025
 
3026
Fri Jun  9 12:49:00 1995  Jeff Law  (law@snake.cs.utah.edu)
3027
 
3028
        * targets.c: Add copy_private_symbol_data and link_split_section
3029
        to the target vector.
3030
        * libbfd-in.h (_bfd_generic_bfd_copy_private_symbol_data): Define.
3031
        (_bfd_nolink_bfd_link_split_section): Likewise.
3032
        (bfd_generic_link_split_section): Declare.
3033
        * syms.c (bfd_copy_private_symbol_data): Define.
3034
        * linker.c (bf_link_split_section): Likewise.
3035
        * som.c (som_bfd_copy_private_symbol_data): New function
3036
        (som_bfd_link_split_section): Likewise.
3037
        * All other targets updated with default versions of new routines.
3038
 
3039
        * Take out my braindamaged bfd_true/bfd_false changes from earlier
3040
        today.  Replace with just:
3041
        * bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
3042
        compiling with g++-2.6 or later.
3043
        * bfd-in2.h: Rebuilt.
3044
 
3045
Fri Jun  9 07:54:29 1995  Steve Chamberlain  
3046
 
3047
        * versados.c (struct esd, get_4): Lint; use unsigned chars.
3048
 
3049
        * coff-i960.c (coff_i960_relocate):  Compare output section names
3050
        when converting for vxworks.
3051
 
3052
Wed Jun  7 19:01:30 1995  Ken Raeburn  
3053
 
3054
        * elfcode.h (elf_fake_sections): Permit .scommon or COMMON
3055
        sections as random SHT_NOBITS sections, in case a linker script is
3056
        strange.
3057
 
3058
Tue Jun  6 17:29:32 1995  Steve Chamberlain  
3059
 
3060
        * bfd-in.h (NT_subsystem, NT_stack_heap): Moved from pe.h
3061
        * coff-i386.c (coff_i386_rtype_to_howto): Get PE relocs right.
3062
        * coffcode.h (coff_mkobject): Set pe tdata bit when using PE.
3063
        * cofflink.c (COFF_WITH_PE code): Test on obj_pe bit rather
3064
        than conditional compile.
3065
        * configure.in: Fix PE dependencies.
3066
        * libcoff-in.h (obj_pe): New.
3067
        (coff_tdata): Added pe entry.
3068
        * libcoff.h: Regenerated.
3069
 
3070
Mon Jun  5 09:07:13 1995  Steve Chamberlain  
3071
 
3072
        * coff-a29k.c (coff_a29k_adjust_symndx): Completely parenthesize
3073
        macro.
3074
 
3075
Mon Jun  5 02:15:20 1995  Ken Raeburn  
3076
 
3077
        Linker support for m68k-elf from Andreas Schwab
3078
        :
3079
        * elfcode.h (elf_link_add_object_symbols): Check for NULL when
3080
        looping through the symbol hashes.
3081
        (elf_bfd_final_link): When looking for _init and _fini don't use
3082
        the symbol if it is imported from another object.
3083
        * elf32-m68k.c: Relocation type changed from REL to RELA.  Regular
3084
        and dynamic linking support functions added, similar to other elf
3085
        targets.
3086
 
3087
        * config.bfd (i[345]86-*-gnu*): Use ELF configuration.
3088
 
3089
Fri Jun  2 18:54:59 1995  Steve Chamberlain  
3090
 
3091
        * versados.c: New file.
3092
        * bfd-in2.h (struct _bfd): New field.
3093
        * bfd.c (struct _bfd): New field.
3094
        * configure.in (versados_vec): New field.
3095
        * targets.c (bfd_flavor): Added versados.
3096
 
3097
Thu Jun  1 13:51:49 1995  Steve Chamberlain  
3098
 
3099
        * coffcode.h (sec_to_styp_flags, styp_to_sec_flags,
3100
        coff_new_section_hook):  Any section that starts ".stab"
3101
        is now marked as debugging.
3102
 
3103
Thu Jun  1 16:15:16 1995  Ken Raeburn  
3104
 
3105
        * archive.c (_bfd_write_archive_contents): Disable extended name
3106
        table until it can be made optional, so that native AR has half a
3107
        chance on SunOS and HP/UX.
3108
 
3109
        * linker.c (_bfd_generic_link_output_symbols, case
3110
        bfd_link_hash_indirect): Add cast to correct pointer types.
3111
 
3112
Sat May 27 21:37:31 1995  J.T. Conklin  
3113
 
3114
        * config.bfd (m68k-bull-sysv*): Added strip_underscore=yes.
3115
          (m68k-est-coff): Removed.  target does not effect object format.
3116
 
3117
Wed May 24 10:52:01 1995  Steve Chamberlain  
3118
 
3119
        * linker.c (_bfd_generic_link_output_symbols): Cope with
3120
        indirect symbols.
3121
 
3122
        * elf32-i386.c (elf_i386_relocate_section): Give error
3123
        message when linking to a shared reloc which isn't there.
3124
 
3125
Wed May 24 10:40:00 1995  Steve Chamberlain  
3126
 
3127
        Support for ARM-PE.
3128
 
3129
        * Makefile.in, coffcode.h, config.bfd, configure.in, pe-arm.c,
3130
         pei-arm.c, coff-arm.c, reloc.c, targets.c, config/arm-pe.mt:
3131
         Support for ARM COFF/PE.
3132
 
3133
Tue May 23 19:24:58 1995  Ken Raeburn  
3134
 
3135
        * bfd.c (bfd_get_relocated_section_contents): Now a function,
3136
        tries calling routine from input bfd target vector for
3137
        bfd_indirect_link_order.  Put a declaration into the header file.
3138
        * bfd-in2.h: Regenerated.
3139
        * elf32-mips.c (gprel16_with_gp): New function, split out from
3140
        mips_elf_gprel16_reloc.
3141
        (mips_elf_gprel16_reloc): Call it.  If output bfd target vector
3142
        isn't elf flavoured, abort, since it's assumed to be elf in some
3143
        of this code, including the code that looks up the gp value.
3144
        (elf32_mips_get_relocated_section_contents): New function,
3145
        modified from bfd_generic_get_relocated_section_contents to deal
3146
        with passing gp to gprel16_with_gp.
3147
        (bfd_elf32_bfd_get_relocated_section_contents): New macro.
3148
        * elf32-target.h (bfd_elf32_bfd_get_relocated_section_contents):
3149
        Don't define if already defined.
3150
 
3151
Tue May 23 15:58:15 1995  Jeff Law  (law@snake.cs.utah.edu)
3152
 
3153
        * Makefile.in: Install bfdlink.h too.
3154
 
3155
Sun May 21 22:25:09 1995  Jeff Law  (law@snake.cs.utah.edu)
3156
 
3157
        * elf32-hppa.c (elf32_hppa_relocate_section): Handle undefined and
3158
        notsupported return codes from final_link_relocate (used when
3159
        $global$ is undefined or nonexistant).
3160
        (elf32_hppa_bfd_link_link_relocate): If $global$ exists, but is
3161
        not defined,then return bfd_reloc_undefined.
3162
 
3163
Fri May 19 10:00:14 1995  Steve Chamberlain  
3164
 
3165
        * coffswap.h: (IMAGE_BASE): Define to 0 if not.
3166
 
3167
Thu May 18 04:24:01 1995  Ken Raeburn  
3168
 
3169
        Wed May 10 14:28:16 1995 Richard Earnshaw (rearnsha@armltd.co.uk)
3170
 
3171
        * aoutx.h (aout_link_input_section_standard): If defined, call
3172
        MY_relocatable_reloc before doing a partial relocation.
3173
 
3174
        * aout-arm.c: (WRITE_HEADERS): Delete.
3175
        (NAME): Define version to override default in aoutx.h
3176
        (MY(howto_table)): Reformat.  Alter some entries slightly.
3177
        (RELOC_ARM_BITS_NEG_{BIG,LITTLE}): Define.
3178
        (MY(reloc_howto), MY(put_reloc), MY(relocatable_reloc)): New functions.
3179
        (MY_reloc_howto, MY_put_reloc, MY_relocatable_reloc): Define.
3180
        (MY(fix_pcrel_26)): Renamed from aoutarm_fix_pcrel_26, return
3181
        bfd_reloc_ok not bfd_reloc_continue.
3182
        (MY(fix_pcrel_26_done)): Likewise.
3183
        (MY(bfd_reloc_type_lookup)): Renamed from aoutarm_reloc_type_lookup.
3184
        (MY_bfd_link_hash_table_create, MY_bfd_link_add_symbols,
3185
        MY_bfd_final_link): Delete.
3186
        (MY_swap_std_reloc_in, MY_swap_std_reloc_out, MY_get_section_contents):
3187
        Define.
3188
        (aoutx.h): Include it.
3189
        (MY(swap_std_reloc_{in,out})): New functions.
3190
        Use RELOC_ARM_BITS_NEG_{BIG,LITTLE} to extract negative reloc bit.
3191
        (aoutarm_squirt_out_relocs): Delete.
3192
 
3193
        From: David Taylor (dtaylor@armltd.co.uk)
3194
        * config/arm[lb]-aout.mt: New files.
3195
        * aout-arm.c: New file.
3196
        * config.bfd: Handle arm{,e[lb]}-*-aout
3197
        * configure.in: Add vetor for aout_arm_{big,little}_vec.
3198
        * reloc.c: New relocation types for the ARM.
3199
        * targets.c (aout_arm_{big,little}_vec): declare.
3200
 
3201
Tue May 16 10:29:51 1995  Jim Kingdon  
3202
 
3203
        * libbfd.c (bfd_stat): If bfd_cache_lookup returns an error,
3204
        return an error to the caller.  Call bfd_set_error on errors.
3205
 
3206
Tue May 16 14:44:45 1995  Ken Raeburn  
3207
 
3208
        * libcoff-in.h (coff_renumber_symbols): Modified prototypes in
3209
        accordance with 11 May libcoff.h change.
3210
 
3211
Thu May 11 16:43:14 1995  Steve Chamberlain  
3212
 
3213
        tekhex.c (first_phase): Understand type 0 symbols.
3214
        (tekhex_write_object_contents): Fix typo in final record.
3215
 
3216
Thu May 11 16:43:14 1995  Steve Chamberlain  
3217
 
3218
        * coff-i960.c (optcall_callback): don't try and optimize
3219
        undefined refs.
3220
        (coff_write_relocs): Search for broken relocs on the way
3221
        out and fix them up.
3222
        (coff_renumber_symbols): Calculate and return index of
3223
        first undefined symbol.
3224
        (coff_write_object_contents): Call coff_renumber_symbols
3225
        and coff_write_relocs with the new args.
3226
        * libcoff.h: (coff_renumber_symbols, coff_renumber_symbols):
3227
        Modified prototypes.
3228
 
3229
Thu May 11 16:43:14 1995  Steve Chamberlain  
3230
                          Tom Griest 
3231
 
3232
        Initial support for PE format.
3233
 
3234
        * Makefile.in, targets.c, configure.in, config.bfd:
3235
        Add support for i386-*-winnt and i386-*-pe.
3236
        * archive.c (do_slurp_coff_armap):  Understand NTPE format
3237
        archives.
3238
        (_bfd_slurp_extended_name_table): Turn \ in a filename
3239
        into /.
3240
        * bfd-in.h (bfd_link_subsystem, _bfd_link_stack_heap): New.
3241
        * coff-i386.c  (howto_table): Conditionalize PCRELOFFSET.
3242
        * coffcode.h (IMAGE_BASE): New.
3243
        (coff_compute_section_file_positions): Throw away .junk
3244
        sections for PE, align symbols.
3245
        (coff_write_object_contents): Throw away .junk sections
3246
        for PE. Remember info on .idata and .rsrc sections.
3247
        Fill in the PE header.
3248
        (coff_slurp_symbol_table): PE uses C_SECTION class.
3249
        * cofflink.c (_bfd_coff_final_link): Keep PE info up to date.
3250
        (_bfd_coff_generic_relocate_section): Cope with PE relocs.
3251
        * coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}):
3252
        New code for PE headers.
3253
 
3254
Tue May  9 17:01:38 1995  Michael Meissner  
3255
 
3256
        * config.bfd: Add little endian PowerPC support.
3257
        * configure.in: Ditto.
3258
        * targets.c: Ditto.
3259
        * config/ppcle-elf.mt: New file, for little endian PowerPC
3260
        support.
3261
        * config/ppc-elf.mt: Add little endian powerpc to the BFD
3262
        selection vectors.
3263
        * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Complain if
3264
        linking a different endian object than we expect.
3265
        (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define, to provide little
3266
        endian support.
3267
 
3268
Tue May  2 16:32:24 1995  Jeff Law  (law@snake.cs.utah.edu)
3269
 
3270
        * config.bfd (hppa*-*-lites*): Treat just like hppa*-*-*elf*.
3271
 
3272
Tue Apr 25 19:38:43 1995  Ken Raeburn  
3273
 
3274
        * coffgen.c (make_a_section_from_file): Initialize lma same as
3275
        vma.
3276
 
3277
Tue Apr 25 11:03:21 1995  Jason Molenda  (crash@phydeaux.cygnus.com)
3278
 
3279
        * hosts/std-host.h: #include ansidecl.h 'cause PTR is used in
3280
        std-host.h.
3281
 
3282
Mon Apr 24 23:56:44 1995  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
3283
 
3284
        * hosts/i386linux.h (HAVE_PROCFS): Don't define it.  Added lengthy
3285
        comment explaining why.
3286
 
3287
Mon Apr 24 10:34:02 1995  Michael Meissner  
3288
 
3289
        * hosts/i386linux.h (HAVE_PROCFS): If NO_PROCFS is defined, don't
3290
        define HAVE_PROCFS.
3291
 
3292
Mon Apr 24 08:33:12 1995  Michael Meissner  
3293
 
3294
        * elf32-ppc.c (ppc_elf_relocate_section): Do not continue
3295
        processing unknown symbols to prevent a cascade of errors.
3296
 
3297
Fri Apr 21 12:48:48 1995  Ken Raeburn  
3298
 
3299
        Patches from H.J. Lu for Linux ELF core file support.
3300
        * elfcode.h (elf_core_file_matches_executable_p) [HAVE_PROCFS]:
3301
        Use prpsinfo_t instead of struct prpsinfo, for consistency.
3302
        * hosts/i386linux.h (HAVE_PROCFS): Define.
3303
 
3304
Thu Apr 20 09:07:39 1995  Steve Chamberlain  
3305
 
3306
        * linker.c (link_action): Do the right thing when a undefined
3307
        strong symbol appears after an undefined weak symbol.
3308
 
3309
Fri Apr 14 16:51:17 1995  Michael Meissner  
3310
 
3311
        * elf32-ppc.c (ppc_elf_relocate_section): New function to relocate
3312
        a whole section for the linker, bypassing bfd_perform_relocation.
3313
        (ppc_elf_reloc_type_lookup): New function to map the BFD
3314
        enumeration code into a howto structure.
3315
        (ppc_elf_howto_raw): Rename from ppc_elf_howto_table.
3316
        (ppc_elf_howto_table): New array that maps PowerPC relocation
3317
        numbers to howto structures without a linear search.  Change from
3318
        using bfd_elf_generic_reloc to use ppc_elf_std_reloc.
3319
        (ppc_elf_howto_init): Initialize ppc_elf_howto_table from
3320
        ppc_elf_howto_raw.
3321
        (ppc_elf_reloc_type_lookup): Use a case statement instead of a
3322
        loop.
3323
        (ppc_elf_std_reloc): Replacement for bfd_elf_generic_reloc.
3324
        (ppc_elf_unsupported_reloc): Print a real error message, instead
3325
        of calling abort.
3326
        (ppc_elf_addr16_ha_inner): Abstract getting adjustment from
3327
        ppc_elf_addr16_ha_reloc, so ppc_elf_relocate_section can use it
3328
        too.
3329
        (ppc_elf_addr16_ha_reloc): Call it.
3330
        (ppc_elf_got16_inner): Abstract getting adjustment from
3331
        ppc_elf_got16_reloc, so ppc_elf_relocate_section can use it too.
3332
        (ppc_elf_got16_reloc): Call it.
3333
        (ppc_elf_info_to_howto): Rename from powerpc_info_to_howto.
3334
 
3335
        * elfcode.h (elf_symbol_from_bfd_symbol): Omit space in debugging
3336
        output.
3337
        (elf_symbol_flags): Add debug function to decode flags so that
3338
        defining DEBUG to be 4 will compile again.
3339
        (elf_debug_section): Fix typo in debug output.
3340
 
3341
Fri Apr 14 16:03:04 1995  Ken Raeburn  
3342
 
3343
        * config.bfd: Add m68*-*-elf*.
3344
        * elf32-m68k.c: Filled out implementation, except for dynamic
3345
        linking support.
3346
        * reloc.c (enum bfd_reloc_code_real): Added *_GOT_PCREL, *_GOTOFF,
3347
        *_PLT_PCREL, *_PLTOFF, *_68K_* relocations for ELF.
3348
        * libbfd.h, bfd-in2.h: Regenerated.
3349
 
3350
Thu Apr 13 14:28:04 1995  Torbjorn Granlund  
3351
 
3352
        * coff-m68k.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
3353
        1 to 2.
3354
        (bfd_target): Change minimum section alignment from 1 to 2.
3355
 
3356
Wed Apr 12 12:40:04 1995  Ken Raeburn  
3357
 
3358
        * aoutx.h (machine_type, case bfd_arch_mips): Treat R8000 like
3359
        R6000 and R4000 for now.
3360
 
3361
Tue Apr  4 12:28:25 1995  Stan Shebs  
3362
 
3363
        * mpw-config.in: New file, MPW version of configure.in.
3364
        * mpw-make.in: New file, MPW version of Makefile.in.
3365
        * hosts/mpw.h: New file, MPW host definitions.
3366
        * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_in) [MPW_C]:
3367
        Alternate versions without ECOFF_64 that chokes MPW C.
3368
        * coffswap.h (coff_swap_scnhdr_out): Add alternative version with
3369
        partly-expanded macros.
3370
 
3371
Thu Mar 30 14:56:21 1995  Ian Lance Taylor  
3372
 
3373
        * reloc.c (bfd_perform_relocation): Don't bother to check for
3374
        overflow if the symbol is undefined.
3375
 
3376
Thu Mar 30 14:32:26 1995  H.J. Lu (hjl@nynexst.com)
3377
 
3378
        * config.bfd: Change linux to default to elf.  Using
3379
        i[345]86-*-linuxaout will build a library which defaults to a.out.
3380
        * config/i386-laout.mt: Rename from old config/i386-linux.mt.
3381
        * config/i386-linux.mt: Rename from old config/i386-lelf.mt.
3382
        Comment out EXTRALIBS.
3383
        * config/i386-lelf.mt: Remove.
3384
 
3385
Wed Mar 29 12:01:30 1995  Ian Lance Taylor  
3386
 
3387
        * coff-i960.c (coff_i960_relocate): Cache the section symbol in
3388
        the used_by_bfd field of the section, to avoid looping for each
3389
        reloc.
3390
 
3391
        * cpu-h8500.c (arch_info_struct): Change name from "H8/300" to
3392
        "h8300" for consistency with other cpu-* files.
3393
 
3394
Tue Mar 28 15:14:11 1995  Ian Lance Taylor  
3395
 
3396
        * bout.c (b_out_canonicalize_reloc): Handle SEC_CONSTRUCTOR
3397
        sections.
3398
        (b_out_get_reloc_upper_bound): Likewise.
3399
 
3400
        * linker.c (generic_link_add_symbol_list): Skip constructor
3401
        symbols which the main linker code did not do anything with.
3402
        (_bfd_generic_link_output_symbols): Use udata.p if it is set,
3403
        rather than looking the symbol up in the hash table.  Just pass
3404
        through constructor symbols for which udata.p is not set.  If the
3405
        linker defined the symbol, clear the constructor flag.
3406
 
3407
Tue Mar 21 10:50:32 1995  Jeff Law  (law@snake.cs.utah.edu)
3408
 
3409
        * som.c (som_set_reloc_info): Sign extend constants from
3410
        R_DATA_OVERRIDE fixups.
3411
        * libhppa.h (sign_extend): Renamed from sign_ext.  Fix.
3412
        (low_sign_extend): Likewise.
3413
 
3414
Mon Mar 20 22:39:10 1995  Jeff Law  (law@snake.cs.utah.edu)
3415
 
3416
        * som.c (som_slurp_symbol_table): Tighten test to determine
3417
        what symbols are section symbols.
3418
 
3419
Sat Mar 18 01:54:45 1995  Ian Lance Taylor  
3420
 
3421
        * elfcode.h (elf_bfd_link_add_symbols): An empty archive is OK.
3422
 
3423
Fri Mar 17 16:29:02 1995  Jeff Law  (law@snake.cs.utah.edu)
3424
 
3425
        * som.c (som_bfd_copy_private_section_data): Just return true when
3426
        either the input or output section isn't attached to a SOM BFD.
3427
        (som_bfd_copy_private_bfd_data): Similarly for BFD private data.
3428
 
3429
Fri Mar 17 11:50:34 1995  Ian Lance Taylor  
3430
 
3431
        * elfcode.h (elf_link_add_object_symbols): Check whether a dynamic
3432
        object has already been included, and ignore it the second time.
3433
 
3434
Wed Mar 15 11:56:40 1995  Ian Lance Taylor  
3435
 
3436
        * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT13 from
3437
        complain_overflow_bitfield to complain_overflow_signed.
3438
 
3439
        * libelf.h (bfd_elf32__write_relocs): Don't declare.
3440
        (bfd_elf64__write_relocs): Don't declare.
3441
 
3442
Tue Mar 14 05:54:33 1995  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
3443
 
3444
        * stab-syms.c (aout_stab_name): Moved aout_stab_names to be local
3445
        to this function.  Recoded function to stop using table, to
3446
        improve performance (on i486-netbsd host).  Left old version
3447
        intact under "#if 0" for further performance testing.
3448
 
3449
Mon Mar 13 13:48:49 1995  Ian Lance Taylor  
3450
 
3451
        * elfcode.h (write_relocs): Make static.  Use PTR argument as a
3452
        pointer to a boolean variable set to true if something fails.
3453
        Cast to PTR rather than void *.
3454
        (sym_is_global): Rewrite for clarity.
3455
        (map_program_segments): If the program header size is too small,
3456
        call _bfd_error_handler and return failure rather than aborting.
3457
        (NAME(bfd_elf,write_object_contents)): Pass boolean variable when
3458
        calling write_relocs.
3459
        (elf_symbol_from_bfd_symbol): Use BFD_ASSERT rather than abort.
3460
        (struct elf_info_failed): Define.
3461
        (NAME(bfd_elf,size_dynamic_sections)): Declare variables in inner
3462
        blocks.  Pass elf_info_failed structure when calling
3463
        elf_export_symbol and elf_adjust_dynamic_symbol.
3464
        (elf_export_symbol): Treat data argument as elf_info_failed rather
3465
        than bfd_link_info.  Set failed field on error.
3466
        (elf_adjust_dynamic_symbol): Likewise.
3467
        (struct elf_finfo_failed): Define.
3468
        (elf_bfd_final_link): Pass elf_finfo_failed structure when calling
3469
        elf_link_output_extsym.  Use BFD_ASSERT rather than abort.
3470
        (elf_link_output_extsym): Treat data argument as elf_finfo_failed
3471
        rather than elf_final_link_info.  Set failed field on error.
3472
        (elf_link_input_bfd): Use BFD_ASSERT rather than abort.
3473
        (elf_reloc_link_order): Likewise.
3474
 
3475
        * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Only write
3476
        out PLTRELSZ, PLTREL and JMPREL relocs if there is a .rela.plt
3477
        section.  Solaris 2.4 apparently does not handle empty reloc
3478
        information correctly.
3479
 
3480
        * archive.c (bsd_write_armap): Cast getuid and getgid results to
3481
        long, and print with %ld.
3482
 
3483
Fri Mar 10 16:41:05 1995  Ian Lance Taylor  
3484
 
3485
        * aoutx.h (translate_to_native_sym_flags): Always use the output
3486
        section if it is not NULL.
3487
 
3488
Thu Mar  9 15:06:25 1995  Ian Lance Taylor  
3489
 
3490
        * coffswap.h (coff_swap_scnhdr_out): If the line number count or
3491
        the reloc count does not fit, print an error and return 0.
3492
        * coffcode.h (coff_write_object_contents): Check return value of
3493
        coff_swap_scnhdr_out.
3494
        * ecoff.c (_bfd_ecoff_write_object_contents): Check return value
3495
        of bfd_coff_swap_scnhdr_out.
3496
 
3497
        * bfd.c: Include  or , depending upon
3498
        ANSI_PROTOTYPES.
3499
        (bfd_error_handler_type): New global type.
3500
        (_bfd_error_program_name): New static variable.
3501
        (_bfd_default_error_handler): New static function.
3502
        (_bfd_error_handler): New BFD private global variable.
3503
        (bfd_set_error_handler): New globally visible function.
3504
        (bfd_set_error_program_name): New globally visible function.
3505
        * libbfd-in.h (_bfd_error_handler): Declare.
3506
        * bfd-in2.h, libbfd.h: Rebuild.
3507
 
3508
        * aoutx.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter,
3509
        and use it instead of bfd_get_symcount.  Check r_index after
3510
        setting r_extern based on whether this is a base relative reloc.
3511
        (NAME(aout,swap_std_reloc_IN)): Add symcount parameter, and use it
3512
        instead of bfd_get_symcount.
3513
        (NAME(aout,slurp_reloc_table)): Pass bfd_get_symcount to reloc
3514
        swap routines.
3515
        * libaout.h (NAME(aout,swap_ext_reloc_in)): Add symcount parameter
3516
        to declaration.
3517
        (NAME(aout,swap_std_reloc_in)): Likewise.
3518
        * sunos.c (sunos_canonicalize_dynamic_reloc): Pass
3519
        info->dynsym_count to reloc swap routines.
3520
        * aout-ns32k.c (MY_swap_std_reloc_in): Add symcount parameter.
3521
        * hp300hpux.c (MY(swap_std_reloc_in)): Likewise.
3522
        (MY(slurp_reloc_table)): Pass bfd_get_symcount to reloc swap
3523
        routine.
3524
        * i386lynx.c (NAME(lynx,swap_ext_reloc_in)): Add symcount
3525
        parameter.
3526
        (NAME(lynx,swap_std_reloc_in)): Likewise.
3527
        (NAME(lynx,slurp_reloc_table)): Pass bfd_get_symcount to reloc
3528
        swap routines.
3529
 
3530
Thu Mar  9 12:04:05 1995  Michael Meissner  
3531
 
3532
        * bfd.c (bfd_merge_private_bfd_data): New function vector to be
3533
        called by the linker to merge any private bfd data of the input
3534
        files and the output file.  Used by the PowerPC ELF support to
3535
        check whether -mrelocatable is used for all modules.
3536
        (bfd_set_private_flags): New function vector to be called by the
3537
        assembler to set private flags.  Used by the PowerPC ELF support
3538
        to set that a particular object file was assembled with the
3539
        -mrelocatable option.
3540
 
3541
        * targets.c (BFD_JUMP_TABLE_COPY): Add intiialization of the
3542
        bfd_merge_private_bfd_data and bfd_set_private_flags function
3543
        vectors.
3544
 
3545
        * bfd-in2.h, libbfd-in.h: Rebuild with bfd.c and targets.c
3546
        changes.
3547
 
3548
        * elf32-ppc.c (ppc_elf_set_private_flags): New function to set the
3549
        ELF e_flags field.
3550
        (ppc_elf_copy_private_bfd_data): Copy the e_flags field from the
3551
        input file to the output file.
3552
        (ppc_elf_merge_private_bfd_data): Check for a mismatch between the
3553
        e_flags field of all of the linker input files.
3554
 
3555
        * libelf.h (elf_obj_tdata): Add ppc_flags_init field so that the
3556
        PowerPC support can check if compataible e_flags are present.
3557
 
3558
        * aout-target.h: Add NOP for the bfd_merge_private_bfd_data
3559
        and bfd_set_private_flags function vectors.
3560
        * coffcode.h: Ditto.
3561
        * elf32-target.h: Ditto.
3562
        * elf64-target.h: Ditto.
3563
        * libbfd.h: Ditto.
3564
        * libecoff.h: Ditto.
3565
        * som.c: Ditto.
3566
 
3567
Wed Mar  8 00:53:54 1995  Ian Lance Taylor  
3568
 
3569
        * cpu-mips.c (arch_info_struct): Add mips:8000 entry.
3570
 
3571
        * elfcode.h (swap_out_syms): Mark an undefined BSF_WEAK symbol as
3572
        STB_WEAK rather than STB_GLOBAL.
3573
 
3574
Tue Mar  7 12:23:47 1995  Ian Lance Taylor  
3575
 
3576
        * coffcode.h (bfd_coff_backend_data): Add new field
3577
        _bfd_coff_adjust_symndx.
3578
        (bfd_coff_adjust_symndx): Define.
3579
        (coff_adjust_symndx): Define as NULL if not already defined.
3580
        (bfd_coff_std_swap_table): Initialize new field to
3581
        coff_adjust_symndx.
3582
        * cofflink.c (coff_link_input_bfd): Call coff_adjust_symndx if it
3583
        is defined.
3584
        * coff-a29k.c (coff_a29k_adjust_symndx): New static function.
3585
        (coff_adjust_symndx): Define before including coffcode.h.
3586
        * libcoff.h: Rebuild.
3587
 
3588
        * format.c (bfd_check_format_matches): Skip binary_vec when
3589
        searching through bfd_target_vector.
3590
 
3591
        * elfcode.h (elf_sort_hdrs): Check SHT_NOBITS before checking
3592
        sh_size.
3593
 
3594
Mon Mar  6 23:31:36 1995  Doug Evans  
3595
 
3596
        * elfcode.h (elf_sort_hdrs): Keep SHT_NOBITS sections after
3597
        !SHT_NOBITS ones.
3598
 
3599
Mon Mar  6 09:53:08 1995  Jeff Law  (law@snake.cs.utah.edu)
3600
 
3601
        * cpu-hppa.c (arch_info_struct): Support both PA1.0 and PA1.1
3602
        machine types.
3603
        (bfd_hppa_arch): Link in both PA1.0 and PA1.1 architecture info
3604
        structures.
3605
        * libhppa.h (enum pa_arch): New enumeration to describe the
3606
        different variants of the PA architecture.
3607
        * som.c (som_object_setup): Use new enumeration to set machine
3608
        type.
3609
        (som_finish_writing): If the machine type is PA1.1, then use the
3610
        PA1.1 machine identifier in the output file.
3611
 
3612
Thu Mar  2 15:58:24 1995  Ian Lance Taylor  
3613
 
3614
        * aoutx.h (NAME(aout,swap_ext_reloc_in)): Treat the index of a
3615
        base relative reloc as an index into the symbol table, regardless
3616
        of the setting of r_extern.
3617
        (NAME(aout,swap_std_reloc_in)): Likewise.
3618
 
3619
        * aoutx.h (NAME(aout,set_section_contents)): Double check that the
3620
        caller is writing to a valid section.
3621
 
3622
Thu Mar  2 14:37:57 1995  Bryan Ford  
3623
 
3624
        * binary.c: Add support for reading binary files.  Loads the raw
3625
        contents of the file into a data section and wraps some symbols
3626
        around it.  The symbols `_binary__start' and
3627
        `_binary__end' indicate the start and end of the data,
3628
        while `_binary__size' is an absolute symbol whose value
3629
        is the size of the data.   is the name of the binary
3630
        input file, with all non-alphanumeric characters converted to
3631
        underscores.
3632
 
3633
        * archures.c (bfd_arch_get_compatible): Assume users knows what
3634
        they're doing if one of the architectures is bfd_arch_unknown.
3635
 
3636
Wed Mar  1 17:30:46 1995  Michael Meissner  
3637
 
3638
        * elf32-ppc.c (elf_powerpc_howto_table): For relocation
3639
        R_PPC_GOT16, change complain_on_overflow to be
3640
        complain_overflow_signed.
3641
 
3642
Wed Mar  1 11:52:55 1995  Jason Molenda  
3643
 
3644
        * configure.host: Recognize powerpc-*-aix*.
3645
 
3646
Wed Mar  1 11:57:39 1995  Ian Lance Taylor  
3647
 
3648
        * coff-i960.c (COFF_PAGE_SIZE): Define.
3649
 
3650
        * configure.in: Rewrite output of TDEFAULTS to avoid relying on
3651
        semantics of single quotes in parameter substitution.
3652
 
3653
Tue Feb 28 12:53:09 1995  Ian Lance Taylor  
3654
 
3655
        * elfcode.h (elf_sort_hdrs): Sort empty sections before non-empty
3656
        sections, if they have the same VMA.
3657
 
3658
        * config.bfd (i[345]86-*-linuxelf*): New target.  Use i386-lelf.
3659
        (i[345]86-*-gnuelf*): New target.  Use i386-gelf.
3660
        * config/i386-lelf.mt: New file.
3661
        * config/i386-gelf.mt: New file.
3662
 
3663
Mon Feb 27 12:58:25 1995  Kung Hsu  
3664
 
3665
        * config.bfd: add a29k-*-vxworks configuration.
3666
 
3667
Wed Feb 22 14:40:26 1995  Ian Lance Taylor  
3668
 
3669
        * libaout.h (NAME(aout,slurp_reloc_table)): Change declaration to
3670
        use reloc_howto_type rather than const struct reloc_howto_struct.
3671
 
3672
Tue Feb 21 18:19:22 1995  Ian Lance Taylor  
3673
 
3674
        * bout.c (b_out_slurp_reloc_table): Don't return an error if asked
3675
        for relocations for the .bss section.
3676
 
3677
Tue Feb 21 15:13:05 1995  Jeff Law  (law@snake.cs.utah.edu)
3678
 
3679
        * som.c (som_bfd_ar_write_symbol_stuff): Handle objects with odd
3680
        lengths.
3681
 
3682
Fri Feb 17 12:34:36 1995  Michael Meissner  
3683
 
3684
        * elf32-ppc.c (ppc_elf_got16_reloc): Make GOT style relocs add
3685
        32768, so the GOT pointer can point to 16384 pointers, instead of
3686
        8192.
3687
 
3688
Fri Feb 17 11:45:38 1995  Ian Lance Taylor  
3689
 
3690
        * hosts/sysv4.h: Include , , and .
3691
        Only define SEEK_SET and SEEK_CUR if they are not already defined.
3692
        Remove all external function declarations.
3693
 
3694
        * syms.c (bfd_decode_symclass): Return 'W' for a weak symbol.
3695
 
3696
        * coffgen.c (coff_real_object_p): Set start address and flags
3697
        before calling coff_mkobject_hook.  Restore them on failure.
3698
        * ecoff.c (_bfd_ecoff_mkobject_hook): If not ECOFF_AOUT_ZMAGIC,
3699
        clear D_PAGED.
3700
 
3701
        * coffgen.c: Reindented.
3702
 
3703
Thu Feb 16 14:37:23 1995  Doug Evans  
3704
 
3705
        * reloc.c (bfd_perform_relocation): Don't use bitpos in overflow
3706
        calculations.
3707
        (bfd_install_relocation): Likewise.
3708
 
3709
Thu Feb 16 13:22:29 1995  Ian Lance Taylor  
3710
 
3711
        * hosts/std-host.h: Remove all function declarations which return
3712
        int or void, except the one for free.
3713
 
3714
Wed Feb 15 14:54:18 1995  Michael Meissner  
3715
 
3716
        * elf32-ppc.c (elf_powerpc_howto_table): Use a destination mask of
3717
        0xffffffff for R_PPC_REL32, not 0.
3718
        (powerpc_reloc_map): Add low 16 bit, high 16 bit, and high 16 bit
3719
        adjusted relocations.
3720
 
3721
Tue Feb 14 17:47:17 1995  Ian Lance Taylor  
3722
 
3723
        * elf32-mips.c (struct mips_elf_find_line): Define.
3724
        (mips_elf_find_nearest_line): New static function.
3725
        (bfd_elf32_find_nearest_line): Define.
3726
        * libelf.h (struct elf_obj_tdata): Add find_line_info field.
3727
 
3728
        * ecoff.c (_bfd_ecoff_swap_tir_in): Move to ecofflink.c.
3729
        (_bfd_ecoff_swap_tir_out): Likewise.
3730
        (_bfd_ecoff_swap_rndx_in): Likewise.
3731
        (_bfd_ecoff_swap_rndx_out): Likewise.
3732
        (cmp_fdrtab_entry): Likewise.
3733
        (mk_fdrtab): Likewise.
3734
        (lookup): Likewise.
3735
        (_bfd_ecoff_find_nearest_line): Just call _bfd_ecoff_locate_line
3736
        to do most of the work.  Allocate find_line_info if necessary.
3737
        * ecofflink.c: Include "aout/stab_gnu.h".
3738
        (_bfd_ecoff_swap_tir_in): Move in from ecoff.c.
3739
        (_bfd_ecoff_swap_tir_out): Likewise.
3740
        (_bfd_ecoff_swap_rndx_in): Likewise.
3741
        (_bfd_ecoff_swap_rndx_out): Likewise.
3742
        (cmp_fdrtab_entry): Likewise.  Use PTR instead of void *.
3743
        (mk_fdrtab): Move in from ecoff.c.  Add debug_info, debug_swap,
3744
        and line_info arguments, and use them instead of ecoff_data.
3745
        (fdrtab_lookup): Move in from lookup in ecoff.c.  Remove abfd
3746
        argument, add line_info argument.  Use it instead of ecoff_data.
3747
        (_bfd_ecoff_locate_line): New function, mostly from the old
3748
        _bfd_ecoff_find_nearest_line in ecoff.c.
3749
        * libecoff.h (ecoff_data_type): Remove find_buffer, fdrtab_len and
3750
        fdrtab fields, replacing them find_line_info field.
3751
        (_bfd_ecoff_swap_tir_in): Declare.
3752
        (_bfd_ecoff_swap_tir_out): Declare.
3753
        (_bfd_ecoff_swap_rndx_in): Declare.
3754
        (_bfd_ecoff_swap_rndx_out): Declare.
3755
        * libbfd-in.h (_bfd_ecoff_locate_line): Declare.
3756
        * libbfd.h: Rebuild.
3757
        * configure.in: Don't use ecoff.o for bfd_elf32_bigmips_vec or
3758
        bfd_elf32_littlemips_vec.
3759
        * Makefile.in: Rebuild dependencies.
3760
 
3761
Tue Feb 14 14:04:22 1995  Michael Meissner  
3762
 
3763
        * libelf.h (elf_backend_data): Add fields elf_machine_alt1 and
3764
        elf_machine_alt2 which provide alternate versions of the machine
3765
        code.
3766
 
3767
        * elf32-ppc.c (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Define to
3768
        recognize old versions of the PowerPC machine code.
3769
 
3770
        * elf32-target.h (elf32_bed): Initialize alternate machine code
3771
        fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
3772
 
3773
        * elf64-target.h (elf64_bed): Initialize alternate machine code
3774
        fields defined by ELF_MACHINE_ALT1 and ELF_MACHINE_ALT2.
3775
 
3776
        * elfcode.h (elf_object_p, elf_core_file_p): In addition to the
3777
        main machine code field, check the two alternate machine code
3778
        fields.
3779
 
3780
Tue Feb 14 12:46:48 1995  Ian Lance Taylor  
3781
 
3782
        * aoutf1.h (MACHTYPE_OK): Don't define if already defined.  Don't
3783
        accept M_SPARC if bfd_arch_sparc is not in the list of supported
3784
        architectures, and don't accept a 680x0 machine type if
3785
        bfd_arch_m68k is not in the list of supported architectures.
3786
        * aout0.c (MACHTYPE_OK): Define.
3787
 
3788
Mon Feb 13 23:25:38 1995  Ian Lance Taylor  
3789
 
3790
        * aoutx.h (NAME(aout,swap_ext_reloc_in)): Don't return a pointer
3791
        to garbage if the symbol index is out of range.
3792
        (NAME(aout,swap_std_reloc_in)): Likewise.
3793
 
3794
Thu Feb  9 18:36:52 1995  Ken Raeburn  
3795
 
3796
        * Makefile.in (BFD32_BACKENDS): Add i386msdos.o.
3797
 
3798
Thu Feb  9 12:02:35 1995  Ian Lance Taylor  
3799
 
3800
        * i386linux.c (NEEDS_SHRLIB): Define.
3801
        (linux_tally_symbols): Crash if a NEEDS_SHRLIB symbol is
3802
        undefined.  From hjl@nynexst.com (H.J. Lu).
3803
 
3804
Wed Feb  8 17:26:00 1995  Ian Lance Taylor  
3805
 
3806
        * linker.c (generic_link_check_archive_element): Allocate common
3807
        symbol information structure.  Don't bother to check for common
3808
        symbol size overflow.
3809
        (_bfd_generic_link_add_one_symbol): Likewise.
3810
        * aoutx.h (aout_link_check_ar_symbols): Likewise.
3811
        * linker.c (generic_link_check_archive_element): Adjust references
3812
        to common symbol information for new structure.
3813
        (_bfd_generic_link_add_one_symbol): Likewise.
3814
        * aoutx.h (aout_link_check_ar_symbols): Likewise.
3815
        (aout_link_add_symbols): Likewise.
3816
        * ecoff.c (ecoff_link_add_externals): Likewise.
3817
        * elfcode.h (elf_link_add_object_symbols): Likewise.
3818
        (elf_link_output_extsym): Likewise.
3819
        * sunos.c (sunos_add_one_symbol): Likewise.
3820
 
3821
Wed Feb  8 09:53:42 1995  Doug Evans  
3822
 
3823
        * elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
3824
 
3825
Tue Feb  7 16:27:33 1995  Jeff Law  (law@snake.cs.utah.edu)
3826
 
3827
        * som.c (som_bfd_find_nearest_line): Just return false, don't
3828
        abort.
3829
 
3830
Tue Feb  7 14:43:33 1995  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
3831
 
3832
        * ecoff.c: Reformatted some comments and brace constructs in
3833
        recent changes to GNU style.
3834
        (cmp_fdrtab_entry, mk_fdrtab, lookup): Use old-style function
3835
        definitions.
3836
 
3837
Tue Feb  7 14:21:28 1995  Ian Lance Taylor  
3838
 
3839
        * ecoffswap.h (ecoff_swap_pdr_in): Zero out intern before setting
3840
        any of the fields.
3841
 
3842
Mon Feb  6 20:01:24 1995  Ken Raeburn  
3843
 
3844
        Sat Feb  4 14:20:24 1995  David Mosberger-Tang  
3845
 
3846
        * ecoffswap.h (ecoff_swap_pdr_in, ecoff_swap_pdr_out): added
3847
        internalizing/externalizing new "prof" field.
3848
 
3849
        * libecoff.h (ecoff_tdata): added fdrtab.
3850
 
3851
        * ecoff.c (_bfd_ecoff_find_nearest_line): Fixed.
3852
 
3853
Mon Feb  6 14:25:24 1995  Ian Lance Taylor  
3854
 
3855
        * libelf.h (struct elf_link_hash_table): Add saw_needed field.
3856
        * elfcode.h (elf_link_add_object_symbols): Set saw_needed if
3857
        DT_NEEDED seen in .dynamic section.
3858
        (elf_link_output_extsym): Warn if an undefined symbol is
3859
        only referenced from a dynamic object, and not making a shared
3860
        object, and saw_needed is false.
3861
        * elf.c (_bfd_elf_link_hash_table_init): Initialize saw_needed.
3862
 
3863
        * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define.
3864
        * elfcode.h (elf_link_add_object_symbols): Don't clear or set
3865
        ELF_LINK_HASH_DEFINED_WEAK.
3866
        (elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK.
3867
 
3868
        Distinguish a weak defined symbol from a regular defined symbol.
3869
        * linker.c (enum link_action): Add DEFW.
3870
        (link_action): Add bfd_link_hash_defweak column.
3871
        (_bfd_generic_link_add_one_symbol): Add DEFW case.  Handle
3872
        bfd_link_hash_defweak in a few other cases.
3873
        * Many files (bfd_link_hash_undefweak): Renamed from
3874
        bfd_link_hash_weak.
3875
        * aoutx.h (aout_link_write_symbols): Handle bfd_link_hash_defweak.
3876
        (aout_link_write_other_symbol): Likewise.
3877
        (aout_link_input_section_std): Likewise.
3878
        (aout_link_input_section_ext): Likewise.
3879
        * bout.c (get_value): Likewise.
3880
        * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3881
        * coff-alpha.c (alpha_convert_external_reloc): Likewise.
3882
        (alpha_relocate_section): Likewise.
3883
        * coff-mips.c (mips_relocate_section): Likewise.
3884
        (mips_relax_section): Likewise.
3885
        (bfd_mips_ecoff_create_embedded_relocs): Likewise.
3886
        * cofflink.c (coff_write_global_sym): Likewise.
3887
        (_bfd_coff_generic_relocate_section): Likewise.
3888
        * ecoff.c (ecoff_link_add_externals): Likewise.
3889
        (ecoff_link_write_external): LIkewise.
3890
        * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3891
        (elf32_hppa_size_stubs): Likewise.
3892
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
3893
        (elf_i386_relocate_section): Likewise.
3894
        (elf_i386_finish_dynamic_symbol): Likewise.
3895
        * elf32-mips.c (mips_elf_output_extsym): Likewise.
3896
        (mips_elf_relocate_section): Likewise.
3897
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
3898
        (elf32_sparc_relocate_section): Likewise.
3899
        * elfcode.h (elf_link_add_object_symbols): Likewise.
3900
        (elf_adjust_dynamic_symbol): Likewise.
3901
        (elf_bfd_final_link): Likewise.
3902
        (elf_link_output_extsym): Likewise.
3903
        * i386linux.c (linux_add_one_symbol): Likewise.
3904
        (linux_tally_symbols): Likewise.
3905
        (linux_finish_dynamic_link): Likewise.
3906
        * linker.c (_bfd_generic_link_output_symbols): Likewise.
3907
        (set_symbol_from_hash): Likewise.
3908
        * reloc16.c (bfd_coff_reloc16_get_value): Likewise.
3909
        (bfd_perform_slip): Likewise.
3910
        * sunos.c (sunos_add_one_symbol): Likewise.
3911
        (sunos_scan_std_relocs): Likewise.
3912
        (sunos_scan_ext_relocs): Likewise.
3913
        (sunos_scan_dynamic_symbol): Likewise.
3914
        (sunos_write_dynamic_symbol): Likewise.
3915
 
3916
Mon Feb  6 03:20:17 1995  Ken Raeburn  
3917
 
3918
        Changes from Bryan Ford, baford@schirf.cs.utah.edu:
3919
        * config.bfd (i[345]86-*-msdos*): New target.
3920
        * configure.in (i386msdos_vec): Handle it.
3921
        * i386msdos.c: New file.
3922
        * config/i386-msdos.mt: New file.
3923
        * bfd.c (enum bfd_error): Added new value bfd_error_file_too_big.
3924
        (bfd_errmsgs): Added string to table.
3925
        * libaout.h (reloc_type-lookup): Declare it.
3926
        * targets.c (enum bfd_flavour): Added bfd_target_msdos_flavour.
3927
        (i386msdos_vec): Declare.
3928
        (bfd_target_vector): Add it to the list.
3929
        * bfd-in2.h: Regenerated.
3930
 
3931
Wed Feb  1 01:32:14 1995  Jeff Law  (law@snake.cs.utah.edu)
3932
 
3933
        * som.c (som_set_reloc_info, case R_DATA_ONE_SYMBOL): If there's
3934
        nothing in R_DATA_OVERRIDE, then try to find the addend in the
3935
        section's contents.
3936
        (som_write_fixups): Ignore the addend in a R_DATA_ONE_SYMBOL fixup.
3937
 
3938
        * som.c (som_object_setup): More heruistics to detect the
3939
        braindamaged HP OSF1 linker.
3940
        (setup_sections): Don't forget to free subspace_sections if we get
3941
        an error.
3942
        (som_slurp_string_table): Allocate strings on this bfd's obstack
3943
        rather than directly out of the heap.
3944
        (som_slurp_symbol_table): Likewise for the saved copy of the
3945
        canonical symbols.
3946
        (som_slurp_reloc_table): Likewise for the saved copy of the
3947
        canonical relocations.  Free the native relocations when we're
3948
        done with them.
3949
 
3950
Tue Jan 31 21:53:28 1995  Doug Evans  
3951
 
3952
        * libelf.h (struct elf_obj_tdata): New member program_header_size.
3953
        * elfcode.h (get_program_header_size): New parameters sorted_hdrs,
3954
        count, and maxpagesize.  All callers updated.
3955
        If sorted_hdrs is non-NULL, use it to compute the number of segments.
3956
        Save result in case called again.
3957
        (assign_file_positions_except_relocs): Sort headers before calling
3958
        get_program_header_size.
3959
 
3960
Tue Jan 31 15:27:53 1995  Ian Lance Taylor  
3961
 
3962
        * elfcode.h (map_program_segments): Add sorted_hdrs parameter.
3963
        Search through it rather than through unsorted section headers.
3964
        (assign_file_positions_except_relocs): Pass sorted_hdrs to
3965
        map_program_segments.
3966
 
3967
Mon Jan 30 22:04:53 1995  Ken Raeburn  
3968
 
3969
        * ecoff.c (_bfd_ecoff_find_nearest_line): Fix problems in range
3970
        checking.  Expect argument OFFSET to be section-relative.  From
3971
        David Mosberger-Tang, davidm@piston.cs.arizona.edu.
3972
 
3973
Mon Jan 30 11:22:11 1995  Ian Lance Taylor  
3974
 
3975
        * elfcode.h (NAME(bfd_elf,record_link_assignment)): Don't do
3976
        anything if we are not linking an ELF file.
3977
        (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3978
 
3979
Sat Jan 28 12:48:57 1995  Jeff Law  (law@snake.cs.utah.edu)
3980
 
3981
        * som.c (compare_subspaces): New function to sort subspaces by
3982
        their location in the object file.
3983
        (setup_sections): When computing the index for each subspace,
3984
        handle case where setup_sections reads the subspaces in a
3985
        different order that they appear in the object file.
3986
        (som_is_space): Also examine the output section for the containing
3987
        section.
3988
        (som_is_subspace, som_is_container): Likewise.
3989
        (som_begin_writing): Don't prepare or write fixups here.  When
3990
        writing the symbol strings, use the unsorted symbol table.
3991
        (som_write_object_contents): Don't write the symbol table here.
3992
        (som_finish_writing): Prepare and write the fixups here.  Likewise
3993
        for the symbol table.
3994
        (som_bfd_derive_misc_symbol_info): Undefined symbols always have
3995
        type SS_UNSAT regardless of BSF_EXPORT.
3996
        (som_set_reloc_info): Unpack and attach argument location
3997
        information for R_PCREL_CALL and R_ABS_CALL relocations.
3998
 
3999
        * som.c (som_object_setup): New heuristic to determine if the
4000
        entry and flags fields are switched in the exec header.
4001
 
4002
Sat Jan 28 00:16:01 1995  Ian Lance Taylor  
4003
 
4004
        * elfcode.h (elf_link_add_object_symbols): Use *sym_hash instead
4005
        of h if we might not be doing an ELF link.
4006
 
4007
Fri Jan 27 16:13:42 1995  Ian Lance Taylor  
4008
 
4009
        * elf32-mips.c (mips_elf_final_link): If the size of an input
4010
        .reginfo section is zero, force it to the correct size, since the
4011
        linker emulation code may have clobbered it.
4012
 
4013
        * elfcode.h (elf_sort_hdrs): Correct SHF_ALLOC test.
4014
        (assign_file_positions_except_relocs): Free sorted_hdrs.
4015
 
4016
Thu Jan 26 09:00:12 1995  Steve Chamberlain  
4017
 
4018
        * srec.c (srec_set_section_contents): Fix off by
4019
        one end address calculation.
4020
 
4021
        * config.bfd: (m68*-est-coff): New configuration.
4022
 
4023
Thu Jan 26 11:39:21 1995  Ian Lance Taylor  
4024
 
4025
        * elfcode.h (elf_link_add_object_symbols): Only examine weakdef if
4026
        we are using an ELF hash table.
4027
 
4028
        * aoutx.h (NAME(aout,some_aout_object_p)): Always set EXEC_P if
4029
        the start address is in the .text section, even if STAT_FOR_EXEC
4030
        is set.  Just use STAT_FOR_EXEC as an additional test.
4031
 
4032
Thu Jan 26 11:12:54 1995  Michael Meissner  
4033
 
4034
        * elfcode.h (prep_headers): Use EM_PPC instead of
4035
        EM_CYGNUS_POWERPC.
4036
 
4037
        * elf32-ppc.c (reloc_type): Add all System V.4 and eABI
4038
        relocations currently defined.
4039
        (powerpc_reloc_map): Adjust to new relocation names.
4040
        (elf_powerpc_howto_table): Add most of the new relocations.
4041
        (ELF_MACHINE_CODE): Use EM_PPC instead of EM_CYGNUS_POWERPC.
4042
 
4043
        * config.bfd: Add support for powerpc-*-eabi.
4044
 
4045
        * config/ppc-elf.mt: Add rs6000 architecture support to the
4046
        PowerPC.  Also add XCOFF support.
4047
 
4048
Wed Jan 25 23:26:13 1995  Ian Lance Taylor  
4049
 
4050
        * coff-sh.c (CALC_ADDEND): Don't define.
4051
        (coff_sh_relocate_section): Remove.
4052
        (coff_relocate_section): Use _bfd_coff_generic_relocate_section.
4053
 
4054
Tue Jan 24 14:22:47 1995  Ian Lance Taylor  
4055
 
4056
        * elf32-mips.c (mips_elf_output_extsym): Set the value of the
4057
        ECOFF symbol from the hash table entry.
4058
 
4059
Mon Jan 23 14:53:35 1995  Steve Chamberlain  
4060
 
4061
        * coff-sh.c (coff_sh_relocate_section):  Don't subtract
4062
        vma twice.
4063
 
4064
Mon Jan 23 13:33:18 1995  Ian Lance Taylor  
4065
 
4066
        * coff-sh.c (sh_reloc): Don't ignore the previous contents of an
4067
        R_SH_IMM32 reloc.
4068
 
4069
        * config.bfd (i[345]86-*-gnu*): Set bfd_name to i386-gnu.
4070
        * config/i386-gnu.mt: New file.  Include ELF support.
4071
 
4072
        * opncls.c (bfd_openstreamr): Call bfd_cache_init.
4073
 
4074
Fri Jan 20 11:44:45 1995  Ian Lance Taylor  
4075
 
4076
        * sunos.c (sunos_add_one_symbol): Only set the sunos specific
4077
        fields if we are doing a sunos link.
4078
 
4079
Wed Jan 18 12:28:17 1995  Ian Lance Taylor  
4080
 
4081
        * cpu-h8300.c (h8300_info_struct): Change name from "H8/300" to
4082
        "h8300" for consistency with other cpu-* files.
4083
        (h8300h_info_struct): Change name from "H8/300H" to "h8300h".
4084
        * coff-h8300.c (special): Remove unused variable diff.
4085
 
4086
Tue Jan 17 10:52:32 1995  Ian Lance Taylor  
4087
 
4088
        * bfd-in.h (bfd_byte, reloc_howto_type): Define here, not...
4089
        * reloc.c (bfd_byte, reloc_howto_type): here.
4090
        * Changed all occurrences of ``const struct reloc_howto_struct''
4091
        to be ``reloc_howto_type'' instead.
4092
        * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
4093
 
4094
        * opncls.c (bfd_openstreamr): New function.
4095
        * bfd-in2.h: Rebuilt.
4096
 
4097
        * elf32-mips.c (enum reloc_type): Define new relocs used on Irix.
4098
        (elf_mips_howto_table): Add entries for new relocs.
4099
        (mips_elf_section_from_shdr): Handle SHT_MIPS_MSYM,
4100
        SHT_MIPS_DWARF, and SHT_MIPS_EVENTS.
4101
        (mips_elf_fake_sections): Handle sections named .msym, .debug_*
4102
        and .MIPS.events.*.
4103
 
4104
        * srec.c (srec_init): Remove unused local variable i.
4105
 
4106
Sat Jan 14 19:09:48 1995  Steve Chamberlain  
4107
 
4108
        * archures.c, Makefile.in, targets.c, bfd-in2.h, coffcode.h,
4109
        config.bfd, configure.in, config/w65.mt: Initial support for the W65.
4110
 
4111
Sun Jan 15 13:57:45 1995  Steve Chamberlain  
4112
 
4113
        * opncls.c (bfd_fdopenr): Configure for WIN32.
4114
 
4115
Thu Jan 12 16:30:47 1995  Ken Raeburn  
4116
 
4117
        * Makefile.in (diststuff): Include `headers'.
4118
 
4119
        * sunos.c (m68k_plt_first_entry, sparc_plt_first_entry): Now
4120
        const.
4121
        * tekhex.c (digs): Ditto.
4122
        * elf32-i386.c (elf_i386_plt0_entry, elf_i386_plt_entry): Ditto.
4123
 
4124
        * srec.c, tekhex.c: Include libiberty.h.  Delete static array
4125
        hex_value and replace references to it with references to
4126
        hex_init, hex_p, and hex_value.
4127
        * Makefile.in: Updated dependencies.
4128
 
4129
        * archures.c (archures_init_table): Now const.
4130
        (bfd_arch_init): Adjusted type of local var `ptable'.
4131
 
4132
Thu Jan 12 09:33:24 1995  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
4133
 
4134
        * hosts/symmetry.h:  Redefine `shared' to enable compilation
4135
        with the native Dynix cc compiler.
4136
        * i386dynix.c:  Include aoutx.h instead of using routines
4137
        from aout32.c.
4138
 
4139
Wed Jan 11 21:31:41 1995  Ken Raeburn  
4140
 
4141
        * reloc.c (reloc_howto_type): Make typedef include `const'.
4142
        * aout-ns32k.c, aoutx.h, bout.c, cf-m68klynx.c, coff-i386.c,
4143
        coff-i960.c, coff-m68k.c, cofflink.c, cpu-ns32k.c, ecoff.c,
4144
        elf32-hppa.c, elf32-i386.c, elf32-mips.c, elf32-sparc.c,
4145
        elfcode.h, libbfd-in.h, linker.c, mipsbsd.c, nlm32-ppc.c, oasys.c,
4146
        reloc.c, som.c: Don't use `const' in combination with
4147
        `reloc_howto_type'.
4148
        * bfd-in2.h, libbfd.h: Regenerated.
4149
 
4150
        * ecoff.c (ecoff_type_to_string): Local variable `buffer1' doesn't
4151
        need to be static.
4152
 
4153
Wed Jan 11 14:36:41 1995  Ian Lance Taylor  
4154
 
4155
        * sunos.c (sunos_add_one_symbol): Don't core dump if a multiple
4156
        definition of an absolute symbol is encountered.
4157
 
4158
        * linker.c (_bfd_generic_link_add_one_symbol): Ignore
4159
        redefinitions of an absolute symbol to the same value.
4160
 
4161
Mon Jan  9 15:51:32 1995  Ian Lance Taylor  
4162
 
4163
        * elfcode.h (elf_link_add_object_symbols): It's reasonable for no
4164
        flags to be set, so don't insist otherwise.
4165
 
4166
Fri Jan  6 16:39:40 1995  Ian Lance Taylor  
4167
 
4168
        * elfcode.h (elf_slurp_symbol_table): Don't set BSF_GLOBAL for an
4169
        undefined or common symbol.
4170
        (elf_link_add_object_symbols): Likewise.
4171
 
4172
Wed Jan  4 14:14:05 1995  Jeff Law  (law@snake.cs.utah.edu)
4173
 
4174
        * som.c (bfd_section_from_som_symbol): Only return sections which
4175
        correspond to subspaces.
4176
 
4177
        * som.c (som_begin_writing): Don't forget to bump the
4178
        total_subspaces when writing the unloadable subspaces.
4179
 
4180
Wed Dec 28 20:54:47 1994  Jeff Law  (law@snake.cs.utah.edu)
4181
 
4182
        * som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identify
4183
        bss-like sections.
4184
        (som_get_section_contents): Likewise.
4185
        (som_set_section_contents): Likewise.
4186
 
4187
Tue Dec 27 14:03:47 1994  Jeff Law  (law@snake.cs.utah.edu)
4188
 
4189
        * som.c (setup_sections): Turn off SEC_HAS_CONTENTS for bss-like
4190
        sections.
4191
 
4192
Tue Dec 20 15:30:12 1994  Ken Raeburn  
4193
 
4194
        * coffgen.c (bfd_debug_section): Deleted.
4195
        (coff_section_from_bfd_index): Return absolute section for debug
4196
        symbol.
4197
        (coff_write_symbol): Set BSF_DEBUGGING for C_FILE symbols.  If
4198
        BSF_DEBUGGING is set, set section to N_DEBUG.
4199
        (coff_bfd_make_debug_symbol): Use absolute section.
4200
 
4201
        * elfcode.h (assign_file_positions_except_relocs): In assertion,
4202
        force all values to the same type.
4203
 
4204
Tue Dec 20 11:11:58 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
4205
 
4206
        * coff-h8300.c (howto_table): All relocs get a special function.
4207
        (special): Never do anything when linking -r.
4208
 
4209
Tue Dec 20 13:58:01 1994  Ian Lance Taylor  
4210
 
4211
        * i386linux.c (linux_add_one_symbol): Don't do anything Linux
4212
        specific if this is not a Linux hash table.  From Eric Youngdale
4213
        .
4214
 
4215
        Patches from kkojima@mix.or.jp (Kazumoto Kojima):
4216
        * mipsbsd.c (mips_howto_table_ext): Change sizes of memory relocs
4217
        apply to from two bytes to four bytes.
4218
        * MY(reloc_howto_type_lookup): Handle BFD_RELOC_CTOR.
4219
 
4220
        * elf32-i386.c (elf_i386_relocate_section): Correct and expand the
4221
        list of cases for which relocation need not be computed.
4222
        * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4223
 
4224
Mon Dec 19 23:09:16 1994  Jeff Law  (law@snake.cs.utah.edu)
4225
 
4226
        * elf32-hppa.c (elf32_hppa_read_symext_info): Delete do_locals and
4227
        do_globals arguments, always read symbol extension information for
4228
        globals and locals.  All callers changed.
4229
        (elf32_hppa_size_stubs): Rework to only read symbol extension
4230
        information once for each input bfd.  10% improvement in linker
4231
        performance.
4232
 
4233
Fri Dec 16 12:28:46 1994  Ian Lance Taylor  
4234
 
4235
        * elfcode.h (elf_section_from_bfd_section): Check
4236
        bfd_is_abs_section, etc., only after checking for the section in
4237
        the BFD and after calling the backend routine.
4238
 
4239
Wed Dec 14 20:21:58 1994  Ian Lance Taylor  
4240
 
4241
        * elfcode.h (elf_map_symbols): Only use section symbols whose
4242
        value is the start of the section, checking output_offset when
4243
        using output_section.  When creating a new symbol, set the value
4244
        to 0, since BFD symbol values are section relative.
4245
 
4246
Tue Dec 13 13:31:06 1994  Ian Lance Taylor  
4247
 
4248
        * cpu-z8k.c (arch_info_struct): Make z8002 the default
4249
        architecture.
4250
 
4251
Fri Dec  9 12:43:05 1994  Ian Lance Taylor  
4252
 
4253
        * elfcode.h (elf_bfd_link_add_symbols): If the first object in the
4254
        archive is not an ELF object, pass the archive to the add_symbols
4255
        entry point appropriate for the first object.  From Eric Youngdale
4256
        .
4257
        * aoutx.h (NAME(aout,link_add_symbols)): Similar change if the
4258
        first object is not an a.out object.
4259
 
4260
        * elf32-i386.c (elf_i386_relocate_section): Don't compute
4261
        relocation in cases where we won't use it.
4262
        * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4263
 
4264
Thu Dec  8 14:19:41 1994  Ken Raeburn  
4265
 
4266
        * pc532-mach.c (NAME): Define to use ns32kaout prefix.
4267
        * ns32knetbsd.c (NAME): Ditto.
4268
        (ns32kaout_32_get_section_contents): Define to standard aout-32
4269
        version.
4270
 
4271
Fri Dec  2 13:56:49 1994  Ian Lance Taylor  
4272
 
4273
        * coff-mips.c (mips_read_relocs): New static function, broken out
4274
        of mips_relax_section.
4275
        (mips_relax_section): Call mips_read_relocs.
4276
        (bfd_mips_ecoff_create_embedded_relocs): New function.
4277
        * bfd-in.h (bfd_mnips_ecoff_create_embedded_relocs): Declare.
4278
        * bfd-in2.h: Rebuild.
4279
 
4280
Wed Nov 30 14:12:55 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4281
 
4282
        * coff-sh.c: Use _bfd_dummy_target instead of no_archive.
4283
 
4284
Tue Nov 29 14:00:19 1994  J.T. Conklin  
4285
 
4286
        * config.bfd (i[345]86-*-freebsd*): Use i386-bsd as bfd_name.
4287
        * configure.host (i[345]86-*-freebsd*): Use i386bsd as my_host.
4288
 
4289
Mon Nov 28 15:36:04 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
4290
 
4291
        * config/m68k-nbsd.mt (DEFAULT_VECTOR): set to m68knetbsd_vec.
4292
        * Makefile.in: Rebuilt dependancies.
4293
          (CFILES): Added m68knetbsd.c.
4294
          (HFILES): Added netbsd.h.
4295
 
4296
Wed Nov 23 19:21:41 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
4297
 
4298
        * coff-sh.c (shlcoff_vec): New target vector.
4299
        (no_archive): New function.
4300
        * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Handle
4301
        little endian SH.
4302
        * configure.in: Handle shl.
4303
        * targets.c (bfd_target_vector): Add shlcoff_vec.
4304
        * config/sh-coff.mt (SELECT_VECS): Handle shl_coff_vec.
4305
 
4306
Wed Nov 23 10:50:13 1994  Jeff Law  (law@snake.cs.utah.edu)
4307
 
4308
        * elfcode.h (write_relocs): Do not subtract the section's vma from
4309
        the reloc's offset when writing .o's.  Instead add the section's
4310
        vma to the reloc's offset when writing an executable or shared
4311
        library.
4312
 
4313
Tue Nov 22 23:34:37 1994  Jeff Law  (law@snake.cs.utah.edu)
4314
 
4315
        * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Do not add
4316
        input_section->vma to the relocation's offset.
4317
 
4318
Mon Nov 21 12:37:25 1994  Ian Lance Taylor  
4319
 
4320
        * srec.c (srec_get_reloc_upper_bound): Define.
4321
        (srec_canonicalize_reloc): Define.
4322
        (srec_bfd_reloc_type_lookup): Define.
4323
        (srec_vec, symbolsrec_vec): Use BFD_JUMP_TABLE_RELOCS (srec).
4324
 
4325
Sat Nov 19 03:10:51 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
4326
 
4327
        * configure.host (i[345]86-*-solaris*):  Use solaris2 to
4328
        enable extraction of procfs info from core file for GDB.
4329
 
4330
Thu Nov 17 17:37:39 1994  Ken Raeburn  
4331
 
4332
        * reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL.
4333
        * bfd-in2.h, libbfd.h: Rebuilt.
4334
 
4335
Thu Nov 17 13:12:08 1994  Jeff Law  (law@snake.cs.utah.edu)
4336
 
4337
        * elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the
4338
        vma from the output_section containing $global$ when computing
4339
        global_vlaue.
4340
 
4341
Thu Nov 17 14:29:13 1994  Ian Lance Taylor  
4342
 
4343
        * archive.c (_bfd_write_archive_contents): Round up the archive
4344
        header size of the extended name table to an even number.
4345
 
4346
Wed Nov 16 16:08:06 1994  Ken Raeburn  
4347
 
4348
        * coff-sh.c: Deleted some code that was commented out or inside
4349
        "#if 0".
4350
        (COFF_LONG_FILENAMES): Define.
4351
 
4352
        * cpu-sh.c (arch_info_struct): Convert name to lowercase, for
4353
        consistency with other architectures.
4354
 
4355
Sat Nov 12 23:50:10 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4356
 
4357
        * elfcode.h (elf_export_symbol): Also export symbols which are
4358
        referenced by a regular file.
4359
 
4360
Fri Nov 11 14:29:31 1994  Ian Lance Taylor  
4361
 
4362
        * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add
4363
        export_dynamic argument, and handle it.
4364
        (elf_export_symbol): New function.
4365
        * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
4366
        (bfd_elf64_size_dynamic_sections): Update declaration.
4367
        * bfd-in2.h: Rebuild.
4368
 
4369
Fri Nov 11 10:35:33 1994  Jeff Law  (law@snake.cs.utah.edu)
4370
 
4371
        * hpux-core.c (hpux_core_struct): Delete handles for the
4372
        data, reg and stack sections.  They're never used.  Delete
4373
        accessor macros.
4374
        (make_bfd_asection): Use bfd_make_section_anyway since debugging
4375
        cores from dynamic executables may have several sections with the
4376
        same logical name.
4377
        (hpux_core_core_file_p): Don't save handles to data, reg and
4378
        stack sections.  Handle CORE_TEXT, CORE_MMF and CORE_SHM.
4379
 
4380
Tue Nov  8 13:03:30 1994  Ian Lance Taylor  
4381
 
4382
        * bout.c (callj_callback): Add new argument shrinking.  Change all
4383
        callers.  Handle relocs against section symbols correctly.  If not
4384
        shrinking, don't subtract out dstidx; the subtraction is already
4385
        in the object file.
4386
 
4387
Sun Nov  6 12:52:00 1994  Jeff Law  (law@snake.cs.utah.edu)
4388
 
4389
        * som.h: Conditionally include  and .
4390
 
4391
Thu Nov  3 18:19:13 1994  Ken Raeburn  
4392
 
4393
        * Makefile.in (ALL_MACHINES): Include m68knetbsd.o.
4394
 
4395
        * config/i386linux.mh (EXTRALIBS): Include -lm.
4396
 
4397
        Patches from DJ Delorie:
4398
        * coff-go32.c: Replacement file, uses coff-i386.c with minor
4399
        changes.
4400
        * coff-i386.c (TARGET_UNDERSCORE): allow other files to override
4401
        underscore also
4402
        * makefile.dos: del ctor.o, add cofflink.o and elf32.o
4403
 
4404
        * aoutx.h (adjust_o_magic): If user set data section vma, use it
4405
        to determine the default bss vma.  Patch from Takada Hiroaki,
4406
        hiro@is.s.u-tokyo.ac.jp.
4407
        (machine_type, case bfd_arch_vax): Set *unknown to false.  Patch
4408
        from John David Anglin .
4409
 
4410
        * configure.in (tb): Rename ns32knetbsd_vec to pc532netbsd_vec,
4411
        since that's what it's called.
4412
 
4413
Wed Nov  2 15:24:51 1994  Ian Lance Taylor  
4414
 
4415
        * archive.c (normalize): Change to take a BFD as an argument.
4416
        Change VMS version to use bfd_alloc rather than malloc, so that we
4417
        don't lose the memory forever.
4418
        (_bfd_construct_extended_name_table): Check the name of an archive
4419
        entry which is not being extended, and correct it if it is wrong.
4420
        This is necessary in case the archive was constructed by another
4421
        program which put an entry in the extended name table which we
4422
        don't plan to put in ourselves.  From jjc@jclark.com (James
4423
        Clark).
4424
        (bfd_dont_truncate_arname): Check return value of normalize.
4425
 
4426
Mon Oct 31 14:19:08 1994  Ian Lance Taylor  
4427
 
4428
        * elf32-hppa.c (ELF32_PARISC_SX_SIZE): Define.
4429
        (ELF32_PARISC_SX_GET, ELF32_PARISC_SX_PUT): Define.
4430
        (symextn_entry): Don't define.
4431
        (symext_chain_size): Change type to bfd_size_type.
4432
        (symextn_contents): Change type to bfd_byte *.
4433
        (elf32_hppa_backend_begin_write_processing): Use
4434
        ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).
4435
        (elf32_hppa_size_symext): Likewise.  Also, change type of sizep to
4436
        bfd_size_type *.
4437
        (elf_hppa_tc_make_sections): Cast symextn_contents assignment to
4438
        bfd_byte *.  Use ELF32_PARISC_SX_PUT instead of direct assignment.
4439
        (elf32_hppa_backend_symbol_table_processing): Use
4440
        ELF32_PARISC_SX_SIZE instead of sizeof (symext_entryS).  Use
4441
        ELF32_PARISC_SX_GET insetad of direct assignment.
4442
        (elf32_hppa_read_symext_info): Change type of contents, and its
4443
        assignment cast, to bfd_byte *.  Use ELF32_PARISC_SX_SIZE instead
4444
        of sizeof (symextn_entry).  Use symext_entryS instead of
4445
        symextn_entry.  Use ELF32_PARISC_SX_GET instead of direct
4446
        assignment.
4447
 
4448
        * archive.c (bfd_dont_truncate_arname): Add the ar padding
4449
        character, if there is room for it, even if the name is the
4450
        maximum length.
4451
 
4452
        * elfcode.h (assign_file_positions_except_relocs): Sort the ELF
4453
        headers by section address when assigning file positions.
4454
        (elf_sort_hdrs): New static function.
4455
 
4456
Sun Oct 30 18:56:58 1994  Ian Lance Taylor  
4457
 
4458
        * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Create DT_INIT
4459
        and DT_FINI dynamic entries based on the existence of _init and
4460
        _fini symbols, not on the .init and .fini sections.  This is
4461
        compatible with some SVR4 linkers.
4462
        (elf_bfd_final_link): Corresponding change.
4463
 
4464
Sat Oct 29 12:18:10 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4465
 
4466
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't move a
4467
        symbol with a PLT entry into the .plt section if it is defined in
4468
        a regular file.
4469
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
4470
 
4471
        * linker.c (_bfd_generic_link_add_archive_symbols): It's not an
4472
        error if an empty archive has no symbol table.
4473
        * ecoff.c (ecoff_link_add_archive_symbols): Likewise.
4474
        * elfcode.h (elf_link_add_archive_symbols): Likewise.
4475
 
4476
Fri Oct 28 10:08:41 1994  J.T. Conklin  (jtc@rtl.cygnus.com)
4477
 
4478
        NetBSD/m68k support, based on work by mikeb@snow.datametrics.com:
4479
        * config.bfd (m68*-*-netbsd*): Use m68k-nbsd as bfd_name.
4480
        * configure.in (m68knetbsd_vec): Added.
4481
        * targets.c (bfd_m68knetbsd_vec): Added.
4482
        * hosts/m68knbsd.h, config/m68k-nbsd.mt, m68knetbsd.c: New files.
4483
        * Makefile.in (BFD32_BACKENDS, CFILES): Add m68knetbsd.c.
4484
 
4485
        miscellaneous cleanup required by all netbsd targets, based on work
4486
        by Andrew Cagney :
4487
        * netbsd.h (N_MAGIC, N_SET_MAGIC, N_GETMAGIC, N_GETMAGIC2, N_TXTADDR,
4488
          N_TXTOFF, N_ALIGN, N_DATADDR, N_DATOFF): Removed.  Generic a.out
4489
          definitions work.
4490
        * i386nbsd.c, ns32knbsd.c, sparcnbsd.c (__LDPGSZ): Removed.
4491
          (MY(write_object_contents)): Use NetBSD's magic numbers
4492
 
4493
Thu Oct 27 16:59:52 1994  Ian Lance Taylor  
4494
 
4495
        * libelf.h (struct bfd_elf_section_data): Add field dynindx.
4496
        * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Don't finalize
4497
        the .dynsym, .dynstr or .hash sections until after the backend
4498
        size_dynamic_sections routine, so that it can add dynamic symbols
4499
        if it wants to.
4500
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't define the
4501
        symbol to be in the .plt section when generating a shared library
4502
        if it is a defined symbol.
4503
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
4504
        (elf32_sparc_size_dynamic_sections): When generating a shared
4505
        library, allocate space for a dynamic symbol for each output
4506
        section, storing the index in the dynindx field of the ELF section
4507
        data.  Adjust the other dynindx fields to account for this.
4508
        (elf32_sparc_adjust_dynindx): New static function.
4509
        (elf32_sparc_relocate_section): When copying a reloc into a shared
4510
        library, use the original addend as appropriate.  Convert an
4511
        R_SPARC_32 reloc into an R_SPARC_RELATIVE reloc.  Use the dynamic
4512
        symbol index of the output section, not the normal symbol index.
4513
        (elf32_sparc_finish_dynamic_sections): Don't die if a section does
4514
        not exist when setting the value of the dynamic tags.  Write out
4515
        a dynamic symbol for each output section.
4516
 
4517
Wed Oct 26 01:15:51 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4518
 
4519
        * aoutx.h (aout_link_input_section): Don't bother to read or write
4520
        the relocs if there aren't any.
4521
 
4522
Tue Oct 25 11:44:38 1994  Ian Lance Taylor  
4523
 
4524
        * Makefile.in (ALL_MACHINES): Add tekhex.o.
4525
        * targets.c (bfd_target_vector): If SELECT_VECS is not defined,
4526
        include tekhex_vec.
4527
        * tekhex.c (NIBBLE, ISHEX): Cast array arguments to unsigned char.
4528
        (getvalue, getsym, out): Likewise.
4529
        (find_chunk): Remove unused variable s.
4530
        (first_phase): Remove unused variable s.
4531
        (pass_over): Remove unused variable address.
4532
        (tekhex_object_p): Remove unused variable section.
4533
        (move_section_contents): Change return type from boolean to void.
4534
        (tekhex_write_object_contents): Remove unused variables tdata and
4535
        list.
4536
 
4537
        * linker.c (enum link_action): Add CIND.
4538
        (link_action): Change COMMON_ROW\indr from MDEF to CREF.  Change
4539
        INDR_ROW\common from MDEF to CIND.
4540
        (_bfd_generic_link_add_one_symbol): In CREF case, handle an
4541
        existing symbol which is indirect rather than defined.  Add new
4542
        CIND case.
4543
 
4544
Mon Oct 24 15:33:16 1994  Ian Lance Taylor  
4545
 
4546
        Change S-record backend to use multiple sections to handle gaps in
4547
        file.
4548
        * srec.c (srec_data_list_struct): Move field next from last place
4549
        to first.  Change type of data to bfd_byte *.
4550
        (struct srec_symbol): Define.
4551
        (tdata_type): Remove done_symbol_read, count, strings, symbol_idx,
4552
        string_size, string_idx.  Change type of symbols to struct
4553
        srec_symbol *.  Add symtail and csymbols.
4554
        (low, high): Remove.
4555
        (size_symbols, fillup_symbols, size_srec, fillup): Remove.
4556
        (white, skipwhite, pass_over, object_p): Remove.
4557
        (srec_mkobject): Call srec_init.  Adjust tdata initialization for
4558
        field changes.
4559
        (srec_get_byte, srec_bad_byte): New static functions.
4560
        (srec_new_symbol, srec_scan): New static functions.
4561
        (srec_object_p): Change type of b to bfd_byte.  Explicitly set
4562
        wrong_format error.  Call srec_mkobject and srec_scan instead of
4563
        object_p.
4564
        (symbolsrec_object_p): Likewise.  Also, change b to be only two
4565
        bytes.
4566
        (srec_read_section): New static function.
4567
        (srec_get_section_contents): Call srec_read_section rather than
4568
        pass_over.  Handle zero length section correctly.
4569
        (set_set_arch_mach): Change from function to macro.
4570
        (srec_set_section_contents): Change data to bfd_byte *.
4571
        (srec_write_record): Change data, end and src to bfd_byte *.
4572
        (srec_write_header): Change buffer and dst to bfd_byte *.
4573
        (srec_write_section): Change location to bfd_byte *.
4574
        (srec_write_terminator): Change buffer to bfd_byte *.
4575
        (srec_get_symtab_upper_bound): Don't call
4576
        srec_get_section_contents.
4577
        (srec_get_symtab): Rewrite.
4578
 
4579
        * ecoff.c (ecoff_set_symbol_info): Set udata.i to 0, not NULL.
4580
 
4581
Fri Oct 21 16:43:13 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
4582
 
4583
        * libaout.h (machine_type): added M_68K_NETBSD and M_SPARC_NETBSD.
4584
        * i386netbsd.c, ns32knetbsd.c, sparcnetbsd.c: removed RCS Id's.
4585
          changed how PAGE_SIZE and SEGMENT_SIZE are defined so they are
4586
          consistant with each other.
4587
        * netbsd.h (N_HEADER_IN_TEXT, TEXT_START_ADDR): NetBSD fits its
4588
          header into the start of its text segment.
4589
 
4590
Fri Oct 21 17:13:07 1994  Ian Lance Taylor  
4591
 
4592
        * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add case for
4593
        _construct_extended_name_table.
4594
        (bfd_target): Add _bfd_construct_extended_name_table.
4595
        * archive.c (_bfd_archive_bsd_construct_extended_name_table): New
4596
        function.
4597
        (_bfd_archive_coff_construct_extended_name_table): New function.
4598
        (_bfd_construct_extended_name_table): Renamed by adding a leading
4599
        underscore, and made externally visible.  Added trailing_slash
4600
        argument, and used it instead of elf_style.  Changed type of
4601
        tablen to bfd_size_type *.
4602
        (_bfd_write_archive_contents): Use BFD_SEND to call
4603
        construct_extended_name_table.  Use the returned name.
4604
        * libbfd-in.h (_bfd_construct_extended_name_table): Declare.
4605
        (_bfd_noarchive_construct_extended_name_table): Define.
4606
        (_bfd_archive_bsd_construct_extended_name_table): Declare.
4607
        (_bfd_archive_coff_construct_extended_name_table): Declare.
4608
        * bfd-in2.h: Rebuild.
4609
        * libbfd.h: Rebuild.
4610
        * som.c (som_construct_extended_name_table): New static function.
4611
        * aout-target.h (MY_construct_extended_name_table): Define.
4612
        * coff-rs6000.c (rs6000coff_construct_extended_name_table):
4613
        Define.
4614
        * ieee.c (ieee_construct_extended_name_table): Define.
4615
        * libecoff.h (_bfd_ecoff_construct_extended_name_table): Define.
4616
        * oasys.c (oasys_construct_extended_name_table): Define.
4617
 
4618
        Fix the ELF linker to not require an interpreter if no dynamic
4619
        objects were seen, even when linking PIC code.
4620
        * libelf.h (ELF_LINK_HASH_NEEDS_PLT): Define.
4621
        (struct elf_link_hash_table): Add field dynamic_sections_created.
4622
        * elfcode.h (elf_link_record_dynamic_symbol): Create dynstr if it
4623
        doesn't already exist.
4624
        (elf_link_add_object_symbols): Create dynamic sections based on
4625
        dynamic_sections_created field, not dynobj field.  Don't bother to
4626
        set dynobj.
4627
        (elf_link_create_dynamic_sections): If dynamic sections were
4628
        already created, don't do anything.  If dynobj is already set, use
4629
        it; otherwise, set it to the bfd argument.  Don't initialize
4630
        dynsymcount.  Only create dynstr if it does not exist.  Set
4631
        dynamic_sections_created to true.
4632
        (NAME(bfd_elf,size_dynamic_sections)): Skip most of this function
4633
        if no dynamic objects were seen.
4634
        (elf_adjust_dynamic_symbol): If a symbol has the
4635
        ELF_LINK_HASH_NEEDS_PLT flag set, let the backend adjust it.
4636
        (elf_bfd_final_link): Change most decisions based on dynobj to
4637
        check dynamic_sections_created instead.
4638
        (elf_link_output_extsym): Only handle dynamic symbols if a dynamic
4639
        object was seen.
4640
        * elf.c (_bfd_elf_link_hash_table_init): Initialize new field
4641
        dynamic_sections_created.  Set dynsymcount to 1, not 0.
4642
        * elf32-i386.c (elf_i386_create_dynamic_sections): Call
4643
        elf_i386_create_got_section rather than creating the .got and
4644
        .got.plt sections.
4645
        (elf_i386_create_got_section): New static function.
4646
        (elf_i386_check_relocs): Just call elf_i386_create_got_section if
4647
        a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
4648
        Only create the .rel.got section, and only make space for a reloc,
4649
        for a global symbol or when generating a shared object.  For a
4650
        R_386_PLT32 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
4651
        (elf_i386_adjust_dynamic_symbol): Rework initial assertion to
4652
        permit ELF_LINK_HASH_NEEDS_PLT non dynamic symbols.  Create a
4653
        procedure linkage table entry for such symbols.  But, if no
4654
        dynamic objects were seen, never create a PLT entry.
4655
        (elf_i386_size_dynamic_sections): If no dynamic objects were seen,
4656
        skip most of this function, and force the size of the .rel.got
4657
        section to zero.
4658
        (elf_i386_relocate_section): For a R_386_GOT32 reloc against a global
4659
        symbol when no dynamic object was seen, initialize the contents of
4660
        the .got section.  For a R_386_GOT32 against a local symbol, only
4661
        create a R_386_RELATIVE reloc when generating a shared object.
4662
        Treat a R_386_PLT32 reloc against a symbol for which we did not
4663
        create a PLT entry as a R_386_PC32 reloc.
4664
        (elf_i386_finish_dynamic_sections): Only fiddle with the dynamic
4665
        entries and the PLT if we saw a dynamic object.
4666
        * elf32-sparc.c (elf_sparc_howto_table): Fix R_SPARC_PC22 by
4667
        setting rightshift to 10.  Fix R_SPARC_WPLT20 by setting
4668
        rightshift to 2, size to 2, bitsize to 30, and dst_mask to
4669
        0x3fffffff.
4670
        (elf32_sparc_create_dynamic_sections): Don't set the size of the
4671
        .plt section.  Call elf32_sparc_create_got_section rather than
4672
        creating the .got section.
4673
        (elf32_sparc_check_relocs): Call elf32_sparc_create_got_section if
4674
        a GOT table is needed, not bfd_elf32_link_create_dynamic_sections.
4675
        Only create the .rela.got section, and only make space for a
4676
        reloc, for a global symbol or when generating a shared object.
4677
        Set the alignment of the .rela.got section to 2.  For a
4678
        R_SPARC_WPLT30 reloc, just set the ELF_LINK_HASH_NEEDS_PLT flag.
4679
        (elf32_sparc_adjust_dynamic_symbol): Rework initial assertion to
4680
        permit ELF_LINK_HASH_NEDS_PLT non dynamic symbols.  Create a
4681
        procedure linkage table for such symbols.  But, if no dynamic
4682
        objects were seen, never create a PLT entry.  Initialize the size
4683
        of the .plt section.
4684
        (elf32_sparc_size_dynamic_sections): If no dynamic objects were
4685
        seen, skip most of this function, and force the size of the
4686
        .rela.got section to zero.  Strip empty reloc sections, and strip
4687
        an empty .plt section.
4688
        (elf32_sparc_relocate_section): For a GOT reloc against a global
4689
        symbol when no dynamic object was seen, initialize the contents of
4690
        the .got section.  For a GOT reloc against a local symbol, only
4691
        create a R_SPARC_RELATIVE reloc when generating a shared object.
4692
        Treat a R_SPARC_WPLT30 reloc against a symbol for which we did not
4693
        create a PLT entry as a R_SPARC_WDISP30 reloc.
4694
        (elf32_sparc_finish_dynamic_sections): Only fiddle with the
4695
        dynamic entries and the PLT if we saw a dynamic object.
4696
 
4697
Thu Oct 20 13:28:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4698
 
4699
        * elfcode.h (elf_map_symbols): Don't worry about section symbols
4700
        in a section not owned by any BFD.
4701
        (elf_section_from_bfd_section): Separate out loop which calls
4702
        backend routine.  Check bfd_section and call the backend routine
4703
        even for a section not owned by any BFD.
4704
        * elf32-mips.c (mips_elf_section_from_bfd_section): Handle
4705
        .acommon section.
4706
 
4707
Wed Oct 19 13:28:29 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
4708
 
4709
        * coffgen.c (coff_print_symbol): Make names for section number and
4710
        storage class slightly more verbose.  It's not clear how many
4711
        characters I can justify using up, but before this change they
4712
        both were abbreviated "sc" which is (IMHO) clearly unacceptable.
4713
 
4714
Wed Oct 19 01:26:39 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
4715
 
4716
        * binary.c (binary_set_section_contents): Set the base file
4717
        position from the lowest section VMA, not the start address.
4718
 
4719
        * aoutx.h (NAME(aout,slurp_symbol_table)): Don't return an error
4720
        if there are no symbols.
4721
        * coffgen.c (coff_get_normalized_symtab): Likewise.
4722
        * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
4723
 
4724
Tue Oct 18 12:56:43 1994  Ian Lance Taylor  
4725
 
4726
        * aout-target.h (MY_bfd_copy_private_section_data): Only copy
4727
        subformat to another bfd_target_aout_flavour file.
4728
 
4729
        * binary.c: New file for raw binary output format.
4730
        * Makefile.in (BFD_LIBS): Add binary.o.
4731
        (CFILES): Add binary.c.
4732
        * targets.c (binary_vec): Declare.
4733
        (bfd_target_vector): Include binary_vec.
4734
 
4735
        * srec.c (tdata_type): Add field tail.
4736
        (srec_mkobject): Initialize tail.
4737
        (srec_set_section_contents): Sort S record list by address.
4738
 
4739
Mon Oct 17 11:38:16 1994  Ian Lance Taylor  
4740
 
4741
        * elfcode.h (elf_map_symbols): Sort the symbols into a new array,
4742
        rather than messing with Elf_Sym_Extra.  Store the symbol index in
4743
        the udata.i field.
4744
        (swap_out_syms): Use outbound_syms as a pointer rather than as an
4745
        array.  Don't worry about elf_sym_num.
4746
        * libelf.h (struct elf_sym_extra): Don't define.
4747
        (Elf_Sym_Extra): Don't define.
4748
        (struct elf_obj_tdata): Remove sym_extra field.
4749
        (elf_sym_extra): Don't define.
4750
        * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Use
4751
        udata.i rather than elf_sym_extra array.
4752
 
4753
        * syms.c (asymbol): Change udata field into a union.
4754
        * bfd-in2.h: Rebuild.
4755
        * aoutx.h (NAME(aout,translate_symbol_table)): Use udata.p rather
4756
        than just udata.
4757
        * bout.c (perform_slip): Likewise.
4758
        * hp300hpux.c (MY(slurp_symbol_table)): Likewise.
4759
        * ieee.c (ieee_slurp_external_symbols): Likewise.
4760
        * linker.c (generic_link_add_symbol_list): Likewise.
4761
        (default_indirect_link_order): Likewise.
4762
        * oasys.c (oasys_slurp_symbol_table): Likewise.
4763
        * reloc16.c (bfd_perform_slip): Likewise.
4764
        * srec.c (fillup_symbols): Likewise.
4765
        * coffcode.h (get_index): Use udata.i rather than just udata.
4766
        (coff_slurp_symbol_table): Likewise.
4767
        * coffgen.c (set_index): Likewise.
4768
        * ecoff.c (ecoff_set_symbol_info): Likewise.
4769
        * elfcode.h (elf_symbol_from_bfd_symbol): Likewise.
4770
        * libecoff.h (ecoff_get_sym_index, ecoff_set_sym_index): Likewise.
4771
        * som.c (compare_syms): Likewise.
4772
        (som_prep_for_fixups): Likewise.
4773
        (som_write_fixups): Likewise.
4774
 
4775
        Use a hash table when writing out ELF symbol names.
4776
        * elfcode.h (elf_stringtab_init): New static function.
4777
        (bfd_new_strtab, bfd_add_to_strtab, bfd_add_2_to_strtab): Remove.
4778
        Change all callers to use elf_stringtab_init or
4779
        _bfd_stringtab_add, and get stringtab lengths using
4780
        _bfd_stringtab_size.
4781
        (elf_fake_sections): Change ignored argument to pointer to
4782
        boolean, and set the boolean to true if an error occurs.  If an
4783
        error has already occurred, don't do anything.
4784
        (assign_section_numbers): Just set sh_size, not contents.
4785
        (elf_compute_section_file_positions): Pass the address of a
4786
        boolean to elf_fake_sections.  Pass the address of a
4787
        bfd_strtab_hash to swap_out_syms.  Write out the .strtab section.
4788
        (prep_headers): Change shstrtab to bfd_strtab_hash.
4789
        (swap_out_syms): Take a pointer to a bfd_strtab_hash as an
4790
        argument.  Set it to the symbol names.
4791
        (NAME(bfd_elf,write_object_contents)): Write out the section
4792
        header names using _bfd_stringtab_emit.
4793
        (elf_debug_section): Remove first argument; get the section name
4794
        via the bfd_section pointer.  Change caller.
4795
        (elf_bfd_final_link): Write out the symbol names using
4796
        _bfd_stringtab_emit.  Likewise for the .dynstr section contents.
4797
        Free the symbol names at the end of the function.
4798
        (elf_link_input_bfd): Remove the last argument, output_names,
4799
        from relocate_section.  Save the old symbol contents before
4800
        calling elf_link_output_sym, and restore them afterward.
4801
        * libelf.h (struct elf_link_hash_table): Change dynstr field to
4802
        struct bfd_strtab_hash.
4803
        (struct elf_backend_data): Remove last argument, output_names,
4804
        from elf_backend_relocate_section field.
4805
        (struct strtab): Don't define.
4806
        (struct elf_obj_tdata): Change strtab_ptr field to struct
4807
        bfd_strtab_hash.
4808
        * elf32-hppa.c (elf32_hppa_relocate_section): Remove last
4809
        argument, output_names.
4810
        * elf32-i386.c (elf_i386_relocate_section): Likewise.
4811
        * elf32-mips.c (mips_elf_relocate_section): Likewise.
4812
        * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4813
 
4814
        * libbfd-in.h (DEFAULT_STRING_SPACE_SIZE): Don't define.
4815
        (bfd_add_to_string_table): Don't declare.
4816
        * libbfd.h: Rebuild.
4817
        * libbfd.c (bfd_add_to_string_table): Remove.
4818
 
4819
        * elfcode.h (elf_swap_shdr_in): Use bfd_section, not rawdata.
4820
        Clear contents field.
4821
        (bfd_section_from_shdr): In SHT_STRTAB case, check bfd_section,
4822
        not rawdata.  Don't set rawdata if e_shstrndx.  Use bfd_section
4823
        rather than rawdata in commented out code.  In SHT_REL[A] case,
4824
        don't bother to check elf_section_data of section returned by
4825
        section_from_elf_index.
4826
        (elf_fake_sections): Set bfd_section, not rawdata.  Don't set
4827
        size.
4828
        (elf_map_symbols): Don't set elf_num_section_syms.  Don't create
4829
        section symbols that already exist.
4830
        (assign_file_position_for_section): Use bfd_section, not rawdata.
4831
        (section_from_elf_index): Just check bfd_section field.
4832
        (elf_section_from_bfd_section): Likewise.
4833
        (elf_debug_section): Don't print rawdata, contents, or size.
4834
        (elf_link_add_object_symbols): Don't error out if
4835
        section_from_elf_index returns NULL.
4836
        (elf_bfd_final_link): Check return value from
4837
        section_from_elf_index against NULL, not bfd_is_abs_section.
4838
        (elf_link_input_bfd): Don't check section_from_elf_index return
4839
        value.
4840
        * libelf.h (struct elf_obj_tdata): Remove num_section_syms field.
4841
        (elf_num_section_syms): Don't define.
4842
        * elf.c (elf_get_str_section): Store section contents in contents
4843
        field rather than rawdata field.
4844
        (elf_string_from_elf_section): Likewise.
4845
        (_bfd_elf_make_section_from_shdr): Store BFD section pointer in
4846
        bfd_section field rather than rawdata field.
4847
        * elf32-hppa.c (elf32_hppa_read_symext_info): Use bfd_section
4848
        rather than rawdata.
4849
        (elf32_hppa_size_stubs): Likewise.
4850
        (elf32_hppa_backend_symbol_table_processing): Don't set
4851
        symextn_hdr->size; just use sh_size.
4852
        * elf32-mips.c (mips_elf_final_write_processing): Use bfd_section
4853
        rathern than rawdata.
4854
        (mips_elf_section_from_shdr): Likewise.
4855
        (mips_elf_section_processing): Likewise.
4856
        (mips_elf_section_from_bfd_section): Remove rawdata check.
4857
 
4858
        * srec.c (pass_over): Set the start address for S7, S8 or S9.
4859
 
4860
Fri Oct 14 19:15:46 1994  Ken Raeburn  
4861
 
4862
        * VERSION: Updated to 2.5.
4863
 
4864
Fri Oct 14 11:07:50 1994  Ian Lance Taylor  
4865
 
4866
        * bfd.c (bfd_scan_vma): Cast end to be non const before passing it
4867
        to strtoul.
4868
 
4869
Thu Oct 13 14:40:41 1994  Ian Lance Taylor  
4870
 
4871
        * bfd.c (bfd_scan_vma): Pass end argument on to strtoul.
4872
 
4873
Wed Oct 12 16:46:43 1994  Ken Raeburn  
4874
 
4875
        * opncls.c (bfd_realloc): Deleted, since it's broken and fixing it
4876
        would make it slow.  Besides, it isn't used much.
4877
        * elfcode.h (elf_map_symbols): Always allocate new storage for the
4878
        symbol table.
4879
 
4880
Wed Oct 12 11:54:37 1994  Ian Lance Taylor  
4881
 
4882
        * ecoff.c (ecoff_set_symbol_info): Mark local stProc, stLabel or
4883
        stabs symbols as BSF_DEBUGGING.
4884
 
4885
        * rs6000-core.c (rs6000coff_core_file_matches_executable_p): Make
4886
        str1 and str2 const pointers.
4887
 
4888
        * Makefile.in (INSTALL): Use top level install.sh script.
4889
        * config/README (INSTALL): Remove.
4890
        * config/delta88.mh (INSTALL): Remove.
4891
        * config/i386v4.mh (INSTALL): Remove.
4892
        * config/irix4.mh (INSTALL): Remove.
4893
        * config/irix5.mh (INSTALL): Remove.
4894
        * config/ncrt3000.mh (INSTALL): Remove.
4895
 
4896
Tue Oct 11 13:57:56 1994  Eric Youngdale  (eric@andante.aib.com)
4897
 
4898
        * elf32-i386.c (elf_i386_check_relocs): Make sure that a symbol
4899
        with a global offset table entry or a procedure linkage table
4900
        entry is added to the dynamic symbol table.
4901
        * elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
4902
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): If a symbol has
4903
        already gotten a procedure linkage table entry, change the
4904
        definition to the PLT entry.
4905
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
4906
 
4907
Tue Oct 11 17:12:00 1994  Ian Lance Taylor  
4908
 
4909
        * lynx-core.c (lynx_core_file_p): SPARC Lynx appears to start
4910
        dumping the .data section in a core file at a page boundary.
4911
 
4912
Mon Oct 10 16:24:44 1994  Ken Raeburn  
4913
 
4914
        * cofflink.c (_bfd_coff_final_link): Cast argument to bfd_h_put_32
4915
        to correct type.
4916
        (coff_read_string_table): Cast argument to bfd_h_get_32 to correct
4917
        type.
4918
        * elfcode.h (elf_link_output_extsym): Cast argument to
4919
        bfd_elf_hash to correct type.
4920
 
4921
        * elf32-sparc.c (elf_sparc_howto_table): The PC10, PC22, and
4922
        WPLT30 relocations are PC-relative.
4923
 
4924
Thu Oct  6 12:57:26 1994  Richard Earnshaw (rwe@pegasus.esprit.ec.org)
4925
 
4926
        * aoutx.h (adjust_o_magic): Correctly initialize vma if the vma of
4927
        the text section was user-defined.
4928
 
4929
Wed Oct  5 14:42:12 1994  Ian Lance Taylor  
4930
 
4931
        * archive.c (bfd_construct_extended_name_table): SVR4 uses slash
4932
        newline at the end of the file name, not just newline.
4933
 
4934
Tue Oct  4 11:23:12 1994  Ian Lance Taylor  
4935
 
4936
        * ecoff.c (_bfd_ecoff_new_section_hook): Default section alignment
4937
        power to 4, rather than using align_power_min.
4938
 
4939
        * coffcode.h (coff_new_section_hook): Don't use align_power_min;
4940
        use COFF_DEFAULT_SECTION_ALIGNMENT_POWER instead.  Force the .stab
4941
        and .stabstr sections to be aligned to no more than 2.  Remove
4942
        COFF_SPARC special cases.
4943
        * coff-a29k.c: Define COFF_DEFAULT_SECTION_ALIGNMENT_POWER.
4944
        * coff-apollo.c, coff-go32.c, coff-h8300.c: Likewise.
4945
        * coff-h8500.c, coff-i386.c, coff-i960.c, coff-m68k.c: Likewise.
4946
        * coff-m88k.c, coff-rs6000.c, coff-sh.c, coff-sparc.c: Likewise.
4947
        * coff-we32k.c, coff-z8k.c: Likewise.
4948
 
4949
        * configure.in: Use ${config_shell} when running config.bfd.
4950
 
4951
        * cofflink.c (coff_link_input_bfd): Don't try to convert a long
4952
        filename if the offset field is zero.
4953
 
4954
        * elfcode.h (swap_out_syms): If the alignment of a common symbol
4955
        was not set, use a sensible default rather than zero.
4956
 
4957
Mon Oct  3 16:04:29 1994  H.J. Lu (hjl@nynexst.com)
4958
 
4959
        * opncls.c (bfd_close): Honor umask when setting execution bits.
4960
        (bfd_close_all_done): Likewise.
4961
 
4962
Mon Oct  3 04:41:49 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
4963
 
4964
        * rs6000-core.c (rs6000coff_core_p):  Set SEC_HAS_CONTENTS flag
4965
        for .stack and .ldinfo sections. Cast coredata.c_tab to a
4966
        file_ptr to avoid warnings from gcc.
4967
 
4968
Fri Sep 30 13:11:38 1994  Ian Lance Taylor  
4969
 
4970
        * elfcode.h (elf_bfd_final_link): Remove assertion when a non
4971
        SEC_IN_MEMORY section is found in dynobj.  This can happen when
4972
        linking PIC compiled code.
4973
 
4974
Thu Sep 29 15:21:44 1994  Ken Raeburn  
4975
 
4976
        * reloc.c (bfd_install_relocation): Change type of "data" to
4977
        bfd_byte *, to go along with yesterday's change.
4978
 
4979
        * elf.c (bfd_elf_print_symbol): Moved here from elf_print_symbol
4980
        in elfcode.h.  (case bfd_print_symbol_all): Print symbol's size
4981
        field, except for common symbols; print their alignment.
4982
        * elfcode.h (elf_print_symbol): Deleted.
4983
        * libelf.h (bfd_elf_print_symbol): Declare.
4984
        (bfd_elf{32,64}_print_symbol): Replace declarations with macros.
4985
 
4986
        * syms.c (bfd_print_symbol_vandf): Show BSF_LOCAL and BSF_GLOBAL
4987
        in one column.  Use the column freed up to show BSF_FUNCTION and
4988
        BSF_FILE.
4989
 
4990
Thu Sep 29 12:29:01 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
4991
 
4992
        * syms.c (stt): Add .rdata and .rodata.
4993
 
4994
Wed Sep 28 13:35:05 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
4995
 
4996
        * reloc.c (bfd_install_relocation): Cast data_start to bfd_byte *
4997
        before trying to add values to it.
4998
 
4999
Tue Sep 27 16:47:58 1994  Ken Raeburn  
5000
 
5001
        * elf32-hppa.c (elf32_hppa_backend_final_write_processing): Cast
5002
        return value from elf_sym_extra.
5003
        (elf32_hppa_build_stubs): Cast return value from bfd_zalloc.
5004
        (elf32_hppa_size_stubs): Cast return value from malloc.
5005
 
5006
        * gen-aout.c (main): Declare and initialize "arch".
5007
 
5008
        * cofflink.c (coff_link_add_symbols): Cast return value of
5009
        bfd_hash_allocate.
5010
 
5011
        * riscix.c (riscix_callback): Use PARAMS macro in prototype.
5012
 
5013
        * reloc.c (bfd_install_relocation): New function, mostly copied
5014
        from bfd_perform_relocation, adjusted for the assembler's needs.
5015
        * bfd-in2.h: Regenerated.
5016
 
5017
Mon Sep 26 11:00:14 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5018
 
5019
        * elfcode.h (assign_file_positions_except_relocs): Align the
5020
        section VMA and the file position even if D_PAGED is not set.
5021
 
5022
        * bfd-in.h (bfd_seek): Change declaration to not mark fp const.
5023
        * bfd-in2.h: Rebuild.
5024
        * libbfd.c (bfd_seek): Don't mark parameters const, to avoid
5025
        conflicts with declaration.
5026
 
5027
Fri Sep 23 15:15:31 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5028
 
5029
        * elfcode.h (map_program_segments): Don't abort if we allocated
5030
        too much space for the program header, only if we allocated too
5031
        little.
5032
        (assign_file_positions_except_relocs): Similar change.
5033
 
5034
Tue Sep 20 13:17:07 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
5035
 
5036
        * libaout.h: Fix comment.
5037
        * ns32knbsd.h: Changed M_NS32K_NETBSD to M_532_NETBSD to match
5038
          libaout.h.
5039
 
5040
Tue Sep 20 15:23:21 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5041
 
5042
        * Makefile.in: Rebuilt dependencies.
5043
        (BFD32_BACKENDS): Add sparcnetbsd.o.
5044
        (CFILES): Add ns32knetbsd.c and sparcnetbsd.c.
5045
        * targets.c: ns32knetbsd_vec was renamed to pc532netbsd_vec.
5046
 
5047
        * coff-sh.c (rtype2howto): Remove; unused.
5048
        (coff_sh_relocate_section): Remove unused local variable rstat.
5049
        (reloc_processing): Comment out; unused.
5050
 
5051
Fri Sep 16 12:12:27 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5052
 
5053
        * aoutx.h (aout_link_write_other_symbol): If h->indx is -2, then
5054
        always write it out even if it would normally be stripped.
5055
        (aout_link_input_section_std): If we find a reloc against a
5056
        stripped global symbol, force it to be written out rather than
5057
        merely calling unattached_reloc.
5058
        (aout_link_input_section_ext): Likewise.
5059
        (aout_link_reloc_link_order): Likewise.
5060
 
5061
Wed Sep 14 15:37:19 1994  Jeff Law  (law@snake.cs.utah.edu)
5062
 
5063
        * som.h (struct somdata): New field sorted_syms.
5064
        (obj_som_sorted_syms): Accessor macro.
5065
        * som.c (som_object_setup): Initialize sorted_syms to NULL.
5066
        (som_prep_for_fixups): Sort a copy of the BFD's symbol table;
5067
        store the sorted symbol table in sorted_syms.
5068
        (som_write_fixups): Initalize tmp_reloc to NULL to make GCC happy.
5069
        (som_begin_writing): Similarly for exec_header.  Pass the sorted
5070
        symbol table to som_write_symbol_strings.
5071
        (som_build_and_write_symbol_table): Use the sorted symbols rather
5072
        than the canonical symbol table.
5073
 
5074
        * som.h (som_symbol_type): Add "stringtab_offset" field.
5075
        * som.c (som_write_symbol_strings): Use "stringtab_offset"
5076
        rather than destroying the "name" field in the BFD symbol.
5077
        (som_build_and_write_symbol_table): Likewise.
5078
 
5079
Wed Sep 14 15:06:55 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5080
 
5081
        * aoutx.h (aout_link_write_symbols): Rename skip_indirect to
5082
        skip_next.  If we find an N_WARNING symbol which has already been
5083
        written out, set skip_next.
5084
 
5085
        * libecoff.h (struct ecoff_tdata): Add field find_buffer.
5086
        * ecoff.c: Include aout/stab_gnu.h.
5087
        (ecoff_find_nearest_line): Handle stabs debugging information.
5088
 
5089
        * elfcode.h (elf_link_output_extsym): Keep a symbol marked as weak
5090
        even if it is referenced by another object.
5091
 
5092
Tue Sep 13 17:57:00 1994  Jeff Law  (law@snake.cs.utah.edu)
5093
 
5094
        * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set both
5095
        'T' and 'U' to grab all the unwind information.
5096
        (som_set_reloc_info): Make 'U' unwind bits persist across
5097
        multiple SOM relocations.  Set the addend field of an R_ENTRY
5098
        relocation to the value in 'T'; set the addend field on an
5099
        R_EXIT relocation to the value in 'U'.
5100
 
5101
        * som.h (som_symbol_type): Delete unwind field.
5102
 
5103
        * som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of
5104
        unwind information from the addend field of the R_ENTRY, get the
5105
        other 32bits from the addend field of the R_EXIT.
5106
        (bfd_som_attach_unwind_info): Delete function and all references.
5107
 
5108
        * som.h (som_symbol_type): Delete unused a.out-related fields.
5109
 
5110
        * som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr
5111
        instead of &bfd_abs_section.
5112
 
5113
        * som.c (som_object_setup): Handle exec_entry and exec_flags being
5114
        switched in executables created by the OSF1 linker.
5115
        (som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL
5116
        fixups.  Support R_ALT_ENTRY (handle just like R_EXIT).
5117
 
5118
Tue Sep 13 16:04:07 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
5119
 
5120
        * cofflink.c (coff_link_input_bfd): syment_base is unsigned
5121
        so can't compare -ve numbers with it.
5122
 
5123
Mon Sep 12 20:31:17 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
5124
 
5125
        * configure.in (shcoff_vec): Use cofflink.o now.
5126
        * coff-sh.c: Rewritten to use new fast coff backend.
5127
 
5128
Tue Sep 13 16:23:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5129
 
5130
        * aoutx.h (NAME(aout,final_link)): Don't assume that all the input
5131
        files are a.out.
5132
 
5133
Tue Sep 13 11:09:39 1994  J.T. Conklin  (jtc@rtl.cygnus.com)
5134
 
5135
        * configure.host (sparc-*-netbsd): use sparcnbsd.
5136
          (ns32k-*-netbsd): use ns32knbsd.
5137
 
5138
        * hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
5139
          host support.
5140
 
5141
        * sparcnetbsd.c: New file, adds support for NetBSD/sparc.
5142
        * config/sparc-nbsd.mt: Likewise.
5143
 
5144
        * netbsd.h: New file, definitions common to all netbsd ports.
5145
        * i386netbsd.c: Use it.
5146
        * ns32knetbsd.c: Use it.
5147
 
5148
        * Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
5149
          config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
5150
          file/variable naming conventions.
5151
        * i386netbsd.c: New file, renamed from netbsd386.c.
5152
        * ns32knetbsd.c: New file, renamed from netbsd532.c.
5153
 
5154
Mon Sep 12 21:56:20 1994  Jeff Law  (law@snake.cs.utah.edu)
5155
 
5156
        * som.c (som_reloc_skip): Correct off-by-one error for 4-byte
5157
        R_NO_RELOCATION fixups.
5158
        (bfd_section_from_som_symbol): Return the absolute section if the
5159
        symbol isn't contained in any section in the output file.
5160
        (som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are
5161
        not function symbols (they are magic code labels which *can* be the
5162
        targets of cross space branches).  $START$ is not a section symbol.
5163
 
5164
Mon Sep 12 11:43:08 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5165
 
5166
        * coff-alpha.c (ecoffalpha_little_vec): Add SEC_CODE and SEC_DATA
5167
        to section_flags.
5168
        * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
5169
 
5170
        * elfcode.h (swap_out_syms): Set the type of an undefined symbol
5171
        to STT_FUNC if the BSF_FUNCTION flag is set.
5172
 
5173
        * cofflink.c (coff_link_input_bfd): If r_symndx is -1, don't
5174
        change it.
5175
        (_bfd_coff_generic_relocate_section): If r_symndx is -1, it is an
5176
        absolute reloc.  Don't dump core using r_symndx as an array index.
5177
        * cf-m68klynx.c (coff_bfd_link_add_symbols): Define.
5178
        (lynx_link_add_symbols): New static function (copy of function in
5179
        coff-i386.c).
5180
        (coff_m68k_lynxrtype_to_howto): sym argument may be NULL.
5181
        * coff-i386.c (coff_i386_rtype_to_howto): Likewise.
5182
        * coff-a29k.c (coff_a29k_relocate_section): Handle an r_symndx
5183
        value of -1, meaning an absolute reloc.
5184
 
5185
        * ctor.c: Remove; obsolete.
5186
        * Makefile.in: Rebuild dependencies.
5187
        (BFD_LIBS): Remove ctor.o.
5188
        (CFILES): Remove ctor.c.
5189
        * libbfd.h: Rebuild.
5190
 
5191
Mon Sep 12 01:58:47 1994  Jeff Law  (law@snake.cs.utah.edu)
5192
 
5193
        * elf32-hppa.c (elf32_hppa_relocate_section): If there was a link
5194
        error of some sort (for example, undefined symbols), then do not
5195
        apply any relocs, just notify the user of the errors.
5196
        (elf32_hppa_backend_begin_write_processing): Do not build a symbol
5197
        extension section for an executable (it's useless).
5198
        (elf32_hppa_link_output_symbol_hook): Do nothing if there was a
5199
        link error of some sort (for example, undefined symbols).
5200
        (elf32_hppa_read_symext_info): Kludge.  Turn off SEC_HAS_CONTENTS
5201
        for all the input symbol extension sections to keep the generic
5202
        BFD code happy.  Temporarily turn it on to read the contents of
5203
        the symbol extension section.
5204
 
5205
Sun Sep 11 21:58:59 1994  Jeff Law  (law@snake.cs.utah.edu)
5206
 
5207
        * config/hppaosf.mh (RANLIB): Do not set.
5208
        * config/hppabsd.mh (RANLIB): Likewise.
5209
 
5210
Sun Sep 11 22:50:49 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
5211
 
5212
        * cf-i386lynx.c: Remove #if 0 code.
5213
        (i386_lynxos_coff_object_p): Remove unused function.
5214
        (coff_bfd_link_add_symbols): Define.
5215
        (lynx_link_add_symbols): New static function.
5216
        * coffcode.h (coff_bfd_link_hash_table_create): If
5217
        coff_relocate_section is defined, only define this if not already
5218
        defined.
5219
        (coff_bfd_link_add_symbols, coff_bfd_final_link): Likewise.
5220
 
5221
        * linker.c (_bfd_generic_final_link): Handle
5222
        bfd_indirect_link_order explicitly, rather than via
5223
        _bfd_default_link_order.
5224
        (set_symbol_from_hash): New static function, broken out of
5225
        _bfd_generic_link_write_global_symbol.
5226
        (_bfd_generic_link_write_global_symbol): Symbol setting code moved
5227
        to set_symbol_from_hash; call it.
5228
        (default_indirect_link_order): Add generic_linker argument.
5229
        Change all callers.  If false, set the generic symbols based on
5230
        the hash table entries.
5231
 
5232
Fri Sep  9 11:51:49 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5233
 
5234
        * coffgen.c (coff_get_symtab): Reindented.  Removed commented out
5235
        call to bfd_constructor_entry.
5236
 
5237
        Convert m68k COFF to use new COFF backend linker.
5238
        * coff-m68k.c (coff_relocate_section): Define.
5239
        * cf-m68klynx.c (coff_rtype_to_howto): Define.
5240
        (coff_m68k_lynx_rtype_to_howto): New static function.
5241
        * configure.in (m68kcoff_vec): Build cofflink.o.
5242
        (m68kcoffun_vec, m68klynx_coff_vec): Likewise.
5243
 
5244
Thu Sep  8 16:20:38 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
5245
 
5246
        * coff-h8300.c (h8300_reloc16_extra_cases, case RELBYTE): Flag
5247
        overflows correctly.
5248
 
5249
Wed Sep  7 19:01:42 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5250
 
5251
        * libelf.h (struct elf_backend_data): Change second argument of
5252
        elf_backend_final_write_processing hook to boolean.
5253
        (struct elf_obj_tdata): Add linker field.
5254
        * elfcode.h (NAME(bfd_elf,write_object_contents)): Pass value of
5255
        tdata linker field to final_write_processing, rather than NULL.
5256
        (elf_bfd_final_link): Don't call final_write_processing hook.  Set
5257
        tdata linker field to true.
5258
        * elf32-mips.c (mips_elf_final_write_processing): Change type of
5259
        second argument to boolean.
5260
        * elf32-hppa.c (elf32_hppa_backend_final_write_processing):
5261
        Likewise.
5262
 
5263
        * coff-go32.c (RTYPE2HOWTO): Fully parenthesize arguments.
5264
        * coff-i960.c (RTYPE2HOWTO): Likewise.
5265
        * coff-m88k.c (RTYPE2HOWTO): Likewise.
5266
        * coff-we32k.c (RTYPE2HOWTO): Likewise.
5267
 
5268
        Make i386 COFF use new COFF backend linker.
5269
        * coff-i386.c (RTYPE2HOWTO): Fully parenthesize arguments.
5270
        (coff_relocate_section): Define.
5271
        (coff_i386_rtype_to_howto): New function.
5272
        * configure.in (i386coff_vec): Use cofflink.o.
5273
        (i386lynx_coff_vec): Likewise.
5274
 
5275
        * coffcode.h (bfd_coff_backend_data): Add new field
5276
        _bfd_coff_rtype_to_howto.
5277
        (bfd_coff_rtype_to_howto): Define.
5278
        (coff_rtype_to_howto): Define to use RTYPE2HOWTO, if not already
5279
        defined.
5280
        (bfd_coff_std_swap_table): Initialize new field.
5281
        * cofflink.c (_bfd_coff_final_link): Allocate section_count + 1
5282
        section_info structures, since the target_index is 1 based.
5283
        (coff_link_input_bfd): Set *secpp to bfd_com_section_ptr for a
5284
        common symbol.  Adjust rel_hash by the output reloc count.
5285
        (_bfd_coff_generic_relocate_section): New function.
5286
        * libcoff-in.h (_bfd_coff_generic_relocate_section): Declare.
5287
        * libcoff.h: Rebuild.
5288
        * coff-alpha.c (alpha_ecoff_backend_data): Initialize new field.
5289
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
5290
 
5291
Tue Sep  6 23:28:52 1994  Jeff Law  (law@snake.cs.utah.edu)
5292
 
5293
        * som.c (som_bfd_derive_misc_symbol_info): Treat undefined code
5294
        symbols and undefined symbols which no type in the same manner
5295
        if the associated BFD symbol has BSF_FUNCTION set.  For a defined
5296
        symbol which no type, select a SOM type based on the flags of the
5297
        section containing the symbol.
5298
        (som_slurp_symbol_type): Set BSF_FUNCTION for undefined ST_STUB
5299
        or ST_CODE symbols (importing a non-function code symbol is
5300
        meaningless in SOM).
5301
        (som_set_reloc_info): Don't set "offset" to the section's vma; it
5302
        should always start at zero.
5303
 
5304
Tue Sep  6 14:51:11 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5305
 
5306
        Add new style linker support to COFF backend.  a29k only for now.
5307
        * cofflink.c: New file.
5308
        * libcoff-in.h: Include bfdlink.h.
5309
        (obj_coff_external_syms, obj_coff_strings): Define accessor macro.
5310
        (obj_coff_sym_hashes): Define accessor macro.
5311
        (struct coff_tdata): Add fields external_syms, strings, and
5312
        sym_hashes.
5313
        (struct coff_link_hash_entry): Define.
5314
        (struct coff_link_hash_table): Define.
5315
        (coff_link_hash_lookup, coff_link_hash_traverse): Define.
5316
        (coff_hash_table): Define.
5317
        (_bfd_coff_link_hash_table_create): Declare.
5318
        (_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare.
5319
        * coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz,
5320
        _bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global,
5321
        _bfd_coff_compute_section_file_positions,
5322
        _bfd_coff_relocate_section.
5323
        (bfd_coff_relsz, bfd_coff_swap_reloc_in): Define.
5324
        (bfd_coff_sym_is_global): Define.
5325
        (bfd_coff_compute_section_file_positions): Define.
5326
        (bfd_coff_relocate_section): Define.
5327
        (coff_mkobject_hook): Initialize obj_raw_syment_count and
5328
        obj_conv_table_size.
5329
        (coff_compute_section_file_positions): Set target_index of all
5330
        sections.  Set output_has_begun field.
5331
        (coff_write_object_contents): Don't set target_index; now done by
5332
        coff_compute_section_file_positions.  Remove obsolete handling of
5333
        scn_base and data_base.  Don't bother to check that target_index
5334
        is positive, since it always is.  Remove use of pad, which is
5335
        always zero.  Check obj_raw_syment_count, not bfd_get_symcount,
5336
        for the number of symbols, but only write them out if
5337
        bfd_get_symcount is non-zero.  Don't check obj_raw_syment_count
5338
        until after coff_write_symbols is called.
5339
        (coff_slurp_symbol_table): Use obj_raw_syment_count, not
5340
        bfd_get_symcount for the number of symbols.  Don't set
5341
        obj_conv_table_size.
5342
        (coff_sym_is_global): New static function or macro.
5343
        (coff_slurp_reloc_table): Call coff_swap_reloc_in, not
5344
        bfd_swap_reloc_in.
5345
        (coff_bfd_link_hash_table_create): If coff_relocate_section is
5346
        defined, define as _bfd_coff_link_hash_table_create.
5347
        (coff_bfd_link_add_symbols): Similar change.
5348
        (coff_bfd_final_link): Similar change.
5349
        (coff_relocate_section): Define as NULL if not defined.
5350
        (bfd_coff_std_swap_table): Initialize new fields.
5351
        * coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count
5352
        and obj_conv_table_size here.
5353
        (coff_count_linenumbers): Reindent.  If bfd_get_symcount is zero,
5354
        add up the line numbers from the sections.
5355
        (coff_write_symbols): Set obj_raw_syment_count, not
5356
        bfd_get_symcount.
5357
        (coff_pointerize_aux): Don't pointerize a nonpositive x_endndx
5358
        field.
5359
        (coff_get_normalized_symtab): Use obj_raw_syment_count, not
5360
        bfd_get_symcount.
5361
        (coff_print_symbol): If auxp->fix_end, print x_endndx value.
5362
        * coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in.
5363
        Reindent.  Change argument type to  PTR.
5364
        * coff-a29k.c (coff_a29k_relocate_section): New static function.
5365
        (coff_relocate_section): Define.
5366
        * configure.in (a29kcoff_big_vec): Compile cofflink.o.
5367
        * coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields.
5368
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
5369
        * libcoff.h: Rebuilt.
5370
        * Makefile.in: Rebuilt dependencies.
5371
        (BFD32_BACKENDS): Add cofflink.o.
5372
        (CFILES): Add cofflink.c.
5373
 
5374
Tue Sep  6 14:00:45 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
5375
 
5376
        * coffgen.c (coff_print_symbol, case bfd_symbol_print_all): Check
5377
        for section symbol, and print its aux fields with appropriate
5378
        labels.
5379
 
5380
        * Makefile.in (ALL_MACHINES): Added cpu-arm.o.
5381
 
5382
Sun Sep 04 17:58:10 1994  Richard Earnshaw (rwe@pegasus.esprit.ec.org)
5383
 
5384
        * aoutx.h (NAME(aout,machine_type)): Recognize the ARM processor.
5385
        * archures.c, config.bfd, configure.host, libaout.h, reloc.c,
5386
        targets.c: Add support for the ARM.
5387
        * cpu-arm.c, riscix.c, config/riscix.mh, config/riscix.mt: New files.
5388
 
5389
        * aoutx.h (add_to_stringtable): Check that str isn't a NULL pointer.
5390
 
5391
Fri Sep  2 14:10:30 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
5392
 
5393
        * reloc.c (enum bfd_reloc_code_real): Rewrote definition to use
5394
        new "chew" commands for simultaneous definition of enumerator and
5395
        enumerator name table.
5396
        (bfd_get_reloc_code_name): New function, for retrieving a symbolic
5397
        name associated with an enumerator.
5398
        * libbfd.h, bfd-in2.h: Regenerated.
5399
 
5400
Tue Aug 30 21:24:54 1994  Jeff Law  (law@snake.cs.utah.edu)
5401
 
5402
        * som.c (som_write_fixups, case R_ENTRY): Handle case where no
5403
        unwind descriptor information is available.
5404
 
5405
Tue Aug 30 11:43:30 1994  Eric Youngdale  (ericy@cais.cais.com)
5406
 
5407
        * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add soname
5408
        argument, and use it to set DT_SONAME dynamic entry.
5409
        * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
5410
        (bfd_elf64_size_dynamic_sections): Update prototype.
5411
        * bfd-in2.h: Rebuilt.
5412
 
5413
Fri Aug 26 15:47:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5414
 
5415
        * coffgen.c (coff_real_object_p): Set obj_raw_syment_count.
5416
        (coff_get_normalized_symtab): Verify obj_raw_syment_count, rather
5417
        than setting it.
5418
 
5419
Thu Aug 25 10:44:53 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5420
 
5421
        * archive.c (bsd_write_armap): Remove host dependencies.
5422
 
5423
        * aoutx.h (add_to_stringtab): Check for _bfd_stringtab_add error
5424
        before adding BYTES_IN_WORD.
5425
 
5426
        * coffgen.c (coff_find_nearest_line): Look for the best C_FILE,
5427
        not merely the first.
5428
 
5429
        * coffgen.c (coff_write_alien_symbol): If we are not using the
5430
        symbol, clear the name so that it is not put in the string table.
5431
        From Antti.Miettinen@ntc.nokia.com.
5432
 
5433
Wed Aug 24 11:49:19 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5434
 
5435
        * coffgen.c (coff_print_symbol): Cast pointer different to long
5436
        and use %ld to print it.
5437
        * osf-core.c (osf_core_core_file_p): Remove unused variable
5438
        dseccnt.
5439
        * ecoffswap.h (ecoff_swap_ext_out): If ECOFF_64, clear remaining
5440
        bytes in bits2.
5441
 
5442
        * configure.host, config.bfd: Change i[34]86 to i[345]86.
5443
        * coffgen.c (coff_real_object_p): Set obj_conv_table_size here,
5444
        rather than waiting until coff_slurp_symbol_table.
5445
        (coff_write_alien_symbol): Just ignore BSF_DEBUGGING symbols.
5446
        From Antti.Miettinen@ntc.nokia.com.
5447
 
5448
        * section.c (bfd_make_section_anyway): Fix failure check of
5449
        bfd_make_empty_symbol.  From Antti.Miettinen@ntc.nokia.com.
5450
 
5451
        * aoutx.h (translate_to_native_sym_flags): Use the output_section
5452
        (and output_offset) if there is one.
5453
 
5454
        * aoutx.h (aout_link_check_archive_element): Discard the symbols
5455
        if the archive element was not needed.
5456
 
5457
        * aoutx.h (aout_get_external_symbols): Ensure that a zero string
5458
        index yields an empty string.
5459
        (aout_link_write_symbols): If info->keep_memory is false, use name
5460
        from original hash table entry, not from entry in *sym_hash.
5461
 
5462
        * aoutx.h (struct aout_final_link_info): Add fields contents,
5463
        relocs, symbol_map and output_syms.
5464
        (NAME(aout,final_link)): Work out the largest section size, reloc
5465
        size, and number of symbols.  Use them to preallocate buffers that
5466
        are large enough for all cases.
5467
        (aout_link_input_bfd): Use preallocated symbol_map.
5468
        (aout_link_write_symbols): Remove symbol_map argument; use
5469
        preallocated symbol_map instead.  Change all callers.  Use
5470
        preallocated output_syms.
5471
        (aout_link_input_section): Remove symbol_map argument.  Change all
5472
        callers.  Use preallocated contents and relocs.
5473
        (aout_link_input_section_std): Remove symbol_map argument; use
5474
        preallocated symbol_map instead.  Change all callers.
5475
        (aout_link_input_section_ext): Likewise.
5476
 
5477
Tue Aug 23 10:51:09 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5478
 
5479
        * archive.c (_bfd_write_archive_contents): Don't update the
5480
        symbol map timestamp if there is no symbol map.  From
5481
        schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
5482
 
5483
Mon Aug 22 12:26:42 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5484
 
5485
        * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add _update_armap_timestamp.
5486
        (bfd_target): Add field _bfd_update_armap_timestamp.
5487
        * bfd.c (bfd_update_armap_timestamp): Define.
5488
        * bfd-in2.h: Rebuilt.
5489
        * libbfd-in.h (_bfd_noarchive_update_armap_timestamp): Define.
5490
        (_bfd_archive_bsd_update_armap_timestamp): Declare.
5491
        (_bfd_archive_coff_update_armap_timestamp): Define.
5492
        * libbfd.h: Rebuilt.
5493
        * archive.c (_bfd_write_archive_contents): Call
5494
        bfd_update_armap_timestamp instead of checking for a BSD archive
5495
        and calling bsd_update_armap_timestamp.
5496
        (_bfd_archive_bsd_update_armap_timestamp): Rename from
5497
        _bsd_update_armap_timestamp.  Don't assume that armap_datepos is
5498
        already set.
5499
        * aout-target.h (MY_update_armap_timestamp): Define if not already
5500
        defined.
5501
        * coff-rs6000.c (rs6000coff_update_armap_timestamp): Define.
5502
        * ieee.c (ieee_update_armap_timestamp): Define.
5503
        * libecoff.h (_bfd_ecoff_update_armap_timestamp): Define.
5504
        * oasys.c (oasys_update_armap_timestamp): Define.
5505
        * som.c (som_update_armap_timestamp): Define.
5506
 
5507
        * hash.c: Copy string hash functions from aoutx.h.
5508
        * aoutx.h: String hash functions moved to hash.c.  Retain
5509
        simplified versions of add_to_stringtab and emit_stringtab.
5510
        Change all callers to use new function and structure names.
5511
        * libbfd-in.h (_bfd_stringtab_init, _bfd_stringtab_free): Declare.
5512
        (_bfd_stringtab_size, _bfd_stringtab_add): Declare.
5513
        (_bfd_stringtab_emit): Declare.
5514
        * libbfd.h: Rebuilt.
5515
 
5516
Mon Aug 22 10:49:37 1994  Eric Youngdale  (ericy@cais.cais.com)
5517
 
5518
        * i386linux.c (linux_add_one_symbol): Create a fixup for any
5519
        defined absolute symbol, not just GOT or PLT symbols.
5520
        (linux_tally_symbols): Correct handling of references to defined
5521
        symbols.
5522
 
5523
Thu Aug 18 16:29:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5524
 
5525
        Get ld -x -r to handle a.out set symbols correctly.
5526
        * aoutx.h (adjust_o_magic): If the .bss VMA was set outside of
5527
        BFD, pad the .data section up to the VMA of the .bss section.
5528
        (aout_link_add_symbols): If a set symbol does not get modified,
5529
        treat it as a local symbol.
5530
        (aout_link_write_symbols): Set the value of set symbols
5531
        correctly.  Don't discard set symbols even if discarding local
5532
        symbols.
5533
        (aout_link_write_other_symbol): Don't abort on bfd_link_hash_new,
5534
        since it can now happen for set symbols.
5535
 
5536
        * elfcode.h (elf_fake_sections): Just check for ".rela" and
5537
        ".rel", not ".rela." and ".rel."; make this work by checking
5538
        use_rela_p.
5539
        * elf32-i386.c (elf_i386_check_relocs): Just check for ".rel", not
5540
        ".rel."
5541
        (elf_i386_size_dynamic_sections): Likewise.
5542
        (elf_i386_relocate_section): Likewise.
5543
        * elf32-sparc.c (elf32_sparc_check_relocs): Just check for
5544
        ".rela", not ".rela."
5545
        (elf32_sparc_size_dynamic_sections): Likewise.
5546
        (elf32_sparc_relocate_section): Likewise.
5547
 
5548
Wed Aug 17 16:54:18 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5549
 
5550
        * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
5551
        PASS to the old value + 1.
5552
 
5553
        * coffgen.c (coff_get_normalized_symtab): If a C_FILE symbol has
5554
        no aux entries, use the symbol name as the file name.
5555
        (coff_find_nearest_line): Look for the right C_FILE symbol, rather
5556
        than always using the first one.  If there is a debugging symbol
5557
        after a function symbol, skip it.  Add the section VMA to the line
5558
        offset, since it was subtracted out in coff_slurp_line_table.
5559
 
5560
Tue Aug 16 16:53:00 1994  Jeff Law  (law@snake.cs.utah.edu)
5561
 
5562
        * som.c (som_prep_headers): If writing some form of an executable,
5563
        allocate and attach an exec header to the BFD private data.
5564
        (som_begin_writing): Don't fill fields of the exec header based
5565
        on BFD private data here (like the exec flags).  Do not write
5566
        the exec header here.
5567
        (som_write_headers): Instead do it here.
5568
        * som.h (struct somdata): New field "exec_hdr" for the executable
5569
        file header.
5570
        (obj_som_exec_hdr): New accessor macro.
5571
 
5572
Tue Aug 16 00:12:31 1994  Eric Youngdale  (ericy@cais.cais.com)
5573
 
5574
        * i386linux.c (linux_link_create_dynamic_sections): Create section
5575
        named .linux-dynamic, not .dynamic.
5576
        (linux_add_one_symbol): Use .linux-dynamic, not .dynamic.
5577
        (bfd_linux_size_dynamic_sections): Likewise.
5578
        (linux_finish_dynamic_link): Likewise.
5579
 
5580
Mon Aug 15 12:16:56 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5581
 
5582
        * coffgen.c (STRING_SIZE_SIZE): Define.
5583
        (coff_fix_symbol_name): Use STRING_SIZE_SIZE, not 4.
5584
        (coff_write_symbols, build_string_table): Likewise.
5585
        (coff_get_normalized_symtab): Likewise.
5586
 
5587
        * libcoff-in.h (obj_symbol_slew): Don't define.
5588
        (struct coff_tdata): Remove unused fields index_slew, raw_linenos,
5589
        and flags.
5590
        * libcoff.h: Rebuilt.
5591
        * coffcode.h (coff_mkobject): Don't initialize raw_linenos.
5592
        (coff_mkobject_hook): Don't initialize flags.
5593
 
5594
        * aout-target.h (MY_zmagic_contiguous): Define as 0 if not already
5595
        defined.
5596
        (MY(backend_data)): Use MY_zmagic_contiguous, not hardcoded 0.
5597
        * i386linux.c (MY_zmagic_contiguous): Define.
5598
 
5599
        * elfcode.h (bfd_section_from_shdr): If a SHT_SYMTAB section in a
5600
        shared object has SHF_ALLOC set, create a BFD section for it.
5601
        (elf_section_from_bfd_section): There may be a BFD section for a
5602
        SHT_SYMTAB section.
5603
 
5604
        * coffcode.h (styp_to_sec_flags): Add name argument.  If no flags
5605
        are recognized, chose section flags based on the name.
5606
        (bfd_coff_backend_data): _bfd_styp_to_sec_flags_hook field: Add
5607
        name argument.
5608
        (bfd_coff_styp_to_sec_flags_hook): Add name argument.
5609
        (coff_compute_section_file_positions): Don't adjust the section
5610
        position by COFF_PAGE_SIZE unless SEC_ALLOC is set.
5611
        * libcoff.h: Rebuilt.
5612
        * coffgen.c (make_a_section_from_file): Pass section name to
5613
        bfd_coff_styp_to_sec_flags_hook.
5614
        * ecoff.c (_bfd_ecoff_styp_to_sec_flags): Add unused name
5615
        argument.
5616
        * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Add name argument to
5617
        prototype.
5618
 
5619
Fri Aug 12 11:22:40 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5620
 
5621
        * elfcode.h (section_from_elf_index): Correct check for invalid
5622
        section index.
5623
 
5624
        * elfcode.h (elf_link_add_object_symbols): If there is no symbol
5625
        table, try using the dynamic symbol table.  From Eric Youngdale
5626
        .
5627
 
5628
        * configure.host (sparc-*-solaris2*): Use solaris2, not sysv4.
5629
        The linker depends upon configuring for solaris2.
5630
        * hosts/solaris2.h: New file; include hosts/sysv4.h.
5631
        * config/solaris2.mh: New file; copy of config/sysv4.mh.
5632
 
5633
Wed Aug 10 13:09:38 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5634
 
5635
        * aoutx.h (adjust_z_magic): Make sure data section is padded to
5636
        page boundary when the VMA is set by the calling program.  From
5637
        Eric Youngdale .
5638
 
5639
Mon Aug  8 17:18:49 1994  Stan Shebs  (shebs@andros.cygnus.com)
5640
 
5641
        Update to ns32k support, from Ian Dall (dall@hfrd.dsto.gov.au).
5642
        * aout-ns32k.c: Add declarations that were in aout-ns32k.h, change
5643
        declarations to traditional form.
5644
        (MY_reloc_howto, MY_put_reloc): Change from macro to function.
5645
        (ns32k_relocate_contents): New function.
5646
        * aout-ns32k.h: Remove.
5647
        * cpu-ns32k.c: Add declarations that were in aout-ns32k.h, change
5648
        declarations to traditional form.
5649
        (ns32k_final_link_relocate): Call ns32k_relocate_contents.
5650
        * netbsd532.c: Reformat to standards, add copyright notice.
5651
        (ARCH): Don't define.
5652
        (aout-ns32k.h): Don't include.
5653
        * pc532-mach.c: Ditto.
5654
 
5655
Mon Aug  8 17:55:52 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5656
 
5657
        * coff-i960.c (coff_i960_relocate): Don't try to convert relocs
5658
        against common symbols.
5659
 
5660
Sat Aug  6 22:27:30 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
5661
 
5662
        * irix-core.c (irix_core_core_file_p):  Ignore sections that
5663
        are not contained in the core file.
5664
 
5665
Thu Aug  4 11:32:23 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5666
 
5667
        * coff-m68k.c (m68k_reloc_type_lookup): New function.
5668
        (coff_bfd_reloc_type_lookup): Define.
5669
        * cf-m68klynx.c (_bfd_m68kcoff_reloc_type_lookup): Define.
5670
 
5671
        * elfcode.h (elf_bfd_final_link): Force the vma of sections which
5672
        do not have SEC_ALLOC set to be 0.  This is needed to handle
5673
        relocs against debugging sections.
5674
 
5675
Wed Aug  3 16:45:41 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5676
 
5677
        * coff-i960.c (coff_i960_relocate): Rewrote to change relocs
5678
        against locally defined symbols into relocs against section
5679
        symbols, for VxWorks 5.1.
5680
 
5681
Wed Aug  3 10:34:37 1994  Eric Youngdale  (ericy@cais.cais.com)
5682
 
5683
        * i386linux.c (linux_add_one_symbol): Only handle
5684
        SHARABLE_CONFLICTS specially if BSF_CONSTRUCTOR is set.  Set hashp
5685
        for a GOT or PLT symbol.  Set jump field of fixup for a PLT symbol.
5686
        (linux_tally_symbols): Check section of real symbol.  When looking
5687
        for a builtin fixup, check builtin and jump flags.  Create no more
5688
        than one fixup, and always create one if the real symbol is in the
5689
        absolute section.  Only strip absolute symbols.
5690
 
5691
Wed Aug  3 05:08:24 1994  D. V. Henkel-Wallace  (gumby@cygnus.com)
5692
 
5693
        * coffcode.h (coff_write_object_contents): set internal_a.magic to
5694
        LYNXCOFFMAGIC whenever 68k, SPARC or i386 LynxOS
5695
        (yes, they have the same magic number!)
5696
 
5697
Tue Aug  2 10:43:21 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5698
 
5699
        * hp300hpux.c (BMAGIC): Define as HPUX_DOT_O_MAGIC, to make test
5700
        in aoutx.h work correctly.
5701
 
5702
        * coff-i960.c (coff_i960_relocate): New function.
5703
        (howto_rellong, howto_iprmed): Use it as special_function.
5704
 
5705
        * libbfd-in.h: Move declarations of bfd_read, bfd_write, bfd_seek,
5706
        bfd_tell, bfd_flush, and bfd_stat from here...
5707
        * bfd-in.h: ...to here, to make them visible to programs which
5708
        know more about the object file format than BFD does.
5709
        * libbfd.h, bfd-in2.h: Rebuilt.
5710
 
5711
Mon Aug  1 17:55:53 1994  Fred Fish  (fnf@cygnus.com)
5712
 
5713
        * ptrace-core.c (ptrace_unix_core_file_p):  Convert zalloc usage
5714
        to bfd_zalloc.
5715
 
5716
Mon Aug  1 12:04:40 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5717
 
5718
        * elf64-sparc.c (ELF_MAXPAGESIZE): Define.
5719
 
5720
        ELF linker patches from Eric Youngdale .
5721
        * elfcode.h (elf_link_create_dynamic_sections): Set type of
5722
        _DYNAMIC to STT_OBJECT.
5723
        (NAME(bfd_elf,record_link_assignment)): Always create hash table
5724
        entry.  Set type to STT_OBJECT.
5725
        (elf_link_output_extsym): Don't set type of weak defined symbol to
5726
        STB_WEAK if symbol was referenced.
5727
        (map_program_segments): Check DYNAMIC as well as EXEC_P.
5728
        (assign_file_positions_except_relocs): Likewise.
5729
        * elf32-i386.c (elf_i386_create_dynamic_sections): Set type of
5730
        _GLOBAL_OFFSET_TABLE to STT_OBJECT.
5731
        (elf_i386_check_relocs): Ignore local PLT32 relocs.
5732
        (elf_i386_relocate_section): Treat local PLT32 relocs as PC32.
5733
 
5734
        * elfcode.h (elf_adjust_dynamic_symbol): Correct weak symbol
5735
        handling again.
5736
 
5737
        * elfcode.h (elf_slurp_reloc_table): Don't try to read the relocs
5738
        if there aren't any.
5739
 
5740
        * configure.host (sparc-*-solaris2*): Use sysv4, not solaris2.
5741
        * hosts/solaris2.h: Remove.
5742
        * config/solaris2.mh: Remove.
5743
 
5744
Sun Jul 31 14:27:04 1994  Jeff Law  (law@snake.cs.utah.edu)
5745
 
5746
        * elf32-hppa.c, elf32-hppa.h: Update comment reflecting which
5747
        HPPA ELF spec the code implements.
5748
 
5749
Tue Jul 26 17:38:01 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
5750
 
5751
        * cpu-i960.c (MAX_ARCH): New macro.
5752
        (compatible): Use it in computing array bounds.  Put comma after
5753
        last entry in array, for regularity.
5754
        (arch_info_struct): Adjust spacing for easier reading.
5755
 
5756
        * coff-i960.c (howto_rellong, howto_iprmed, howto_optcall): Use
5757
        HOWTO macro.
5758
 
5759
        * cpu-i960.c (JX): Define as bfd_mach_i960_jx.
5760
        (scan_960_mach): Recognize jx machine.
5761
        (MAX_ARCH): Define to be JX.
5762
        (compatible): Add JX row to array.
5763
        (arch_info_struct): Add JX entry.
5764
 
5765
        * archures.c (bfd_mach_i960_jx): New macro.
5766
        * bfd-in2.h: Regenerated.
5767
 
5768
        * coffcode.h (coff_set_arch_mach_hook): For F_I960JX, set machine
5769
        to bfd_mach_i960_jx.
5770
        (coff_set_flags): For bfd_mach_i960_jx, set F_I960JX.
5771
 
5772
Tue Jul 26 11:04:00 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5773
 
5774
        * elfcode.h (elf_adjust_dynamic_symbol): When handling a weak
5775
        symbol, correct check to see whether the equivalent normal symbol
5776
        was referenced.
5777
 
5778
        Add support for creating shared libraries under i386 ELF and SPARC
5779
        ELF.  Based on patches by Eric Youngdale .
5780
        * libelf.h (struct elf_link_hash_entry): Remove copy_offset field.
5781
        Add got_offset and plt_offset fields.
5782
        (ELF_LINK_HASH_REF_DYNAMIC_MULTIPLE): Don't define.
5783
        (ELF_LINK_HASH_DEF_DYNAMIC_MULTIPLE): Don't define.
5784
        (ELF_LINK_HASH_NEEDS_COPY): Define.
5785
        (struct elf_backend_data): Add check_relocs field.
5786
        (struct bfd_elf_section_data): Change relocs from PTR to
5787
        Elf_Internal_Rela *.
5788
        (struct elf_obj_tdata): Add local_got_offsets field.
5789
        (elf_local_got_offsets): Define accessor macro.
5790
        (bfd_elf32_link_create_dynamic_sections): Declare.
5791
        (bfd_elf32_link_record_dynamic_symbol): Declare.
5792
        (bfd_elf64_link_create_dynamic_sections): Declare.
5793
        (bfd_elf64_link_record_dynamic_symbol): Declare.
5794
        * elfcode.h (elf_slurp_reloc_table): Don't use the section data
5795
        relocs field.
5796
        (elf_link_record_dynamic_symbol): Make globally visible.  Use
5797
        macro to rename to NAME(bfd_elf,link_record_dynamic_symbol).
5798
        (elf_link_add_object_symbols): If creating a shared library, put
5799
        make all local symbols dynamic.  Don't bother with the
5800
        DYNAMIC_MULTIPLE flags.  Call the check_relocs backend function if
5801
        it is defined.
5802
        (elf_link_create_dynamic_sections): Make globally visible.  Use
5803
        macro to rename to NAME(bfd_elf,link_create_dynamic_sections).  If
5804
        creating a shared library, make sure that _DYNAMIC is added as a
5805
        dynamic symbol.
5806
        (elf_link_read_relocs): New function.
5807
        (NAME(bfd_elf,record_link_assignment)): If creating a shared
5808
        library, always create symbols, and always make them dynamic.
5809
        (elf_bfd_final_link): Permit creation of shared libraries.
5810
        (elf_link_input_bfd): Use elf_link_read_relocs to get the relocs.
5811
        * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize
5812
        copy_offset.  Initialize got_offset and plt_offset.
5813
        * elf32-target.h (elf_backend_check_relocs): Define as 0 if not
5814
        defined.
5815
        (elf32_bed): Initialize check_relocs field.
5816
        * elf64-target.h (elf_backend_check_relocs): Define as 0 if not
5817
        defined.
5818
        (elf64_bed): Initialize check_relocs field.
5819
        * elf32-i386.c (elf_howto_table): Change R_386_PLT32 and
5820
        R_386_GOTPC to be pc_relative and pcrel_offset.
5821
        (elf_i386_pic_plt0_entry): Define.
5822
        (elf_i386_pic_plt_entry): Define.
5823
        (elf_i386_create_dynamic_sections): Create a .got.plt section, and
5824
        define _GLOBAL_OFFSET_TABLE_ at the start of it.  If creating a
5825
        shared library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
5826
        dynamic symbol.  Don't create .rel.bss if creating a shared
5827
        library.
5828
        (elf_i386_check_relocs): New function.
5829
        (elf_i386_adjust_dynamic_symbol): Don't make a PLT entry if the
5830
        symbol already has one.  When making a PLT entry, set plt_offset.
5831
        Don't create a copy reloc when creating a shared library.  Don't
5832
        set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
5833
        (elf_i386_allocate_dynamic_section): Remove.
5834
        (elf_i386_size_dynamic_sections): Look through all the sections
5835
        rather than assuming we know their names.  Remove any empty reloc
5836
        or plt sections.  Only add a DT_DEBUG entry if not creating a
5837
        shared library.  Only add a DT_PLTGOT entry if there is a PLT.
5838
        Add a DT_TEXTREL entry if required.
5839
        (elf_i386_relocate_section): Permit undefined symbols when
5840
        creating a shared library.  Handle the special relocation types
5841
        specially.
5842
        (elf_i386_finish_dynamic_symbol): Create a PLT entry if plt_offset
5843
        is set.  If creating a shared library, produce a PIC PLT entry.
5844
        Only mark a PLT symbol as undefined if it was not defined by a
5845
        regular object file.  Create a GOT entry if got_offset is set.
5846
        Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
5847
        (elf_i386_finish_dynamic_sections): Change the handling of
5848
        DT_RELSZ to simply subtract out the size of .rel.plt.  If creating
5849
        a shared library, produce PIC PLT code.
5850
        (elf_backend_check_relocs): Define.
5851
        * elf32-sparc.c (elf_sparc_howto_table): Change R_SPARC_GOT10,
5852
        R_SPARC_GOT22, and R_SPARC_PC10 to not warn about reloc overflow.
5853
        (elf32_sparc_create_dynamic_sections): If creating a shared
5854
        library, make sure that _GLOBAL_OFFSET_TABLE_ is added as a
5855
        dynamic symbol, and set the type to STT_OBJECT.  Likewise for
5856
        _PROCEDURE_LINKAGE_TABLE_.  Don't create .rel.bss if creating a
5857
        shared library.
5858
        (elf32_sparc_check_relocs): New function.
5859
        (elf32_sparc_adjust_dynamic_symbol): Don't make a PLT entry if the
5860
        symbol already has one.  When making a PLT entry, set plt_offset.
5861
        Don't create a copy reloc when creating a shared library.  Don't
5862
        set copy_offset, just set ELF_LINK_HASH_NEEDS_COPY.
5863
        (elf32_sparc_allocate_dynamic_section): Remove.
5864
        (elf32_sparc_size_dynamic_sections): Look through all the sections
5865
        rather than assuming we know their names.  Only add a DT_DEBUG
5866
        entry if not creating a shared library.  Add a DT_TEXTREL entry if
5867
        required.
5868
        (elf32_sparc_relocate_section): Permit undefined symbols when
5869
        creating a shared library.  Handle the special relocation types
5870
        specially.
5871
        (elf32_sparc_finish_dynamic_symbol): Create a PLT entry if plt_offset
5872
        is set.  Only mark a PLT symbol as undefined if it was not defined
5873
        by a regular object file.  Create a GOT entry if got_offset is
5874
        set.  Create a copy reloc if ELF_LINK_HASH_NEEDS_COPY is set.
5875
        (elf32_sparc_finish_dynamic_sections): Store dynobj in a local
5876
        variable.
5877
        (elf_backend_check_relocs): Define.
5878
 
5879
Mon Jul 25 12:21:07 1994  Stan Shebs  (shebs@andros.cygnus.com)
5880
 
5881
        * configure.in (pc532mach_vec): Change to pc532machaout_vec.
5882
        * config.bfd (ns32k-*-netbsd*): Use ns32k-nbsd as bfd_name.
5883
        * Makefile.in (ALL_MACHINES): Add cpu-ns32k.o.
5884
        (BFD32_BACKENDS): Add aout-ns32k.o, netbsd532.o, m88kmach3.o,
5885
        pc532-mach.o.
5886
        * targets.c (pc532machaout_vec): Use instead of pc532mach_vec.
5887
        * config/pc532-mach.mt (DEFAULT_VECTOR): Ditto.
5888
        (SELECT_VECS): Remove.
5889
        * config/ns32k-nbsd.mt: New file, was ns32k-netbsd.mt.
5890
        * config/ns32k-netbsd.mt: Remove, name too long.
5891
 
5892
Fri Jul 22 11:07:14 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5893
 
5894
        * linker.c (generic_link_check_archive_element): When changing a
5895
        symbol to common, set the alignment.
5896
        (_bfd_generic_link_add_one_symbol): When creating a common symbol,
5897
        set the alignment.
5898
        * aoutx.h (aout_link_check_ar_symbols): When changing a symbol to
5899
        common, set the alignment.
5900
        (aout_link_add_symbols): Restrict the alignment of a common symbol
5901
        to the alignment power given by the architecture.
5902
        * libelf.h (struct elf_link_hash_entry): Remove align field.  Add
5903
        copy_offset field.
5904
        * elfcode.h (elf_link_add_object_symbols): Store alignment in
5905
        new bfd_link_hash_entry field, not in elf_link_hash_entry field.
5906
        (elf_link_output_extsym): Similar change when getting alignment.
5907
        * elf.c (_bfd_elf_link_hash_newfunc): Don't initialize align.  Do
5908
        initialize copy_offset.
5909
        * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use copy_offset
5910
        field rather than align field.  Get alignment using bfd_log2
5911
        rather than switch.
5912
        * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
5913
        * elf32-i386.c (elf_i386_finish_dynamic_symbol): Use copy_offset,
5914
        not align.
5915
        * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Likewise.
5916
 
5917
        * aoutx.h (NAME(aout,some_aout_object_p)): Just check
5918
        STAT_FOR_EXEC, don't check MACH.
5919
        * m88kmach3.c (MACH): Don't define.
5920
        * config/i386-mach3.mt (TDEFINES): Define STAT_FOR_EXEC.
5921
        * config/m88k-mach3.mt (TDEFINES): Likewise.
5922
        * config/mips-mach3.mt (TDEFINES): Likewise.
5923
 
5924
Thu Jul 21 17:24:31 1994  Stan Shebs  (shebs@andros.cygnus.com)
5925
 
5926
        * i386mach3.c: Reverted to version from before Jul 5 1994 changes.
5927
 
5928
Thu Jul 21 12:26:01 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5929
 
5930
        * reloc.c (struct reloc_howto_struct): Remove special_function1.
5931
        It's the wrong way to do things.
5932
        (HOWTO): Change accordingly.
5933
        (HOWTO2): Remove.
5934
        (_bfd_final_link_relocate): Remove references to
5935
        special_function1.
5936
        * bfd-in2.h: Rebuilt.
5937
        * aoutx.h (aout_link_input_section_std): Remove references to
5938
        special_function1.
5939
        (aout_link_reloc_link_order): Likewise.
5940
 
5941
Wed Jul 20 15:46:44 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5942
 
5943
        * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add rpath
5944
        argument.  If it is not NULL, use it to set DT_RPATH.
5945
        * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
5946
        (bfd_elf64_size_dynamic_sections): Likewise.
5947
        * bfd-in2.h: Rebuilt.
5948
 
5949
Sat Jul 16 21:10:39 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
5950
 
5951
        * elfcode.h (elf_get_dynamic_symtab_upper_bound): If there is no
5952
        dynamic symtab, return error.
5953
 
5954
        * libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Define.
5955
        * elfcode.h (elf_link_add_object_symbols): If symbol is defined as
5956
        weak, set ELF_LINK_HASH_DEFINED_WEAK.
5957
        (elf_link_output_extsym): If symbol is defined as weak, mark it
5958
        STB_WEAK.
5959
 
5960
        * libelf.h (struct bfd_elf_section_data): Add relocs field.
5961
        (shdr_name): Remove; unused.
5962
        * elfcode.h (elf_slurp_reloc_table): Rewrote to handle both REL
5963
        and RELA relocs.  Free up the unswapped relocs.  Permit the relocs
5964
        to be cached in the section_data.  Correct the reloc address.
5965
        (elf_slurp_reloca_table): Remove.
5966
        (elf_canonicalize_reloc): Rewrote.
5967
        (elf_link_input_bfd): Permit the relocs to be cached in the
5968
        section data.
5969
 
5970
Sat Jul 16 13:55:38 1994  Stan Shebs  (shebs@andros.cygnus.com)
5971
 
5972
        * config.bfd (m88*-harris-cxux*): Recognize.
5973
        * hosts/harris.h (POSIX_UTIME, HAVE_PROCFS): Define.
5974
 
5975
        * configure.host (m68*-atari-sysv4*): New host.
5976
        (m68*-cbm-sysv4*): Use m68kv4 instead of amix.
5977
        * hosts/amix.h: Remove.
5978
        * hosts/m68kv4.h: New file, was amix.h.
5979
 
5980
Thu Jul 14 15:12:24 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
5981
 
5982
        * reloc.c (enum bfd_reloc_code_real, bfd_type, struct
5983
        reloc_howto_struct, reloc_howto_type, HOWTO, HOWTO2): Copied
5984
        changes over from bfd-in2.h so they get generated properly next
5985
        time someone runs "make headers".
5986
        * bfd-in2.h: Rebuilt.
5987
 
5988
        * targets.c (netbsd532_vec, pc532mach_vec): Declare const.
5989
        (m88kmach3_vec): Restore deleted declaration.
5990
 
5991
        * configure.in: Alphabetize target vector names.
5992
 
5993
        * config/pc532mach.mh: New file.
5994
        (HDEPFILES, HDEFINES): Define here.
5995
        * config/pc532-mach.mt (HDEPFILES, HDEFINES): Deleted.
5996
        * config/ns32k-netbsd.mt (HDEPFILES, HDEFINES): Deleted.
5997
 
5998
        Sun Jul 10 00:04:20 1994  Ian Dall  (dall@hfrd.dsto.gov.au)
5999
 
6000
        * pc532-mach.c: New File. pc532-mach a.out format.
6001
 
6002
        * netbsd532.c: New file. pc532-netbsd532 a.out format.
6003
 
6004
        * hosts/pc532mach.h: New file. pc532-mach host support.
6005
 
6006
        * cpu-ns32k.c: New file. ns32k support cpu specific code rather
6007
        than format specific code.
6008
 
6009
        * config/pc532-mach.mt: New file. Support for pc532-mach target.
6010
 
6011
        * config/ns32k-netbsd.mt: New file. Support for netbsd532 target.
6012
 
6013
        * aout-ns32k.c, aout-ns32k.h: New files supporting aout format for
6014
        ns32k series.
6015
 
6016
        * targets.c: Add netbsd532_vec and pc532machaout_vec into
6017
        bfd_target_vector array. Move netbsd386_vec to alphabetic order
6018
        location.
6019
 
6020
        * reloc.c (_bfd_final_link_relocate) Add support for
6021
        special_function1 in howto.
6022
 
6023
        * libaout.h: add M_NS32032, M_NS32532, M_532_NETBSD entries in
6024
        machine_type enum.
6025
 
6026
        * configure.in: add pc532mach_vec and netbsd532_vec entries.
6027
 
6028
        * config.bfd: add pc532mach host entries. Use for both
6029
        ns32k-pc532-mach and ns32k-pc532-netbsd.
6030
 
6031
        * config.bfd: it doesn't work to use i386-mach3 for ns32k*-*-mach.
6032
        add ns32k-pc532-mach* and ns32k-*-netbsd* entries.
6033
 
6034
        * bfd-in2.h: Add ns32k specific relocations to bfd_reloc_code_real
6035
        enum.
6036
 
6037
        * bfd-in2.h: Add special_function1 to struct howto. Change HOWTO
6038
        and NEWHOWTO macros to make special_function1 NULL. Neww HOWTO2
6039
        macro.
6040
 
6041
        * bfd-in2.h: Split definition of struct reloc_howto_struct
6042
        and corresponding typedef into two statements.
6043
 
6044
        * bfd-in2.h: Add entry bfd_arch_ns32k to bfd_architecture enum.
6045
 
6046
        * archures.c: Add bfd_ns32k_arch prototype, and entry in
6047
        archures_init_table.
6048
 
6049
        * aoutx.h (aout_link_reloc_link_order): Allow for target dependent
6050
        MY_put_reloc macro. Allow for target dependent special_function1
6051
        to apply the relocation.
6052
 
6053
        * aoutx.h (aout_link_input_section_std): Allow for target
6054
        dependent determination of reloc howto. Allow for target dependent
6055
        special_function1 to apply the relocation.
6056
 
6057
        * aoutx.h (get_reloc_upper_bound): Detect bss and return 0.
6058
 
6059
        * aoutx.h (slurp_reloc_table): Detect bss and succesfully read
6060
        zero reloc entries.
6061
 
6062
        * aoutx.h (machine_type): Add bfd_arch_ns32k case.
6063
 
6064
        * aoutx.h: Stat to determine executable status if STAT_FOR_EXEC
6065
        is defined (not just MACH). Use fstat instead of stat and check
6066
        for fstat error.
6067
 
6068
        * aoutx.h: Allow target dependent swap_std_reloc_{in,out}.
6069
 
6070
        * aoutx.h: Allow CTORS reloc info to be in target dependent reloc
6071
        table.
6072
 
6073
        * aout-target.h: Apply SWAP_MAGIC (if defined) after
6074
        swap_exec_header_in, otherwise we have magic in the wrong order.
6075
 
6076
Thu Jul 14 11:47:27 1994  Stan Shebs  (shebs@andros.cygnus.com)
6077
 
6078
        * coff-sparc.c (sparccoff_vec): Have leading underscores.
6079
 
6080
Tue Jul 12 12:08:10 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6081
 
6082
        * aix386-core.c, aoutf1.h, cisco-core.c, elfcode.h, hppabsd-core.c,
6083
        hpux-core.c, irix-core.c, lynx-core.c, osf-core.c, ptrace-core.c,
6084
        rs6000-core.c, trad-core.c:  Remove SEC_ALLOC flag from .reg
6085
        sections, .reg sections are not allocated and contain debug
6086
        information only.
6087
        * osf-core.c (make_bfd_asection, osf_core_core_file_p):  Use
6088
        bfd_make_section_anyway instead of building unique section names.
6089
 
6090
Tue Jul 12 11:41:22 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6091
 
6092
        * libelf.h (bfd_elf32_swap_symbol_in): Declare.
6093
        (bfd_elf32_swap_symbol_out): Declare.
6094
        (bfd_elf64_swap_symbol_in, bfd_elf64_swap_symbol_out): Declare.
6095
        * elf32-hppa.c (elf32_hppa_args_hash_table_init): Correct cast.
6096
 
6097
        * aout-encap.c (ARCH): Don't define.  Obsolete.
6098
        * aout0.c, aoutx.h, gen-aout.c, hp300bsd.c, hp300hpux.c: Likewise.
6099
        * i386aout.c, i386bsd.c, i386dynix.c, i386linux.c: Likewise.
6100
        * i386lynx.c, m68klynx.c, mipsbsd.c, netbsd386.c: Likewise.
6101
        * newsos3.c, sparclynx.c, sunos.c: Likewise.
6102
 
6103
Mon Jul 11 20:08:23 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6104
 
6105
        * section.c (STD_SECTION): Make the sixth argument boolean, not
6106
        the seventh.  From gary@tuva.pacsemi.oz.au (gary kopff).
6107
 
6108
Sun Jul 10 09:12:02 1994  D. V. Henkel-Wallace  (gumby@cygnus.com)
6109
 
6110
        * aoutx.h (bfd_free_cached_info): Change name of FREE to BFCI_FREE
6111
        in order not to collide with LynxOS's definition of FREE in
6112
        /usr/include/sys/proc.h
6113
 
6114
Thu Jul  7 14:18:06 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6115
 
6116
        * reloc.c (bfd_perform_relocation): Don't clobber the relocation
6117
        value for coff-Intel-little or coff-Intel-big.  Hack upon hack.
6118
 
6119
Thu Jul  7 10:10:34 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6120
 
6121
        * aoutx.h (howto_table_std):  Add entry for GOT relocations
6122
        which are present in sun3 shared libraries, to avoid assertions
6123
        when reading the dynamic relocations.
6124
 
6125
Thu Jul  7 10:19:20 1994  Jeff Law  (law@snake.cs.utah.edu)
6126
 
6127
        * som.h (R_HPPA_COMPLEX): Fix dumb typo.
6128
 
6129
Wed Jul  6 19:21:57 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6130
 
6131
        * hosts/sysv4.h (qsort, strtol): Don't declare.
6132
 
6133
        * elfcode.h (elf_link_output_sym): Don't call output_symbol_hook
6134
        if it is NULL.
6135
 
6136
        * elf32-mips.c (mips_elf_final_write_processing): Add ignored info
6137
        argument to correspond to recent libelf.h change.
6138
 
6139
Wed Jul  6 00:48:57 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6140
 
6141
        * coff-alpha.c (alpha_ecoff_mkobject_hook):  New hook to
6142
        additionally copy object type information from the alpha file
6143
        header to the BFD flags.
6144
        (alpha_ecoff_backend_data):  Use it.
6145
        (ecoffalpha_little_vec):  Add DYNAMIC to object_flags.
6146
        * aout64.c:  Fix typo in conditional QMAGIC definition.
6147
 
6148
Wed Jul  6 00:13:17 1994  Jeff Law  (law@snake.cs.utah.edu)
6149
 
6150
        * hppabsd-core.c (hppabsd_core_core_file_p): Sanity check the
6151
        value of clicksz to help weed out non HPPA BSD core files.
6152
 
6153
Tue Jul  5 13:26:02 1994  Stan Shebs  (shebs@andros.cygnus.com)
6154
 
6155
        Mach 3 support.
6156
        * config.bfd (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*):
6157
        New targets.
6158
        * configure.host (i[34]86-*-mach3*, ns32k-*-mach3*): Recognize
6159
        "mach3" instead of "mach".
6160
        (m88*-*-mach3*, mips*-dec-mach3*, mips*-*-mach3*): New hosts.
6161
        * targets.c (m88kmach3_vec): New target vector.
6162
        (bfd_target_vector): Add i386mach3_vec and m88kmach3_vec, but
6163
        inside #if 0.
6164
        * aoutx.h (some_aout_object_p) [MACH]: Recognize executables by
6165
        checking for execute permission, instead of looking at entry
6166
        point.
6167
        * i386mach3.c: Update, define MACH, N_TXTOFF, N_TXTADDR,
6168
        N_SHARED_LIB, don't include aout/*.h files, etc.
6169
        * m88kmach3.c: New file, m88k Mach 3 target.
6170
        * config/m88k-mach3.mt, config/mips-mach3.mt: New files, target
6171
        makefile fragments.
6172
        * config/i386mach3.mh, config/m88kmach3.mh, config/mipsmach3.mh:
6173
        New files, host makefile fragments.
6174
        * hosts/m88kmach3.h, hosts/mipsmach3.h: New files, host definitions.
6175
 
6176
Tue Jul  5 13:56:52 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6177
 
6178
        * elfcode.h (swap_out_syms): Get alignment of common symbol from
6179
        st_value field of saved ELF symbol information, if there is any.
6180
 
6181
Mon Jul  4 19:13:32 1994  Jeff Law  (law@snake.cs.utah.edu)
6182
 
6183
        * som.h (R_HPPA_COMPLEX): Define.
6184
        * elf32-hppa.h (R_HPPA_COMPLEX): Define.
6185
        (elf32_hppa_reloc_type): Delete R_PARISC_STUB_CALL_17.
6186
 
6187
Fri Jul  1 12:07:41 1994  Jeff Law  (law@snake.cs.utah.edu)
6188
 
6189
        * Support code for enabling the new style linker for PA ELF.
6190
        * elfcode.h (swap_symbol_in, swap_symbol_out): Externalize.
6191
        (elf_compute_section_file_positions): Pass link_info to
6192
        the begin_write_processing hook.
6193
        (bfd_elf_write_object_contents): Pass NULL for new link_info
6194
        argument to final_write_processing hook.
6195
        (elf_link_output_sym): Accept new "input_section" argument for
6196
        the symbols's input section.  All callers changed.  Call the
6197
        link_output_symbol_hook if it's defined.
6198
        (elf_bfd_final_link): Call the final_write_processing hook if
6199
        it's defined.
6200
        * libelf.h (elf_backend_link_output_symbol_hook): Declare.
6201
        (elf_backend_begin_write_processing): Add new "info" argument.
6202
        (elf_backend_final_write_processing): Likewise.
6203
        * elf32-target.h (elf_backend_link_output_symbol_hook): Provide
6204
        a default definition.
6205
        (elf32_bed): Add elf_backend_link_output_symbol_hook.
6206
        * elf64-target.h: Likewise.
6207
 
6208
        * Major rework of the PA ELF code.  Uses the new style BFD
6209
        linker, major cleanups.
6210
        * hppa_stubs.h: Rewrite from scratch.  Much smaller and simpler.
6211
        * elf32-hppa.h: Delete all symbol extension related code.
6212
        (hppa_look_for_stubs_in_section): Delete decl.
6213
        (elf32_hppa_size_stubs, elf32_hppa_build_stubs): New decls.
6214
        * elf32-hppa.c: Symbol extension stuff moved form elf32-hppa.h
6215
        into elf32-hppa.c.  Do not include aout64.h.
6216
        (typdef hppa_stub_type): Delete.
6217
        (elf32_hppa_stub_name_list_struct): Delete.
6218
        (elf32_hppa_stub_description_struct): Delete.
6219
        (arg_reloc_type): Use simpler enumerations.  All references changed.
6220
        (arg_location, arg_reloc_relocation): Likewise.
6221
        (elf32_hppa_symextn_map_struct): Delete.
6222
        (get_symbol_value): Delete.
6223
        (elf32_hppa_get_sym_extn): Delete.
6224
        (find_stubs, new_stubs, type_of_mismatch): Delete.
6225
        (find_stub_by_name, add_stub_by_name): Delete.
6226
        (hppa_elf_stub_finish, hppa_elf_stub_reloc): Delete.
6227
        (hppa_elf_arg_reloc_needed): Renamed.  Simplify.
6228
        (hppa_elf_build_linker_stub, hppa_elf_create_stub_sec): Delete.
6229
        (hppa_elf_long_branch_needed_p): Delete.
6230
        (hppa_look_for_stubs_in_section): Delete.
6231
        (hppa_elf_get_section_contents): Delete.
6232
        (elf32_hppa_backend_symbol_processing): Delete.
6233
        (elf32_hppa_backend_section_processing): Delete.
6234
        (elf32_hppa_backend_section_from_shdr): Delete.
6235
        (elf32_hppa_backend_fake_sections): Delete.
6236
        (elf32_hppa_backend_section_from_bfd_section): Delete.
6237
        (NEW_INSTRUCTION): Delete.
6238
        (CURRENT_STUB_OFFSET): Delete.
6239
        (elf32_hppa_relocate_section): New function.
6240
        (elf32_hppa_bfd_final_link_relocate): New function.
6241
        (elf32_hppa_size_symext): New function.
6242
        (elf32_hppa_link_output_symbol_hook): New function.
6243
        (elf32_hppa_read_symext_info): New function.
6244
        (elf32_hppa_add_symbol_hook): New function.
6245
        (elf32_hppa_name_of_stub): New function.
6246
        (elf32_hppa_size_of_stub): New function.
6247
        (elf32_hppa_build_one_sub): New function.
6248
        (elf32_hppa_build_stubs): New function.
6249
        (elf32_hppa_size_stubs): New function.
6250
        (linker, stub and argument hash tables): Add appropriate
6251
        structures, definitions and functions to implement all three
6252
        hash tables.
6253
        (hppa_elf_relocate_insn): Don't need argument location information
6254
        in this function.
6255
        (add_entry_to_symext_chain): Accept a symbol's argument location
6256
        information rather than the symbol itself.  All callers changed.
6257
        (hppa_elf_gen_reloc_type): Simplify.
6258
        (hppa_elf_set_section_contents): Stub section is no longer special.
6259
        (hppa_elf_reloc): Greatly simplify.
6260
        (elf32_hppa_begin_write_processing): Accept link_info argument.
6261
        Handle being called from the BFD backend linker.
6262
        (elf32_hppa_final_write_processing): Likewise.
6263
        (elf_hppa_tc_make_sections): No longer call stub_finish.
6264
 
6265
Mon Jun 27 18:07:06 1994  Steve Chamberlain  (sac@cirdan.cygnus.com)
6266
 
6267
        * section.c (bfd_get_section_contents): Put in parens to get
6268
        precedence right.
6269
 
6270
Sun Jun 26 18:08:29 1994  Jeff Law  (law@snake.cs.utah.edu)
6271
 
6272
        * libelf.h (relocate_section): New argument "output_names" added
6273
        to prototype.
6274
        * elfcode.h (elf_link_input_bfd): New argument "output_names"
6275
        added to prototype of relocate_section.  Pass the output symbol
6276
        names to relocate_section.
6277
        * elf32-i386.c (elf_i386_relocate_section): Use "output_names" to
6278
        determine the name of a local symbol.
6279
        * elf32-mips.c (mips_elf_relocate_section): Likewise.
6280
        * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6281
 
6282
Fri Jun 24 08:15:42 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
6283
 
6284
        Add Solaris BCP (the part of Solaris which allows it to run
6285
        SunOS4 a.out files) core file handling.
6286
        * aoutf1.h (external_solaris_bcp_core, swapcore_solaris_bcp):
6287
        New structure and its swap in function.
6288
        (internal_sunos_core):  New member c_data_addr, to receive the
6289
        start address of the data section in the core file.
6290
        (swapcore_sun3, swapcore_sparc, sunos4_core_file_p):  Use it.
6291
        (sunos4_core_file_p):  Recognize Solaris BCP core file.
6292
        (sunos4_core_file_matches_executable_p):  Always indicate match
6293
        for Solaris BCP core files.
6294
 
6295
Thu Jun 23 15:31:28 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6296
 
6297
        Preliminary support for generating shared libraries, from Eric
6298
        Youngdale .
6299
        * elfcode.h (prep_headers): If DYNAMIC, set e_type to ET_DYN.
6300
        (elf_link_add_object_symbols): If generating a shared library,
6301
        create dynamic sections for first input BFD with the right format.
6302
        (elf_link_create_dynamic_sections): Don't create .interp section
6303
        if creating a shared library.
6304
        (elf_link_input_bfd): Skip dynamic sections in input file.
6305
        (elf_bfd_final_link): If creating a shared library, it's OK for
6306
        dynobj to have sections which are not SEC_IN_MEMORY.
6307
        * elf32-i386.c (elf_i386_size_dynamic_sections): Only set .interp
6308
        section if not creating a shared library.
6309
        * elf32-sparc.c (elf_sparc_size_dynamic_sections): Likewise.
6310
 
6311
        * elfcode.h (elf_object_p): Don't set DYNAMIC just because there
6312
        is an SHT_DYNAMIC section.
6313
 
6314
        * cf-i386lynx.c (i386coff_vec): Don't include DYNAMIC in
6315
        object_flags.
6316
        * coff-sparc.c (sparccoff_vec): Likewise.
6317
        * hppabsd-core.c (hppabsd_core_vec): Likewise.
6318
 
6319
        * aoutx.h (NAME(aout,some_aout_object_p)): Don't set SEC_RELOC
6320
        just because DYNAMIC is set.
6321
 
6322
Thu Jun 23 12:53:41 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
6323
 
6324
        * configure.in: Change --with-targets to --enable-targets and
6325
        --with-64-bit-bfd to --enable-64-bit-bfd.
6326
        * Makefile.in, mpw-make.in, targets.c: Change comments.
6327
 
6328
Wed Jun 22 17:59:59 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6329
 
6330
        * config.bfd (powerpc-*-elf*): New target, just like
6331
        powerpc-*-sysv4*.
6332
 
6333
        * linker.c (FAIL): Undefine macro before defining as enum.
6334
 
6335
Wed Jun 22 10:52:47 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6336
 
6337
        * linker.c (_bfd_generic_link_add_archive_symbols): Initialize
6338
        pass from abfd->archive_pass, and save it there as well.
6339
 
6340
        * hash.c (bfd_hash_allocate): Don't call bfd_set_error if
6341
        obstack_alloc returns NULL unless the size is non-zero.
6342
 
6343
        * linker.c (archive_hash_allocate): Define.
6344
        (_bfd_generic_link_add_archive_symbols): Use archive_hash_allocate
6345
        rather than obstack_alloc, for clarity.
6346
 
6347
        * elfcode.h (elf_get_reloc_upper_bound): Correct.
6348
 
6349
        * aout64.c (BMAGIC, QMAGIC): Define if not already defined.  From
6350
        Peter Schauer .
6351
 
6352
        Linux ZMAGIC support from Eric Youngdale .
6353
        * libaout.h (struct aoutdata): Add field zmagic_disk_block_size.
6354
        * aout-target.h (MY(callback)): Only set alignment according to
6355
        architecture if the section sizes are aligned to that alignment,
6356
        for backward compatibility.
6357
        (MY(set_sizes)): Initialize zmagic_disk_block_size field.
6358
        * aoutx.h (adjust_z_magic): Set ztih if using q_magic_format.  Set
6359
        text section filepos to zmagic_disk_block_size if not ztih.  Use a
6360
        different padding algorithm if not ztih.
6361
        * i386linux.c (MY_text_includes_header): Don't define.
6362
 
6363
        * aoutx.h (aout_link_check_ar_symbols): Just skip N_STAB and N_FN
6364
        symbols; don't look them up in the hash table.  From
6365
        ralphc@pyramid.com (Ralph Campbell).
6366
 
6367
Tue Jun 21 11:47:20 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6368
 
6369
        * coff-go32.c (go32coff_archive_p): Remove unused function.
6370
 
6371
        * section.c (bfd_abs_section): Make const.
6372
        (bfd_abs_section_ptr, bfd_is_abs_section): Define.
6373
        (bfd_und_section): Make const.
6374
        (bfd_und_section_ptr, bfd_is_und_section): Define.
6375
        (bfd_com_section): Make const.
6376
        (bfd_com_section_ptr): Define.
6377
        (bfd_ind_section): Make const.
6378
        (bfd_ind_section_ptr, bfd_is_ind_section): Define.
6379
        (bfd_abs_symbol, bfd_com_symbol): Make const.
6380
        (bfd_und_symbol, bfd_ind_symbol): Likewise.
6381
        (global_syms): Cast initialization of section field.
6382
        (STD_SECTION): Define as const, and cast initializations.
6383
        * bfd-in2.h: Rebuilt.
6384
        * Many files: Change uses of bfd_abs_section, etc., to use
6385
        bfd_abs_section_ptr or bfd_is_abs_section, etc.
6386
 
6387
Mon Jun 20 11:06:27 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
6388
 
6389
        * Many files: change all bfd_target vectors to be const.  Change
6390
        all uses of bfd_target * to be const bfd_target *.  Change
6391
        bfd_target_vector and bfd_default_vector arrays to be const
6392
        bfd_target * const *.
6393
 
6394
        * ecoff.c, libecoff.h, ecoffswap.h, coff-alpha.c, coff-mips.c,
6395
        elf32-mips.c: Renamed all externally visible ECOFF routines which
6396
        are local to BFD to start with _bfd_ecoff instead of just ecoff.
6397
 
6398
        * ecoff.c (ecoff_swap_tir_in): Change input argument to const.
6399
        (ecoff_swap_tir_out): Likewise.
6400
        (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Likewise.
6401
        (ecoff_slurp_symbolic_info): Add new arguments to correspond to
6402
        read_debug_info entry point in ecoff_debug_swap structure.
6403
        Change all calls.
6404
        * libecoff.h (ecoff_slurp_symbolic_info): Change declaration.
6405
        * ecoffswap.h (ecoff_swap_tir_in, ecoff_swap_tir_out): Declare.
6406
        (ecoff_swap_rndx_in, ecoff_swap_rndx_out): Declare.
6407
        * coff-alpha.c (alpha_ecoff_backend_data): Initialize new
6408
        ecoff_debug_swap fields.
6409
        * coff-mips.c (mips_ecoff_backend_data): Likewise.
6410
        * elf32-mips.c (mips_elf_read_ecoff_info): Undefine READ.
6411
        (mips_elf_ecoff_debug_swap): Initialize new ecoff_debug_swap
6412
        fields.
6413
        * configure.in (bfd_elf32_bigmips_vec): Use ecoff.o and
6414
        ecofflink.o.
6415
        (bfd_elf32_littlemips_vec): Likewise.
6416
        (ecoff_big_vec, ecoff_little_vec): Likewise.
6417
        (ecoffalpha_little_vec): Likewise.
6418
        * Makefile.in (BFD_LIBS): Remove ecoff.o and ecofflink.o.
6419
        (BFD32_BACKENDS): Add ecoff.o and ecofflink.o.
6420
 
6421
        * aoutx.h (NAME(aout,final_link)): Check flavour of sub, not abfd,
6422
        when computing reloc sizes.  From Eric Youngdale
6423
        .
6424
        * elfcode.h (elf_bfd_final_link): Don't try to compute maximum
6425
        reloc count or size for a non-ELF file.
6426
 
6427
        * mipsbsd.c (MY_final_link_callback): Define to avoid warning.
6428
 
6429
        * hp300hpux.c (MY_final_link_callback): Define to avoid warning.
6430
        (BMAGIC, QMAGIC): Define; used by aoutx.h.
6431
        (MY(slurp_symbol_table)): Change translate_from_native_sym_flags
6432
        calls to use new parameters.
6433
 
6434
Fri Jun 17 14:45:32 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6435
 
6436
        * aout-target.h (MY(callback)): Set the alignments of the text,
6437
        data and bss sections after determining the architecture.
6438
 
6439
        * sunos.c (sunos_add_one_symbol): Treat a common symbol from a
6440
        dynamic object as being in the .bss section of the object, rather
6441
        than as being undefined.
6442
 
6443
Fri Jun 17 11:16:50 1994  Jeff Law  (law@snake.cs.utah.edu)
6444
 
6445
        * libhppa.h (bfd_hppa_insn2fmt, hppa_rebuild_insn): Make INLINE.
6446
 
6447
        * elf32-hppa.h (elf_hppa_final_processing): Delete decl.
6448
 
6449
Thu Jun 16 23:36:23 1994  Jeff Law  (law@snake.cs.utah.edu)
6450
 
6451
        * elfcode.h (elf_link_input_bfd): Don't try to read local symbols
6452
        if there aren't any in the input file.
6453
 
6454
Thu Jun 16 14:25:22 1994  Eric Youngdale  (ericy@cais.cais.com)
6455
 
6456
        * i386linux.c: Many new functions and definitions for linker
6457
        support for Linux shared libraries.
6458
        * bfd-in.h (bfd_linux_size_dynamic_sections): Declare.
6459
        * bfd-in2.h: Rebuild.
6460
 
6461
Thu Jun 16 14:23:46 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6462
 
6463
        * config.bfd: If second argument is ``_'', then, instead of
6464
        echoing config file name, echo whether target uses leading
6465
        underscores on symbol names.  Add appropriate settings to
6466
        different cases.  Used by binutils/configure.in to set default for
6467
        c++filt.
6468
 
6469
        * elfcode.h (elf_bfd_final_link): If trying to generate a shared
6470
        object, warn and return false.
6471
 
6472
        * aoutx.h (NAME(aout,some_aout_object_p)): Accept BMAGIC objects
6473
        and treat them as OMAGIC.
6474
 
6475
Wed Jun 15 18:02:21 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6476
 
6477
        Enable sparc v9 support for release.  Note that this is still a
6478
        work in progress, pending release of an ABI specification.
6479
        * config.bfd, configure.in: Include sparc v9 elf config.
6480
        * elfcode.h (prep_headers): Handle sparc v9 (64 bit).
6481
        * reloc.c (bfd_reloc_code_real): New reloc types.
6482
        * elf64-sparc.c: Implement elf64-sparc target.
6483
        * Makefile.in, targets.c: Updated.
6484
 
6485
Wed Jun 15 01:34:07 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6486
 
6487
        * libelf.h (struct elf_obj_tdata): New field dt_needed_name.
6488
        (elf_dt_needed_name): New accessor macro.
6489
        * elfcode.h (elf_link_add_object_symbols): If elf_dt_needed_name
6490
        is set, use that instead of the filename for the DT_NEEDED dynamic
6491
        entry.
6492
        * elf.c (bfd_elf_set_dt_needed_name): New function.
6493
        * bfd-in.h (bfd_elf_set_dt_needed_name): Declare.
6494
        * bfd-in2.h: Rebuilt.
6495
 
6496
        * elfcode.h (NAME(bfd_elf,size_dynamic_sections)): Add sinterpptr
6497
        argument, and set it to the .interp section.
6498
        * bfd-in.h (bfd_elf32_size_dynamic_sections): Update prototype.
6499
        (bfd_elf64_size_dynamic_sections): Likewise.
6500
        * bfd-in2.h: Rebuilt.
6501
 
6502
        * coff-sparc.c (SWAP_OUT_RELOC_EXTRA): Define to clear the r_spare
6503
        field of the reloc rather than letting it be garbage.
6504
 
6505
        * archive.c (bfd_slurp_armap): Recognize __.SYMDEF/ as well as
6506
        __.SYMDEF; the former was used in old Linux archives.  From
6507
        jrs@world.std.com (Rick Sladkey).
6508
 
6509
        * i386linux.c (i386linux_write_object_contents): Define; like
6510
        MY(write_object_contents) in aout-target.h, but set MACHTYPE to
6511
        M_386.  From jrs@world.std.com (Rick Sladkey).
6512
        (MY_write_object_contents): Define.
6513
 
6514
        * aoutx.h (translate_from_native_sym_flags): Treat N_SETV symbols
6515
        as N_DATA symbols.
6516
        (aout_link_add_symbols): Likewise.
6517
 
6518
        * aoutx.h: Rewrite symbol duplicate elimination to use BFD hash
6519
        tables.
6520
        (struct stringtab_entry, struct stringtab_data): Remove.
6521
        (HASHMAXLEN, HASH_CHAR, hash, compare, log2, emit_strtab): Remove.
6522
        (struct strtab_hash_entry, struct strtab_hash): Define.
6523
        (strtab_hash_newfunc, strtab_hash_lookup): Define.
6524
        (stringtab_free, emit_stringtab): Define.
6525
        (stringtab_init, add_to_stringtab): Rewrite.
6526
        (NAME(aout,write_syms)): Use new stringtab code.
6527
        (struct aout_final_link_info, NAME(aout,final_link)): Likewise.
6528
        (aout_link_write_symbols, aout_link_write_other_symbol): Likewise.
6529
 
6530
        * bfd-in.h (BFD_TRADITIONAL_FORMAT): Define new BFD flag to
6531
        request BFD to write object in the traditional format, whatever
6532
        that means for the particular backend.
6533
        * bfd-in2.h: Rebuilt.
6534
 
6535
        * hash.c (bfd_hash_allocate): If obstack_alloc fails, set
6536
        bfd_error_no_memory.
6537
 
6538
Tue Jun 14 13:00:04 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6539
 
6540
        * libaout.h (struct aoutdata): Add q_magic_format to subformat
6541
        enum.
6542
        * aout-target.h (MY_bfd_copy_private_bfd_data): Define as function
6543
        if not already defined.  Copy subformat information.
6544
        (MY_text_includes_header): Define as 0 if not already defined.
6545
        (MY(backend_data)): Use MY_text_includes_header rather than 0.
6546
        (MY_final_link_callback): Rename from final_link_callback, and
6547
        define only if MY_final_link_callback is not already defined.
6548
        (MY_bfd_final_link): Rename use of final_link_callback to
6549
        MY_final_link_callback.
6550
        * aoutx.h (NAME(aout,some_aout_object_p)): Handle QMAGIC like
6551
        ZMAGIC, but set the subformat to q_magic_format.  Abort if the
6552
        magic number if not recognized.
6553
        (adjust_z_magic): Use QMAGIC if q_magic_format.
6554
        * i386linux.c (MY_text_includes_header): Define as 1.
6555
        (i386linux_bfd_final_link): New static function.
6556
        (MY_bfd_final_link): Define as i386linux_bfd_final_link.
6557
 
6558
        * aoutx.h (translate_to_native_sym_flags): Check both section and
6559
        output_section against sections of abfd.
6560
 
6561
        * libecoff.h (struct ecoff_link_hash_entry): Change type of
6562
        written from boolean to char.  Add new field small.
6563
        * ecoff.c (ecoff_link_hash_newfunc): Initialize written to 0
6564
        rather than false.  Initialize small to 0.
6565
        (ecoff_link_add_externals): If ECOFF type is scSUndefined, set
6566
        small.  If small is set, and hash table type is common, force the
6567
        symbol into a section named SCOMMON and change the ECOFF type from
6568
        scCommon to scSCommon.
6569
        (ecoff_link_write_external): Set written to 1 rather than true.
6570
        * coff-mips.c (mips_relocate_section): Correct JMPADDR reloc
6571
        overflow check to consider section VMA of input file.
6572
 
6573
Mon Jun 13 14:20:07 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6574
 
6575
        * aoutf1.h (aout_32_sunos4_write_object_contents): Handle a
6576
        machine type of 68000.
6577
        * aoutx.h (NAME(aout,machine_type)): Add new argument unknown.
6578
        Set *unknown to true if machine type is really unknown, as opposed
6579
        to M_UNKNOWN for the 68000.
6580
        (NAME(aout,set_arch_mach)): Change NAME(aout,machine_type) call
6581
        accordingly.
6582
        * libaout.h (NAME(aout,machine_type)): Add new argument to
6583
        prototype.
6584
 
6585
Sun Jun 12 20:21:03 1994  Jeff Law  (law@snake.cs.utah.edu)
6586
 
6587
        * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_ID
6588
        or HIUX_AUX_ID.
6589
        (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID.
6590
        (som_write_armap): Use CPU_PA_RISC1_0 as the magic number.  Note
6591
        som.c is careful to always define CPU_PA_RISC1_0.
6592
 
6593
Sat Jun 11 16:32:30 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6594
 
6595
        Add weak symbols as an extension to a.out.
6596
        * aoutx.h (sym_in_text_section): Don't define.
6597
        (sym_in_data_section, sym_in_bss_section): Likewise.
6598
        (sym_is_undefined, sym_is_global_defn): Likewise.
6599
        (sym_is_debugger_info, sym_is_fortrancommon): Likewise.
6600
        (sym_is_absolute, sym_is_indirect): Likewise.
6601
        (translate_from_native_sym_flags): Rewrite for clarity.  Rearrange
6602
        arguments and change caller.  Handle weak symbols.
6603
        (translate_to_native_sym_flags): Likewise.
6604
        (aout_link_check_ar_symbols): Don't ignore weak symbols.  Pull
6605
        object in from archive if a weak defintion is found for an
6606
        existing undefined symbol.
6607
        (aout_link_add_symbols): Put all cases in switch.  Set flags of an
6608
        undefined symbol to 0.  Handle weak symbols.
6609
        (aout_link_write_symbols): Handle weak symbols.
6610
        (aout_link_write_other_symbol): Likewise.
6611
        (aout_link_input_section_std): Likewise.
6612
        (aout_link_input_section_ext): Likewise.
6613
        * sunos.c (sunos_write_dynamic_symbol): Likewise.
6614
 
6615
Fri Jun 10 13:25:13 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6616
 
6617
        * aoutx.h (NAME(aout,canonicalize_reloc)): Handle .bss section.
6618
        (NAME(aout,get_reloc_upper_bound)): Likewise.
6619
 
6620
        * coff-i960.c (coff_i960_reloc_type_lookup): Add BFD_RELOC_CTOR.
6621
        * linker.c (_bfd_generic_link_write_global_symbol): Don't assume
6622
        the section of a common symbol is not NULL.
6623
 
6624
Wed Jun  8 23:15:53 1994  Stu Grossman  (grossman@cygnus.com)
6625
 
6626
        * nlmcode.h (nlm_object_p):  Set EXEC_P and start address for GDB.
6627
 
6628
Wed Jun  8 23:57:34 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6629
 
6630
        * aoutx.h (aout_get_external_symbols): Don't try to read the
6631
        strings if there are no symbols.
6632
        (aout_link_write_other_symbol): Use the output section when
6633
        working out the type.
6634
 
6635
Tue Jun  7 13:25:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6636
 
6637
        * elfcode.h (assign_section_numbers): Put shstrtab, symtab and
6638
        strtab sections at end of file.  Avoids bug in some versions of
6639
        SVR4 strip.  From Eric Youngdale .
6640
 
6641
        * coffcode.h (styp_to_sec_flags): If COFF_PAGE_SIZE is defined,
6642
        set SEC_DEBUGGING for STYP_INFO sections.
6643
        (coff_compute_section_file_positions): If COFF_PAGE_SIZE is
6644
        defined, and D_PAGED is set, set the file position equal to the
6645
        section VMA modulo COFF_PAGE_SIZE.
6646
        * coffgen.c (coff_real_object_p): If F_EXEC is set, set D_PAGED.
6647
        * coff-i386.c: Set D_PAGED in BFD target.
6648
        (COFF_PAGE_SIZE): Define.
6649
        * coff-m68k.c, coff-sparc.c: Likewise.
6650
 
6651
Mon Jun  6 10:57:28 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6652
 
6653
        * elfcode.h (bfd_section_from_shdr): Don't turn a reloc section
6654
        into a BFD section just because SHF_ALLOC is set; require that it
6655
        not use the normal symbol table.
6656
        (elf_section_from_bfd_section): Corresponding change.
6657
 
6658
        Better indirect and warning symbol handling inspired by Stuart
6659
        Quick .
6660
        * linker.c (enum link_action): Add REF, MIND, CWARN, REFC.
6661
        (link_action): Change UNDEF_ROW/def and UNDEFW_ROW/def from NOACT
6662
        to REF.  Change UNDEF_ROW/indr and UNDEFW_ROW/indr from CYCLE to
6663
        REFC.  Change DEF_ROW/indr and COMMON_ROW/indr from CYCLE to MDEF.
6664
        Change DEFW_ROW/indr from CYCLE to NOACT.  Change INDR_ROW/indr
6665
        from MDEF to MIND.  Change INDR_ROW/warn from WARNC to CYCLE.
6666
        Change WARN_ROW/def and WARN_ROW/indr from MWARN to CWARN.  Change
6667
        WARN_ROW/com from MWARN to WARN.  Change WARN_ROW/warn from NOACT
6668
        to CYCLE.  Change SET_ROW/warn from WARNC to CYCLE>
6669
        (_bfd_generic_link_add_one_symbol): Handle REF, MIND, CWARN and
6670
        REFC.  If a new indirect symbol has been referenced, push the
6671
        reference down to the symbol it points to.  FIx handling of WARN.
6672
        * aoutx.h (translate_from_native_sym_flags): If N_WARNING, don't
6673
        clobber e_type of next symbol.
6674
        (translate_to_native_sym_flags): Likewise.
6675
        (aout_link_write_symbols): Loop on bfd_link_hash_warning as well
6676
        as bfd_link_hash_indirect.
6677
 
6678
        * libaout.h (struct aout_link_hash_entry): New field written.
6679
        * aoutx.h (NAME(aout,link_hash_newfunc)): Initialize written.
6680
        (aout_link_write_symbols): Use written, not root.written.
6681
        (aout_link_write_other_symbol): Likewise.
6682
        * sunos.c (sunos_scan_dynamic_symbol): Likewise.
6683
        * libecoff.h (struct ecoff_link_hash_entry): New field written.
6684
        * ecoff.c (ecoff_link_hash_newfunc): Initialize written.
6685
        (ecoff_link_write_external): use written, not root.written.
6686
        * genlink.h (struct generic_link_hash_entry): New field written.
6687
        * linker.c (_bfd_link_hash_newfunc): Don't initialize written.
6688
        (generic_link_hash_newfunc): Initialize written.
6689
        (_bfd_generic_link_output_symbols): Use written, not root.written.
6690
        (_bfd_generic_link_write_global_symbol): Likewise.
6691
        (_bfd_generic_reloc_link_order): Likewise.
6692
 
6693
        * libecoff.h (ecoff_data_type): Add linker field.
6694
        * ecoff.c (ecoff_write_object_contents): Check new tdata linker
6695
        field, rather than outsymbols being non-NULL, to decide whether to
6696
        output the symbols and relocs.
6697
        (ecoff_bfd_final_link): Set new tdata linker field to true.
6698
 
6699
        * ecoff.c (ecoff_bfd_copy_private_bfd_data): Don't try to copy
6700
        data to a non-ECOFF file.
6701
 
6702
        * libbfd-in.h: Add warning that libbfd.h is a generated file.
6703
        * libbfd.h: Rebuilt.
6704
 
6705
Sun Jun  5 15:02:30 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6706
 
6707
        Changes to support ELF strip and objcopy on dynamically linked
6708
        files.
6709
        * elfcode.h (elf_fake_sections): Add prototype.
6710
        (bfd_section_from_shdr): Make a BFD section from an SHT_HASH
6711
        section, and from an SHT_DYNSYM section, and from the dynamic
6712
        string table section.
6713
        (elf_object_p): Set D_PAGED if there is a program header.
6714
        (elf_make_sections): Remove.
6715
        (fix_up_strtabs): Remove.
6716
        (elf_fake_sections): Rewrite.  Now sets sh_entsize.
6717
        (assign_section_numbers): Rewrite.  Now sets sh_link and sh_info
6718
        for all sections.
6719
        (elf_compute_section_file_positions):  Don't call obsolete
6720
        functions elf_make_sections or fix_up_strtabs.
6721
        (swap_out_syms): Set sh_addralign to FILE_ALIGN rather than 4.
6722
        (NAME(bfd_elf,write_object_contents)): Permit writing DYNAMIC
6723
        objects.
6724
        (elf_section_from_bfd_section): Treat SHT_DYNSYM like other normal
6725
        sections.  If an SHT_REL or SHT_RELA section is allocated or uses
6726
        an unusual symbol table, permit a BFD section to map to it.
6727
        Permit most SHT_STRTAB sections to have a BFD section mapped to
6728
        them.
6729
        (elf_bfd_final_link): Don't set sh_link, sh_info or sh_entsize
6730
        fields of dynamic sections here; do it in assign_section_numbers.
6731
        * elf32-target.h, elf64-target.h: Add D_PAGED to permitted object
6732
        flags.
6733
 
6734
        * elf.c (_bfd_elf_make_section_from_shdr): Only set SEC_DATA if
6735
        SEC_LOAD is set, rather than checking SEC_ALLOC.
6736
 
6737
        * libbfd-in.h (bfd_realloc): Change last arg to "size_t size".
6738
 
6739
Fri Jun  3 10:58:02 1994  Jeff Law  (law@snake.cs.utah.edu)
6740
 
6741
        * som.c (som_write_object_contents): Don't compute the file header's
6742
        checksum here.
6743
        (som_write_headers): Instead do it here.
6744
 
6745
        * libbfd.h (bfd_realloc): Change last arg to "size_t size".
6746
 
6747
Thu Jun  2 17:39:22 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6748
 
6749
        * hosts/sun3.h: Include .  Don't declare free, exit or
6750
        getenv.
6751
 
6752
        Add linker support for SunOS shared libraries.
6753
        * sunos.c: Include bfdlink.h.  Add many new functions and
6754
        definitions for SunOS shared library support.
6755
        * bfd-in.h (bfd_sunos_record_link_assignment): Declare.
6756
        (bfd_sunos_size_dynamic_sections): Declare.
6757
        * bfd-in2.h: Rebuilt.
6758
        * aoutx.h (struct aout_link_hash_entry): Move to libaout.h.
6759
        (struct aout_link_hash_table): Likewise.
6760
        (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
6761
        (aout_hash_table): Likewise.
6762
        (NAME(aout,link_hash_newfunc)): Rename from aout_link_hash_newfunc
6763
        and make externally visible.
6764
        (NAME(aout,link_hash_table_init)): New function.
6765
        (NAME(aout,link_hash_table_create)): Call
6766
        NAME(aout,link_hash_table_init), not _bfd_link_hash_table_init.
6767
        (aout_link_add_symbols): Don't fail if no symbols.  If it exists,
6768
        call add_dynamic_symbols backend entry point for dynamic objects.
6769
        Use add_one_symbol backend entry point if it exists.
6770
        (NAME(aout,final_link)): Call finish_dynamic_link backend entry
6771
        point, if it exists.
6772
        (aout_link_input_bfd): For a dynamic object, call
6773
        link_dynamic_object backend entry point, if it exists.
6774
        (aout_link_write_other_symbol): Call write_dynamic_symbol backend
6775
        entry point, if it exists.
6776
        (aout_link_input_section): Don't read the relocs if they have
6777
        already been read.
6778
        (aout_link_input_section_std): When doing a final link, for a
6779
        reloc against an external symbol, call check_dynamic_reloc backend
6780
        entry point, if it exists.
6781
        (aout_link_input_section_ext): Likewise.
6782
        * libaout.h: Protect against multiple inclusion.  Include
6783
        bfdlink.h.
6784
        (struct aout_link_hash_entry): Move in from aoutx.h.
6785
        (struct aout_link_hash_table): Likewise.
6786
        (aout_link_hash_lookup, aout_link_hash_traverse): Likewise.
6787
        (aout_hash_table): Likewise.
6788
        (struct aout_backend_data): Add fields add_dynamic_symbols,
6789
        add_one_symbol, link_dynamic_object, write_dynamic_symbol,
6790
        check_dynamic_reloc, and finish_dynamic_link.
6791
        (struct aout_section_data_struct): Define new structure.
6792
        (aout_section_data): Define new accessor macro.
6793
        (NAME(aout,link_hash_newfunc)): Declare.
6794
        (NAME(aout,link_hash_table_init)): Declare.
6795
        * aoutf1.h (sunos4_aout_backend): Initialize new aout_backend_data
6796
        fields.
6797
        * aout-target.h (MY(backend_data)): Likewise.
6798
        * i386aout.c (MY(backend_data)): Likewise.
6799
        * i386mach3.c (MY(backend_data)): Likewise.
6800
        * mipsbsd.c (MY(backend_data)): Likewise.
6801
        * sparclynx.c (sparclynx_aout_backend): Likewise.
6802
 
6803
        * aoutx.h (NAME(aout,slurp_symbol_table)): Don't zero out cached
6804
        until we know it is non-NULL.
6805
        (aout_link_write_symbols): Don't skip a warning symbol even if it
6806
        has already been written out.  If skipping an indirect symbol,
6807
        skip the next symbol as well.
6808
 
6809
Wed Jun  1 14:37:50 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6810
 
6811
        * hosts/sun3.h: Don't declare qsort, malloc or realloc.
6812
 
6813
Thu May 26 13:56:03 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
6814
 
6815
        * nlmcode.h (nlm_swap_auxiliary_headers_in): Cast bfd_byte pointer
6816
        to char pointer to avoid compiler warnings.
6817
 
6818
        * dep-in.sed: Remove spaces before colons.
6819
 
6820
        Merged changes back in from FSF gas release 2.3:
6821
 
6822
        * Makefile.in (stmp-bfd.h): Wrap `if' block around grep
6823
        invocation, to avoid a bug in BSD 4.4 make.
6824
 
6825
        From Ralph Campbell:
6826
        * mipsbsd.c (mips_fix_jmp_addr): If symbol is undefined, return an
6827
        error.
6828
        (mips_fix_hi16_s): Ditto.
6829
 
6830
        Fri May 13 21:21:00 1994  DJ Delorie (dj@ctron.com)
6831
 
6832
        * makefile.dos: define a default target, or archives won't work
6833
          due to multiple matches.
6834
 
6835
        Wed May 11 22:32:00 1994  DJ Delorie (dj@ctron.com)
6836
 
6837
        * configure.bat: update for latest files
6838
        * makefile.dos: update for correct targets and sources
6839
        * coff-go32.c: [new] go32's COFF format (i386coff with underscores)
6840
        * targets.c: add go32coff target
6841
        * makefile.in: add coff-go32.c support
6842
 
6843
Thu May 26 10:10:21 1994  Jeff Law  (law@snake.cs.utah.edu)
6844
 
6845
        * som.c (som_prep_headers): Do not set the system_id here, private
6846
        bfd data has not been copied yet.
6847
        (som_write_headers): Instead do it here.
6848
 
6849
Tue May 24 16:17:18 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6850
 
6851
        Make MIPS ELF use new ELF backend linker.  No shared library
6852
        support yet.
6853
        * elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
6854
        (bfd_mips_elf32_swap_gptab_out): New function.
6855
        (mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
6856
        (mips_elf_final_write_processing): Set sh_info field for .gptab.*
6857
        sections.
6858
        (mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
6859
        (mips_elf_read_ecoff_info): Read and free external symbols last,
6860
        not first, for clarity.
6861
        (struct mips_elf_link_hash_entry): Define new structure.
6862
        (struct mips_elf_link_hash_table): Define new structure.
6863
        (mips_elf_link_hash_lookup): Define new macro.
6864
        (mips_elf_link_hash_traverse): Define new macro.
6865
        (mips_elf_hash_table): Define new macro.
6866
        (mips_elf_link_hash_newfunc): New static function.
6867
        (mips_elf_link_hash_table_create): New static function.
6868
        (mips_elf_add_symbol_hook): New static function.
6869
        (struct extsym_info): Define new structure.
6870
        (mips_elf_get_extr, mips_elf_set_index): Remove.
6871
        (mips_elf_output_extsym): New static function.
6872
        (gptab_compare): New static function.
6873
        (mips_elf_final_link): Rewrite to use ELF backend linker, and to
6874
        merge gptab information in input files.
6875
        (mips_elf_relocate_hi16): New static function.
6876
        (mips_elf_relocate_section): New static function.
6877
        (bfd_elf32_bfd_link_hash_table_create): Define as macro before
6878
        including elf32-target.h.
6879
        (elf_backend_relocate_section): Likewise.
6880
        (elf_backend_add_symbol_hook): Likewise.
6881
        * elf.c (_bfd_elf_link_hash_newfunc): Rename from
6882
        elf_link_hash_newfunc and make globally visible.  Change caller.
6883
        (_bfd_elf_link_hash_table_init): New function, broken out of
6884
        _bfd_elf_link_hash_table_create.
6885
        (_bfd_elf_link_hash_table_create): Use
6886
        _bfd_elf_link_hash_table_init.
6887
        * libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
6888
        (elf_bad_symtab): Define new accessor macro.
6889
        (_bfd_elf_link_hash_newfunc): Declare.
6890
        (_bfd_elf_link_hash_table_init): Declare.
6891
        * elfcode.h (elf_object_p): Call backend object_p hook after
6892
        swapping in all the section headers.
6893
        (map_program_segments): Correct typo: Internal for External.
6894
        (elf_link_add_object_symbols): If elf_bad_symtab is set, read all
6895
        the symbols.  Skip STB_LOCAL symbols rather than giving an error.
6896
        (elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
6897
        all symbols, not just locals.
6898
        (elf_link_output_extsym): Only skip a symbol not mentioned by a
6899
        regular file if it is mentioned by a dynamic object.
6900
        (elf_link_input_bfd): If elf_bad_symtab is set, read all the
6901
        symbols.
6902
 
6903
Fri May 20 13:38:23 1994  Jeff Law  (law@snake.cs.utah.edu)
6904
 
6905
        * som.c (som_set_reloc_info): Do not set any relocation info
6906
        for SOM fixups which are never passed to BFD.
6907
 
6908
Fri May 20 11:57:05 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6909
 
6910
        * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
6911
        checking.
6912
 
6913
        * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
6914
        the dynamic linking information for the benefit of the debugger.
6915
        From Peter Schauer.
6916
        * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6917
 
6918
        * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
6919
        code repeated three times in bfd_section_from_shdr in elfcode.h.
6920
        * libelf.h (_bfd_elf_make_section_from_shdr): Declare.
6921
        * elfcode.h (bfd_section_from_shdr): Use new function
6922
        _bfd_elf_make_section_from_shdr to create BFD sections.  If a
6923
        reloc section does not use the main symbol table, or it is part of
6924
        the process image, treat it as a normal section, not relocs.
6925
        * elf32-mips.c (mips_elf_section_from_shdr): Use new function
6926
        _bfd_elf_make_section_from_shdr.
6927
 
6928
Thu May 19 11:37:11 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
6929
 
6930
        * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
6931
        15 to 14 to match SVR4 ar.
6932
 
6933
        Add support for ELF shared libraries.  Loosely based on work by
6934
        Eric Youngdale .
6935
        * libelf.h (struct elf_backend_data): Add new fields for dynamic
6936
        linking: elf_backend_create_dynamic_sections,
6937
        elf_backend_adjust_dynamic_symbol,
6938
        elf_backend_size_dynamic_sections,
6939
        elf_backend_finish_dynamic_symbol,
6940
        elf_backend_finish_dynamic_sections.
6941
        (struct elf_link_hash_entry): Change type of align field to
6942
        bfd_size_type.  Add fields dynindx, dynstr_index, weakdef,
6943
        elf_link_hash_flags.
6944
        (struct elf_link_hash_table): Add fields dynobj, dynsymcount,
6945
        dynstr, bucketcount.
6946
        (bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
6947
        (bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
6948
        (bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
6949
        (bfd_elf32_add_dynamic_entry): Declare.
6950
        (bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
6951
        (bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
6952
        (bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
6953
        (bfd_elf64_add_dynamic_entry): Declare.
6954
        * elfcode.h (Elf_External_Dyn): Define.
6955
        (elf_swap_reloc_in): Define as macro using NAME.  Make externally
6956
        visible.
6957
        (elf_swap_reloc_out): Likewise.
6958
        (elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
6959
        (elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
6960
        and as new externally visible function.
6961
        (elf_fake_sections): Set section type of dynamic sections based on
6962
        section names.
6963
        (elf_write_phdrs): Remove.
6964
        (assign_file_position_for_section): Add new align argument.
6965
        Change all callers.
6966
        (get_program_header_size): New static function.
6967
        (struct seg_info): Remove.
6968
        (map_program_segments): Completely rewrite.
6969
        (assign_file_positions_except_relocs): Completely rewrite.
6970
        (assign_file_positions_for_relocs): Don't set a file position for
6971
        sections which already have one.  Don't bother to align the file
6972
        position here.
6973
        (section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
6974
        section types.
6975
        (elf_section_from_bfd_section): Likewise.
6976
        (elf_slurp_symbol_table): If section_from_elf_index fails, just
6977
        use bfd_abs_section rather than returning an error.
6978
        (elf_sizeof_headers): Make useful.
6979
        (elf_link_record_dynamic_symbol): New static function.
6980
        (elf_link_add_object_symbols): Handle dynamic objects.
6981
        (elf_link_create_dynamic_sections): New static function.
6982
        (elf_add_dynamic_entry): Define as macro using NAME and as new
6983
        externally visible function.
6984
        (NAME(bfd_elf,record_link_assignment)): New function.
6985
        (elf_buckets): New static variable.
6986
        (NAME(bfd_elf,size_dynamic_sections)): New function.
6987
        (struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
6988
        (elf_bfd_final_link): Handle dynamic linking.  Create a section
6989
        symbol for all ELF sections, not all BFD sections.  Store section
6990
        symbol index in target_index field, not index field.  Traverse
6991
        over global symbols even if stripping.
6992
        (elf_link_output_extsym): Output dynamic symbols.  Mark symbols
6993
        defined by dynamic objects as undefined.
6994
        (elf_link_input_bfd): Ignore dynamic objects.  Use target_index
6995
        field for section relocs, and make sure it is set.
6996
        (elf_reloc_link_order): Use target_index field for section relocs,
6997
        and make sure it is set.
6998
        * elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
6999
        weakdef and elf_link_hash_flags fields.
7000
        (_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
7001
        dynstr and bucketcount fields.
7002
        * elf32-target.h: Initialize new dynamic linking fields.
7003
        * elf64-target.h: Likewise.
7004
        * elf32-i386.c: New functions for dynamic linking support.
7005
        * elf32-sparc.c: Likewise.
7006
        * bfd-in.h (bfd_elf32_record_link_assignment): Declare.
7007
        (bfd_elf64_record_link_assignment): Declare.
7008
        (bfd_elf32_size_dynamic_sections): Declare.
7009
        (bfd_elf64_size_dynamic_sections): Declare.
7010
        * bfd-in2.h: Rebuilt.
7011
 
7012
Wed May 18 08:29:04 1994  Ian Lance Taylor  (ian@cygnus.com)
7013
 
7014
        * som.c: Don't include  or .
7015
        (som_reloc_queue_find): Call memcmp instead of bcmp.
7016
        (som_bfd_reloc_type_lookup): Change first argument to bfd *.
7017
        (compare_syms): Change types of arguments to const void *.
7018
        (bfd_section_from_som_symbol): Removed unused local found.
7019
        (som_write_armap): Add elength, map, orl_count and int arguments.
7020
        (som_write_armap): Use %ld and cast to long for getuid result.
7021
 
7022
Wed May 18 09:09:32 1994  Jeff Law  (law@snake.cs.utah.edu)
7023
 
7024
        * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
7025
        * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.
7026
 
7027
        * som.h (R_HPPA_ABS_CALL): Define.
7028
        * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
7029
 
7030
Tue May 17 19:33:12 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
7031
 
7032
        * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading
7033
        underscore, for compatibility with Intel tool chain (gnu960v2).
7034
 
7035
Mon May 16 10:09:22 1994  Jeff Law  (law@snake.cs.utah.edu)
7036
 
7037
        * bfd-in2.h: Rebuilt.
7038
 
7039
        * elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
7040
        likewise for other PA specific sections.
7041
        (hppa_elf_relocate_unwind_table): Delete unused
7042
        function.
7043
        (elf_hppa_howto_table): Completely new table based on 94-02-02
7044
        draft PA ELF spec.  Change relocation tags appropriately
7045
        throughout elf32-hppa.c
7046
        (hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
7047
        spec.
7048
        (hppa_elf_reloc): Likewise.
7049
        (hppa_look_for_stubs_in_section): Likewise
7050
        (ELF_MACHINE_CODE): Change to EM_PARISC.
7051
        * elf32-hppa.h: Include "elf/hppa.h".  Change relocation tags
7052
        appropriately throughout elf32-hppa.h.
7053
        (elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
7054
        spec.
7055
        (R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
7056
        * elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
7057
        * reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
7058
        * som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.
7059
 
7060
        * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
7061
        the final value twice for LR and RR field selectors.
7062
 
7063
Sat May 14 09:09:19 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
7064
 
7065
        * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert.  This
7066
        avoids __eprintf troubles.
7067
 
7068
Fri May 13 10:51:21 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7069
 
7070
        * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR.
7071
 
7072
        * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
7073
        ecoff_little_vec since Irix 5 supports ECOFF executables.
7074
 
7075
Wed May 11 00:31:57 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7076
 
7077
        * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
7078
        correctly.
7079
 
7080
        * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
7081
        make to invoke the shell.
7082
 
7083
Tue May 10 14:23:43 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7084
 
7085
        * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
7086
        SEC_SHARED_LIBRARY for clarity.  Changed all uses.
7087
        * bfd-in2.h: Rebuilt.
7088
        * coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
7089
        set, set STYP_NOLOAD.
7090
        * coffgen.c (coff_section_from_bfd_index): Don't get an assertion
7091
        failure because of a bad shared library.
7092
 
7093
Mon May  9 18:53:40 1994  Bill Cox  (bill@rtl.cygnus.com)
7094
 
7095
        * linker.c: Add missing comment terminator.
7096
 
7097
Mon May  9 11:53:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7098
 
7099
        * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
7100
        are not NULL, assume the caller has already looked up the symbol
7101
        in the hash table and has stored the entry in *hashp.
7102
        (generic_link_add_symbol_list): Set h to NULL before calling
7103
        _bfd_generic_link_add_one_symbol.
7104
        * ecoff.c (ecoff_link_add_externals): Likewise.
7105
 
7106
        * elfcode.h (assign_file_positions_except_relocs): Don't require
7107
        page shared between .data and .bss segments to contain zeroes.
7108
 
7109
        * elfcode.h: Include bfdlink.h.  Added several new functions to do
7110
        linking.
7111
        (ELF_R_TYPE): Define.
7112
        (bfd_add_to_strtab): Return unsigned long.  Change check for
7113
        realloc failure.
7114
        (elf_fake_sections): Check return value of bfd_add_to_strtab.
7115
        (elf_compute_section_file_positions): Add link_info argument.
7116
        Call elf_backend_begin_write_processing hook and prep_headers
7117
        here.  Only call swap_out_syms if link_info is NULL.  Set up
7118
        .shstrtab section here.  Pass dosyms argument to
7119
        assign_file_positions_except_relocs.  Set output_has_begun flag.
7120
        (assign_file_positions_for_symtab_and_strtabs): Add dosyms
7121
        argument, and use it to control setting .symtab and .strtab file
7122
        positions.
7123
        (assign_file_positions_except_relocs): Add dosyms argument, and
7124
        pass it on.
7125
        (prep_headers): Check return value of bfd_add_to_strtab.
7126
        (swap_out_syms): Likewise.  Also, don't set up .shstrtab here.
7127
        (NAME(bfd_elf,write_object_contents)): Some calls moved into
7128
        elf_compute_section_file_positions.
7129
        (elf_set_section_contents): Likewise.
7130
        (elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
7131
        * libelf.h: Include bfdlink.h.
7132
        (struct elf_backend_data): Add fields collect,
7133
        elf_add_symbol_hook, elf_backend_relocate_section.
7134
        (struct bfd_elf_section_data): Add field rel_hashes.
7135
        (struct elf_obj_tdata): Remove fields internal_syms and symbols.
7136
        Add field sym_hashes.
7137
        (obj_symbols, obj_internal_syms): Remove definitions.
7138
        (elf_sym_hashes): Define.
7139
        (struct elf_link_hash_entry): Define.
7140
        (struct elf_link_hash_table): Define.
7141
        (elf_link_hash_lookup): Define.
7142
        (elf_link_hash_traverse): Define.
7143
        (elf_hash_table): Define.
7144
        (_bfd_elf_link_hash_table_create): Declare.
7145
        (bfd_elf32_bfd_link_add_symbols): Declare.
7146
        (bfd_elf32_bfd_final_link): Declare.
7147
        (bfd_elf64_bfd_link_add_symbols): Declare.
7148
        (bfd_elf64_bfd_final_link): Declare.
7149
        * elf.c: Include bfdlink.h.
7150
        (elf_link_hash_newfunc): New function.
7151
        (_bfd_elf_link_hash_table_create): New function.
7152
        * elf32-target.h (elf_backend_relocate_section): If not defined,
7153
        define as 0 and use generic linker.  Otherwise, use ELF backend
7154
        linker.
7155
        (elf_backend_collect): If not defined, define as false.
7156
        (elf_backend_add_symbol_hook): If not defined, define as 0.
7157
        (elf32_bed): Initialize new fields.
7158
        * elf64-target.h: Same changes as elf32-target.h.
7159
        * elf32-i386.c: Include bfdlink.h.
7160
        (elf_i386_relocate_section): New function.
7161
        (elf_backend_relocate_section): Define.
7162
        * elf32-sparc.c: Include bfdlink.h.
7163
        (elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
7164
        to Elf_Internal_Rela (they're the same type anyhow).
7165
        (elf_sparc_relocate_section): New function.
7166
        (elf_backend_relocate_section): Define.
7167
        * elf32-mips.c (elf_backend_collect): Define.
7168
 
7169
        * Makefile.in (stmp-bfd.h): Avoid useless make error message in a
7170
        different way; touch takes a numeric argument on some systems.
7171
 
7172
Fri May  6 13:34:14 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7173
 
7174
        * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
7175
        handling for latest suggested format.
7176
        (nlm_swap_auxiliary_headers_out): Likewise.
7177
        (nlm_compute_section_file_positions): Likewise.
7178
 
7179
Fri May  6 11:11:50 1994  D. V. Henkel-Wallace  (gumby@rtl.cygnus.com)
7180
 
7181
        * config.bfd: handle erricsson config (for OSE).
7182
 
7183
Thu May  5 15:40:47 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
7184
 
7185
        Patches from Ralph Campbell:
7186
        * mipsbsd.c (mips_fix_jmp_addr): New function.
7187
        (mips_fix_hi16_s): Use bfd_is_com_section.
7188
        (mips_howto_table_ext): Call mips_fix_jmp_addr for MIPS_RELOC_JMP.
7189
 
7190
Fri May  6 11:48:55 1994  Steve Chamberlain  (sac@cygnus.com)
7191
 
7192
        * config/go32.mh: XX support.
7193
 
7194
        From bill
7195
        * Makefile.in: Build sysdep.h without causing worrying but
7196
        harmless error message.
7197
 
7198
Wed May  4 11:09:53 1994  Ian Lance Taylor  (ian@cygnus.com)
7199
 
7200
        Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
7201
        * aout0.c: New file.
7202
        * targets.c (aout0_big_vec): Declare.
7203
        (bfd_target_vector): Add aout0_big_vec.
7204
        * config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
7205
        * config/m68k-aout.mt (SELECT_VECS): Removed.
7206
        * config/m68k-0aout.mt: New file.
7207
        * configure.in (aout0_big_vec): New target vector: use aout0.o,
7208
        aout32.o and stab-syms.o.
7209
        * Makefile.in: Rebuilt dependencies.
7210
        (BFD32_BACKENDS): Add aout0.o.
7211
        (CFILES): Add aout0.c.
7212
 
7213
        * libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
7214
        * aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
7215
        MY(backend_data): Initialize exec_hdr_flags field.
7216
        * aoutf1.h (sunos_32_set_arch_mach): Make static.
7217
        (aout32_sunos4_write_object_contents): Set flags from backend
7218
        info.
7219
        (MY_exec_hdr_flags): If not defined, define as 1.
7220
        (sunos4_aout_backend): Initialize exec_hdr_flags field.
7221
        * aout-encap.c (encap_write_object_contents): Set flags from
7222
        backend info.
7223
        (MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
7224
        * hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
7225
        (MY(write_object_contents)): Set flags from backend info.
7226
        * i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
7227
        * i386mach3.c (MY(backend_data)): Likewise.
7228
        * mipsbsd.c (MY(backend_data)): Likewise.
7229
        * sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
7230
        flags from backend info.
7231
        (sparclynx_aout_backend): Initialize exec_hdr_flags field.
7232
 
7233
Wed May  4 02:56:00 1994  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
7234
 
7235
        * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
7236
        (m68*-apollo-*): Treat all Apollo configs the same, don't handle
7237
        BSD specially.
7238
 
7239
Tue May  3 19:43:21 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7240
 
7241
        * cache.c: Rewrote to work correctly.
7242
        * libbfd.h: Rebuilt.
7243
        * opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
7244
        (bfd_fdopenr): Check return value of bfd_cache_init.
7245
 
7246
Fri Apr 29 15:08:23 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7247
 
7248
        * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
7249
        enumerating them, since the reloc type can not serve as an index
7250
        into the m68k COFF howto_table.
7251
 
7252
Fri Apr 29 09:42:39 1994  Steve Chamberlain  (sac@cygnus.com)
7253
 
7254
        * config.bfd (*-go32): Changed to coff.
7255
        * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
7256
        * srec.c (srec_write_symbols): Write out the correct number of
7257
        symbols and don't stick in extra nulls.
7258
 
7259
Tue Apr 26 15:07:24 1994  Stan Shebs  (shebs@andros.cygnus.com)
7260
 
7261
        * cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
7262
        * coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
7263
        (COFF_SPARC): Define.
7264
        * coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
7265
        power of data and bss sections to 3.
7266
        * hosts/lynx.h (__LYNXOS): Define.
7267
 
7268
Tue Apr 26 15:04:26 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7269
 
7270
        * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
7271
        against section symbols to avoid losing during ld -r.
7272
 
7273
Tue Apr 26 12:16:41 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7274
 
7275
        * elfcode.h (shstrtab_length_fixed): Remove useless static
7276
        variable.
7277
        (struct elf_sect_data): Remove unused structure.
7278
        (elf_object_p): Free memory if error occurs.  Check return value
7279
        of bfd_default_set_arch_mach.  If elf_get_str_section fails,
7280
        preserve error code rather than setting wrong_format.
7281
        (null_shdr): Remove static variable.
7282
        (assign_section_numbers): Remove shstrtab_length_fixed assignment.
7283
        Allocate first section header on BFD obstack rather than using
7284
        null_shdr.
7285
        (bfd_prpsinfo): Remove unused local variable newsect.
7286
 
7287
Mon Apr 25 15:31:04 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7288
 
7289
        * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris.
7290
 
7291
        * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
7292
        to create sections.  Check return value of recursive calls.
7293
        (bfd_section_from_phdr): Check return value of bfd_make_section.
7294
        (elf_symbol_from_bfd_symbol): Likewise.
7295
        (elf_object_p): Check return value of bfd_section_from_shdr.
7296
        (section_from_elf_index): Likewise.
7297
        (elf_slurp_symbol_table): Check return value of
7298
        section_from_elf_index.
7299
        (bfd_prstatus): Return boolean value.  Check return value of
7300
        bfd_make_section.
7301
        (bfd_fpregset): Likewise.
7302
        (bfd_prpsinfo): Return boolean value.
7303
        (elf_corefile_note): Check return values of bfd_prstatus,
7304
        bfd_fpregset, and bfd_prpsinfo.
7305
        (elf_core_file_p): Check return value of elf_corefile_note.
7306
 
7307
Fri Apr 22 11:08:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7308
 
7309
        Get rid of the ECOFF .reginfo section hack.
7310
        * ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
7311
        (ecoff_new_section_hook): Don't handle the .reginfo section.
7312
        (ecoff_sizeof_headers): Likewise.
7313
        (ecoff_get_section_contents): Likewise.
7314
        (ecoff_compute_section_file_positions): Likewise.
7315
        (ecoff_compute_reloc_file_positions): Likewise.
7316
        (ecoff_set_section_contents): Likewise.
7317
        (ecoff_write_object_contents): Likewise.
7318
        (ecoff_bfd_final_link): Likewise.
7319
        (ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
7320
        register masks.
7321
        (bfd_ecoff_get_gp_value): New function.
7322
        (bfd_ecoff_set_gp_value): New function.
7323
        (bfd_ecoff_set_regmasks): New function.
7324
        * bfd-in.h (bfd_ecoff_get_gp_value): Declare.
7325
        (bfd_ecoff_set_gp_value): Declare.
7326
        (bfd_ecoff_set_regmasks): Declare.
7327
        * bfd-in2.h: Rebuilt.
7328
 
7329
        Fix ECOFF objcopy to actually copy debugging information.
7330
        * ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
7331
        (ecoff_get_extr): Assume that any ECOFF symbol with local clear is
7332
        an external symbol, rather than checking the symbol flags.  Only
7333
        check the flags for non-ECOFF symbols.
7334
        * ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
7335
        output_section field of the symbol section is NULL.
7336
        * libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
7337
        function rather than defining as macro.
7338
 
7339
        * ieee.c (ieee_object_p): Set bfd_error_got_wrong_format if
7340
        appropriate.
7341
 
7342
        * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec.
7343
 
7344
        * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
7345
        bfd_default_set_arch_mach.  Accept bfd_arch_m68k as well as
7346
        bfd_arch_unknown.
7347
        * coffcode.h (coff_set_arch_mach): Check return value of
7348
        bfd_default_set_arch_mach.
7349
        * elfcode.h (elf_set_arch_mach): Don't check a list of ELF
7350
        architectures, just see if the desired architecture matches what
7351
        the ELF backend permits.
7352
 
7353
        * coffcode.h (coff_set_arch_mach_hook): Rename SHMAGIC to
7354
        SH_ARCH_MAGIC to match change in coff/sh.h.
7355
        (coff_set_flags): Likewise.
7356
 
7357
        Follow convention in which each NLM header has an 8 byte stamp
7358
        followed by a four byte length.
7359
        * libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
7360
        to nlm_cygnus_ext_header, and change type to
7361
        Nlm_Internal_Cygnus_Ext_Header.
7362
        (nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
7363
        * nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
7364
        of CyGnUsSeCs.  Rename from cygnus_section to cygnus_ext.  Require
7365
        length word to be 8.
7366
        (nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
7367
        cygnus_ext.  Set length word to 8.
7368
        (nlm_compute_section_file_positions): Rename from cygnus_section
7369
        to cygnus_ext.
7370
 
7371
Thu Apr 21 22:54:22 1994  Stu Grossman  (grossman at cygnus.com)
7372
 
7373
        * nlmcode.h (nlm_swap_auxiliary_headers_in):  Keep section table
7374
        (from CyGnUsSeCs) in more permanent memory to keep section names
7375
        from getting trashed.
7376
 
7377
Thu Apr 21 09:29:37 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
7378
 
7379
        * libelf.h (elf_obj_tdata):  Add members for dynamic symbol table
7380
        handling.
7381
        * elfcode.h (bfd_section_from_shdr):  Handle dynamic symbol table.
7382
        * elfcode.h (elf_slurp_symbol_table):  Take additional parameter
7383
        to select static or dynamic symbol table and return number of
7384
        symbols slurped or -1 on error.
7385
        * elfcode.h (elf_get_symtab):  Set bfd symcount from
7386
        elf_slurp_symbol_table result.
7387
        * elfcode.h (elf_get_dynamic_symtab_upper_bound,
7388
        elf_canonicalize_dynamic_symtab):  New functions to handle dynamic
7389
        symbol table.
7390
        * elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
7391
        Change to handle dynamic symbol table, provide default definitions
7392
        for dynamic relocs.
7393
        * aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
7394
        NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
7395
        aout_link_reloc_link_order):  Handle r_jmptable and r_relative
7396
        relocations.
7397
 
7398
Thu Apr 21 11:58:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7399
 
7400
        Clean up uses of _bfd_dummy_target (from Peter Schauer).
7401
        * libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
7402
        * nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
7403
        NULL.
7404
        * srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
7405
        _bfd_check_format.
7406
        (symbolsrec_vec): Likewise.
7407
        * tekhex.c (tekhex_vec): Likewise.
7408
 
7409
        * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
7410
        field.
7411
        (nlm_cygnus_section_header): New accessor macro.
7412
        * nlmcode.h (nlm_object_p): Free new tdata structure if failure.
7413
        Add fixed sections before swapping in auxiliary headers.  After
7414
        adding sections, treat errors as real, not as wrong format.
7415
        (nlm_swap_auxiliary_headers_in): Swap in the sections header; add
7416
        sections to the BFD for each section it describes.
7417
        (nlm_swap_auxiliary_headers_out): Swap out the sections header.
7418
        (nlm_compute_section_file_positions): Account for the size of the
7419
        sections header.
7420
 
7421
Wed Apr 20 16:45:51 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
7422
 
7423
        * coff-sparc.c (sparccoff_vec): Change minimum alignment power to
7424
        2, so that stab sections can be multiples of 4 bytes only.
7425
 
7426
        * hosts/i386aix.h: Changes to avoid prototypes conflicts with the
7427
        ones defined in stdlib.h.  (From Minh Tran-Le.)
7428
 
7429
Wed Apr 20 14:15:21 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7430
 
7431
        * nlm32-ppc.c: Complete rewrite for new version of PowerPC
7432
        NetWare.  Old code still present, but ifdeffed out.
7433
 
7434
        * nlmcode.h (nlm_swap_auxiliary_headers_in): Don't assume a
7435
        particular format for the customer header.  Allocate a block of
7436
        memory and read it into that.
7437
        (nlm_swap_auxiliary_headers_out): Write out the block of memory.
7438
        (nlm_compute_section_file_positions): Include length of customer
7439
        header when computing its size.
7440
 
7441
Mon Apr 18 14:27:17 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7442
 
7443
        * som.c (som_prep_headers): Get the space's number from the
7444
        backend private section data rather than target_index.
7445
        (bfd_som_set_section_attributes): Store the space's number
7446
        in the backend private section data rather than target_index.
7447
 
7448
        * som.h (som_copyable_section_data_struct): Add space_number.
7449
 
7450
Fri Apr 15 12:22:07 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7451
 
7452
        * coff-a29k.c (reloc_processing): Always set the address of a
7453
        R_IHCONST reloc to that of the immediately preceding R_IHIHALF.
7454
        gas does this anyhow, but some other assemblers seem to leave
7455
        garbage in the R_IHCONST address field.
7456
 
7457
        * archive.c: Consistently use ARFMAG; from
7458
        schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
7459
        (_bfd_write_archive_contents): Use ARFMAG rather than '`' and
7460
        '\012'.
7461
        (bsd_write_armap): Likewise.
7462
        (coff_write_armap): Likewise.
7463
 
7464
        * coff-mips.c (mips_relocate_section): When relaxing, adjust local
7465
        relocs against the .text section as required.
7466
        * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust
7467
        PDR addresses as required.
7468
 
7469
        * ecoff.c (ecoff_emit_aggregate): Take fdr argument.  Map fdr
7470
        index through rfd map if it exists.  Check for a couple of cases
7471
        which gdb handles specially.  Change all callers.
7472
        (ecoff_type_to_string): Take fdr argument rather than aux_ptr and
7473
        bigendian argument.  Change all callers.
7474
        (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
7475
 
7476
Thu Apr 14 13:05:10 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7477
 
7478
        * coff-mips.c (mips_howto_table): Add dummy entries to account for
7479
        numbering changes in include/coff/mips.h.  Add entries for
7480
        MIPS_R_RELHI and MIPS_R_RELLO.
7481
        (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type
7482
        when little endian.  Treat internal MIPS_R_RELLO or MIPS_R_RELHI
7483
        relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32
7484
        bits.
7485
        (mips_ecoff_swap_reloc_out): Likewise.
7486
        (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or
7487
        MIPS_R_RELHI relocs like MIPS_R_SWITCH.
7488
        (mips_adjust_reloc_out): Likewise.
7489
        (mips_relhi_addr, mips_relhi_addend): New static variables.
7490
        (mips_relhi_reloc, mips_rello_reloc): New functions.
7491
        (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into
7492
        MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO.
7493
        (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel
7494
        argument.  Changed all callers.
7495
        (mips_relocate_section): Rename got_reflo to got_lo and
7496
        reflo_int_rel to lo_int_rel.  Handle MIPS_R_RELLO and MIPS_R_RELHI
7497
        relocs.
7498
        (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when
7499
        expanding a PC relative call.
7500
 
7501
        * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_S
7502
        and BFD_RELOC_PCREL_LO16.
7503
        * bfd-in2.h: Rebuilt.
7504
 
7505
Wed Apr 13 11:50:07 1994  Stan Shebs  (shebs@andros.cygnus.com)
7506
 
7507
        * coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
7508
 
7509
Tue Apr 12 13:36:20 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7510
 
7511
        * som.c (som_write_fixups): Always emit at least
7512
        one relocation for any non-bss section.
7513
 
7514
Mon Apr 11 14:41:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7515
 
7516
        * elfcode.h (assign_file_positions_except_relocs): Don't require
7517
        the file alignment to correspond to the page size when linking
7518
        with -N.
7519
 
7520
Sun Apr 10 01:02:24 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7521
 
7522
        * elfcode.h (write_relocs): For rela relocations, adjust the
7523
        addend for relocations involving section symbols to account
7524
        for the lossage of 1:1 mapping from input section symbols to
7525
        output section symbols.
7526
 
7527
Fri Apr  8 12:22:02 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7528
 
7529
        * aoutx.h (NAME(aout,make_sections)): New function.
7530
        (NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
7531
        rather than making sections inline.
7532
        (NAME(aout,mkobject)): Don't make any sections.
7533
        (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
7534
        (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
7535
        obj_datasec (abfd) if they are NULL.
7536
        * libaout.h (NAME(aout,make_sections)): Declare.
7537
        * bout.c (b_out_mkobject): Don't make any sections.
7538
        (b_out_write_object_contents): Call aout_32_make_sections.
7539
        (b_out_set_section_contents): Likewise.
7540
        * i386os9k.c (os9k_mkobject): Don't make any sections.
7541
        (os9k_write_object_contents): Call aout_32_make_sections.
7542
        (os9k_set_section_contents): Likewise.
7543
 
7544
        * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
7545
        index.
7546
 
7547
Wed Apr  6 20:44:56 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
7548
 
7549
        * config.bfd, configure.host:  Add mips-*-sysv4* support.
7550
 
7551
Thu Apr  7 14:23:05 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7552
 
7553
        * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
7554
        (mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
7555
        r_offset and set r_symndx to RELOC_SECTION_TEXT.
7556
        (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
7557
        value from the r_offset field.
7558
        (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
7559
        For MIPS_R_SWITCH, copy the r_offset field into the addend field.
7560
        (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
7561
        into the r_offset field.
7562
        (mips_switch_reloc): New function.
7563
        (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
7564
        MIPS_R_SWITCH.
7565
        (mips_relocate_section): Handle MIPS_R_SWITCH.
7566
        (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
7567
 
7568
Thu Apr  7 11:10:51 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7569
 
7570
        * elfcode.h (elf_set_section_contents): Support calling the backend
7571
        function elf_backend_begin_write_processing when just beginning to
7572
        write an object file.
7573
 
7574
        * libelf.h (elf_backend_begin_write_processing): Declare.
7575
 
7576
        * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
7577
        a default definition.
7578
        (elf{32,64}_bed): Add elf_backend_begin_write_processing.
7579
 
7580
        * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
7581
        (elf_hppa_tc_make_sections): Likewise.
7582
 
7583
        * elf32-hppa.c (symext_chain_built): Delete.
7584
        (symext_chain_size): Renamed from symextn_contents_real_size.
7585
        (elf32_hppa_backend_{begin,final}_write_processing): New functions.
7586
        (add_entry_to_symext_chain): New function.
7587
        (hppa_elf_set_section_contents): Ignore writes to the symbol extension
7588
        section until it's been rebuilt internally.
7589
        (hppa_elf_get_section_contents): Symbol extension section is no
7590
        longer special.
7591
        (elf_backend_{begin,final}_write_processing): Define.
7592
        (elf_hppa_tc_make_sections): Simplify now that much code has
7593
        migrated into elf32_hppa_backend_{being,final}_write_processing.
7594
 
7595
Wed Apr  6 17:24:14 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7596
 
7597
        Add new target vectors to read the dynamic symbols and dynamic
7598
        relocs.  Change a.out to use these rather than reading the dynamic
7599
        symbols and relocs along with the normal symbols and relocs.
7600
        * targets.c (bfd_target): Add fields
7601
        _bfd_get_dynamic_symtab_upper_bound,
7602
        _bfd_canonicalize_dynamic_symtab,
7603
        _bfd_get_dynamic_reloc_upper_bound,
7604
        _bfd_canonicalize_dynamic_reloc.
7605
        (BFD_JUMP_TABLE_DYNAMIC): Define.
7606
        * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
7607
        Define.
7608
        (_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
7609
        (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
7610
        (_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
7611
        * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
7612
        (bfd_canonicalize_dynamic_symtab): Define.
7613
        (bfd_get_dynamic_reloc_upper_bound): Define.
7614
        (bfd_canonicalize_dynamic_reloc): Define.
7615
        * sunos.c (MY_read_dynamic_symbols): Don't define.
7616
        (MY_read_dynamic_relocs): Don't define.
7617
        (MY_get_dynamic_symtab_upper_bound): Define.
7618
        (MY_canonicalize_dynamic_symtab): Define.
7619
        (MY_get_dynamic_reloc_upper_bound): Define.
7620
        (MY_canonicalize_dynamic_reloc): Define.
7621
        (struct sunos_dynamic_info): Change type of dynsym_count and
7622
        dynrel_count to long.  Add fields canonical_dynsym and
7623
        canonical_dynrel.
7624
        (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
7625
        Clear info->canonical_dynsym and info->canonical_dynrel.
7626
        (MY(read_dynamic_symbols)): Removed.
7627
        (MY(read_dynamic_relocs)): Removed.
7628
        (sunos_get_dynamic_symtab_upper_bound): New function.
7629
        (sunos_canonicalize_dynamic_symtab): New function.
7630
        (sunos_get_dynamic_reloc_upper_bound): New function.
7631
        (sunos_canonicalize_dynamic_reloc): New function.
7632
        * libaout.h: Declare struct reloc_ext_external and
7633
        reloc_std_external to avoid prototype problems.
7634
        (struct aout_backend_data): Remove fields read_dynamic_symbols and
7635
        read_dynamic_relocs.
7636
        (NAME(aout,translate_symbol_table)): Declare.
7637
        (NAME(aout,swap_ext_reloc_in)): Declare.
7638
        (NAME(aout,swap_std_reloc_in)): Declare.
7639
        * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
7640
        translate_symbol_table and made non-static.  Changed all callers.
7641
        (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
7642
        (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
7643
        (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
7644
        * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
7645
        remove dynamic symbols and relocs.  They will no longer be
7646
        present.
7647
        (MY_read_dynamic_symbols): Don't define.
7648
        (MY_read_dynamic_relocs): Don't define.
7649
        (sunos4_aout_backend): Don't initialize dynamic entry points.
7650
        * aout-target.h (MY_read_dynamic_symbols): Don't define.
7651
        (MY_read_dynamic_relocs): Don't define.
7652
        (MY(backend_data)): Don't initialize dynamic entry points.
7653
        (MY_get_dynamic_symtab_upper_bound): If not defined, define to
7654
        _bfd_nodynamic version.
7655
        (MY_canonicalize_dynamic_symtab): Likewise.
7656
        (MY_get_dynamic_reloc_upper_bound): Likewise.
7657
        (MY_canonicalize_dynamic_reloc): Likewise.
7658
        * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.
7659
        * bfd-in2.h: Rebuilt.
7660
        * libbfd.h: Rebuilt.
7661
 
7662
        * cf-m68klynx.c: Include sysdep.h.
7663
 
7664
        * hp300hpux.c: Removed some spaces in uses of NAME to avoid
7665
        problems with traditional C compilers.
7666
 
7667
        * targets.c (bfd_target): Rearranged fields in target vector.
7668
        Removed _bfd_debug_info_start, _bfd_debug_info_end and
7669
        _bfd_debug_info_accumulate, which were never used.
7670
        (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
7671
        (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
7672
        (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
7673
        (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
7674
        * All backends: Changed to use the new BFD_JUMP_TABLE_* macros
7675
        rather than the single JUMP_TABLE macro.  Removed many of the
7676
        weird macro definitions needed to support the monolithic
7677
        JUMP_TABLE.
7678
        * bfd-in.h (JUMP_TABLE): Removed.
7679
        * libbfd-in.h: Define a bunch of macros, and declare a few
7680
        functions, for use with the new BFD_JUMP_TABLE_* macros.
7681
        * libbfd.c (_bfd_dummy_new_section_hook): Removed.
7682
        (bfd_false): Set bfd_error_invalid_operation.
7683
        (bfd_nullvoidptr): Likewise.
7684
        (bfd_n1): New function.
7685
        (_bfd_nocore_core_file_matches_executable_p): Renamed from
7686
        _bfd_dummy_core_file_matches_executable_p.
7687
        (_bfd_nocore_core_file_failing_command): Similar rename.  Set
7688
        bfd_error_invalid_operation.
7689
        (_bfd_nocore_core_file_failing_signal): Likewise.
7690
        (_bfd_generic_get_section_contents): Renamed from
7691
        bfd_generic_get_section_contents.  Changed all callers.
7692
        (_bfd_generic_set_section_contents): Similar rename.
7693
        * ieee.c: #if 0 out ieee_bfd_debug_info_start,
7694
        ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate.  They
7695
        were never called.
7696
        * bfd-in2.h: Rebuilt.
7697
        * libbfd.h: Rebuilt.
7698
 
7699
Tue Apr  5 22:10:04 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7700
 
7701
        * Crude support for examining dynamic libraries.
7702
        * som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
7703
        DL_MAGIC objects.
7704
        (som_prep_headers): Preserve the system_id for DYNAMIC objects.
7705
        Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
7706
        Write exec headers for DYNAMIC objects.
7707
        (som_begin_writing): DYNAMIC objects have the same alignment
7708
        restrictions as D_PAGED objects.
7709
        (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
7710
        objects.
7711
        (object_flags): Add DYNAMIC.
7712
 
7713
Tue Apr  5 17:48:52 1994  Stan Shebs  (shebs@andros.cygnus.com)
7714
 
7715
        * i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
7716
        macro uses, confuses some non-ANSI compilers.
7717
 
7718
Tue Apr  5 15:50:01 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7719
 
7720
        * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
7721
        Don't free anything if we don't have a bfd_object.
7722
        (som_close_and_cleanup): Call som_bfd_free_cached_info.
7723
 
7724
Tue Apr  5 11:22:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7725
 
7726
        * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
7727
        It turns out not to be required on Irix 5, and it causes problems
7728
        if the sections happen to contain symbols.
7729
 
7730
        * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.
7731
 
7732
        * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
7733
        section->relocation is NULL; malloc might have returned NULL when
7734
        given a zero size if there were no relocations.
7735
        * bout.c (b_out_canonicalize_reloc): Likewise.
7736
        * coffcode.h (coff_canonicalize_reloc): Likewise.
7737
        * ecoff.c (ecoff_canonicalize_reloc): Likewise.
7738
        * elfcode.h (elf_canonicalize_reloc): Likewise.
7739
        * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
7740
        * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
7741
        * nlmcode.h (nlm_canonicalize_reloc): Likewise.
7742
        * som.c (som_canonicalize_reloc): Likewise.
7743
        * hp300hpux.c (MY(slurp_reloc_table)): Likewise.  Also, if malloc
7744
        returns NULL, don't report an error if we asked for zero bytes.
7745
        * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
7746
        NULL, don't report an error if we asked for zero bytes.
7747
        * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
7748
 
7749
Mon Apr  4 15:30:49 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7750
 
7751
        * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
7752
        if we don't have a bfd_object.
7753
 
7754
        Made sure that every call to bfd_read, bfd_write, and bfd_seek
7755
        checks the return value and handled bfd_error correctly.  These
7756
        changes are not itemised.  Also:
7757
        * aoutx.h (emit_strtab): Change return type to boolean, and return
7758
        errors.
7759
        (NAME(aout,write_syms)): Check emit_strtab return value.
7760
        (NAME(aout,final_link)): Likewise.
7761
        * coffcode.h (coff_write_relocs): Change return type to boolean,
7762
        and return errors.
7763
        (coff_write_object_contents): Check coff_write_relocs return
7764
        value.
7765
        * i386os9k.c (os9k_swap_exec_header_in): Change return type to
7766
        boolean.
7767
        (os9k_object_p): Check os9k_swap_exec_header_in return value.
7768
        * oasys.c (oasys_read_record): Change return type to boolean.
7769
        (oasys_slurp_symbol_table: Check oasys_read_record return value.
7770
        (oasys_object_p, oasys_slurp_section_data): Likewise.
7771
        (oasys_write_record): Change return type to boolean.
7772
        (oasys_write_syms): Likewise.  Also, check oasys_write_record
7773
        return value.
7774
        (oasys_write_sections): Check oasys_write_record return value.
7775
        (oasys_write_header): Change return type to boolean.  Check
7776
        oasys_write_record return value.
7777
        (oasys_write_end, oasys_write_data): Likewise.
7778
        (oasys_write_object_contents): Check return values of
7779
        oasys_write_header, oasys_write_syms, oasys_write_data, and
7780
        oasys_write_end.
7781
        * srec.c (srec_write_record): Change return type to boolean.
7782
        (srec_write_header): Likewise.  Also, check srec_write_record
7783
        return value.
7784
        (srec_write_section, srec_write_terminator): Likewise.
7785
        (srec_write_symbols): Change return type to boolean.
7786
        (internal_srec_write_object_contents): Check return value of
7787
        srec_write_symbols, srec_write_header, srec_write_section, and
7788
        srec_write_terminator.
7789
 
7790
        * Makefile.in: Rebuilt dependencies.
7791
 
7792
Mon Apr  4 10:56:45 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
7793
 
7794
        * aix386-core.c (aix386_bfd_is_local_label):  Correct cast from
7795
        asection to asymbol.
7796
        * ptrace-core.c (ptrace_unix_bfd_is_local_label):  Correct cast from
7797
        bfd to asymbol.
7798
        * trad-core.c (trad_unix_bfd_is_local_label):  Correct cast from
7799
        asection to asymbol.
7800
 
7801
Sun Apr  3 18:27:29 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
7802
 
7803
        * som.c (som_slurp_string_table): Use malloc to allocate space
7804
        for the cached copy of the native string table.
7805
        (som_slurp_symbol_table): Likewise for the native symbol table.
7806
        (som_slurp_reloc_table): Likewise for the native and generic
7807
        relocation tables.
7808
        (som_bfd_free_cached_info): Free the cached native strings,
7809
        symbols, and relocations.  Also free the canonical cached
7810
        relocations.
7811
 
7812
Fri Apr  1 12:40:58 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7813
 
7814
        * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
7815
        sure the symbol name is stored in permanent memory before adding
7816
        it to the string table.
7817
 
7818
        * archive.c (_bfd_write_archive_contents): Once we've found an
7819
        object, don't bother to look for more when deciding whether to
7820
        build a map.
7821
        (compute_and_write_armap): After adding the symbols for a BFD,
7822
        call bfd_free_cached_info on it.
7823
 
7824
        Add bfd_free_cached_info support to a.out backends.
7825
        * aoutx.h (aout_get_external_symbols): Renamed from
7826
        aout_link_get_symbols.  Read strings even if symbols have been
7827
        read.  Store string size in obj_aout_string_size.
7828
        (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
7829
        read the symbols.  Allocate the cached symbols with malloc, not
7830
        bfd_alloc.
7831
        (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
7832
        malloc, not bfd_alloc.
7833
        (NAME(aout,bfd_free_cached_info)): New function; free cached
7834
        symbols and relocs.
7835
        * libaout.h (struct aoutdata): Add external_string_size field.
7836
        (obj_aout_external_string_size): New accessor macro.
7837
        (NAME(aout,close_and_cleanup)): Don't declare.
7838
        (NAME(aout,bfd_free_cached_info)): Declare.
7839
        (aout_32_close_and_cleanup): Don't define.
7840
        (aout_64_close_and_cleanup): Don't define.
7841
        * aout-target.h (MY_bfd_free_cached_info): If not already defined,
7842
        define as NAME(aout,free_cached_info).
7843
        (MY_close_and_cleanup): If not already defined, define as
7844
        MY_bfd_free_cached_info.
7845
        * aout-adobe.c (aout_32_close_and_cleanup): Define.
7846
        (aout_32_bfd_free_cached_info): Don't define.
7847
        * bout.c (aout_32_close_and_cleanup): Define.
7848
        (aout_32_bfd_free_cached_info): Don't define.
7849
        * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
7850
        (MY_close_and_cleanup): Don't define.
7851
        * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
7852
        relocs with malloc, not bfd_alloc.
7853
        * i386os9k.c (aout_32_close_and_cleanup): Define.
7854
        (aout_32_bfd_free_cached_info): Don't define.
7855
 
7856
        Add a new entry point to free memory cached by a BFD.
7857
        * targets.c (bfd_target): Add _bfd_free_cached_info field.
7858
        * bfd.c (bfd_free_cached_info): Define.
7859
        * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
7860
        * bfd-in2.h: Rebuilt.
7861
        * All backends: Initialize bfd_free_cached_info entry point to
7862
        bfd_true.
7863
 
7864
        * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
7865
        first, unused, argument.
7866
        (hppa_elf_is_local_label): Declare instead of
7867
        som_bfd_is_local_label.
7868
 
7869
        * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
7870
        absolute R_IREL reloc.
7871
 
7872
Thu Mar 31 11:52:15 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7873
 
7874
        Added some support for Irix 4 shared libraries.
7875
        * ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
7876
        .lib section.
7877
        (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
7878
        STYP_ECOFF_LIB bit is set.
7879
        (ecoff_compute_section_file_positions): Round the contents of a
7880
        .lib section up to the next page boundary.
7881
        (ecoff_set_section_contents): If we see a .lib section, increment
7882
        the vma by one to count the number of shared libraries we have.
7883
        (ecoff_write_object_contents): Don't crash if we see a
7884
        STYP_ECOFF_LIB section, and don't adjust text_start or data_start
7885
        or bss_size either.
7886
 
7887
        * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
7888
        from original BFD, rather than using value of current BFD symbol.
7889
        Needed for new linker.
7890
        * coff-sparc.c (CALC_ADDEND): Likewise.
7891
 
7892
        * ecoff.c (ecoff_write_object_contents): Set the text_start and
7893
        data_start entries in the optional header correctly even if a text
7894
        or data section starts at location zero.
7895
 
7896
        * reloc.c (bfd_reloc_code_real_type): Added BFD_RELOC_26 (from sef
7897
        and raeburn).
7898
        * bfd-in2.h: Rebuilt.
7899
 
7900
        * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
7901
        name.
7902
        * nlm32-alpha.c (nlm_alpha_read_import): Likewise.
7903
        * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
7904
 
7905
        * coffgen.c (coff_write_symbol): Reindented.  Changed to return
7906
        boolean, and changed written to unsigned int *.  Check error
7907
        returns from called functions.
7908
        (coff_write_alien_symbol): Likewise.
7909
        (coff_write_native_symbol): Likewise.
7910
        (coff_write_symbols): Likewise.  Reworked checks on whether to
7911
        write symbol name to string table for clarity and to avoid core
7912
        dumping when given a non COFF symbol.
7913
        * libcoff-in.h (coff_write_symbols): Declare as returning boolean.
7914
        * libcoff.h: Rebuilt.
7915
        * coffcode.h (coff_write_object_contents): Check return value of
7916
        coff_write_symbols.
7917
 
7918
Wed Mar 30 16:25:41 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
7919
 
7920
        Changes to let BFD return an error indication from
7921
        get_symtab_upper_bound, bfd_canonicalize_symtab,
7922
        bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc.  They now
7923
        return long instead of unsigned int, and use -1 to indicate an
7924
        error.  Along the way, rename get_symtab_upper_bound to
7925
        bfd_get_symtab_upper_bound.
7926
        * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
7927
        errors.
7928
        (bfd_canonicalize_reloc): Likewise.
7929
        * syms.c (bfd_get_symtab_upper_bound): Renamed from
7930
        get_symtab_upper_bound.
7931
        * targets.c (bfd_target): Renamed _get_symtab_upper_bound to
7932
        _bfd_get_symtab_upper_bound, and changed it and
7933
        _bfd_canonicalize_symtab and _get_reloc_upper_bound and
7934
        _bfd_canonicalize_reloc to all return long.
7935
        * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
7936
        (NAME(aout,canonicalize_reloc)): Likewise.
7937
        (NAME(aout,get_reloc_upper_bound)): Likewise.
7938
        (NAME(aout,get_symtab_upper_bound)): Likewise.
7939
        * bout.c (b_out_canonicalize_reloc): Likewise.
7940
        (b_out_get_reloc_upper_bound): Likewise.
7941
        * coffcode.h (coff_canonicalize_reloc): Likewise.
7942
        * coffgen.c (coff_get_symtab_upper_bound): Likewise.
7943
        (coff_get_symtab): Likewise.
7944
        (coff_get_reloc_upper_bound): Likewise.
7945
        * ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
7946
        (ecoff_get_symtab): Likewise.
7947
        (ecoff_canonicalize_reloc): Likewise.
7948
        * elfcode.h (elf_get_symtab_upper_bound): Likewise.
7949
        (elf_get_reloc_upper_bound): Likewise.
7950
        (elf_canonicalize_reloc): Likewise.
7951
        (elf_get_symtab): Likewise.
7952
        * hp300hpux.c (MY(get_symtab)): Likewise.
7953
        (MY(get_symtab_upper_bound)): Likewise.
7954
        (MY(canonicalize_reloc)): Likewise.
7955
        * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
7956
        * ieee.c (ieee_slurp_external_symbols): Change return type to
7957
        boolean.  Check for errors from get_symbol.
7958
        (ieee_slurp_symbol_table): Change return type to boolean.  Check
7959
        for errors from ieee_slurp_external_symbols.
7960
        (ieee_get_symtab_upper_bound): Return long, and -1 on errors.
7961
        (ieee_get_symtab): Likewise.
7962
        (ieee_get_reloc_upper_bound): Likewise.
7963
        (ieee_canonicalize_reloc): Likewise.
7964
        * mipsbsd.c (MY(canonicalize_reloc)): Likewise.
7965
        * nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
7966
        (nlm_get_symtab): Likewise.
7967
        (nlm_get_reloc_upper_bound): Likewise.
7968
        (nlm_canonicalize_reloc): Likewise.
7969
        * oasys.c (oasys_get_symtab_upper_bound): Likewise.
7970
        (oasys_get_symtab): Likewise.
7971
        (oasys_get_reloc_upper_bound): Likewise.
7972
        (oasys_canonicalize_reloc): Likewise.
7973
        * som.c (som_get_symtab_upper_bound): Likewise.
7974
        (som_get_symtab): Likewise.
7975
        (som_get_reloc_upper_bound): Likewise.
7976
        (som_canonicalize_reloc): Likewise.
7977
        * srec.c (srec_get_symtab_upper_bound): Likewise.
7978
        (srec_get_symtab): Likewise.
7979
        (srec_get_reloc_upper_bound): Define as bfd_0l.
7980
        (srec_canonicalize_reloc): Likewise.
7981
        * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
7982
        (tekhex_get_symtab_upper_bound): Likewise.
7983
        (tekhex_get_reloc_upper_bound): Define as bfd_0l.
7984
        (tekhex_canonicalize_reloc): Likewise.
7985
        * libaout.h (NAME(aout,get_symtab_upper_bound)): Change
7986
        declaration to return long.
7987
        (NAME(aout,get_symtab)): Likewise.
7988
        (NAME(aout,canonicalize_reloc)): Likewise.
7989
        (NAME(aout,get_reloc_upper_bound)): Likewise.
7990
        * libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
7991
        (coff_get_symtab): Likewise.
7992
        (coff_get_reloc_upper_bound): Likewise.
7993
        * libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
7994
        (ecoff_get_symtab): Likewise.
7995
        (ecoff_canonicalize_reloc): Likewise.
7996
        * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
7997
        (bfd_elf32_get_symtab): Likewise.
7998
        (bfd_elf32_get_reloc_upper_bound): Likewise.
7999
        (bfd_elf32_canonicalize_reloc): Likewise.
8000
        (bfd_elf64_get_symtab_upper_bound): Likewise.
8001
        (bfd_elf64_get_symtab): Likewise.
8002
        (bfd_elf64_get_reloc_upper_bound): Likewise.
8003
        (bfd_elf64_canonicalize_reloc): Likewise.
8004
        * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
8005
        (nlmNAME(get_symtab)): Likewise.
8006
        (nlmNAME(get_reloc_upper_bound)): Likewise.
8007
        (nlmNAME(canonicalize_reloc)): Likewise.
8008
        * archive.c (compute_and_write_armap): Use error_return and
8009
        no_memory_return labels rather than freeing information in various
8010
        places.  Change storage, symcount and src_count to long.  Check
8011
        errors from bfd_get_symtab_upper_bound and
8012
        bfd_canonicalize_symtab.
8013
        * bout.c (b_out_relax_section): Change reloc_size to long.  Check
8014
        for errors from bfd_get_reloc_upper_bound and
8015
        bfd_canonicalize_reloc.
8016
        (b_out_get_relocated_section_contents): Likewise.
8017
        * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
8018
        Likewise.
8019
        * elf32-mips.c: Likewise.
8020
        * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
8021
        (hppa_look_for_stubs_in_section): Check for errors from
8022
        bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
8023
        bfd_canonicalize_reloc.
8024
        * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
8025
        from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
8026
        * linker.c (generic_link_read_symbols): Likewise.
8027
        (_bfd_generic_final_link): Check for errors from
8028
        bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
8029
        * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
8030
        * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
8031
        (bfd_coff_reloc16_get_relocated_section_contents): Likewise.
8032
        * libbfd.c (bfd_0l): New function.
8033
        * libbfd-in.h (bfd_0l): Declare.
8034
        * aix386-core.c: Change get_symtab_upper_bound, get_symtab,
8035
        get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
8036
        than bfd_0u.
8037
        * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
8038
        * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
8039
        * bfd-in2.h: Rebuilt.
8040
        * libbfd.h: Rebuilt.
8041
        * libcoff.h: Rebuilt.
8042
 
8043
        * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
8044
        temp and name.
8045
 
8046
Wed Mar 30 08:33:04 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
8047
 
8048
        * hosts/dpx2.h: Define POSIX_UTIME.
8049
 
8050
Wed Mar 30 00:31:49 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8051
 
8052
        * i386dynix.c, config/i386-dynix.mt:  New files, handling Dynix
8053
        variant of a.out.
8054
        * configure.in, config.bfd:  Use them for Dynix.
8055
        * Makefile.in:  Add dependencies for i386dynix.o.
8056
        * targets.c:  Add definition for i386dynix_vec.
8057
        * hosts/symmetry.h:  Do not define TRAD_CORE_USER_OFFSET for Dynix.
8058
        Define HOST_DATA_START_ADDR and TRAD_UNIX_CORE_FILE_FAILING_SIGNAL
8059
        for Dynix. Remove inclusion of dynix3.h, Dynix bfd is now handled by
8060
        i386dynix.c
8061
 
8062
Mon Mar 28 12:53:27 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8063
 
8064
        * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.
8065
 
8066
        * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
8067
        bfd_arch_rs6000.
8068
 
8069
        * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.
8070
        * config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
8071
 
8072
        * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flag
8073
        for generated constructor section.
8074
 
8075
Sun Mar 27 16:25:22 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8076
 
8077
        * som.c (som_begin_writing): New approach at dealing with holes
8078
        in executables left by the HP linker.  Does not rely on subspace
8079
        alignments as subspaces are *NOT* guaranteed to be properly
8080
        aligned in an executable (can you believe that!).
8081
 
8082
Sat Mar 26 10:25:43 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8083
 
8084
        * som.c (som_get_section_contents): New function.  Do not try
8085
        to actually read data from a section that doesn't have either
8086
        SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
8087
 
8088
        * libbfd.c (bfd_read): Set bfd_error as appropriate for a short
8089
        read. (bfd_error_system_call or bfd_error_file_truncated).
8090
 
8091
        * som.c: Do not blindly set bfd_error_system_call after a
8092
        failing bfd_read, bfd_write, or bfd_seek.  In a few places
8093
        (like som_object_p) override the error status set by bfd_read.
8094
 
8095
        * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
8096
        * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
8097
        * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
8098
        * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
8099
 
8100
        * som.c: Check return values from several bfd_{seek,read,write}
8101
        calls that we just assumed were not failing.
8102
 
8103
Fri Mar 25 11:44:06 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
8104
 
8105
        * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.
8106
        * config/sysv4.mh: Add comment.
8107
        * config/symmetry.mh: Change comment.
8108
        * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
8109
 
8110
Fri Mar 25 17:10:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8111
 
8112
        Changes to support linker relaxing of embedded MIPS PIC code to
8113
        use a five instruction sequence for function calls which are out of
8114
        range of the bal instruction.
8115
        * libecoff.h (struct ecoff_section_tdata): Define.
8116
        (ecoff_section_data): Define.
8117
        (ecoff_bfd_relax_section): Don't define.
8118
        * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free
8119
        the debugging information if it has already been read.
8120
        (ecoff_indirect_link_order): Handle _cooked_size being different
8121
        from _raw_size.  Don't reread the contents or the relocs if they
8122
        have already been read in.
8123
        * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from
8124
        18 to 16.
8125
        (PCREL16_EXPANSION_ADJUSTMENT): Define.
8126
        (mips_relocate_refhi): Take adjust argument.
8127
        (mips_relocate_section): Handle reloc offsets stored in section
8128
        used_by_bfd field.  Call mips_relax_pcrel16 to handle details of
8129
        expanding an out of range PCREL16.  Keep trace of adjustments
8130
        required by expansions.  Set s and unset h when converting a reloc
8131
        from undefined to section.  Change handling of PC relative relocs:
8132
        if against a section, they are correct in the object file, if
8133
        against an external symbol they are pcrel_offset.
8134
        (mips_relax_section): New function.
8135
        (mips_relax_pcrel16): New function.
8136
        (ecoff_bfd_relax_section): Define.
8137
        * coff-alpha.c (ecoff_bfd_relax_section): Define.
8138
        * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments
8139
        built by mips_relax_section when writing out addresses.
8140
        * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
8141
 
8142
        * aoutx.h (NAME(aout,find_nearest_line)): The caller expects
8143
        functionname_ptr to be set to a symbol name, so prepend
8144
        symbol_leading_char.
8145
 
8146
Thu Mar 24 11:33:46 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
8147
 
8148
        * coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
8149
        for 16bit relative branches.
8150
        * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
8151
        overflow.
8152
 
8153
Thu Mar 24 09:21:13 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8154
 
8155
        * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
8156
        (som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
8157
 
8158
Wed Mar 23 14:29:31 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
8159
 
8160
        * netbsd386.c (N_SET_FLAGS): Delete the old definition.
8161
 
8162
Wed Mar 23 14:58:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8163
 
8164
        Clean up the relaxing code for the new linker.
8165
        * targets.c (_bfd_relax_section): Take boolean *again argument
8166
        rather than asymbol list.
8167
        * bfd.c (bfd_relax_section): Change name of fourth argument from
8168
        symbols to again.
8169
        * reloc.c (bfd_generic_relax_section): Take boolean *again
8170
        argument rather than asymbol list.  Always return true.
8171
        * bout.c: Include genlink.h.
8172
        (aligncode, perform_slip): Declare.
8173
        (perform_slip): Take BFD argument rather than asymbol list.
8174
        Changed all callers.  Get the symbols from the BFD.  Change the
8175
        hash table entry value as well as the symbol value.
8176
        (abs32code): Take BFD argument rather than asymbol list.  Changed
8177
        all callers.
8178
        (aligncode): Likewise.
8179
        (b_out_relax_section): Take boolean *again argument rather than
8180
        asymbol list.  Only return false if an error occurred.  Set *again
8181
        to false.  Get symbols from BFD.
8182
        * reloc16.c: Include genlink.h.
8183
        (bfd_perform_slip): Take BFD argument rather than asymbol list.
8184
        Get the symbols from the BFD.  Change the hash table entry value
8185
        as well as the symbol value.
8186
        (bfd_coff_reloc16_relax_section): Take boolean *again argument
8187
        rather than asymbol list.  Only return false if an error occurred.
8188
        Set *again to false.  Get symbols from BFD.
8189
        * coffcode.h (bfd_coff_backend_data): Change
8190
        _bfd_coff_reloc16_estimate to take BFD argument rather than
8191
        asymbol list.
8192
        (bfd_coff_reloc16_estimate): Corresponding change.
8193
        (dummy_reloc16_estimate): Corresponding change.
8194
        * libcoff-in.h (bfd_coff_reloc16_relax_section): Change
8195
        declaration to take boolean * rather than asymbol list.
8196
        (bfd_perform_slip): Change declaration to take BFD rather than
8197
        asymbol list.
8198
        * coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
8199
        than asymbol list.  Changed calls to bfd_perform_slip.
8200
        * bfd-in2.h: Rebuilt.
8201
        * libbfd.h: Rebuilt.
8202
        * libcoff.h: Rebuilt.
8203
        * Makefile.in: Rebuilt dependencies.
8204
 
8205
        * genlink.h (_bfd_generic_link_get_symbols): Define.
8206
        (_bfd_generic_link_get_symcount): Define.
8207
        * linker.c (generic_link_read_symbols): New function.
8208
        (generic_link_add_object_symbols): Use it.  Use
8209
        _bfd_generic_link_get_symbols and _bfd_generic_link_get_symcount
8210
        to get the symbols from the BFD.
8211
        (generic_link_check_archive_element): Likewise.
8212
        (_bfd_generic_final_link): Likewise.
8213
        (_bfd_generic_link_output_symbols): Likewise.
8214
        (default_indirect_link_order): Likewise.
8215
        (generic_link_add_symbol_list): Store pointer to hash table entry
8216
        in asymbol udata field.
8217
 
8218
Tue Mar 22 13:09:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8219
 
8220
        * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
8221
        reloc, used in embedded PIC code.
8222
        (mips_adjust_reloc_in): Change sanity check to permit new reloc.
8223
        (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
8224
        MIPS_R_PCREL16.
8225
 
8226
        * elf32-mips.c (mips_elf_final_link): Account for link_order
8227
        relocs when allocating space for relocations.  Set SEC_RELOC flag
8228
        for any section which has relocs.  Handle link_order relocs in
8229
        link_order loop.  Use _bfd_generic_link_add_symbols_collect for
8230
        add_symbls entry point.
8231
 
8232
        * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
8233
        counting relocs.  Set SEC_RELOC flag for any section which has
8234
        relocs.
8235
 
8236
        * linker.c (_bfd_default_link_order): Handle bfd_data_link_order.
8237
 
8238
        * linker.c (_bfd_generic_link_add_symbols): Just call
8239
        generic_link_add_symbols.
8240
        (_bfd_generic_link_add_symbols_collect): New function, like
8241
        _bfd_generic_link_add_symbols but also collect constructors and
8242
        destructors by name as collect2 does.
8243
        (generic_link_add_symbols): New function, like old
8244
        _bfd_generic_link_add_symbols but with collect argument.
8245
        (generic_link_add_object_symbols): Take collect argument.
8246
        (generic_link_check_archive_element_no_collect): New function.
8247
        (generic_link_check_archive_element_collect): New function.
8248
        (generic_link_check_archive_element): Take collect argument.
8249
        (generic_link_add_symbol_list): Take collect argument.
8250
        (_bfd_generic_link_add_one_symbol): Rename constructor argument to
8251
        collect.
8252
        * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
8253
        * libbfd.h: Rebuilt.
8254
 
8255
Tue Mar 22 10:04:00 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8256
 
8257
        * archive.c (bfd_construct_extended_name_table): Use ar_padchar
8258
        for first character in an extended name.
8259
        (_bfd_write_archive_contents): If ar_padchar == '/', then use
8260
        "//" as the name of the special archive member holding the
8261
        extended name table.
8262
 
8263
Mon Mar 21 12:28:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8264
 
8265
        Support for link_order types which generate relocs in order to
8266
        support -Ur in the linker.
8267
        * linker.c (generic_link_add_symbol_list): Remove bitsize argument
8268
        from call to _bfd_generic_link_add_one_symbol.
8269
        (_bfd_generic_link_add_one_symbol): Remove bitsize argument.
8270
        Don't pass bitsize to constructor call back.  Pass BFD_RELOC_CTOR
8271
        instead of bitsize to add_to_set call back.
8272
        (_bfd_generic_final_link): Account for link_order relocs when
8273
        allocating space for relocations.  Handle them in link_order loop.
8274
        (_bfd_generic_reloc_link_order): New function.
8275
        (_bfd_default_link_order): If a reloc_link_order is seen here,
8276
        abort.
8277
        (_bfd_count_link_order_relocs): New function.
8278
        * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
8279
        argument from declaration.
8280
        (_bfd_generic_reloc_link_order): Declare.
8281
        (_bfd_count_link_order_relocs): Declare.
8282
        * libbfd.h: Rebuilt.
8283
        * aoutx.h (aout_link_add_symbols): Remove bitsize argument from
8284
        call to _bfd_generic_link_add_one_symbol.
8285
        (NAME(aout,final_link)): Account for link_order relocs when
8286
        allocating space for relocations.  Handle them after handling all
8287
        input BFDs.
8288
        (aout_link_reloc_link_order): New function.
8289
        * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
8290
        call to _bfd_generic_link_add_one_symbol.
8291
        (ecoff_bfd_final_link): Account for link_order relocs when
8292
        allocating space for relocations.  Handle them in link_order loop.
8293
        (ecoff_link_write_external): Set the storage class of a defined
8294
        linker created symbol based on the section it is in.  Correct
8295
        bfd_link_hash_weak case to use .sc rather than .st.
8296
        (ecoff_reloc_link_order): New function.
8297
        * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
8298
        BFD_RELOC_CTOR.
8299
        * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
8300
 
8301
        * sunos.c (sunos_read_dynamic_info): Remove unused locals dynsym
8302
        and buf.
8303
 
8304
        * cisco-core.c (cisco_core_file_p): Only pass one argument to
8305
        bfd_zmalloc.  Free a pointer, not a union.
8306
        (cisco_bfd_is_local_label): Correct cast from asection to asymbol.
8307
 
8308
Sun Mar 20 09:24:36 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8309
 
8310
        * som.c (som_begin_writing): Fix thinko (off by one error).
8311
 
8312
        * som.c (bfd_section_from_som_symbol): Only to do the value
8313
        comparison for function symbols within executables.
8314
 
8315
        * som.c (bfd_section_from_som_symbol): Renamed from
8316
        som_section_from_subspace_index.  Pass in a native SOM symbol.
8317
        For executables, iterate through the sections to find out
8318
        which contains the symbol's address rather than using the
8319
        symbol_info field.  (symbol_info has a different meaning for
8320
        dynamicly linked executables.)
8321
 
8322
        * trad-core.c (trad_unix_core_file_p): Don't pass abfd to
8323
        bfd_zmalloc.
8324
 
8325
        * som.c (som_begin_writing): Fix braino (one call to align
8326
        space/subspace data was done unconditionally rather than
8327
        just for executables.)
8328
 
8329
        * som.c (som_begin_writing): Align text in all executables to
8330
        make HPUX kernel happy.  Fixes strip/objcopy for shared
8331
        executables.
8332
 
8333
Sat Mar 19 07:06:59 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8334
 
8335
        * som.c (som_begin_writing): Account for alignment needs of
8336
        subspaces too when writing executables.  Never request a negative
8337
        bss size.  Fixes some problems with demand paged executables,
8338
        still having problems with pure executables and shared executables.
8339
 
8340
Fri Mar 18 19:12:47 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
8341
 
8342
        * trad-core.c (trad_unix_core_file_p): Call bfd_zmalloc not
8343
        bfd_zalloc for rawptr, because later on we may call free, not
8344
        bfd_release, on it.
8345
 
8346
        * bfd.c (struct _bfd): Add cisco_core_struct to tdata union.
8347
        * libbfd.c (bfd_read, bfd_seek): Add comments regarding errors.
8348
        * cisco-core.c: New file.
8349
        * Makefile.in: Change accordingly.
8350
        * configure.in: Recognize cisco_core_vec.
8351
        * config/m68k-aout.mt (SELECT_VECS): Add cisco_core_vec.
8352
        * targets.c: Add cisco_core_vec.
8353
        * bfd-in2.h: Rebuilt.
8354
 
8355
Fri Mar 18 18:13:49 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8356
 
8357
        * som.h (som_copyable_section_data_struct): New structure
8358
        containing all the private section information which needs
8359
        to be copied from input section to output section during
8360
        objcopy or strip.
8361
        (som_section_data_struct): Remove several fields now in
8362
        som_copyable_section_data_struct.  Make the space and
8363
        subspace dictionaries be pointers (to save space when
8364
        only reading objects).
8365
 
8366
        * som.c (bfd_som_set_section_attributes): Now returns a boolean;
8367
        some references changed.  Allocate a copyable data stucture if
8368
        none exists.  Store info into the copyable data structure.
8369
        (bfd_som_set_subsection_attributes): Likewise.
8370
        (som_is_space, som_is_subspace, som_is_container): New functions.
8371
        Use these instead of directly accessing private data.
8372
        (som_prep_headers): Allocate space and subspace headers here.
8373
        Fill in some fields in the space/subspace headers from the
8374
        copyable data.
8375
        (som_bfd_copy_private_section_data): Only copy the stuff
8376
        that we really need to make objcopy and strip work.  Allocate
8377
        the copy_data structure for the output bfd before copying.
8378
 
8379
        * som.h (struct som_exec_data): New structure to hold exec
8380
        info that must be preserved when running objcopy/strip.
8381
        (struct somdata): Add new "exec_data" field and accessor
8382
        macro.  Add some comments on how the various fields are used.
8383
        (som_section_data_struct): Make is_space and is_subspace bitfields.
8384
        Delete unused subspace_index.  All references now use the
8385
        target_index field within the section structure itself.
8386
 
8387
        * som.c (make_unique_section): Delete unused declaration.
8388
        (som_bfd_copy_private_bfd_data): New function.
8389
        (som_object_setup): Allocate space for and save exec information
8390
        that needs to be copied during objcopy/strip.
8391
        (som_mkobject): Do not allocate space for a file header here.
8392
        It is not used when only reading SOM objects.
8393
        (som_prep_headers): Allocate space for and attach a file header
8394
        to the output bfd.  For executables, use the saved system_id
8395
        value rather than trying to guess the right value.  Do not abort
8396
        wwhen setting file_hdr->entry* for executables.
8397
        (som_begin_writing): For executables, set the exec_entry and
8398
        exec_flags fields.
8399
        (som_copy_private_backend_section_data): Always return a value.
8400
 
8401
        * libhppa.h (PA_PAGESIZE): Define.
8402
 
8403
        * som.c (SOM_ALIGN): Define.
8404
        (som_begin_writing): If writing an executable, initialize all
8405
        fields in the exec header to zero.  Update fields in the exec
8406
        header as sizes of loadable subspaces are computed.  Carefully
8407
        preserve alignments when building executables.  Actually write the
8408
        exec after all the fields are filled in.
8409
 
8410
        * Better long-filename handling.  Reads SOM ABI compliant extended
8411
        names, but doesn't quite write compliant extended names yet.
8412
        * som.c (som_slurp_extended_name_table): Delete function.  The
8413
        generic code will handle things correctly.
8414
        (som_slurp_armap): Seek to the beginning of the next member.
8415
        (normalize): New function.
8416
        (som_bfd_ar_write_symbol_stuff): Take the size of the extended
8417
        name table into account when computing the file offsets in the
8418
        SOM dictionary.  Make sure to align to an even boundary.
8419
        (som_write_armap): Initialize the checksum to zero.
8420
        (ar_maxchars): Fix.  Opps.
8421
 
8422
Fri Mar 18 20:35:24 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
8423
 
8424
        * aoutx.h (reloc_type_lookup): Handle BFD_RELOC_CTOR on a 64-bit
8425
        machine.  Handle BFD_RELOC_SPARC13 and BFD_RELOC_SPARC_BASE13.
8426
 
8427
Thu Mar 17 18:26:46 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
8428
 
8429
        * bfd-in.h (BFD_VERSION): Use @VERSION@.
8430
        * Makefile.in (bfd.h): Replace it with contents of VERSION file.
8431
        * bfd-in2.h: Regenerated.
8432
 
8433
        * trad-core.c (trad_unix_bfd_is_local_label): Fixed typo where
8434
        this was also named trad_unix_bfd_copy_private_bfd_data.
8435
 
8436
Thu Mar 17 10:37:07 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
8437
 
8438
        * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,
8439
        elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0)
8440
        returns NULL, it is not an error.  It's possible that some of
8441
        these checks are not necessary (because the size can never be
8442
        zero), but putting in the checks is the conservative thing to do
8443
        in light of the fact that some of these malloc calls replaced
8444
        unchecked alloca calls, in which a zero argument would work fine.
8445
 
8446
Thu Mar 17 11:44:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8447
 
8448
        * osf-core.c (osf_core_bfd_copy_private_bfd_data): Remove
8449
        duplicate definition.
8450
        (osf_core_bfd_is_local_label): Define.
8451
 
8452
        * reloc.c (bfd_generic_get_relocated_section_contents): Don't fail
8453
        if malloc (0) fails.  bfd_canonicalize_reloc returning 0 is not a
8454
        failure indication, it merely means there are no relocs.
8455
 
8456
        * elfcode.h (NAME(bfd_elf,write_object_contents)): Don't use space
8457
        after NAME, since SunOS /bin/cc can't handle it.
8458
 
8459
Wed Mar 16 16:43:33 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
8460
 
8461
        * netbsd386.c (N_SET_FLAGS): Don't nuke the machine id field.
8462
        From sukes@glue.umd.edu (Tasuki Hirata).
8463
 
8464
Wed Mar 16 07:55:54 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
8465
 
8466
        * aoutf1.h (4 places): Use a simple #if on ARCH_SIZE, rather than
8467
        all that convoluted stuff with NAME, CAT3, etc.  The convoluted
8468
        stuff broke for SunOS4 /bin/cc (due to DEFUN elimination, I guess).
8469
 
8470
Wed Mar 16 00:02:05 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8471
 
8472
        * som.c (som_prep_for_fixups): Detect section symbols based
8473
        on either the lack of private data or the symbol flags.  Do not
8474
        munge section symbol names anymore -- they no longer confuse GDB.
8475
        (som_begin_writing): Leave space for an exec header if writing
8476
        an executable.
8477
        (som_slurp_symbol_table): Recognize both forms of section symbol
8478
        names "L$0\002" and "$$".  Change the name of "L$0\002"
8479
        section symbols to be the name of the section they represent.
8480
        Debugging  symbols begin with "L$0\001", not just "L$".
8481
 
8482
Tue Mar 15 22:58:28 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8483
 
8484
        * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
8485
 
8486
        * bfd-in.h (JUMP_TABLE): Add new entries to the jump table
8487
        for bfd_copy_private_section_data, bfd_copy_private_bfd_data,
8488
        and bfd_is_local_label.
8489
 
8490
        * targets.c: Add new entries to the bfd_target structure.
8491
 
8492
        * bfd.c (bfd_copy_private_bfd_data): New definition.
8493
 
8494
        * section.c (bfd_copy_private_section_data): New definition.
8495
 
8496
        * syms.c (bfd_is_local_label): New definition.
8497
 
8498
        * libbfd-in.h (bfd_generic_is_local_label): Declare.
8499
 
8500
        * libbfd.c (bfd_generic_is_local_label): New function.
8501
 
8502
        * *-core.c: Provide default definitions for new functions in
8503
        the target vector which all point to bfd_false.
8504
 
8505
        * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c
8506
        libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c
8507
        Default new vectors for copying private backend data to bfd_true.
8508
        Default new vector for determining if a symbol is a local label
8509
        to bfd_generic_is_local_label.
8510
 
8511
        * som.c (som_bfd_copy_private_section_data): New function.
8512
        (som_bfd_is_local_label): New function.
8513
        (som_bfd_copy_private_bfd_data): For now default to bfd_true.
8514
 
8515
        * elf32-hppa.c (hppa_elf_is_local_label): New function.
8516
 
8517
Tue Mar 15 23:55:47 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8518
 
8519
        * cf-m68klynx.c (CALC_ADDEND): Use _bfd_m68klynx_howto_table.
8520
 
8521
Tue Mar 15 04:41:13 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
8522
 
8523
        * Most files:
8524
        Replace DEFUN and DEFUN_VOID with K&R-style function definition.
8525
        Indent some of them to GNU standards.
8526
 
8527
        * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c,
8528
        cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c,
8529
        elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h,
8530
        libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c:
8531
        Update copyright years.
8532
 
8533
Mon Mar 14 11:41:23 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8534
 
8535
        * som.c (som_prep_for_fixups): A relocation involving the section
8536
        symbol for the *ABS* section is really a relocation involving
8537
        no symbol.
8538
        (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for
8539
        undefined symbols.  Correctly distinguish between debugger symbols
8540
        and section symbols.
8541
 
8542
        * som.c (setup_sections): Set SEC_DEBUGGING and the section attributes
8543
        for spaces and subspaces.
8544
 
8545
        * som.c (som_bfd_count_ar_symbols): Fix typo.
8546
 
8547
        * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, and
8548
        HAS_RELOC based on the object's magic number.
8549
        (make_unique_section): Delete function.  BFD and its users are
8550
        prepared to handle multiple sections with the same name.
8551
        (setup_sections): Allocate space on the BFD's obstack to hold
8552
        section names.  Use bfd_make_setion_anyway rather than the
8553
        obsolete make_unique_section.
8554
        (som_prep_headers): Choose the correct SOM magic number based
8555
        on the BFD's flags.
8556
        (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
8557
 
8558
Sat Mar 12 09:46:09 1994  Ian Lance Taylor  (ian@cygnus.com)
8559
 
8560
        * elf32-ppc.c: Renamed from elf32-powerpc.c.
8561
        * nlm32-ppc.c: Renamed from nlm32-powerpc.c.
8562
        * Makefile.in, configure.in: Corresponding changes.
8563
 
8564
Fri Mar 11 22:27:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8565
 
8566
        * elf32-powerpc.c: Extensive changes to update to preliminary ABI.
8567
 
8568
Fri Mar 11 00:34:59 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8569
 
8570
        * sunos.c (sunos_read_dynamic_info):  Assume that dynamic info
8571
        is always located at the start of the data section to allow
8572
        recovery of the dynamic info from a stripped executable.
8573
        * ecoff.c (ecoff_styp_to_sec_flags):  Handle STYP_PDATA, STYP_XDATA
8574
        and STYP_COMMENT.
8575
 
8576
Wed Mar  9 17:17:53 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
8577
 
8578
        * libbfd-in.h: Remove alloca cruft.  It was missing some necessary
8579
        cruft (like the #pragma alloca for AIX).
8580
        In addition to that problem, the C alloca calls xmalloc, which
8581
        means checking for being out of memory can't work right.  The
8582
        following changes remove all uses of alloca from BFD.
8583
        * hosts/solaris2.h: Remove alloca cruft.
8584
        * som.c: Replace alloca with a fixed size auto array.
8585
        * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c,
8586
        ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c,
8587
        sunos.c: Replace alloca with malloc and appropriate error checking and
8588
        freeing.
8589
        * linker.c: Replace alloca with obstack_alloc.
8590
        * libbfd.h: Rebuilt.
8591
 
8592
Tue Mar  8 12:10:38 1994  Ian Lance Taylor  (ian@cygnus.com)
8593
 
8594
        * coff-mips.c (mips_relocate_section): Handle MIPS_R_LITERAL like
8595
        MIPS_R_GPREL.
8596
 
8597
Sat Mar  5 14:08:54 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8598
 
8599
        * elf32-hppa.h, elfcode.h:  Replace uses of Elf*_Half, Elf*_Word,
8600
        Elf*_Off typedefs by their expansion, the typedefs have been
8601
        removed from include/elf/internal.h.
8602
        * elfcode.h (bfd_section_from_shdr):  Handle SHT_DYNAMIC section like
8603
        SHT_PROGBITS section.
8604
 
8605
Thu Mar  3 20:03:39 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8606
 
8607
        * som.h (_PA_RISC_ID): Treat HOST_HPPAOSF just like HOST_HPPABSD.
8608
 
8609
Wed Mar  2 13:28:06 1994  Jim Kingdon  (kingdon@deneb.cygnus.com)
8610
 
8611
        * configure.host: Recognize i[34]86-sequent-*.
8612
 
8613
        * trad-core.c (trad_unix_core_file_p): A non-zero, not zero,
8614
        return from bfd_seek indicates an error.
8615
        New macro TRAD_CORE_DSIZE_INCLUDES_TSIZE to replace
8616
        TRAD_CORE_STACK_OFFSET.
8617
        * hosts/symmetry.h: Define TRAD_CORE_DSIZE_INCLUDES_TSIZE and
8618
        TRAD_CORE_USER_OFFSET but not HOST_STACK_OFFSET.
8619
 
8620
Wed Mar  2 11:57:03 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8621
 
8622
        * som.[ch]: Do not include libhppa.h in som.c, instead include
8623
        it in som.h.
8624
 
8625
        * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead
8626
        include it in elf32-hppa.h.
8627
 
8628
        * som.c (log2): Return -1 on error rather than aborting.
8629
        (setup_sections): Bubble up an error from log2.
8630
 
8631
        * Changes to make HP C compiler happy in both traditional
8632
        and ANSI mode.
8633
        * som.c (hppa_som_gen_reloc_type): Use correct enum type for
8634
        field parameter.
8635
        (bfd_som_set_section_attributes): Use unsigned int rather than
8636
        unsigned char to avoid GNU-C extensions.
8637
        (bfd_som_attach_aux_hdr): Return a boolean to indicate success
8638
        or failure rather than aborting on failure.
8639
 
8640
        * som.h (bfd_som_set_section_attributes): Fix prototype to match
8641
        som.c changes.
8642
        (bfd_som_attach_aux_hdr): Add prototype.
8643
        (hppa_som-gen_reloc_type): Likewise.
8644
 
8645
        * elf32-hppa.c: Add a couple casts to make HP compiler happy.
8646
        (hppa_look_for_stubs_in_section): Do not return false on failure
8647
        until rest of code is ready to handle it.  Abort for now.
8648
 
8649
Tue Mar  1 18:33:59 1994  Jim Kingdon  (kingdon@deneb.cygnus.com)
8650
 
8651
        * bfd-in2.h: Rebuilt.
8652
 
8653
Tue Mar  1 13:06:53 1994  Kung Hsu  (kung@mexican.cygnus.com)
8654
 
8655
        * i386os9k.c: use new functions bfd_set_error and bfd_get_error.
8656
        * Makefile.in: delete an extra blank.
8657
        * configure.in : Add i396os9k_vec.
8658
 
8659
Mon Feb 28 15:41:01 1994  Kung Hsu  (kung@mexican.cygnus.com)
8660
 
8661
        * config.bfd : Add i386-os9k.
8662
        * config/i386-os9k.mt : Newly add os9k target makefile.
8663
 
8664
        * i386os9k.c : new file to handle os9k format bfd.
8665
        * Makefile.in : Handle new file i386os9k.c
8666
        * targets.c : Add bfd_target_os9k_flavour and i386os9k_vec.
8667
        * cache.c : Initialize cache_sentinel to 0.
8668
 
8669
Sun Feb 27 16:30:55 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8670
 
8671
        * elf32-hppa.c (mismatches, retval_mismatches): Fix mismatch
8672
        action in case where caller specified no argument relocation.
8673
        (hppa_elf_build_linker_stub): Try again to get the sym_ptr_ptr
8674
        right in the original relocation and the stub's relocation.
8675
 
8676
        * elf32-hppa.h (hppa_look_for_stub_in_section): Fix typo.  Delete
8677
        unused symbols argument.
8678
 
8679
        * elf32-hppa.c (hppa_elf_stub_reloc): Accept asymbol ** rather
8680
        than asymbol * for original target symbol.  All callers changed.
8681
        Set reloc->sym_ptr_ptr appropriately.
8682
        (hppa_elf_build_linker_stub): Set reloc->sym_ptr_ptr correctly.
8683
        (hppa_elf_look_for_stubs_in_section): No longer need symbols
8684
        argument.  Use the output symbols when canonicalizing the relocs,
8685
        creating them if necessary.
8686
 
8687
        * linker.c (_bfd_generic_link_output_symbols): Do not
8688
        rebuild/clobber the output symbols if they already exist.
8689
 
8690
Sun Feb 27 15:22:36 1994  Stan Shebs  (shebs@andros.cygnus.com)
8691
 
8692
        * targets.c (BFD_SEND, BFD_SEND_FMT): Add debugging versions that
8693
        check all the pointer dereferences.  Enabled via DEBUG_BFD_SEND.
8694
        * bfd-in2.h: Rebuilt.
8695
 
8696
        * srec.c (hex_value): Always set to a size of 256 bytes.
8697
        (srec_init): Cosmetic changes.
8698
 
8699
Sun Feb 27 11:18:47 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8700
 
8701
        * elf32-hppa.c: Second half of major cleanup.  More comments,
8702
        PARAMize and staticize rest of functions.  Delete unused
8703
        functions.  Delete unused/unnecessary arguments to some functions.
8704
        Group static vars together.  Abort for bad errors until we have
8705
        error code propogation working.  Work on spacing and indention.
8706
        Add FIXMEs for unresolved problems.  Use enums rather than
8707
        #defines for lots of things.  Merge two functions which build
8708
        linker stubs into a single function (so they can easily share a
8709
        ton of common code).
8710
 
8711
Sat Feb 26 10:00:45 1994  Ian Lance Taylor  (ian@cygnus.com)
8712
 
8713
        * reloc.c (_bfd_relocate_contents): Adjust handling of overflow to
8714
        avoid depending upon right shifts of signed numbers, and to
8715
        correct handling of src_mask with lower bits zero.
8716
 
8717
        * aoutx.h, archive.c: Add casts to avoid warnings from SVR4 cc.
8718
        * ecoff.c, ecofflink.c, ecoffswap.h, srec.c: Likewise.
8719
        * elf32-i386.c: Likewise.
8720
        * elfcode.h (bfd_section_from_shdr): Make i unsigned; remove old
8721
        #if 0 code.
8722
        (elf_write_phdrs): Make i unsigned.
8723
        (map_program_segments): Make i and n_left unsigned.
8724
        (assign_file_positions_except_relocs): Make i unsigned.
8725
        (write_shdrs_and_ehdr): Make count unsigned.
8726
        (assign_file_positions_for_relocs): Make i unsigned.
8727
        (NAME(bfd,elf_write_object_contents)): Make count unsigned.
8728
        (section_from_elf_index): Make index argument unsigned.
8729
 
8730
Fri Feb 25 21:34:58 1994  Ian Lance Taylor  (ian@cygnus.com)
8731
 
8732
        * elfcode.h: Don't include assert.h.
8733
        (swap_out_syms): Use BFD_ASSERT rather than assert.
8734
 
8735
        * linker.c (_bfd_generic_link_write_global_symbol): Add missing
8736
        break in switch.
8737
 
8738
        * hosts/i386v4.h (qsort, strtol): Remove incorrect and useless
8739
        declarations.
8740
 
8741
Fri Feb 25 16:35:57 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8742
 
8743
        * libhppa.h (hppa_rebuild_insn): Moved here from elf32-hppa.c.
8744
 
8745
        * elf32-hppa.h (elf_hppa_tc_symbol): Add new arguments.
8746
        (elf_hppa_tc_make_sections): Likewise.
8747
        (elf_hppa_final_processing): Add extern decl.
8748
 
8749
        * elf32-hppa.c: First half of major cleanup.  Add/cleanup lots of
8750
        comments.  PARAMize some static functions.  Delete unused functions.
8751
        Delete unused/unnecessary arguments to many functions.  Group
8752
        static vars together.  Collapse common case statements together
8753
        in many places.  Use default case when possible instead of listing
8754
        each case separately.  Abort for bad errors until we get error
8755
        code propogation working.  Work on spacing and indention problems.
8756
        Add FIXMEs for some unresolved problems.  Delete hopelessly broken
8757
        COMPLEX relocation support (it's never used anyway).
8758
        (hppa_elf_rebuild_insn): Delete.  Moved into libhppa.h.
8759
        (elf_hppa_tc_symbol): Accept and use new arguments (symext chains).
8760
        (elf_hppa_tc_make_sections): Likewise.
8761
 
8762
        * format.c (bfd_check_format_matches): Initialize matching_vector
8763
        to keep gcc -Wall quiet.
8764
 
8765
        * elfcode.h (elf_slurp_reloca_table): Fix typo.
8766
 
8767
        * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"
8768
        not "sizeof (som_symbol_type *)".
8769
 
8770
        * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)"
8771
        not "sizeof (asymbol").  Opps.
8772
 
8773
Fri Feb 25 13:19:04 1994  Ted Lemon  (mellon@pepper.ncd.com)
8774
 
8775
        * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.
8776
        (bfd_set_gp_size):  Can't set gp value on an archive.
8777
 
8778
Fri Feb 25 12:57:00 1994  Steve Chamberlain  (sac@jonny.cygnus.com)
8779
 
8780
        * srec.c (pass_over): Don't skip too many characters when
8781
        end of line seen.
8782
 
8783
Fri Feb 25 11:41:57 1994  Ian Lance Taylor  (ian@cygnus.com)
8784
 
8785
        * ecoff.c (ecoff_sizeof_headers): Align result to 16 byte
8786
        boundary.
8787
 
8788
Thu Feb 24 07:13:22 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8789
 
8790
        * som.c (som_bfd_derive_misc_symbol_info): Derive symbol_info
8791
        field for absolute symbols in the same manner as undefined
8792
        and common symbols.
8793
 
8794
Thu Feb 24 04:29:19 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8795
 
8796
        * elfcode.h (elf_core_file_p):  Check for core file e_machine match
8797
        like in elf_object_p.
8798
 
8799
Wed Feb 23 18:28:37 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8800
 
8801
        * elfcode.h (alloca): Delete declaration.
8802
 
8803
        * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magic
8804
        number rather than HP9000S800_ID.  Note som.c is careful
8805
        to make sure CPU_PA_RISC1_0 is always defined.
8806
 
8807
Mon Feb 21 10:12:02 1994  Stan Shebs  (shebs@andros.cygnus.com)
8808
 
8809
        * Makefile.in (targets.o, archures.o): Use ALL_CFLAGS to supply
8810
        flags to explicit compile actions.
8811
 
8812
Mon Feb 21 09:50:06 1994  Ian Lance Taylor  (ian@lisa.cygnus.com)
8813
 
8814
        * ecofflink.c (ecoff_write_symhdr): Set symhdr->magic here.
8815
        * ecoff.c (ecoff_write_object_contents): Make sure .bss section
8816
        ends on a page boundary if there is no symbol table.
8817
        (ecoff_bfd_final_link): Don't set symhdr->magic here.
8818
 
8819
        * hosts/hp300.h: Include ; don't declare free.
8820
 
8821
        * som.c (som_bfd_count_ar_symbols): Use a pointer and alloca
8822
        rather than an array of variable size.
8823
        (som_bfd_fill_in_ar_symbols): Likewise.
8824
        (som_bfd_ar_write_symbol_stuff): Likewise.
8825
 
8826
        * coff-alpha.c (alpha_relocate_section): Rewrite mask and shift
8827
        operation to avoid OSF 1.3 cc bug.
8828
        * ecoff.c (ecoff_write_object_contents): Make text_size, data_size
8829
        and bss_size bfd_size_type instead of unsigned long.  Make
8830
        text_start and data_start bfd_vma instead of unsigned long.
8831
        * ecofflink.c (ecoff_add_string): Remove incorrect cast of return
8832
        value.
8833
 
8834
Sun Feb 20 16:06:54 1994  Ian Lance Taylor  (ian@lisa.cygnus.com)
8835
 
8836
        * linker.c (_bfd_generic_link_add_archive_symbols): Consider
8837
        symbols in the order they appear in the archive map.
8838
 
8839
Sat Feb 19 03:17:32 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8840
 
8841
        * coff-alpha.c (reloc_nil):  Add forward declaration, add missing
8842
        error_message argument.
8843
        * coff-sparc.c (bfd_coff_generic_reloc):  Add forward declaration,
8844
        add missing error_message argument.
8845
        * mipsbsd.c (mips_fix_hi16_s):  Add forward declaration, add missing
8846
        error_message argument.
8847
 
8848
Fri Feb 18 11:41:58 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8849
 
8850
        Support for PowerPC NetWare.
8851
        * nlm32-powerpc.c: New file.
8852
        * config.bfd (powerpc-*-netware*): New target; use ppc-nlm.
8853
        * config/ppc-nlm.mt: New file.
8854
        * configure.in (nlm32_powerpc_vec): New target vector; use
8855
        nlm32-powerpc.o, nlm32.o, nlm.o.
8856
        * targets.c (nlm32_powerpc_vec): Declare.
8857
        * Makefile.in (BFD32_BACKENDS): Add nlm32-powerpc.o.
8858
        (CFILES): Add nlm32-powerpc.c.
8859
 
8860
        Initial support for PowerPC ELF.  Done without an ABI, and
8861
        probably to be changed when I get an ABI.
8862
        * config.bfd (powerpc-*-sysv4*): New target; use ppc-elf.
8863
        * config/ppc-elf.mt: New file.
8864
        * configure.in (bfd_elf32_powerpc_vec): New target vector; use
8865
        elf32-powerpc.o, elf32.o, elf.o.
8866
        * elf32-powerpc.c: New file.
8867
        * elfcode.h (prep_headers): Add bfd_arch_powerpc case.
8868
        (elf_set_arch_mach): Likewise.
8869
        * targets.c (bfd_elf32_powerpc_vec): Declare.
8870
        * Makefile.in (BFD32_BACKENDS): Add elf32-powerpc.o.
8871
        (CFILES): Add elf32-powerpc.c.
8872
        Rebuilt dependencies.
8873
 
8874
Thu Feb 17 15:29:55 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
8875
 
8876
        * coffgen.c (coff_write_linenumbers): Always return a value.
8877
 
8878
        * elfcode.h (elf_slurp_symbol_table): Handle zero symbols
8879
        reasonably.  Allocate x_symp using alloca.
8880
 
8881
        * elfcode.h (map_program_segments): ELF program header entries
8882
        must be sorted by load address.  This used to generate the entries
8883
        in reverse order.
8884
 
8885
        * section.c (SEC_IN_MEMORY): Define.
8886
        (asection): Rename unused field otheruserdata to contents, and
8887
        make it char *.
8888
        (bfd_make_section_anyway): Initialize contents field to NULL.
8889
        (bfd_get_section_contents): If SEC_IN_MEMORY is set, get section
8890
        contents from contents field rather than from file.
8891
        * bfd-in2.h: Rebuilt.
8892
 
8893
Thu Feb 17 08:30:53 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
8894
 
8895
        * bfd.c (bfd_get_error, bfd_set_error): New functions.
8896
        (bfd_error): Make static.
8897
        (bfd_error_type): Renamed from bfd_ec.  Prepend "bfd_error_" to
8898
        all values.
8899
        * bfd-in2.h: Regenerated.
8900
        * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h,
8901
        aoutf1.h, aoutx.h, archive.c, archures.c,
8902
        bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c,
8903
        coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c,
8904
        ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c,
8905
        elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c,
8906
        i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c,
8907
        lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c,
8908
        nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
8909
        ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c,
8910
        srec.c, sunos.c, syms.c, targets.c, tekhex.c,
8911
        trad-core.c: Change callers.
8912
 
8913
Tue Feb 15 22:27:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8914
 
8915
        * som.c: Remove FIXMEs for things which have been dealt with.
8916
 
8917
Tue Feb 15 19:39:24 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
8918
 
8919
        * section.c (bfd_get_section_contents): Since this function reads
8920
        unrelocated contents, the section's raw size is always the one to
8921
        use for bounds checking.
8922
 
8923
        * linker.c (default_indirect_link_order): In assertion, compare
8924
        link_order size field against cooked size, not raw size, of input
8925
        section.
8926
 
8927
        * bout.c (b_out_get_reloc_upper_bound): For BSS section, just
8928
        return 0.
8929
        (aligncode): When shrinking, the addend should be set to the
8930
        current offset in the section plus the number of bytes of padding
8931
        that will actually be retained.
8932
        (b_out_relax_section): If a section contains no relocations, don't
8933
        bother processing them.
8934
        (b_out_get_relocated_section_contents): Set reloc_done.  Assert
8935
        that bfd_get_section_contents returns true.  Check that relocs are
8936
        properly ordered.
8937
        (b_out_get_relocated_section_contents, case ALIGNDONE): Assert
8938
        that reloc->addend falls between the current source offset and the
8939
        raw size of the input section.
8940
 
8941
        * config.bfd: Support i960 vxworks versions > 5.0 with coff, not
8942
        bout.  Default with no version number is still bout.  Support
8943
        explicit i960-coff target too.
8944
 
8945
        * bout.c: Changed some indentation, deleted trailing whitespace,
8946
        fixed some comments, removed some "#if 1" lines.
8947
        (output_addr): New macro.
8948
        (calljx_callback, callj_callback, get_value, abs32code, aligncode,
8949
        b_out_get_relocated_section_contents): Use it for readability.
8950
 
8951
Tue Feb 15 09:00:16 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8952
 
8953
        * som.c (som_bfd_prep_for_ar_write): Iterate through the SOM
8954
        symbols, not the BFD symbols.
8955
        (som_bfd_ar_write_symbol_stuff): Likewise.
8956
 
8957
Mon Feb 14 22:55:20 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8958
 
8959
        * som.c (som_slurp_symbol_table): Do not die if a BFD doesn't
8960
        have any symbols.
8961
 
8962
        * Finish basic read-write support for SOM archive libraries.  Bugs
8963
        surely remain as this hasn't been tested all that much.
8964
        * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define.
8965
        (struct som_misc_symbol_info): New structure to hold info necessary
8966
        to build both normal and library symbol tables.
8967
        (som_derive_misc_symbol_info): New function to derive info necessary
8968
        to build both normal and library symbol tables.
8969
        (som_build_and_write_symbol_table): Use new function to derive misc
8970
        symbol information.
8971
        (som_slurp_symbol_table): Update backend private data for symbols
8972
        appropriately.
8973
        (som_bfd_prep_for_ar_write): New function.
8974
        (som_bfd_ar_symbol_hash): New function.
8975
        (som_bfd_ar_write_symbol_stuff): New function.
8976
        (som_write_armap): Flesh out.
8977
        (som_vec): Fix ar padding character.
8978
 
8979
        * som.c: Consistently use memset rather than bzero.
8980
 
8981
Mon Feb 14 17:02:28 1994  Stu Grossman  (grossman at cygnus.com)
8982
 
8983
        * coff-rs6000.c:  Add Lynx core file support, use HOST_AIX, where
8984
        appropriate.
8985
        * rs6000-core.c:  Use HOST_AIX instead of COREFILES_PLEASE.
8986
        * config/rs6000.mh:  Remove defs of ARCHIVES_PLEASE and
8987
        COREFILES_PLEASE.
8988
        * config/rs6000lynx.mh:  Turn on Lynx core file support.
8989
        * hosts/rs6000.h:  #define HOST_AIX.
8990
        * hosts/rs6000lynx.h:  Create this to enable Lynx host support.
8991
 
8992
Sun Feb 13 14:30:00 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
8993
 
8994
        * som.h (som_symbol_data): Safely access backend private data
8995
        for BFD symbols.  All callers changed.
8996
 
8997
        * Read-only SOM archive support.
8998
        * som.c (som_bfd_count_ar_symbols): New helper function.
8999
        (som_bfd_fill_in_ar_symbols): New helper function.
9000
        (som_slurp_armap): New function to read a SOM LST.
9001
 
9002
        * som.h: Include  and .
9003
 
9004
Sat Feb 12 22:34:14 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
9005
 
9006
        * elfcode.h (elf_map_symbols): Fix typo.
9007
        (write_object_contents): Check return values from prep_headers and
9008
        elf_compute_section_file_positions.
9009
        (set_section_contents): Likewise.
9010
 
9011
Fri Feb 11 16:56:50 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9012
 
9013
        * archive.c (normalize) [VMS]: Call malloc, not bfd_xmalloc.
9014
        (bfd_construct_extended_name_table): Check result of normalize.
9015
 
9016
Tue Feb  8 08:57:31 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9017
 
9018
        Make all callers of malloc or realloc (including via obstacks)
9019
        check the result for NULL.  Most set bfd_error to no_memory and
9020
        return in that case; a few are harder to fix, and are marked
9021
        with "FIXME ".
9022
 
9023
        * elf32-hppa.c (hppa_elf_build_arg_reloc_stub
9024
        hppa_elf_build_long_branch_stub):  Check bfd_make_empty_symbol return.
9025
        * linker.c (_bfd_generic_link_output_symbols
9026
        _bfd_generic_link_write_global_symbol): Ditto
9027
        * section.c (bfd_make_section_anyway): Ditto.
9028
 
9029
        * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc.
9030
        (first_phase): Ditto.  FIXME void
9031
        (tekhex_make_empty_symbol): Check bfd_zalloc.
9032
 
9033
        * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc.
9034
        (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc.
9035
 
9036
        * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate.
9037
 
9038
        * srec.c: Indent.
9039
        (fillup_symbols): Check bfd_alloc.  FIXME void
9040
        (srec_mkobject srec_get_section_contents
9041
        srec_set_section_contents): Check bfd_alloc.
9042
        (srec_make_empty_symbol): Check bfd_zalloc.
9043
 
9044
        * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t.
9045
        (make_unique_section): Check bfd_alloc.
9046
        (som_new_section_hook): Check bfd_zalloc.
9047
        (bfd_som_attach_aux_hdr): Ditto.  FIXME void
9048
 
9049
        * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc.
9050
 
9051
        * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc.
9052
        (osf_core_core_file_p): Check bfd_alloc.
9053
 
9054
        * oasys.c (oasys_slurp_symbol_table oasys_archive_p
9055
        oasys_mkobject oasys_object_p oasys_new_section_hook
9056
        oasys_set_section_contents): Check bfd_alloc.
9057
        (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc.
9058
        (oasys_make_empty_symbol): Check bfd_zalloc.
9059
 
9060
        * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc.
9061
        (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc.
9062
 
9063
        * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc.
9064
 
9065
        * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc.
9066
 
9067
        * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc.
9068
 
9069
        * linker.c (_bfd_link_hash_newfunc
9070
        (generic_link_hash_newfunc
9071
        (archive_hash_newfunc
9072
        (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate.
9073
        (_bfd_generic_final_link
9074
        (_bfd_generic_link_output_symbols
9075
        (default_indirect_link_order): Check bfd_alloc.
9076
        (bfd_new_link_order): Check bfd_alloc_by_size_t.
9077
 
9078
        * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc.
9079
 
9080
        * ieee.c: Indent.
9081
        (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p
9082
        ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc.
9083
        (do_one): Check bfd_alloc.  Return a boolean.
9084
        (ieee_slurp_section_data): Check it.
9085
        (init_for_output): Check bfd_alloc.  Return a boolean.
9086
        (ieee_set_section_contents): Check it.
9087
        (do_with_relocs):  Check bfd_alloc.  Return a boolean.
9088
        (ieee_bfd_debug_info_accumulate): Ditto.  FIXME void.
9089
        (ieee_mkobject): Check bfd_zalloc.
9090
        (ieee_make_empty_symbol): Check bfd_zmalloc.
9091
 
9092
        * hpux-core.c (hpux_core_make_empty_symbol): Check
9093
        bfd_zalloc.
9094
 
9095
        * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check
9096
        bfd_zalloc.
9097
        (hppabsd_core_core_file_p): Check bfd_zalloc.
9098
 
9099
        * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc.
9100
 
9101
        * elfcode.h (elf_new_section_hook): Check bfd_alloc.
9102
        (bfd_section_from_phdr): Ditto.
9103
        (write_relocs): Ditto.  FIXME void
9104
        (elf_map_symbols assign_section_numbers map_program_segments):
9105
        Ditto.  Return a boolean.
9106
        (swap_out_syms): Ditto.  Check elf_map_symbols.
9107
        (elf_slurp_symbol_table): Check bfd_zalloc.
9108
        (elf_slurp_reloca_table): Check bfd_alloc.
9109
        (elf_slurp_reloc_table): Ditto.
9110
        (elf_compute_section_file_positions): Check assign_section_numbers.
9111
        (assign_file_positions_except_relocs): Return a boolean.
9112
        Check map_program_segments.
9113
        (elf_compute_section_file_positions): Check it.
9114
 
9115
        * elf32-mips.c (mips_elf_final_link): Check bfd_alloc.
9116
 
9117
        * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and
9118
        realloc.
9119
        (hppa_elf_stub_reloc): Ditto.
9120
        (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc.
9121
        (hppa_elf_build_long_branch_stub): Ditto.
9122
        (elf32_hppa_backend_symbol_table_processing): Ditto.
9123
 
9124
        * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc.  Return a boolean.
9125
        (ecoff_slurp_symbol_table): Check it.
9126
        (ecoff_slurp_armap): Check bfd_alloc.
9127
        (ecoff_write_armap): Check bfd_zalloc.
9128
        (ecoff_link_hash_newfunc): Check bfd_hash_allocate and
9129
        _bfd_link_hash_newfunc.
9130
        (ecoff_link_add_externals): Check bfd_alloc.
9131
 
9132
        * ctor.c (bfd_constructor_entry): Check bfd_alloc.
9133
 
9134
        * coffgen.c (coff_real_object_p): Check bfd_alloc.
9135
        (coff_renumber_symbols): Check bfd_alloc_by_size_t.  Return a boolean.
9136
        (coff_write_symbol): Check bfd_alloc.  FIXME int
9137
        (coff_write_linenumbers): Check bfd_alloc.  Return a boolean.
9138
        (coff_section_symbol): Check bfd_alloc_by_size_t.
9139
        (coff_get_normalized_symtab): Check bfd_alloc.
9140
        (coff_bfd_make_debug_symbol): Check bfd_zalloc.
9141
        * libcoff-in.h: Change decls of coff_renumber_symbols,
9142
        coff_write_linenumbers.
9143
        * libcoff.h: Rebuilt.
9144
        * coffcode.h (coff_write_object_contents): Check
9145
        coff_renumber_symbols, coff_write_linenumbers.
9146
 
9147
        * coffcode.h: Indent.
9148
        (coff_add_missing_symbols): Check bfd_alloc_by_size_t.  Return a
9149
        boolean.
9150
        (coff_write_object_contents): Check it.
9151
 
9152
        * coff-alpha.c (alpha_relocate_section): Check bfd_alloc.
9153
        * coff-mips.c (mips_relocate_section): Ditto.
9154
 
9155
        * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value.
9156
        (do_slurp_bsd_armap): Ditto.
9157
        (compute_and_write_armap): Check bfd_realloc value.
9158
 
9159
        * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc
9160
        return value.  Return boolean value.
9161
        (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value.
9162
        (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc
9163
        return value.
9164
        (add_to_stringtab): Ditto.  FIXME void
9165
        (aout_link_hash_newfunc): Check bfd_hash_allocate return value.
9166
        (aout_link_add_symbols): Check bfd_alloc value.
9167
        (translate_symbol_table): Check translate_from_native_sym_flags.
9168
        * hp300hpux.c (MY(slurp_symbol_table)): Ditto.
9169
        * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc.
9170
 
9171
        * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc.
9172
 
9173
        * opncls.c (obstack_chunk_alloc): Define as malloc, not
9174
        bfd_xmalloc_by_size_t.
9175
        (_bfd_new_bfd): Check obstack_begin for 0 return.
9176
 
9177
        * ieee.c (obstack_chunk_alloc): Define as malloc, not
9178
        bfd_xmalloc_by_size_t.
9179
        (ieee_archive_p): Check obstack_begin for 0 return and
9180
        obstack_finish for NULL return.
9181
 
9182
        * hash.c (obstack_chunk_alloc): Define as malloc, not
9183
        bfd_xmalloc_by_size_t.
9184
        (bfd_hash_table_init_n): Check obstack_begin for 0 return and
9185
        obstack_finish for NULL return.
9186
        (bfd_hash_lookup): Check obstack_alloc for NULL return.
9187
 
9188
        * ecofflink.c (obstack_chunk_alloc): Define as malloc, not
9189
        bfd_xmalloc_by_size_t.
9190
        bfd_ecoff_debug_accumulate
9191
        bfd_ecoff_debug_accumulate_other): Check obstack_alloc.
9192
        (add_file_shuffle add_memory_shuffle): Check obstack_alloc for
9193
        NULL return.  Return boolean, not void.
9194
        (bfd_ecoff_debug_init): Check obstack_begin for 0 return.
9195
        (bfd_ecoff_debug_accumulate): Check add_file_shuffle
9196
        and add_memory_shuffle return.
9197
        (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc.
9198
        (bfd_ecoff_debug_accumulate): Check bfd_alloc.
9199
        (ecoff_add_string): Check add_memory_shuffle return.
9200
 
9201
        * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t):
9202
        Remove decls.
9203
        * libbfd.h: Rebuilt.
9204
 
9205
Fri Feb 11 15:35:32 1994  Stu Grossman  (grossman at cygnus.com)
9206
 
9207
        * configure.host:  Add Lynx/rs6000 support.
9208
        * config/i386-nlm.mt:  Enable a.out file support.
9209
        * config/rs6000lynx.mh:  Lynx/rs6000 host support.
9210
 
9211
Fri Feb 11 17:25:58 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9212
 
9213
        * archive.c (compute_and_write_armap): Rewrite somewhat to improve
9214
        memory usage.
9215
 
9216
Fri Feb 11 13:10:42 1994  Stan Shebs  (shebs@andros.cygnus.com)
9217
 
9218
        * archive.c: Change all references to '\n' in archive magic
9219
        to '\012', for greater portability.
9220
        * ecoff.c (ecoff_write_armap): Ditto.
9221
 
9222
Thu Feb 10 12:58:48 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9223
 
9224
        * aoutx.h (aout_link_write_other_symbol): Check strip settings to
9225
        see whether symbol should be output.
9226
        * genlink.h (struct generic_write_global_symbol_info): Added info
9227
        field.
9228
        * linker.c (_bfd_generic_final_link): Initialize wginfo.info.
9229
        (_bfd_generic_link_write_global_symbol): Check strip settings to
9230
        see whether symbol should be output.
9231
        * elf32-mips.c (mips_elf_final_link): Initialize wginfo.info.
9232
 
9233
Wed Feb  9 21:34:58 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
9234
 
9235
        * som.c (som_reloc_queue_find): Do not examine a NULL queue entry.
9236
 
9237
        * som.c: Cast return values from BFD memory allocation routines to
9238
        avoid warnings from the HP compiler.
9239
 
9240
Wed Feb  9 12:55:02 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9241
 
9242
        * coff-alpha.c (alpha_relocate_section): Accept a LITERAL
9243
        reloc on an "ldl" instruction too.
9244
 
9245
        * archive.c (bfd_ar_hdr_from_filesystem): Cast status elements
9246
        when passing them to sprintf.  Use %ld instead of %d.
9247
 
9248
        * coff-rs6000.c (rs6000coff_mkarchive): Return false.
9249
        (rs6000_coff_snarf_ar_hdr): Don't declare errno; it's not used.
9250
        Also removed unused variable namelen.
9251
        (rs6000coff_write_armap): Declare orl_count and stridx parameters.
9252
 
9253
Tue Feb  8 18:00:34 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9254
 
9255
        * libbfd-in.h (xmalloc): Don't declare parameter type, to avoid
9256
        conflicts.
9257
        * libbfd.h: Rebuilt.
9258
 
9259
Tue Feb  8 15:55:50 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
9260
 
9261
        * coff-alpha.c (reloc_nil): New function.
9262
        (alpha_howto_table): Use it as special_function to prevent certain
9263
        relocs from being adjusted by bfd_perform_relocation.  IGNORE
9264
        reloc should be partial_inplace.
9265
        (alpha_ecoff_get_relocated_section_contents): Accept a LITERAL
9266
        reloc on an "ldl" instruction too.
9267
 
9268
Tue Feb  8 00:32:28 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
9269
 
9270
        * elf32-hppa.c (CURRENT_STUB_OFFSET, hppa_elf_build_arg_reloc_stub,
9271
        hppa_elf_build_long_branch_stub):  Cast to char * instead of int
9272
        before performing pointer arithmetic.
9273
 
9274
Mon Feb  7 20:56:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
9275
 
9276
        * config.bfd (hppa*-*-osf*): Use bfd_name hppaosf for this
9277
        configuration.
9278
        (hppa*-*-*elf*): This configuration used hppa-elf now.
9279
 
9280
        * som.c: This file is also used for HOST_HPPAOSF.
9281
 
9282
        * targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
9283
 
9284
        * hosts/hppaosf.h: New host configuration file.
9285
 
9286
        * config/hppabsd.mt (SELECT_VECS): Add bfd_elf32_hppa_vec as
9287
        BSD handles both SOM and ELF object files.
9288
 
9289
        * config/hppaosf.mh (HDEFINES): Delete.  No longer needed.
9290
        (RANLIB): Doesn't do anything, define it to be "echo".
9291
 
9292
        * config/hppaosf.mt: New target makefile fragment for a PA running
9293
        OSF1.
9294
 
9295
Mon Feb  7 15:02:06 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9296
 
9297
        * archures.c (enum bfd_architecture): Added bfd_arch_powerpc.
9298
        (archures_init_table): If SELECT_ARCHITECTURES is not defined,
9299
        added bfd_powerpc_arch.
9300
        * bfd-in2.h: Rebuilt.
9301
        * cpu-powerpc.c: New file.
9302
        * Makefile.in (ALL_MACHINES, CFILES): Added cpu-powerpc.c.
9303
        Rebuilt dependencies.
9304
 
9305
        * elfcode.h (bfd_section_from_shdr): Get vma and alignment_power
9306
        of an SHT_STRTAB section from sh_addr and sh_addralign, rather
9307
        than just setting them to zero.
9308
 
9309
Sun Feb  6 20:04:10 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9310
 
9311
        * elfcode.h (prep_headers, swap_out_syms): Check for NULL return
9312
        from bfd_new_strtab.
9313
        (elf_compute_section_file_positions): Check for false return from
9314
        swap_out_syms.
9315
 
9316
        * linker.c (default_indirect_link_order): Check for NULL return
9317
        from bfd_get_relocated_section_contents.
9318
 
9319
        * syms.c: Make example application in doc call xmalloc, not
9320
        bfd_xmalloc.
9321
 
9322
        * aoutx.h (NAME(aout,slurp_symbol_table),
9323
        aout_link_get_symbols, NAME(aout,link_hash_table_create)):
9324
        * bout.c (b_out_slurp_reloc_table, b_out_squirt_out_relocs):
9325
        * ecoff.c (ecoff_bfd_link_hash_table_create):
9326
        * ecofflink.c (bfd_ecoff_debug_init):
9327
        * format.c (bfd_check_format_matches):
9328
        * linker.c (_bfd_generic_link_hash_table_create):
9329
        (_bfd_generic_final_link):
9330
        * reloc16.c (bfd_coff_reloc16_relax_section):
9331
        (bfd_coff_reloc16_get_relocated_section_contents):
9332
        * elf32-hppa.c (hppa_elf_build_arg_reloc_stub):
9333
        * elf32-mips.c (mips_elf_final_link):
9334
        * elfcode.h (bfd_new_strtab):
9335
        (bfd_add_2_to_strtab):
9336
        (elf_slurp_symbol_table):
9337
        (elf_corefile_note):
9338
        * libbfd.c (bfd_zmalloc):
9339
        Use malloc and check the result, instead of bfd_xmalloc.
9340
 
9341
Sat Feb  5 12:39:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
9342
 
9343
        * config.bfd: Put m68*-*-sysv* line after m68*-*-sysv4*.
9344
 
9345
Sat Feb  5 05:32:44 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
9346
 
9347
        * srec.c (srec_write_record):  Put CONST keyword for "src" before
9348
        "unsigned", some compilers don't like it after "unsigned".
9349
        * libcoff.h, libcoff-in.h (bfd_perform_slip):  Rename "value" to
9350
        "val" in prototype declaration because some compilers don't like
9351
        arguments whose names are the same as types.
9352
 
9353
Sat Feb  5 01:14:38 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9354
 
9355
        * aoutx.h (aout_link_check_ar_symbols): Correct test for whether
9356
        object file defines symbol.  Also, if skipping a symbol, skip the
9357
        second symbol of a N_WARNING or N_INDR symbol as well.
9358
 
9359
Fri Feb  4 23:55:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9360
 
9361
        Add basic support for writing RS/6000 XCOFF files.
9362
        * coff-rs6000.c (dummy_reloc): Removed.
9363
        (rs6000coff_howto_table): Defined XCOFF relocs.
9364
        (RTYPE2HOWTO): Defined to use rs6000coff_rtype2howto.
9365
        (rs6000coff_rtype2howto): New function.
9366
        (coff_bfd_reloc_type_lookup): Defined to use
9367
        rs6000coff_reloc_type_lookup.
9368
        (rs6000coff_reloc_type_lookup): New function.
9369
        (SELECT_RELOC): Defined to set r_type and r_size fields.
9370
        (COFF_LONG_FILENAMES): Defined.
9371
        * coffcode.h (combined_entry_type): Changed fix_tag and fix_end
9372
        fields to bitfields.  Added fields fix_value and fix_scnlen.
9373
        (sec_to_styp_flags): If STYP_DEBUG is defined, use it rather than
9374
        STYP_INFO for the type of a section named .debug.
9375
        (coff_add_missing_symbols): Don't define if RS6000COFF_C.
9376
        (coff_write_object_contents): If RS6000COFF_C, don't call
9377
        coff_add_missing_symbols.
9378
        (coff_slurp_symbol_table): If RS6000COFF_C, then if the last aux
9379
        entry has type STY_LD change the x_scnlen into a pointer to a
9380
        symbol and set fix_scnlen.  Also, for a C_BSTAT symbol, change the
9381
        value into a pointer to a symbol and set fix_value.
9382
        * libcoff.h: Rebuilt.
9383
        * coffgen.c (coff_mangle_symbols): Reindent.  If fix_value is set,
9384
        get the symbol offset. Likewise for fix_scnlen.
9385
        (string_size): Change type to bfd_size_type.
9386
        (debug_string_size, debug_string_section): New static variables.
9387
        (coff_fix_symbol_name): If bfd_coff_symname_in_debug returns true,
9388
        write the symbol name into the .debug section; assume that the
9389
        section has already been created with the right size.
9390
        (coff_write_symbols): Initialize debug_string_size to 0.  If
9391
        bfd_coff_symname_in_debug returns true, don't put symbol name in
9392
        usual string table.  After writing out all symbols, if
9393
        debug_string_size is not 0, check that it matches the size of the
9394
        .debug section.
9395
        (coff_get_normalized_symtab): Clear new fix_value and fix_scnlen
9396
        fields.  If the string offset is 0, always use an empty string as
9397
        the name.
9398
        (coff_make_empty_symbol): Zero out the symbol structure.
9399
        * reloc.c (bfd_perform_relocation): Work around one gross hack
9400
        with another: actually look at the target name to avoid the broken
9401
        COFF check.
9402
        (bfd_reloc_code_real_type): Add BFD_RELOC_PPC_B26,
9403
        BFD_RELOC_PPC_BA26 and BFD_RELOC_PPC_TOC16.
9404
        * bfd-in2.h: Rebuilt.
9405
 
9406
Fri Feb  4 17:28:32 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9407
 
9408
        * libbfd.c (bfd_zmalloc): Call bfd_xmalloc instead of malloc.
9409
        (bfd_xmalloc, bfd_xmalloc_by_size_t): Functions deleted.
9410
        * libbfd-in.h: Define them as macros calling xmalloc and declare
9411
        xmalloc.
9412
        * libbfd.h: Rebuilt.
9413
 
9414
Thu Feb  3 16:49:35 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9415
 
9416
        * ecofflink.c (bfd_ecoff_debug_externals): If a small undefined
9417
        symbol has a value in the ECOFF symbol but not in the BFD symbol,
9418
        keep the value in the ECOFF symbol.  This helps gas.
9419
 
9420
        * linker.c (_bfd_generic_link_output_symbols,
9421
        _bfd_generic_link_write_global_symbol): Don't require that all
9422
        references to a common symbol be themselves common symbols.
9423
 
9424
        * aoutx.h (aout_reloc_index_to_section): Handle N_UNDF.
9425
 
9426
Wed Feb  2 20:37:19 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
9427
 
9428
        * libbfd.c, bfd-in.h, hosts/alphaosf.h, hosts/sparc-ll.h, aoutf1.h,
9429
        sparclynx.c, Makefile.in: Change HOST_64_BIT to BFD_HOST_64_BIT.
9430
        * bfd-in2.h: Rebuilt.
9431
 
9432
Wed Feb  2 12:30:13 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9433
 
9434
        * coffswap.h (coff_swap_reloc_out): If RS6000COFF_C, handle type
9435
        and size correctly.
9436
        (coff_swap_aux_in): If RS6000COFF_C, change x_csect.x_scnlen to
9437
        x_csect.x_scnlen.l to match change in coff/internal.h.
9438
        (coff_swap_aux_out): Likewise.
9439
 
9440
        * coff-mips.c (mips_ecoff_backend_data), coff-alpha.c
9441
        (alpha_ecoff_backend_data): Change casts of aux_in and aux_out
9442
        fields to match yesterday's changes.
9443
 
9444
        * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, pass
9445
        in the internal_reloc itself, not the type.
9446
        * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c,
9447
        coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed
9448
        definition of SELECT_RELOC accordingly.
9449
 
9450
Tue Feb  1 12:05:44 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9451
 
9452
        * coffcode.h (bfd_coff_backend_data): Added new arguments to
9453
        _bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number
9454
        and number of aux entries.
9455
        (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed
9456
        accordingly.
9457
        * libcoff.h: Rebuilt.
9458
        * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new
9459
        arguments.  If RS6000COFF_C, only treat C_EXT and C_HIDEXT
9460
        specially if this is the last aux entry.
9461
        * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass
9462
        new arguments to swap_aux functions.
9463
 
9464
Sun Jan 30 15:14:36 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
9465
 
9466
        * gen-aout.c (main): Set DEFAULT_ARCH based on preprocessor macros
9467
        (only testing for m68k and vax at the moment); do verify that the
9468
        preprocessor didn't trash the arch name inside the string version.
9469
        Don't print out "pagesize =" line that prevents output from
9470
        compiling.  Derive BYTES_IN_WORD and ARCH values from sizeof
9471
        results.
9472
        * Makefile.in (aout-params.h): Pass gen-aout a dummy target name.
9473
        (check, installcheck): Identify directory in "no testsuites"
9474
        message.
9475
 
9476
Sun Jan 30 13:25:28 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9477
 
9478
        * aoutx.h (aout_link_write_symbols): Write out correct value for
9479
        object file symbol.
9480
 
9481
Fri Jan 28 18:34:05 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
9482
 
9483
        * hosts/vaxbsd.h (HOST_STACK_END_ADDR): Vax BSD doesn't define
9484
        KERNBASE, so hard-code 0x80000000 instead.
9485
 
9486
Thu Jan 27 13:54:08 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9487
 
9488
        * linker.c (generic_link_add_symbol_list): If symbol is common,
9489
        set the BSF_OLD_COMMON flag.
9490
 
9491
Wed Jan 26 13:47:15 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9492
 
9493
        * format.c (bfd_check_format_matches): Put the new entry in the
9494
        correct element of matching_vector.
9495
 
9496
Tue Jan 25 11:43:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
9497
 
9498
        * som.c, som.h (bfd_som_set_section_attributes,
9499
        bfd_som_set_subsection_attributes): Change parameters from char
9500
        to int.  Following a prototype with an old-style function definition
9501
        in the presence of widened parameters is a GCC-ism not supported
9502
        by the HP compiler in ANSI mode.
9503
 
9504
Tue Jan 25 11:46:46 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9505
 
9506
        * reloc.c (bfd_get_reloc_size): Size of type -2 is 4 bytes, not 2.
9507
 
9508
        * hp300hpux.c (MY(write_object_contents)): Write out the symbols
9509
        before writing out the relocs, so that the right symbol indices
9510
        are used.
9511
 
9512
        * archive.c (do_slurp_bsd_armap, bfd_slurp_bsd_armap_f2): Do not
9513
        try to overlay the internal carsyms on the external symdefs.  That
9514
        can not work if the size of a host pointer is larger than 4 bytes.
9515
 
9516
        * format.c (bfd_check_format_matches): Cast result of
9517
        bfd_xmalloc_by_size_t.
9518
        * opncls.c (_bfd_new_bfd): Avoid ANSI C prototype.
9519
 
9520
        * archive.c: Reindented to GNU standards.
9521
 
9522
Mon Jan 24 14:41:23 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9523
 
9524
        * opncls.c (_bfd_new_bfd, _bfd_new_bfd_contained_in): Add
9525
        "_bfd_" to function names.
9526
        * archive.c (_bfd_create_empty_archive_element_shell),
9527
        libbfd-in.h: Change callers.
9528
 
9529
        * libbfd.c (bfd_zmalloc): Renamed from zalloc.
9530
        * libbfd.c (bfd_add_to_string_table),
9531
        trad-core.c (trad_unix_core_file_p),
9532
        targets.c (bfd_target_list),
9533
        ptrace-core.c (ptrace_unix_core_file_p),
9534
        opncls.c (new_bfd), libbfd-in.h,
9535
        ieee.c (ieee_make_empty_symbol),
9536
        elf32-hppa.c (hppa_elf_stub_branch_reloc),
9537
        (hppa_elf_stub_reloc): Change callers.
9538
        * libbfd.h: Regenerated.
9539
 
9540
        * archive.c (_bfd_look_for_bfd_in_cache): Add "_bfd_" to name.
9541
        (_bfd_get_elt_at_filepos),
9542
        coff-rs6000.c (rs6000coff_get_elt_at_filepos), libbfd-in.h:
9543
        Change callers.
9544
 
9545
        * format.c (bfd_check_format_matches), libbfd-in.h, targets.c,
9546
        elfcode.h (elf_object_p): Rename target_vector to bfd_target_vector
9547
        and default_vector to bfd_default_vector.
9548
        * libbfd.h: Regenerated.
9549
 
9550
        * format.c (bfd_check_format_matches): New function.
9551
        (bfd_check_format): Call it.
9552
        (bfd_matching_formats): Function removed.
9553
        * targets.c: Replace the vector added on Jan 21 with a count of
9554
        entries in default_vector.
9555
        * bfd-in2.h: Regenerated.
9556
 
9557
Mon Jan 24 12:38:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9558
 
9559
        * coff-alpha.c (alpha_ecoff_object_p): New function.  Set size of
9560
        .pdata section based on lnnoptr field, not section header.
9561
        (alpha_relocate_section): Don't bother to check if r_symndx >= 0,
9562
        since it is unsigned.
9563
        (ecoffalpha_little_vec): Use alpha_ecoff_object_p rather than
9564
        coff_object_p.
9565
        * ecoff.c (ecoff_new_section_hook): Set alignment_power field of
9566
        .pdata section to 3.
9567
        (ecoff_compute_section_file_positions): Save the size of the
9568
        .pdata section in the line_filepos field, and actually align the
9569
        .pdata section to an alignment power of 4.
9570
        (ecoff_compute_reloc_file_positions): Set output_has_begun after
9571
        calling ecoff_compute_section_file_positions.
9572
        (ecoff_write_object_contents): Set s_lnnoptr for the .pdata
9573
        section from the line_filepos field.  Set vstamp for the optional
9574
        header from the vstamp of the symbolic header.
9575
        (ecoff_bfd_final_link): Set vstamp of the symbolic header to the
9576
        vstamp used by the first object file in the link.
9577
 
9578
        * ecofflink.c (ecoff_align_debug): Align RFDs to debug_align.
9579
 
9580
        * linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
9581
        for a created common section.
9582
        (_bfd_generic_link_add_one_symbol): Likewise.
9583
 
9584
        * elfcode.h (swap_out_syms): Use elf_section_from_bfd_section to
9585
        get the index of a common section, rather than always using
9586
        SHN_COMMON (MIPS has multiple common sections).
9587
 
9588
        * elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
9589
 
9590
        * aoutx.h (aout_link_input_section_std,
9591
        aout_link_input_section_ext): Pass additional arguments to
9592
        reloc_overflow callback.
9593
        * coff-alpha.c (alpha_ecoff_get_relocated_section_contents,
9594
        alpha_relocat_section): Likewise.
9595
        * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
9596
        * coff-h8500.c (extra_case): Likewise.
9597
        * coff-mips.c (mips_relocate_section): Likewise.
9598
        * coff-z8k.c (extra_case): Likewise.
9599
        * elf32-hppa.c (hppa_elf_stub_finish): Likewise.
9600
        * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
9601
 
9602
        * bout.c (calljx_callback, callj_callback): Use get_value to get
9603
        the symbol value and check for undefined symbols.
9604
        (get_value): If the symbol is undefined, look it up in the linker
9605
        hash table.
9606
        (b_out_get_relocated_section_contents): For PCREL24 and PCREL13
9607
        use get_value to get the symbol value and check for undefined
9608
        symbols.
9609
        * reloc16.c (bfd_coff_reloc16_get_value): If the symbol is
9610
        undefined, look it up in the linker hash table.
9611
 
9612
        * aoutx.h (translate_symbol_table): The string index 0 has a
9613
        special meaning for normal symbols, but not for dynamic symbols.
9614
 
9615
Sat Jan 22 12:26:01 1994  Stu Grossman  (grossman at cygnus.com)
9616
 
9617
        * sparclynx.c:  Setup appropriate macros to enable core file
9618
        support.
9619
 
9620
Fri Jan 21 16:25:35 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9621
 
9622
        * targets.c: Add a vector of matching format names.
9623
        * format.c (bfd_matching_formats): New function to return it.
9624
        (bfd_check_format): Set it.
9625
        * bfd-in2.h: Regenerated.
9626
 
9627
        * bfd-in.h: Remove decls of bfd_ec type and error printing functions.
9628
        Remove decl of type symclass; wasn't used.
9629
        * bfd.c: Document error handling, including code fragments
9630
        containing the error decls that were in bfd-in.h.
9631
        Remove DEFUNs.
9632
        * bfd-in2.h: Regenerated.
9633
 
9634
Fri Jan 21 14:11:16 1994  Sean Fagan  (sef@cygnus.com)
9635
 
9636
        * nlmcode.h, liblnm.h, nlm32-alpha.c nlm32-i386.c nlm32-sparc.c:
9637
        The sparc (and possibly other?) NLM format requires a different
9638
        way to write exports, so add a write_export field to the backend
9639
        data (and set it to NULL for everything but the sparc).
9640
 
9641
Fri Jan 21 14:11:16 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
9642
 
9643
        * sunos.c (MY(read_dynamic_relocs)): Compare info->dynrel with NULL,
9644
        not (struct external_nlist *) NULL.  info->dynrel is a PTR, not
9645
        a struct external_nlist *.
9646
 
9647
Fri Jan 21 09:29:01 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9648
 
9649
        * bfd.c: Remove error strings for errors removed below.
9650
        * aoutx.h (translate_to_native_sym_flags), bfd-in.h (bfd_ec),
9651
        oasys.c (oasys_write_sections): Rename
9652
        bfd_error_nonrepresentable_section to nonrepresentable_section.
9653
        None of the other bfd error names start with "bfd_error".
9654
        Remove errors symbol_not_found and no_relocation_info, which seem
9655
        to be unused.
9656
        * bfd-in2.h: Regenerated.
9657
 
9658
Fri Jan 21 01:11:55 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9659
 
9660
        * bfd.c (bfd_get_gp_size): Added support for ELF.
9661
 
9662
        * syms.c (BSF_DYNAMIC): New symbol flag.
9663
        (bfd_print_symbol_vandf): Print it.
9664
        * bfd-in2.h: Rebuilt.
9665
        * libaout.h (struct aout_backend_data): New read_dynamic_symbols
9666
        and read_dynamic_relocs fields.
9667
        (struct aoutdata): New dynamic_info field.
9668
        (obj_aout_dynamic_info): New accessor macro.
9669
        * sunos.c (struct sunos_dynamic_info): New structure.
9670
        (sunos_read_dynamic_info, MY(read_dynamic_symbols),
9671
        MY(read_dynamic_relocs)): New functions to read dynamic symbols
9672
        and relocs.
9673
        * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
9674
        dynamically linked, set SEC_RELOC for both the .text and .data
9675
        sections.
9676
        (translate_from_native_sym_flags): Don't set BSF_LOCAL for an
9677
        undefined symbol.
9678
        (translate_symbol_table): New function, split out of
9679
        slurp_symbol_table; set the BSF_DYNAMIC flag appropriately.
9680
        (NAME(aout,slurp_symbol_table)): Read dynamic symbols, if any.
9681
        (NAME(aout,slurp_reloc_table)): Read dynamic relocs, if any.
9682
        (NAME(aout,get_reloc_upper_bound)): Include dynamic reloc count in
9683
        return value.
9684
        * aoutf1.h (NAME(aout,sunos4_write_object_contents)): Don't write
9685
        out dynamic symbols or relocs against reloc symbols, since they
9686
        are already in the .text section and we wouldn't know where to
9687
        write them anyhow.
9688
        (sunos4_aout_backend): Initialize read_dynamic_symbols and
9689
        read_dynamic_relocs fields.
9690
        * aout-target.h (MY(backend_data)): Initialize
9691
        read_dynamic_symbols and read_dynamic_relocs fields.
9692
 
9693
Thu Jan 20 20:57:27 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
9694
 
9695
        * hosts/alphaosf.h (uint64e_type, uint64_type, int64_type): Delete
9696
        typedefs, since HOST_64_BIT will take care of defining them in
9697
        bfd.h.
9698
 
9699
Wed Jan 19 17:28:59 1994  Ken Raeburn  (raeburn@cujo.cygnus.com)
9700
 
9701
        * config/alphaosf.mh (HDEFINES): Don't define HOST_64_BIT here;
9702
        that's dealt with elsewhere.
9703
        * hosts/alphaosf.h (sprintf_vma, fprintf_vma): New macros.
9704
        (uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so
9705
        they get copied to bfd.h.
9706
 
9707
        * reloc.c (enum bfd_reloc_code_real): Add some Alpha relocation
9708
        types.  Reorganized some of the existing ones.
9709
        * coff-alpha.c (alpha_howto_table): Construct 64-bit negative one
9710
        values in case of compilation on a 32-bit machine.  Fix pcrel
9711
        fields of some reloc types.
9712
        (alpha_bfd_reloc_type_lookup): Handle more relocation types.
9713
 
9714
        * bfd-in.h (uint64_typeHIGH, uint64_typeLOW): Supply default
9715
        definitions when not defined, regardless of whether uint64_type is
9716
        a defined macro or not.
9717
        (fprintf_vma, sprintf_vma): Define only if fprintf_vma is not
9718
        already defined.
9719
 
9720
Wed Jan 19 00:02:54 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9721
 
9722
        * aoutx.h (translate_to_native_sym_flags): Set the type of a
9723
        BSF_WARNING symbol to N_WARNING.
9724
 
9725
Tue Jan 18 16:43:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9726
 
9727
        * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
9728
        for an indirect or warning symbol.
9729
        (aout_link_write_symbols): Update sym_hash with the target of an
9730
        indirect or warning symbol.  If an indirect symbol is defined,
9731
        output the calculated value and don't output the target symbol.
9732
 
9733
Tue Jan 18 03:54:59 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9734
 
9735
        * aoutx.h (translate_from_native_sym_flags): Give warning symbols
9736
        an (unused) nonzero section value, needed for check below.
9737
 
9738
Mon Jan 17 15:12:07 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9739
 
9740
        * aoutx.h (translate_from_native_sym_flags,
9741
        aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
9742
        N_SET[ABDT].
9743
 
9744
Fri Jan 14 16:45:43 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9745
 
9746
        * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
9747
        the DYNAMIC flag for the BFD.
9748
        (NAME(bfd_elf,write_object_contents)): Don't try to write out a
9749
        BFD with the DYNAMIC flag set, since we don't generate the program
9750
        header table correctly.
9751
 
9752
Fri Jan 14 01:04:36 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
9753
 
9754
        * elfcode.h (elf_slurp_symbol_table):  Free x_symp at the end
9755
        of the function to avoid storage leak.
9756
 
9757
Thu Jan 13 23:07:32 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9758
 
9759
        * ecoff.c (ecoff_link_write_external): An ifd can be -1.
9760
 
9761
Thu Jan 13 12:33:27 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
9762
 
9763
        * som.c (som_set_reloc_info): Provide a default symbol for
9764
        relocations which don't actually have an associated symbol.
9765
 
9766
        * som.c (hppa_som_reloc): Add new "error message" argument.
9767
 
9768
Wed Jan 12 13:36:43 1994  Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
9769
 
9770
        Enable gdb to write to core files on more core file readers.
9771
        * libbfd.c (bfd_generic_set_section_contents):  Remove range check
9772
        for section size, it is already done in bfd_set_section_contents
9773
        with bfd_get_section_size_now.
9774
        * aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
9775
        osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
9776
        Use bfd_generic_set_section_contents instead of bfd_false.
9777
 
9778
Wed Jan 12 15:31:57 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9779
 
9780
        * linker.c: Added initial documentation.
9781
 
9782
        * linker.c (default_indirect_link_order): Don't expect space for
9783
        output relocations if there aren't any input relocations.
9784
 
9785
Tue Jan 11 14:37:12 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9786
 
9787
        * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
9788
        file offsets.
9789
 
9790
        * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
9791
        STT_NOTYPE.
9792
 
9793
Tue Jan 11 09:10:56 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
9794
 
9795
        * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
9796
        Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
9797
 
9798
Tue Jan 11 00:07:19 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9799
 
9800
        * ecofflink.c: Extensive changes to compress and merge debugging
9801
        information, and to write some of out directly rather than saving
9802
        it in memory.  Several new functions and structures, and new
9803
        arguments to existing functions.
9804
        * ecoff.c (ecoff_compute_reloc_file_positions): Compute
9805
        sym_filepos as well.
9806
        (ecoff_get_extr): Use ifdmap instead of ifdbase.
9807
        (ecoff_write_object_contents): Don't compute sym_filepos here.
9808
        Only output symbols if outsymbols is not NULL.
9809
        (ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
9810
        bfd_ecoff_debug functions.  Write out debugging information here.
9811
        (ecoff_final_link_debug_accumulate): Adjust for changes in
9812
        bfd_ecoff_debug functions.
9813
        (ecoff_link_write_external): Use ifdmap rather than ifdbase.
9814
        * elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
9815
        first, to put them in the first memory buffer.  Clear fdr field.
9816
        (mips_elf_get_extr): Use pointer to unswapped external symbol.
9817
        (mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
9818
        Preserve .text, .data and .bss even if they are empty.  Save
9819
        pointer to unswapped external symbol rather than copying it.
9820
        Don't free up the external symbols.
9821
        * libelf.h (elf_symbol_type): Change mips_extr to PTR.
9822
        * bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
9823
        (bfd_ecoff_debug_accumulate): Update declaration.
9824
        (bfd_ecoff_debug_accumulate_other): Rename declaration from
9825
        bfd_ecoff_debug_link_other and update.
9826
        (bfd_ecoff_write_accumulated_debug): Declare.
9827
        * bfd-in2.h: Rebuilt.
9828
        * Makefile.in: Rebuilt dependencies.
9829
 
9830
Mon Jan 10 20:46:53 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
9831
 
9832
        * Makefile.in (install): Remove "@" which follows a backslash.  In
9833
        this position it just causes errors, not suppresses echoes.
9834
 
9835
Mon Jan 10 09:06:21 1994  Jeffrey A. Law  (law@snake.cs.utah.edu)
9836
 
9837
        * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
9838
        field selectors.
9839
 
9840
Sun Jan  9 04:32:25 1994  Ken Raeburn  (raeburn@kr-pc.cygnus.com)
9841
 
9842
        * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec.
9843
 
9844
Fri Jan  7 10:27:27 1994  David J. Mackenzie  (djm@rtl.cygnus.com)
9845
 
9846
        * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
9847
        end of data if they are not contiguous.
9848
 
9849
        * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings.
9850
 
9851
Fri Jan  7 15:40:16 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9852
 
9853
        * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
9854
        for .reginfo section here.
9855
        (ecoff_new_section_hook): Set it here instead.
9856
 
9857
Fri Jan  7 10:29:27 1994  Stan Shebs  (shebs@andros.cygnus.com)
9858
 
9859
        * bfd-in.h: (bfd_boolean): Add workaround for systems that also
9860
        define true and false as enums.
9861
        (ALMOST_STDC): Add as alternative to __STDC__.
9862
        * bfd-in2.h: Rebuilt.
9863
        * syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
9864
 
9865
Thu Jan  6 14:24:44 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9866
 
9867
        * aoutx.h (translate_to_native_sym_flags): Catch the case where
9868
        there is no output section.
9869
 
9870
Thu Jan  6 14:37:42 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9871
 
9872
        * nlmcode.h (nlm_object_p): If we can't read the fixed header,
9873
        count it as a wrong format error, not a system call error, since
9874
        the object file might simply be too small.
9875
 
9876
        * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
9877
        BFD64.
9878
        * Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
9879
        (BFD64_BACKENDS): Add nlm32-alpha.o.  It depends on 64 bit
9880
        support, even though it is for an Alpha in 32 bit mode.
9881
        * configure.in (nlm32_alpha_vec): Set target64 to true.
9882
 
9883
        * nlm32-gen.c, nlm64-gen.c: Removed.  All nlm targets are
9884
        different, so there is no point to providing a generic one.
9885
        * libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
9886
        in the backend accessor macros; that should no longer be possible.
9887
        * targets.c (target_vector): Removed nlm32_big_generic_vec,
9888
        nlm64_big_generic_vec, nlm64_little_generic_vec.
9889
        * configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
9890
        nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
9891
        * Makefile.in: Rebuilt dependencies, and
9892
        (BFD32_BACKENDS): Removed nlm32-gen.o.
9893
        (BFD64_BACKENDS): Removed nlm64-gen.o.
9894
        (CFILES): Removed nlm32-gen.c and nlm64-gen.c.
9895
 
9896
        * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h.
9897
 
9898
        * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
9899
        bitsize arguments.  Changed all callers (aoutx.h).
9900
        * libbfd-in.h (_bfd_generic_link_add_one_symbol): Add constructor
9901
        and bitsize arguments to declaration.
9902
        * libbfd.h: Rebuilt.
9903
 
9904
        * ecoff.c: First cut at new style of linker backend for
9905
        ECOFF--added a bunch of functions.  Also:
9906
        (ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
9907
        (ecoff_slurp_symbolic_header): New function.
9908
        (ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
9909
        (ecoff_compute_reloc_file_positions): New function.
9910
        (ecoff_set_section_contents): Get out quickly if count is zero.
9911
        Check errors better.
9912
        (ecoff_write_object_contents): Put .xdata section in data segment.
9913
        Call ecoff_compute_reloc_file_positions.  Don't output relocs or
9914
        external symbols if outsymbols is NULL.
9915
        (ecoff_bfd_final_link): Completely rewritten.
9916
        * libecoff.h: Include bfdlink.h.
9917
        (struct ecoff_backend_data): Add relocate_section field.
9918
        (ecoff_data_type): Add sym_hashes and symndx_to_section fields.
9919
        (struct ecoff_link_hash_entry): Define.
9920
        (struct ecoff_link_hash_table): Define.
9921
        (ecoff_bfd_link_add_symbols): Declare as function, not macro.
9922
        (ecoff_bfd_link_hash_table_create): Likewise.
9923
        * ecofflink.c (bfd_ecoff_debug_one_external): New function.
9924
        (bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
9925
        * bfd-in.h (bfd_ecoff_debug_one_external): Declare.
9926
        * bfd-in2.h: Rebuilt.
9927
        * coff-alpha.c (alpha_howto_table): Mark BRADDR as
9928
        partial_inplace, and set the src_mask to 0x1fffff.
9929
        (alpha_ecoff_get_relocated_section_contents): Remove unused
9930
        variable gp_warned.
9931
        (alpha_convert_external_reloc): New static function.
9932
        (alpha_relocate_section): New static function.
9933
        (alpha_ecoff_backend_data): Initialize relocate_section field.
9934
        * coff-mips.c (mips_relocate_refhi): New static function.
9935
        (mips_relocate_section): New static function.
9936
        (mips_ecoff_backend_data): Initialize relocate_section field.
9937
 
9938
        * reloc.c (_bfd_relocate_contents): Corrected signed overflow
9939
        checking when there is an addend.
9940
 
9941
        * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
9942
        a non a.out file, just pass it to _bfd_default_link_order.
9943
        (aout_link_input_section_std): When doing a final PC relative link
9944
        against a section symbol, subtract the VMA of the input section.
9945
        (aout_link_input_section_ext): Likewise.
9946
 
9947
        * linker.c (default_indirect_link_order): Renamed from
9948
        _bfd_generic_indirect_link_order and made static.
9949
        (_bfd_generic_final_link): Don't switch on link_order type, just
9950
        call _bfd_default_link_order.
9951
        (_bfd_default_link_order): Handle bfd_indirect_link_order type.
9952
        * genlink.h: Removed declaration of
9953
        _bfd_generic_indirect_link_order.
9954
        * elf32-mips.c (mips_elf_final_link): Don't switch on link_order
9955
        type, just call _bfd_default_link_order.
9956
 
9957
Tue Jan  4 21:23:37 1994  Ian Lance Taylor  (ian@cygnus.com)
9958
 
9959
        * linker.c (generic_link_check_archive_element): Base the name of
9960
        the created common section on the name of the section the symbol
9961
        came from.
9962
        (_bfd_generic_link_add_one_symbol): (case BIG): A common symbol
9963
        must have a section, so don't bother to create one.
9964
 
9965
Mon Jan  3 15:32:16 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
9966
 
9967
        * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
9968
        * aoutf1.h (NAME(aout,sunos4_write_object_contents)):
9969
        If the DYNAMIC flag is set, set it in the exec header.
9970
        * aoutx.h (NAME(aout,some_aout_object_p)): If the object is
9971
        dynamically linked, set the DYNAMIC flag in the BFD.
9972
        * libaout.h (N_SET_DYNAMIC): New macro.
9973
        (N_DYNAMIC): Add missing 0 in mask.
9974
 
9975
Mon Jan  3 11:41:45 1994  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
9976
 
9977
        * ecoff.c (ecoff_get_extr): Don't output section symbols as
9978
        external symbols.
9979
 
9980
        * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
9981
        to unsigned int, because size_t may not be defined in bfd.h.
9982
        * bfd-in2.h: Rebuilt.
9983
 
9984
        * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
9985
        be a const pointer.
9986
        * bfd-in2.h: Rebuilt.
9987
        * libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
9988
        be a const pointer.
9989
        * targets.c (bfd_target): Change swap function pointers
9990
        accordingly.
9991
        * archive.c (do_slurp_coff_armap): Change swap accordingly.
9992
        * aix386-core.c: Change NO_GET and NO_GETS accordingly.
9993
        * hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
9994
        ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
9995
        accordingly.
9996
 
9997
        * libbfd-in.h (struct artdata): Added tdata field.
9998
        (_bfd_add_bfd_to_archive_cache): Declare.
9999
        (_bfd_get_elt_at_filepos): Declare.
10000
        (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
10001
        * libbfd.h: Rebuilt.
10002
        * archive.c: Cleaned up some more.
10003
        (_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
10004
        pointer elements of artdata.
10005
        (_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
10006
        (_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
10007
        (_bfd_get_elt_at_filepos): Renamed from get_elt_at_filepos.
10008
        (get_extended_arelt_filename, bfd_construct_extended_name_table,
10009
        bfd_ar_hdr_from_filesystem, compute_and_write_armap): Made static.
10010
        * ecoff.c: Some comment changes.
10011
        (ecoff_slurp_armap): Handle rename of snarf_ar_hdr.  Set
10012
        ardata->tdata to raw_armap.
10013
        (ecoff_archive_p): Initialize pointer elements of artdata.
10014
        * coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
10015
        add_bfd_to_cache.
10016
 
10017
        * hash.c: Added some documentation.
10018
 
10019
Mon Jan  3 11:09:28 1994  Jim Kingdon  (kingdon@lioth.cygnus.com)
10020
 
10021
        * aout-target.h, netbsd386.c: Replace NO_SWAP_MAGIC with SWAP_MAGIC,
10022
        and do the swapping here rather than calling ntohl from the N_*
10023
        macros.  This cleans up assumptions about the size of a host long,
10024
        the existence to ntohl, etc.
10025
 
10026
Sat Jan  1 13:50:05 1994  Rob Savoye  (rob@darkstar.cygnus.com)
10027
 
10028
        * config.bfd: Add support for VSTa micro-kernel. It currently uses
10029
        i386-aout.
10030
 
10031
Sat Jan  1 10:18:54 1994  David J. Mackenzie  (djm@thepub.cygnus.com)
10032
 
10033
        * hosts/i386mach3.h (HOST_SEGMENT_SIZE): Fix value.
10034
        * i386mach3.c (SEGMENT_SIZE): Fix value.
10035
 
10036
For older changes see ChangeLog-9193
10037
 
10038
Local Variables:
10039
mode: change-log
10040
left-margin: 8
10041
fill-column: 74
10042
version-control: never
10043
End:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.