Another try at correcting relocations against discarded
[external/binutils.git] / bfd / ChangeLog
1 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
2
3         * section.c (struct sec): Add kept_section.
4         (struct bfd_comdat_info): Remove sec, we can use above.
5         (STD_SECTION): Add initializer.
6         (bfd_make_section_anyway): Init here too.
7
8         * bfd-in2.h: Regenerate.
9
10         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
11         zeroing of `flags'.  
12         (elf_link_input_bfd): Set all asection->symbol->value's here, and
13         fudge values for discarded link-once section symbols.
14
15         * elf64-hppa.c: Include alloca-conf.h
16
17 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
18
19         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
20
21         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
22
23 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
24
25         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
26
27 2000-10-10  Tom Rix <trix@redhat.com>
28
29         * section.c (bfd_make_section_anyway): Release newsect ptr when 
30         newsect->symbol fails to alloc.  Use bfd_release instead of free.
31
32 2000-10-09  Richard Henderson  <rth@cygnus.com
33
34         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
35         (elf64_ia64_unwind_entry_compare): New.
36         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
37
38 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
39
40         * elflink.h (size_dynamic_sections): Don't create various tags if
41         .dynstr is excluded from the link.  Don't set first dynsym entry
42         if dynsymcount is zero.
43         (elf_bfd_final_link): Don't try to swap out dynamic syms if
44         .dynsym excluded from the link.  Don't try to write any dynamic
45         sections excluded from the link.
46
47         * elf.c (swap_out_syms): Handle global section symbols.
48
49 2000-10-05  DJ Delorie  <dj@redhat.com>
50
51         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
52         * coffcode.h (coff_set_alignment_hook): read extended reloc count
53         (coff_write_relocs): write extended reloc count
54         (coff_write_object_contents): account for extended relocs
55
56 2000-10-05  Jim Wilson  <wilson@cygnus.com>
57
58         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
59         field.
60         * elf.c (_bfd_elf_make_section_from_shdr): Call the
61         elf_backend_section_flags function.
62         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
63         code.
64         (elf64_ia64_section_flags): New function containing flag conversion
65         code.
66         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
67         * elfxx-target.h (elf_backend_section_flags): Define.
68         (elfNN_bed): Initialize elf_backend_section_flags field.
69
70 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
71
72         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
73         _bfd_elf32_gc_record_vtable.  Correct a comment.
74
75 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
76
77         From  Ralf Baechle  <ralf@gnu.org>
78
79         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
80         produces binaries with got[1] = 0x80000001 to differenciate them
81         for the dynamic linker from the broken binaries produced by old
82         versions.
83
84 2000-09-30  Petr Sorfa <petrs@sco.com>
85
86         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
87         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
88         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
89         * configure: Regenerate.
90
91 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
92
93         Define two bfd_targets for absence and presence of leading
94         underscore on symbols.  Make sure to only link same kind.
95         * elf32-cris.c (cris_elf_object_p,
96         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
97         cris_elf_merge_private_bfd_data): New.
98         (elf_backend_object_p, elf_backend_final_write_processing,
99         bfd_elf32_bfd_print_private_bfd_data,
100         bfd_elf32_bfd_merge_private_bfd_data): Define.
101         <Target vector definition>: Include elf32-target.h twice with
102         different macro settings:
103         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
104         bfd_elf32_us_cris_vec.
105         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
106         (elf_symbol_leading_char): First as 0, then '_'.
107         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
108         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
109         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
110         * configure: Regenerate.
111         * targets.c: Declare bfd_elf32_us_cris_vec.
112         * po/bfd.pot: Regenerate.
113
114 2000-09-29  Momchil Velikov  <velco@fadata.bg>
115
116         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
117         R_ARM_THM_PC22 relocations.
118
119 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
120
121         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
122
123 2000-09-29  Momchil Velikov <velco@fadata.bg>
124
125         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
126         is has the SEC_HAS_CONTENTS flag set.
127
128 2000-09-28  Ã–rjan Friberg  <orjanf@axis.com>
129             Hans-Peter Nilsson  <hp@axis.com>
130
131         * aout-cris.c (N_TXTADDR): Define.
132
133 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
134
135         * som.c: Include alloca-conf.h.
136         * Makefile.am: "make dep-am"
137         * Makefile.in: Regenerate.
138
139 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
140
141         * elf32-hppa.c (plt_stub): New.
142         (PLT_STUB_ENTRY): Define.
143         (elf32_hppa_link_hash_table): Change multi_subspace to packed
144         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
145         (elf32_hppa_link_hash_table_create): Init to suit.
146         (elf32_hppa_check_relocs): Set has_12bit_branch and
147         has_17bit_branch as appropriate.
148         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
149         non-local functions.
150         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
151         Add space for plt_stub as needed.
152         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
153         functions at plt_stub.
154         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
155         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
156
157         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
158         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
159         of fixed size, and if negative, disable handling of input sections
160         before stub section.  Set up default stub group size depending
161         on detected branch relocs.
162         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
163         ensure different offsets from sym_value aren't rounded to
164         different 2k blocks.  Use lrsel and rrsel for other stubs too for
165         consistency rather than necessity.
166         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
167         (final_link_relocate): Likewise.
168         (elf32_hppa_relocate_section): Likewise.
169
170         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
171         (_bfd_elf_hppa_gen_reloc_type): Generate them.
172         (elf_hppa_final_link_relocate): Handle them.
173         (elf_hppa_relocate_insn): Likewise.
174         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
175
176 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
177
178         * elfcode.h (elf_object_p): Preserve and clear abfd section
179         information.  Restore at error.
180
181 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
182
183         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
184         is empty, make sure that its rva also 0. NT loader dislikes
185         having otherwise.
186
187 2000-09-26  Steve Ellcey <sje@cup.hp.com>
188
189         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
190         global by default.
191
192 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
193
194         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
195         currently unused RELATIVE_DYNAMIC_RELOCS code.
196         (hppa_discard_copies): Likewise.
197         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
198         comments.  Don't check non-code output sections for stub grouping.
199
200 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
201
202         * section.c (bfd_get_unique_section_name): Return NULL if
203         bfd_malloc fails.
204
205 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
206
207         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
208         instruction sequence to actually work.
209         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
210         accordingly.
211
212 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
213
214         * elf32-sh.c (sh_elf_relocate_section): Use
215         _bfd_final_link_relocate to apply the relocation against a section
216         symbol, when doing relocatable links.
217
218 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
219
220         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
221         to id_sec.
222         (stub_hash_newfunc): Here too.
223         (hppa_add_stub): And here.
224         (elf32_hppa_link_hash_table): Remove stub_section_created,
225         reloc_section_created, first_init_sec and first_fini_sec.  Add
226         stub_group.
227         (elf32_hppa_link_hash_table_create): Init to suit.
228         (hppa_get_stub_entry): Add support for grouping stub sections.
229         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
230         section code.  Index stub vars by section->id.
231         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
232         exit paths.  Zap allocation of above removed vars.  Refine
233         link-once test.
234
235         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
236         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
237         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
238         rather than pointer to bfd_link_info.
239         (hppa_add_stub): Likewise.
240         (final_link_relocate): Likewise.
241
242 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
243
244         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
245         link-once sections.
246
247 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
248
249         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
250         ld/emulparams/shelf.sh.
251
252 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
253
254         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
255         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
256         * bfd-in2.h: Regenerate.
257
258 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
259
260         * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
261         LITUSE relocations incorrectly if -relax is specified on the ld
262         command line and the displacement field of the load or store
263         instruction is non-zero. (Patch by paul.winalski@compaq.com)
264
265 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
266
267         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
268         first_fini_sec here.
269         (elf32_hppa_size_stubs): Instead correctly find the first .init
270         and .fini section here.
271
272 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
273
274         * elf32-hppa.c (clobber_millicode_symbols): New function.
275         (elf32_hppa_size_dynamic_sections): Call it.
276
277 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
278
279         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
280         packed.  Add plabel, plt_abs packed booleans.
281         (hppa_link_hash_newfunc): Init new fields.
282         (PLABEL_PLT_ENTRY_SIZE): Define.
283         (hppa_stub_name): Use size_t len vars.
284         (hppa_add_stub): Likewise.
285         (elf32_hppa_build_stubs): Likewise.
286         (hppa_build_one_stub): Kill some compiler warnings.
287         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
288         if dynamic linking.  Munge the local plt offsets into
289         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
290         size_t len vars.  Add assert for plabel addend.
291         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
292         (elf32_hppa_hide_symbol): New function.
293         (elf_backend_hide_symbol): Define.
294         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
295         with h->plabel set.  Don't make plt entries to have dynamic syms
296         when they have been forced local.  If plt entry is used by a
297         plabel, make it PLABEL_PLT_ENTRY_SIZE.
298         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
299         Set up .plt offsets for local syms.
300         (elf32_hppa_relocate_section): Initialise plt entries for local
301         syms.  Leave weak undefined plabels zero.  Make global plabel
302         relocs against function symbol, and leave the addend zero.
303         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
304         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
305         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
306         relocs instead of SEGREL32 for dynamic got relocs.
307         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
308         (elf_backend_got_header_size): Adjust.
309         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
310
311         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
312         (hppa_type_of_stub): Use it instead of #if 0
313         (hppa_discard_copies): Use it here too.
314         (elf32_hppa_size_dynamic_sections): And here.
315
316         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
317         (elf32_hppa_link_hash_table_create): And here.
318         (hppa_build_one_stub): And here.  Instead keep track of stub
319         offset using _raw_size.
320         (elf32_hppa_size_stubs): Likewise.
321         (elf32_hppa_build_stubs): Likewise.
322         (hppa_size_one_stub): Likewise.  Resize reloc section too.
323
324         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
325         first_fini_sec handling.  Don't search for reloc section or set
326         hplink->reloc_section_created here.
327         (elf32_hppa_size_stubs): Instead search for reloc sections, and
328         set reloc_section_created here.
329         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
330         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
331         and DT_FINI.
332         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
333
334         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
335         with `hplink->root.'.
336         (elf32_hppa_check_relocs): Likewise.
337         (elf32_hppa_gc_sweep_hook): Likewise.
338         (elf32_hppa_adjust_dynamic_symbol): Likewise.
339         (hppa_handle_PIC_calls): Likewise.
340         (elf32_hppa_size_dynamic_sections): Likewise.
341         (elf32_hppa_set_gp): Likewise.
342         (elf32_hppa_relocate_section): Likewise.
343         (elf32_hppa_finish_dynamic_symbol): Likewise.
344         (elf32_hppa_finish_dynamic_sections): Likewise.
345
346         From  David Huggins-Daines  <dhd@linuxcare.com>
347         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
348         defined weak symbols in shared links.
349         (final_link_relocate): Calls to defined weak symbols in shared
350         objects must go via import stubs, as the target might not be known
351         at link time.
352
353 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
354
355         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
356         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
357         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
358         the original entries with EMPTY_HOWTOs, and added new ones to fill
359         in the gap.
360         (sh_elf_info_to_howto): Make sure the new gap isn't used.
361         (sh_elf_relocate_section): Likewise.
362
363 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
364
365         * cpu-mips.c (arch_info_struct): Add mips:4K
366         * bfd-in2.h (bfd_mach_mips4K): New define.
367         * archures.c: Add bfd_mach_mips4K to comment.
368         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
369         E_MIPS_ARCH_2 for bfd_mach_mips4K.
370
371 Wed Sep 13 19:31:39 2000  Marco Franzen <marcof@thyron.com>
372
373         * som.c (som_write_symbol_strings): Do not used fixed buffers,
374         use size_t as a counter.
375         (som_write_space_strings): Similarly.
376
377 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
378
379         * elf32-i860.c (elf32_i860_relocate_pc26): New function
380         and prototype.
381         (elf32_i860_relocate_section): Invoke new function from here.
382
383 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
384
385         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
386         static.
387
388 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
389
390         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
391         target section name instead of dumping core when the target symbol is
392         undefined.
393
394 2000-09-09  Kazu Hirata  <kazu@hxi.com>
395
396         * riscix.c: Remove DEFUN.
397
398 2000-09-08  Nick Clifton  <nickc@redhat.com>
399
400         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
401         initialise flags in output bfd if the input bfd is the default
402         architecture with the default flags.
403
404 2000-09-08  Kazu Hirata  <kazu@hxi.com>
405
406         * archive.c: Fix formatting.
407         * coff-arm.c: Likewise.
408         * doc/chew.c: Likewise.
409
410 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
411
412         * section.c (bfd_get_unique_section_name): Put a dot before the
413         numeric suffix.
414
415 2000-09-07  Kazu Hirata  <kazu@hxi.com>
416
417         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
418         * elf.c: Fix formatting.
419
420 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
421
422         * config.bfd (sh-*-linux*): Added.
423         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
424         * targets.c: Declare them.
425         * elf32-sh-lin.c: New file.
426         * Makefile.am: Compile it.
427         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
428         * configure, Makefile.in: Rebuilt.
429
430 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
431
432         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
433         pseduo-section when determining where the TOC ends.
434
435         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
436         output x_tvndx as it is only two bytes wide.
437
438         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
439         reloc is 26 or 32 bits wide.
440
441         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
442         for relocs that don't change anything.  Also look at the full
443         6 bits of bitsize.
444
445 2000-09-06  Philip Blundell  <philb@gnu.org>
446
447         * config.bfd (arm*-*-uclinux*): New target.
448
449 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
450
451         * configure: Rebuilt with new libtool.m4.
452
453 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
454
455         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
456         word for variable name.
457         * bfd-in2.h: Regenerate.
458
459 2000-09-05  Nick Clifton  <nickc@redhat.com>
460
461         * config.in: Regenerate.
462         * libbfd.h: Regenerate.
463         * po/bfd.pot: Regenerate.
464         * doc/bfdint.texi: Remove CVS date string - it foils compares with
465         local versions.
466
467 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
468
469         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
470
471 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
472
473         Shared library and PIC support.
474         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
475         (GOT_ENTRY_SIZE): New.
476         (ELF_DYNAMIC_INTERPRETER): New.
477         (STUB_SUFFIX): Define.
478         (LONG_BRANCH_PIC_IN_SHLIB): Define.
479         (RELATIVE_DYNAMIC_RELOCS): Define.
480         (enum elf32_hppa_stub_type): New.
481         (struct elf32_hppa_stub_hash_entry): Rename offset to
482         stub_offset.  Add a number of new fields.
483         (struct elf32_hppa_link_hash_entry): New.
484         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
485         global_value.
486         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
487         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
488         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
489         new fields.
490         (hppa_link_hash_newfunc): New function.
491         (elf32_hppa_link_hash_table_create): Use above function. Init new
492         fields.
493         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
494         instead of addend, and remove sym_name from args.  Don't use
495         symbol name for local syms, instead use sym index.
496         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
497         stub type rather than size.  Pass in hash and handle import stub
498         case.  Also pass in reloc instead of offset so we can calculate
499         PCREL22F and PCREL12F branches properly.
500         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
501         import and export stubs too.
502         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
503         import and export stub sizing.
504         (elf32_hppa_check_relocs): New function.
505         (elf32_hppa_adjust_dynamic_symbol): New function.
506         (hppa_discard_copies): New function.
507         (elf32_hppa_size_dynamic_sections): New function.
508         (elf_backend_size_dynamic_sections): Define.
509         (elf32_hppa_finish_dynamic_symbol): New function.
510         (elf_backend_finish_dynamic_symbol): Define.
511         (elf32_hppa_size_stubs): Stash params in link hash table, and move
512         some local vars into the link hash table too.  For shared links,
513         trundle over function syms, generating export stubs.  Handle
514         PCREL22F branches.  Break out stub creation code from here..
515         (hppa_add_stub): .. to here.  New function.
516         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
517         call the bfd linker.  Use elf_gp to record global pointer.
518         Calculate a value from sections if $global$ is missing.
519         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
520         (elf32_hppa_gc_mark_hook): New function.
521         (elf_backend_gc_mark_hook): Define.
522         (elf32_hppa_gc_sweep_hook): New function.
523         (elf_backend_gc_sweep_hook): Define.
524         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
525         Add rel to args, and remove howto, input_bfd, offset, addend,
526         sym_name as we can recalculate these locally.  Handle calls to
527         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
528         handling of undefined weak syms.  Check that stubs are in range.
529         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
530         message on hitting a DPREL21L reloc that needs fixing.  Subtract
531         off PC for PCREL14F.  Break out code that does a stub lookup from
532         here..
533         (hppa_get_stub_entry): ..to here.  New function.
534         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
535         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
536         relocs, etc. etc.
537         (elf32_hppa_finish_dynamic_sections): New function.
538         (elf_backend_finish_dynamic_sections): Define.
539         (elf_backend_final_write_processing) Define.
540         (hppa_handle_PIC_calls): New function.
541         (elf32_hppa_build_stubs): Call it.  Pass link_info to
542         hppa_build_one_stub.
543         (elf32_hppa_create_dynamic_sections): New function
544         to create .plt and .got then set .plt flags correctly.
545         (elf_backend_create_dynamic_sections): Define.
546         (elf32_hppa_object_p): New function.
547         (elf_backend_object_p): Define.
548         (elf32_hppa_elf_get_symbol_type): New function.
549         (elf_backend_get_symbol_type): Define.
550         (elf_backend_can_gc_sections): Define.
551         (elf_backend_want_got_plt): Define.
552         (elf_backend_plt_alignment): Set to 2.
553         (elf_backend_plt_readonly): Define.
554         (elf_backend_want_plt_sym): Define.
555         (elf_backend_got_header_size): Reserve one entry.
556
557         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
558         (elf32_hppa_size_stubs): Pass in multi_subspace.
559         (elf32_hppa_set_gp): Declare.
560
561         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
562         (bfd_get_unique_section_name): New function.
563         * bfd_in2.h: Regenerate.
564
565         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
566         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
567         comment.
568
569         From  David Huggins-Daines  <dhd@linuxcare.com>
570         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
571         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
572         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
573         been updated in finish_dynamic_symbol before modifying function
574         symbol.
575
576         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
577         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
578         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
579         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
580         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
581         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
582         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
583         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
584
585         From David Huggins-Daines  <dhd@linuxcare.com>
586         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
587         style of local labels as well.
588
589 2000-09-03  Philip Blundell  <philb@gnu.org>
590
591         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
592         references to undefined symbols in debugging sections.
593
594 2000-09-02  H.J. Lu  <hjl@gnu.org>
595
596         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
597         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
598         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
599         section.
600
601 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
602
603         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
604         (elf32_i860_is_local_label_name): New function and prototype.
605
606 2000-09-02  Nick Clifton  <nickc@redhat.com>
607
608         * configure.in: Increase version number to 2.10.91.
609         * configure: Regenerate.
610         * aclocal.m4: Regenerate.
611         * config.in: Regenerate.
612         * po/bfd.pot: Regenerate.
613
614 2000-09-02  Daniel Berlin <dberlin@redhat.com>
615
616         * elf.c (_bfd_elf_make_section_from_shdr): Add
617         .gnu.linkobce.wi. to the list of debug section names.
618
619 2000-09-02  Nick Clifton  <nickc@redhat.com>
620
621         * dwarf2.c (find_debug_info): New function: Locate a section
622         containing dwarf2 debug information.
623         (bfd_dwarf2_find_nearest_line): Find all sections containing
624         debug information and include them in the stash.
625
626 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
627
628         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
629         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
630         (sh_reloc_map): Add new relocs.
631         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
632         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
633         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
634         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
635         functions.
636         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
637         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
638         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
639         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
640         New array constants.
641         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
642         New variables.
643         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
644         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
645         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
646         elf_sh_plt_reloc_offset): Define.
647         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
648         elf_sh_link_hash_table): New structs.
649         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
650         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
651         relocation types.
652         (elf_backend_create_dynamic_sections,
653         bfd_elf32_bfd_link_hash_table_create,
654         elf_backend_adjust_dynamic_symbol,
655         elf_backend_size_dynamic_sections,
656         elf_backend_finish_dynamic_symbol,
657         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
658         elf_backend_plt_readonly, elf_backend_want_plt_sym,
659         elf_backend_got_header_size, elf_backend_plt_header_size):
660         Define.
661         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
662         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
663         New relocs.
664         * bfd-in2.h, libbfd.h: Rebuilt.
665
666 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
667
668         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
669         change.
670
671 Thu Aug 31 22:49:30 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
672
673         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
674         not initialized, set them to indicate the SH1 instruction set.
675
676 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
677
678         * acinclude.m4: Include libtool and gettext macros from the
679         top level.
680         * aclocal.m4, configure: Rebuilt.
681
682 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
683
684         * elf.c: Eliminate references to __sparcv9 macro; replace with
685         autoconf variables HAVE_PSINFO32_T etc.
686         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
687         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
688         * config.in: Ditto.
689         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
690         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
691         * aclocal.m4: Ditto.
692         * configure: Regenerate.
693
694 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
695
696         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
697         for any shared link, not just shared -Bsymbolic.
698         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
699         any shared link, and pass link info to it.
700         (elf_i386_size_dynamic_sections): Update comment.
701         (elf_i386_discard_copies): Modify to discard relocs for symbols
702         that have been forced local.
703         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
704         that have been forced local.
705
706 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
707
708         * elflink.h (elf_link_add_object_symbols): Allow common
709         symbols to have an alignment of 1 if explicitly requested, and
710         not overridden by other definitions.
711
712 2000-08-22  Doug Kwan <dkwan@transmeta.com>
713
714         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
715         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
716
717 2000-08-22  H.J. Lu  <hjl@gnu.org>
718
719         * elf-bfd.h (elf_link_hash_table): Add runpath.
720
721         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
722         * bfd-in2.h: Rebuilt.
723
724         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
725         "runpath" field to NULL.
726         (bfd_elf_get_runpath_list): New function.
727
728         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
729         DT_RUNPATH entries.
730
731 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
732
733         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
734         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
735         explicitly.  Improve validation of r_type.
736
737 2000-08-21  H.J. Lu  <hjl@gnu.org>
738
739         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
740         dynamic allocated content space.  Add a comment to remind us that
741         one day this ought to be fixed.
742         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
743         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
744         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
745
746 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
747
748         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
749         field with the newly relocated value instead of adding it to the
750         existing immediate field.
751         (elf32_i860_relocate_splitn): Likewise.
752         (elf32_i860_relocate_highadj): Likewise.
753
754 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
755
756         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
757         was previously just a stub).
758
759 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
760
761         * elflink.c (_bfd_elf_create_got_section): Don't abort().
762         Formatting fixes.
763         (_bfd_elf_create_dynamic_sections): Likewise.
764
765 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
766
767         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
768         for undefined symbols to be the beginning of the section.
769
770         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
771         four extra entries at the beginning of the .rela.plt section.
772         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
773         section to account for the four reserved entries in the .plt section.
774
775 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
776
777         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
778         to the list of NOPs we recognize after a branch-and-link.
779         Use the ori NOP when one is needed.
780
781         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
782         for large archives.
783
784 2000-08-14  Jim Wilson  <wilson@cygnus.com>
785
786         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
787         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
788         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
789         EF_IA_64_ABSOLUTE.
790
791 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
792
793         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
794
795 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
796
797         * elf32-i860.c (elf32_i860_relocate_section): New function.
798         (i860_final_link_relocate): New function.
799         (elf32_i860_relocate_splitn): New function.
800         (elf32_i860_relocate_pc16): New function.
801         (elf32_i860_relocate_highadj): New function.
802         (elf32_i860_howto): Minor adjustments to some relocations.
803         (elf_info_to_howto_rel): Define.
804         (elf_backend_relocate_section): Define.
805
806 2000-08-10  Nick Clifton  <nickc@cygnus.com>
807
808         * elf32-arm.h: Fix formatting.
809
810 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
811
812         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
813
814 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
815
816         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
817
818 2000-08-07  Kazu Hirata  <kazu@hxi.com>
819
820         * ieee.c (ieee_write_debug_part): Rewrite a comment.
821         * elf64-ia64.c: Fix a typo.
822
823 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
824
825         * elf32-i860 (elf32_i860_howto_table): New structure.
826         (lookup_howto): New function.
827         (elf32_i860_reloc_type_lookup): New function.
828         (elf32_i860_info_to_howto_rela): New function.
829         (elf_code_to_howto_index): New structure.
830         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
831         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
832         elf32_i860_reloc_type_lookup.
833
834 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
835
836         * som.c (struct fixup_format): Constify `format'.
837         (som_hppa_howto_table): Use SOM_HOWTO macro.
838         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
839         (som_bfd_reloc_type_lookup): Likewise.
840         (compare_subspaces): Remove unused `count1', `count2'.
841         (som_begin_writing): Remove unused `total_reloc_size'.
842         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
843         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
844         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
845         (som_find_nearest_line): Decorate unused parameter(s).
846         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
847         (som_bfd_link_split_section): Likewise.
848
849 2000-08-03  Nick Clifton  <nickc@cygnus.com>
850
851         * section.c: Restore backed out code.
852         * elf.c: Restore backed out code.
853         (copy_private_bfd_data): Fix bug preventing stipped dynamic
854         binaries from working.
855         * bfd-in2.h: Regenerate.
856
857 2000-08-03  H.J. Lu  <hjl@gnu.org>
858
859         * section.c: Back out the change made by Nick Clifton
860         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
861         binaries.
862         * bfd-in2.h: Likewise.
863         * elf.c: Likewise.
864
865 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
866
867         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
868
869 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
870
871         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
872         * bfd-in2.h, libbfd.h: Regenerate.
873
874 2000-07-31  Nick Clifton  <nickc@cygnus.com>
875
876         * section.c (struct sec): Add new boolean field 'segment_mark'.
877         (STD_SECTION): Initialise new field to zero.
878
879         * bfd-in2.h: Regenerate.
880
881         * elf.c (copy_private_bfd_data): Reorganise section to segment
882         mapping to cope with moved sections requiring new segments,
883         and overlapping segments.
884         (SEGMENT_END): New macro: Return the end address of a segment.
885         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
886         contains a section by comparing their VMA addresses.
887         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
888         contains a section by comparing their LMA addresses.
889         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
890         section should be included in a segment.
891         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
892         follows another in memory.
893         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
894         segments overlap.
895
896 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
897
898         * cpu-i860.c: Added comments.
899
900         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
901         bfd_elf32_i860_little_vec.
902         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
903         (ELF_MAXPAGESIZE): Changed to 4096.
904
905         * targets.c (bfd_elf32_i860_little_vec): Declaration of
906         new target.
907         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
908
909         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
910         config for little endian elf32 i860.
911         (targ_defvec): Define for the new config above
912         as "bfd_elf32_i860_little_vec".
913         (targ_selvecs): Define for the new config above
914         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
915
916         * configure.in (bfd_elf32_i860_little_vec): Added recognition
917         of new target vec.
918
919         * configure: Regenerated.
920
921 2000-07-27  H.J. Lu  <hjl@gnu.org>
922
923         * elflink.h (elf_merge_symbol): Take one more argument,
924         dt_needed, to indicate if the symbol comes from a DT_NEEDED
925         entry. Don't overide the existing weak definition if dt_needed
926         is true.
927         (elf_link_add_object_symbols): Pass dt_needed to
928         elf_merge_symbol ().
929
930 2000-07-27  Nick Clifton  <nickc@cygnus.com>
931
932         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
933         allocated contents.
934
935 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
936
937         * configure.host (*-*-aix*): AIX has 'long long' always.
938
939         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
940         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
941         (xcoff_write_archive_contents_big): Don't update the offset
942         of the symbol table, xcoff_write_armap will do it.
943
944 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
945
946         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
947         of dynobj for SGI_COMPAT checks.
948
949 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
950
951         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
952         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
953         * bfd-in2.h: Regenerate.
954
955 2000-07-21  Nick Clifton  <nickc@cygnus.com>
956
957         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
958         range symbol indices in relocs and issue an error message.
959
960 2000-07-20  H.J. Lu  <hjl@gnu.org>
961
962         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
963         info->new_dtags when setting DT_FLAGS_1. It will only be set
964         by the new linker options. It shouldn't break anything.
965
966 2000-07-20  H.J. Lu  <hjl@gnu.org>
967
968         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
969         only if info->new_dtags is true.
970
971 2000-07-20  H.J. Lu  <hjl@gnu.org>
972
973         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
974         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
975
976 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
977
978         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
979         (ALL_MACHINES_CFILES): Add cpu-cris.c.
980         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
981         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
982         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
983         * Makefile.in: Rebuild.
984         * aclocal.m4: Rebuild.
985         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
986         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
987         (bfd_cris_arch): Declare.
988         (bfd_archures_list): Add bfd_cris_arch.
989         * bfd-in2.h: Rebuild.
990         * config.bfd: (cris-*-*): New target.
991         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
992         * configure: Rebuild.
993         * elf.c (prep_headers): Add bfd_arch_cris.
994         * libbfd.h: Rebuild.
995         * libaout.h (enum machine_type): Add M_CRIS.
996         * reloc.c: Add CRIS relocations.
997         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
998         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
999         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
1000         * po/POTFILES.in, po/bfd.pot: Regenerate.
1001
1002 2000-07-19  H.J. Lu  <hjl@gnu.org>
1003
1004         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
1005         DF_TEXTREL if DT_TEXTREL is set.
1006         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1007         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1008         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1009         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
1010         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1011         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1012         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1013         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1014         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
1015         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1016
1017         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
1018         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
1019         DT_RPATH is set.
1020         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
1021
1022 2000-07-19  H.J. Lu  <hjl@gnu.org>
1023
1024         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
1025         * bfd-in2.h: Rebuild.
1026
1027         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
1028         (elf_dt_soname): New.
1029
1030         * elf.c (bfd_elf_set_dt_needed_soname): New.
1031
1032         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
1033         entry if the shared object loaded by DT_NEEDED is used to
1034         resolve the reference in a regular object.
1035
1036 2000-07-19  H.J. Lu  <hjl@gnu.org>
1037
1038         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
1039         DT_DEPAUDIT and DT_AUDIT as strings.
1040
1041 2000-07-19  Nick Clifton  <nickc@cygnus.com>
1042
1043         * format.c: Fix formatting.
1044
1045 2000-07-19  H.J. Lu  <hjl@gnu.org>
1046
1047         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
1048
1049 2000-07-19  H.J. Lu  <hjl@gnu.org>
1050
1051         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
1052         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
1053         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
1054         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
1055         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
1056         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
1057         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
1058
1059 Tue Jul 18 13:11:54 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1060
1061         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
1062         renamed functions from here...
1063         (assign_section_numbers): Use renamed functions.
1064         (prep_headers): Use renamed functions.
1065
1066         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
1067         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
1068         * bfd-in2.h: Regenerate.
1069
1070 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
1071
1072         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
1073         parenthesis in if statement.
1074
1075 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
1076
1077         Enable the support for Traditional MIPS.
1078         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
1079         return ict_none appropriately for traditional mips targets.
1080         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
1081         (STUB_MOVE): Conditionalize for traditonal mips.
1082         (STUB_LI16): Likewise.
1083         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
1084         room for RTPROC header.
1085         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
1086         the permission for the PT_DYNAMIC as read, write and execute.
1087         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
1088         for traditonal mips.
1089         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
1090         _DYNAMIC_LINKING for traditonal mips.
1091         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
1092         in case of traditonal mips.
1093         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
1094         entry is required. For a function if PLT is not required then set the
1095         corresponding hash table entry to 0.
1096         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
1097         traditonal mips.
1098         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
1099         shared object set the value to 0.
1100         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
1101         _DYNAMIC_LINKING for traditonal mips.
1102         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
1103         for traditonal mips.
1104
1105 2000-07-15  H.J. Lu  <hjl@gnu.org>
1106
1107         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
1108
1109 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
1110
1111         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
1112         out a structure that is BFD_IN_MEMORY.
1113
1114 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
1115
1116         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
1117         bfd pointer.  Print section id instead of bfd pointer for local
1118         syms.  Prefix addend with `+' for global syms as well as local.
1119         Correct calculation of name component lengths.
1120         (elf64_hppa_check_relocs): Update call to get_dyn_name.
1121
1122         From David Huggins-Daines  <dhd@linuxcare.com>
1123         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
1124         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
1125         (elf64_hppa_modify_segment_map): Likewise.
1126
1127 Tue Jul 11 17:21:52 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1128
1129         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
1130         addresses to be "naturally" sign extended.  Return -1 if unknown.
1131         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
1132         * bfd-in2.h: Regenerate.
1133
1134 Tue Jul 11 16:25:52 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1135
1136         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
1137         and ECOF_SIGNED_64 to list ways to extract an offset.
1138         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
1139         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
1140         Update.
1141         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
1142         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
1143
1144 Tue Jul 11 16:03:04 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1145
1146         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
1147         bfd_get_start_address.
1148         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
1149         (elf_swap_ehdr_out): Ditto.
1150
1151 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
1152
1153         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
1154         compatibility with older binutils.
1155
1156 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
1157
1158         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
1159         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
1160
1161         From Ryan Bradetich  <rbradetich@uswest.net>
1162         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
1163         (parse_line_table): Ditto.
1164         (_bfd_dwarf1_find_nearest_line): Ditto.
1165         * syms.c (cmpindexentry): Remove extra `*' from params.
1166
1167 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
1168
1169         * elf32-mips.c (sort_dynamic_relocs): New Function.
1170         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
1171         via qsort to sort the dynamic relocations in increasing r_symndx
1172         value.
1173
1174 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
1175
1176         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
1177         ATTRIBUTE_UNUSED to unused args.
1178         (get_opd): Likewise.
1179         (get_plt): Likewise.
1180         (get_dlt): Likewise.
1181         (get_stub): Likewise.
1182         (elf64_hppa_adjust_dynamic_symbol): Likewise.
1183         (elf64_hppa_link_output_symbol_hook): Likewise.
1184         (elf64_hppa_check_relocs): Delete unused var.
1185         (elf64_hppa_size_dynamic_sections): Likewise.
1186         (elf64_hppa_finalize_opd): Likewise.
1187         (elf64_hppa_finalize_dynreloc): Likewise.
1188         (elf64_hppa_modify_segment_map): Likewise.
1189         (elf64_hppa_finish_dynamic_sections): Likewise.
1190
1191         * elf-hppa.h (elf_hppa_final_write_processing): Add
1192         ATTRIBUTE_UNUSED to unused args.
1193         (elf_hppa_final_link_relocate): Likewise.
1194         (elf_hppa_record_segment_addrs): Add paretheses.
1195         (elf_hppa_relocate_section): Constify dyn_name.
1196
1197         From  David Huggins-Daines  <dhd@linuxcare.com>
1198         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
1199         rearrange case statement so that it gets preferred to 32-bit ones.
1200
1201         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
1202         asection->id instead of address of asection structure.
1203         (elf32_hppa_size_stubs): Likewise.
1204
1205         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
1206         for .init* and .fini*.
1207
1208         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
1209         and addends used in stub names to 32 bits.
1210         (elf32_hppa_size_stubs): Likewise.
1211
1212         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
1213         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
1214         not bfd_put_64.  Fix minor comment typo and formatting.
1215
1216         Changes to create multiple linker stubs, positioned immediately
1217         before the section where they are required.
1218         * elf32-hppa.c: Don't include hppa_stubs.h.
1219         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
1220         (elf32_hppa_stub_hash_table): Delete.
1221         (elf32_hppa_link_hash_entry): Delete.
1222         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
1223         stub_hash_table, and store the struct here rather than a pointer.
1224         Delete output_symbol_count.  Add offset array.  Change
1225         global_value to a bfd_vma.
1226         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
1227         (elf32_hppa_stub_hash_traverse): Delete.
1228         (elf32_hppa_name_of_stub): Delete.
1229         (elf32_hppa_link_hash_lookup): Delete.
1230         (elf32_hppa_link_hash_traverse): Delete.
1231         (elf32_hppa_stub_hash_table_init): Delete.
1232         (elf32_hppa_size_of_stub): Pass input section and offset rather
1233         than location and calculate location here.  Don't pass name as all
1234         stubs are now the same size.
1235         (elf32_hppa_stub_hash_newfunc): Init new fields.
1236         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
1237         too.
1238         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
1239         comparing against ints.  Rewrite stub handling code.
1240         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
1241         Case enums to int before comparing against ints.  Remove
1242         bfd_reloc_dangerous case.
1243         (elf32_hppa_build_one_stub): Rewrite.
1244         (elf32_hppa_size_one_stub): New function.
1245         (elf32_hppa_build_stubs): Rewrite.
1246         (elf32_hppa_size_stubs): Pass in linker call-back functions.
1247         Rewrite stub-handling specific code.
1248
1249         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
1250
1251         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
1252
1253         * hppa_stubs.h: Delete.
1254         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
1255         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
1256         * Makefile.in: Regenerate.
1257
1258         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
1259         e_nlrsel.
1260
1261         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
1262
1263         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
1264         and section name for bfd_reloc_notsupported error message.
1265         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
1266         bfd_reloc_notsupported.
1267         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
1268
1269         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
1270         undefined weak symbols for all relocs.
1271         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
1272         offsets are relative to one past the delay slot.
1273         (elf32_hppa_size_stubs): Account for reloc addend when calculating
1274         branch destination.  Put addend into stub name too.
1275         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
1276         adjust by 8 when deciding whether a linker stub is needed.  Put
1277         addend into stub name as for above.
1278
1279         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
1280         various args and vars.
1281         (elf32_hppa_bfd_final_link_relocate): Here too.
1282         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
1283         inner block var to avoid shadowing.
1284
1285         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
1286         unsigned.
1287         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
1288         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
1289         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
1290
1291         * libhppa.h: Change practically all unsigned ints to plain ints.
1292         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
1293         prototypes.
1294
1295         From Ryan Bradetich  <rbradetich@uswest.net>
1296         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
1297         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
1298         suit above.
1299         From  David Huggins-Daines  <dhd@linuxcare.com>
1300         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
1301         to the new OP_* ones.
1302
1303         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
1304         error exit.  Bail out earlier on plabel relocs that we aren't
1305         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
1306         string, and then don't free our copy.
1307         (elf32_hppa_build_one_stub): Make insn unsigned int.
1308
1309         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
1310         available with BL, not BE and BLE.
1311
1312         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
1313         code for elf arg relocs.
1314         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
1315         argument with elf_link_hash_entry h.  Handle undefined weak
1316         symbols.  Move $global$ lookup from here...
1317         (elf32_hppa_relocate_section): ...to here.  Return correct error
1318         message for non-handled relocs.
1319         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
1320         wrong test was -0x3ffff to +0x40000.
1321
1322         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
1323         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
1324         Handle them as such.
1325         (elf_hppa_relocate_insn): Fix a typo.
1326
1327         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
1328         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
1329         assemble_17, assemble_21): Delete.
1330         Supply defines for all 64 possible opcodes.
1331         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
1332         formats.  Handle COMICLR.
1333         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
1334         -10, -16, 16, 22.
1335
1336         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
1337         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
1338         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
1339         to suit.
1340         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
1341         the local syms - did this code get deleted accidentally?  Ignore
1342         undefined and undefweak syms.
1343
1344         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
1345         block.  Use it instead of elf64_hppa_hash_table (info).
1346         (elf_hppa_final_link_relocate): Use hppa_info instead of
1347         elf64_hppa_hash_table (info).
1348
1349         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1350         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1351         (hppa_rebuild_insn): Mask immediate bits here instead.
1352         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1353
1354 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
1355
1356         * section.c (struct sec): Add id field.  Tidy comment formatting.
1357         (bfd_make_section_anyway): Set id.
1358         (STD_SECTION): Init id too.
1359         Change CONST to const throughout.
1360         * archures.c (bfd_arch_info): Tidy comment.
1361         (bfd_arch_list): Change a CONST to const.
1362         * libbfd-in.h: Tidy comments and replace CONST with const.
1363         * elf-bfd.h: Likewise.
1364         * libbfd.h: Regenerate.
1365         * bfd-in2.h: Regenerate.
1366         * libcoff.h: Regenerate.
1367
1368 2000-07-07  DJ Delorie  <dj@redhat.com>
1369
1370         * archive.c (_bfd_write_archive_contents): Add an informative
1371         comment.
1372
1373 2000-07-06  Kazu Hirata  <kazu@hxi.com>
1374
1375         * srec.c: Fix formatting.
1376
1377 2000-06-05  DJ Delorie  <dj@redhat.com>
1378
1379         * MAINTAINERS: new
1380
1381 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
1382
1383         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
1384         value of PC-relative offsets.
1385
1386 2000-07-03  Jim Wilson  <wilson@cygnus.com>
1387
1388         * elf64-alpha.c (alpha_elf_size_info): New.
1389         (elf_backend_size_info): Define to alpha_elf_size_info.
1390         * elfcode.h (elf_size_info): Change hash bucket size to 4.
1391
1392 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
1393
1394         * elf32-mips.c: Include elf32-target.h again for the traditional
1395         MIPS targets.
1396
1397 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
1398
1399         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
1400         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
1401         (avr_info_to_howto_rela): Likewise.
1402         (elf32_avr_gc_mark_hook): Likewise.
1403         (elf32_avr_gc_sweep_hook): Likewise.
1404         (elf32_avr_relocate_section): Likewise.
1405
1406 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
1407
1408         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
1409         an external symbol for a non-shared, non-relocatable link.
1410
1411 2000-07-03  Nick Clifton  <nickc@redhat.com>
1412
1413         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
1414         is an external symbol.
1415         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
1416         external symbol.
1417
1418 2000-07-03  Kazu Hirata  <kazu@hxi.com>
1419
1420         * reloc16.c: Fix formatting.
1421
1422 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
1423
1424         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
1425         to add a new target for traditional mips i.e
1426         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
1427         * configure.in: Likewise.
1428         * configure: Rebuild.
1429         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
1430         bfd_target_vector.
1431         (bfd_elf32_tradlittlemips_vec): Likewise.
1432         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
1433         to see that elfNN_bed does not get redefined even if the target file
1434         is included twice for a chip. See elf32-mips.c.
1435
1436 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
1437
1438         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
1439         (CLEANFILES): Add DEPA.
1440         * Makefile.in: Regenerate.
1441
1442 2000-06-30  DJ Delorie  <dj@cygnus.com>
1443
1444         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
1445         can't assume the PE header is at 0x80.
1446
1447 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
1448
1449         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
1450
1451 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
1452
1453         * go32stub.h: Update stub.
1454
1455 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
1456
1457         * archures.c (bfd_mach_avr5): Define.
1458         * bfd-in2.h (bfd_mach_avr5): Define.
1459         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
1460         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
1461         (compatible): Update comment.  Add missing test.
1462         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
1463         for avr2 and avr4.  Simplify 8K wrap code.
1464         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
1465         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
1466
1467 2000-06-26  Kazu Hirata  <kazu@hxi.com>
1468
1469         * coff-h8300.c: Fix formatting.
1470         * cpu-h8300.c: Likewise.
1471
1472 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
1473
1474         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
1475         for local symbols whose names are unknown.
1476
1477 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
1478
1479         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
1480         find one.
1481         * Makefile.in: Regenerate.
1482         * doc/Makefile.in: Regenerate.
1483
1484 2000-06-20  H.J. Lu  <hjl@gnu.org>
1485
1486         * Makefile.am: Rebuild dependency.
1487         * Makefile.in: Rebuild.
1488
1489 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1490
1491         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
1492         (elf_backend_copy_indirect_symbol): Map to the new function.
1493
1494 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
1495
1496         * archive.c (normalize): Correct pointer comparison when checking
1497         for backslashes.
1498         (bfd_bsd_truncate_arname): Likewise.
1499         (bfd_gnu_truncate_arname): Likewise.
1500
1501 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
1502
1503         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
1504         sections elf_{text,data}_{section,symbol}.
1505         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
1506         (_bfd_mips_elf_hide_symbol): New function.
1507         (elf_backend_hide_symbol): Map to the new function.
1508         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
1509         definitions of mips_elf_{text,data}_{section,symbol}.
1510         (mips_elf_local_relocation_p): Try to find the direct symbol
1511         based on new check_forced argument.
1512         (mips_elf_calculate_relocation): Use new version of
1513         mips_elf_local_relocation_p.
1514         (mips_elf_relocate_section): Likewise.
1515         (_bfd_mips_elf_relocate_section): Likewise.
1516         (mips_elf_sort_hash_table): Only assert that have enough GOT
1517         space.
1518         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
1519         entry if the relocation based on the new external argument.
1520         (mips_elf_create_dynamic_relocation): Assert that we have a
1521         section contents allocated where we can swap out the dynamic
1522         relocations.
1523         (mips_elf_calculate_relocation): Find the real hash-table entry
1524         correctly by using h->root.root.type.  Only create a dynamic
1525         relocation entry if the symbol is defined in a shared library.
1526         Create an external GOT entry for the GOT16 relocation if the
1527         symbol was forced local.
1528         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
1529         dynamic index if the symbol was forced local.
1530
1531 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1532
1533         * elf32-mips.c: Fix typos in comments.
1534
1535 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
1536
1537         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
1538         CORE_VERSION_1.
1539
1540 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
1541
1542         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
1543         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
1544         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
1545         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
1546         (bfd_elf32_m68hc11_vec): Likewise.
1547         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
1548         Supports 68hc11 & 68hc12  at the same time.
1549         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
1550         bfd_target_vector.
1551         (bfd_elf32_m68hc11_vec): Likewise.
1552         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
1553         * archures.c (bfd_m68hc12_arch): Define and register in global list
1554         (bfd_m68hc11_arch): Likewise.
1555         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
1556         BFD_RELOC_M68HC11_3B): Define.
1557         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
1558         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
1559
1560 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
1561
1562         * elf_bfd.h (struct elf_backend_data): Add info argument to
1563         elf_backend_hide_symbol.
1564         (_bfd_elf_link_hash_hide_symbol): Likewise.
1565         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
1566         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
1567         * elflink.h (elf_link_add_object_symbols): Likewise.
1568         (elf_link_assign_sym_version): Likewise.
1569
1570 2000-06-18  H.J. Lu  <hjl@gnu.org>
1571
1572         * coff-i386.c (coff_i386_reloc): Don't return in case of
1573         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
1574         Compensate PE relocations when linking with non-PE object
1575         files to generate a non-PE executable.
1576
1577 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
1578
1579         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
1580         GOT entries if we're doing a static link or -Bsymbolic link.
1581
1582 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
1583
1584         * elflink.h (elf_link_adjust_relocs): Check for and call backend
1585         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
1586         available.
1587         (elf_link_output_relocs): Likewise.
1588         (elf_reloc_link_order): Likewise.
1589
1590 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
1591
1592         * archures.c (enum bfd_architecture): #define constants for
1593         PowerPc and RS6000 machine numbers.
1594         * bfd-in2.h: Regenerate.
1595         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
1596         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
1597         and RS6000 machine numbers using #defined constants from
1598         archures.c.
1599         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
1600         machine numbers using #defined constants from archures.c.  Add
1601         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
1602         64-bit words in 620 entry.
1603         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
1604         RSC, and RS2.
1605         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
1606
1607 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
1608
1609         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
1610         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
1611         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
1612
1613 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
1614
1615         * bfd-in.h (bfd_family_coff): Define.
1616         * bfd-in2.h: Regenerate.
1617         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
1618         coff_find_nearest_line): Check COFFness using bfd_family_coff()
1619         instead of bfd_target_coff_flavour.
1620         * cofflink.c (_bfd_coff_final_link): Likewise.
1621         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
1622         exclude XCOFF files.
1623         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
1624         Likewise.
1625         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
1626         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
1627         * xcofflink.c (XCOFF_XVECP): Delete.
1628         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
1629         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
1630         bfd_xcoff_record_link_assignment,
1631         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
1632         check for bfd_target_xcoff_flavour.
1633
1634 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
1635
1636         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
1637         files on AIX 4.3.
1638         (read_hdr): New function.
1639         (rs6000coff_core_p): Store mstsave or __context64 struct instead
1640         of trying to extract individual registers.  Set abfd->arch_info
1641         to match the architecture that created the core file.
1642         (rs6000coff_get_section_contents): Delete.
1643         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
1644
1645 2000-06-14  H.J. Lu  <hjl@gnu.org>
1646
1647         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
1648         is NULL.
1649
1650 2000-06-13  H.J. Lu  <hjl@gnu.org>
1651
1652         * configure: Regenerate.
1653
1654 Tue Jun 13 01:28:57 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
1655
1656         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
1657         armpei_little_vec.
1658
1659 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
1660
1661         * configure.in (VERSION): Update to show this is the CVS mainline.
1662
1663 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
1664
1665         * elf32-d10v.c: Include elf/d10v.h
1666         (enum reloc_type): Delete.
1667         * elf32-d30v.c: Include elf/d30v.h
1668         (enum reloc_type): Delete.
1669
1670         * Makefile.am: Run "make dep-am" to regenerate dependencies.
1671         * Makefile.in: Regenerate.
1672
1673         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
1674         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
1675         move HOWTOs into elf_howto_table.
1676         (R_386_standard, R_386_ext_offset): Define.
1677         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
1678         (elf_i386_reloc_type_lookup): Modify calculation of index into
1679         elf_howto_table since we've removed the padding.
1680         (elf_i386_info_to_howto_rel): Likewise.
1681         (elf_i386_relocate_section): Likewise.
1682
1683 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
1684
1685         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
1686
1687 2000-06-05  H.J. Lu  <hjl@gnu.org>
1688
1689         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
1690         an error when seeing an undefined symbol with hidden/internal
1691         attribute. It is handled in *_relocate_section ().
1692
1693 2000-06-05  H.J. Lu  <hjl@gnu.org>
1694
1695         * elflink.h (elf_fix_symbol_flags): Follow the link for the
1696         indirect symbol for the ELF_LINK_NON_ELF bit.
1697         (elf_link_output_extsym): Don't output the indirect symbol even
1698         if the ELF_LINK_NON_ELF bit is set.
1699
1700 2000-06-01  J.T. Conklin  <jtc@redback.com>
1701
1702         * config.bfd (i[3456]86-*-netbsdelf*): New target.
1703         (i[3456]86-*-netbsdaout*): New target.
1704         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
1705         (i[3456]86-*-openbsd*): Likewise.
1706
1707 Tue May 30 15:39:04 2000  Andrew Cagney  <cagney@b1.cygnus.com>
1708
1709         * trad-core.c: From hpux-core.c, include <dirent.h> or
1710         <sys/ndir.h> when possible.
1711
1712 2000-05-31  Nick Clifton  <nickc@cygnus.com>
1713
1714         * opintl.h (_(String)): Explain why dgettext is used instead
1715         of gettext.
1716
1717 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
1718
1719         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
1720         definitions.  We must not assume they are sorted in the file
1721         according to their index numbers.
1722
1723 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
1724
1725         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
1726         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
1727         R_PARISC_DIR17F are for absolute branches; Handle them as such.
1728
1729 2000-05-30  Nick Clifton  <nickc@cygnus.com>
1730
1731         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
1732         80960CA, 80960MC as valid machine names.
1733
1734 2000-05-30  H.J. Lu  <hjl@gnu.org>
1735
1736         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
1737         visibility bits if the symbol is undefined. Correctly handle
1738         weak undefined symbols with hidden and internal attributes.
1739
1740         * elflink.h (elf_link_add_object_symbols): Always turn the
1741         symbol into local if it has the hidden or internal attribute.
1742
1743 2000-05-29  Philip Blundell  <philb@gnu.org>
1744
1745         * ppcboot.c:  Add packed attribute if compiling with GCC.
1746
1747 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
1748
1749         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
1750
1751 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
1752
1753         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
1754         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
1755         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
1756         a few old comments.
1757
1758 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
1759
1760         * Makefile.am: Update dependencies with "make dep-am"
1761         * Makefile.in: Regenerate.
1762
1763         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
1764         bindtextdomain): Replace defines with those from intl/libgettext.h
1765         to quieten gcc warnings.
1766
1767 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
1768
1769         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
1770
1771         * archive.c (normalize, bfd_bsd_truncate_arname,
1772         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
1773         file names with backslashes.
1774
1775         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
1776         before opening it.
1777
1778         * sysdep.h: Include filenames.h.
1779
1780 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
1781
1782         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
1783
1784 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
1785
1786         * elf64-sparc.c (sparc64_elf_relax_section): New.
1787         (sparc64_elf_relocate_section): Optimize tail call into branch always
1788         if possible.
1789         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1790         (elf32_sparc_relax_section): New.
1791
1792 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
1793
1794         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
1795         Remove unusued variables.
1796         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
1797         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
1798         previous fix, so that shared libs really don't influence targets
1799         extension mask and memory model.
1800
1801 2000-05-23  H.J. Lu  <hjl@gnu.org>
1802
1803         * elf64-alpha.c (elf64_alpha_relocate_section): Check
1804         h->root.other not h->other.
1805         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1806
1807         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
1808
1809 2000-05-23  H.J. Lu  <hjl@gnu.org>
1810
1811         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
1812         undefined symbol with the non-default visibility attributes.
1813         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
1814         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1815         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1816         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1817         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1818         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1819         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1820         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1821         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1822         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
1823         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1824
1825 2000-05-22  Richard Henderson  <rth@cygnus.com>
1826
1827         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
1828         PCREL22, PCREL64I.  Zero size of special relocs.
1829         (elf64_ia64_reloc_type_lookup): Likewise.
1830         (USE_BRL, oor_brl, oor_ip): New.
1831         (elf64_ia64_relax_section): New.
1832         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
1833         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
1834         (elf64_ia64_relocate_section): Likewise.
1835         (bfd_elf64_bfd_relax_section): New.
1836         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
1837         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
1838         * bfd-in2.h, libbfd.h: Regenerate.
1839
1840 2000-05-22  Nick Clifton  <nickc@cygnus.com>
1841
1842         * configure.in : Add peigen.lo to MIPS PE targets.
1843         * configure: Regenerate.
1844
1845 2000-05-22  Momchil Velikov  <velco@fadata.bg>
1846
1847         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
1848         only if it is known for both input and output bfds. Separate
1849         error message strings as in some languages, it may be necessary
1850         to change more than one place in the string to change between
1851         'big' and 'little'.
1852
1853         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
1854         endianess checks, call _bfd_generic_verify_endian_match() instead.
1855
1856         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1857
1858         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
1859
1860         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
1861         endianess before checking bfd flavours.
1862
1863 2000-05-22  H.J. Lu  <hjl@gnu.org>
1864
1865         * elflink.h (elf_link_output_extsym): Clear the visibility
1866         field for symbols not defined locally.
1867
1868 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
1869
1870         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1871         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1872         (hppa_rebuild_insn): Mask immediate bits here instead.
1873         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1874
1875 2000-05-18  Momchil Velikov <velco@fadata.bg>
1876
1877         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
1878         relocs for an executable, ensure that they are virtual addresses.
1879
1880 Thu May 18 10:55:47 2000  Jeffrey A Law  (law@cygnus.com)
1881
1882         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
1883
1884 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
1885             Rick Gorton             <gorton@scrugs.lkg.dec.com>
1886
1887         * elflink.h: Add emitrelocations support: when enabled, relocation
1888         information and relocation sections are put into final output
1889         executables.  If the emitrelocations flag is set, do the following:
1890         (elf_bfd_final_link): Emit relocation sections.
1891         (elf_link_input_bfd): Compute relocation section contents.
1892         (elf_gc_sections): Don't clean relocation sections.
1893
1894 2000-05-16  Catherine Moore  <clm@cygnus.com>
1895
1896         * som.c (som_decode_symclass):  Recognize weak symbols.
1897
1898 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
1899
1900         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
1901         read idata section only from dataoff.
1902         (pe_print_edata): Correctly check for valid eat_member.
1903
1904 Tue May 16 00:04:11 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
1905
1906         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
1907
1908 2000-05-14  Philip Blundell  <philb@gnu.org>
1909
1910         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
1911
1912 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
1913
1914         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
1915
1916         * peigen.c (pe_print_idata): Look for .idata section and print
1917         info even if data directory has zero entries.  Read idata section
1918         starting from dataoff, and adjust all data offsets to suit.  Cast
1919         all bfd_vma vars to unsigned long before passing to fprintf.
1920         * peigen.c (pe_print_edata): Similarly, look for .edata section
1921         and print info even if data directory has zero entries.  Cast
1922         all bfd_vma vars to unsigned long before passing to fprintf.
1923
1924         From Szabolcs Szakacsits <szaka@F-Secure.com>
1925         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
1926         directory size which may be bogus.
1927         * peigen.c (pe_print_edata): Similarly.
1928
1929 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
1930
1931         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
1932         section is empty.
1933         (copy_private_bfd_data): Allow for space possibly taken up by elf
1934         headers when calculating segment physical address from lma.
1935
1936 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
1937
1938         * versados.c (versados_scan): Init stringlen and pass_2_done.
1939
1940         * trad-core.c (trad_unix_core_file_p): Return
1941         bfd_error_wrong_format rather than bfd_error_file_truncated.
1942
1943         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
1944         add_data_entry.  DataDirectory virtual address is relative.
1945         (pe_print_idata): Account for relative DataDirectory virtual
1946         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
1947         (pe_print_edata): Similarly.
1948
1949         From Szabolcs Szakacsits <szaka@F-Secure.com>
1950         * peigen.c (dir_names): Add Delay Import Directory.
1951         (pe_print_idata):  Always search for bfd section containing
1952         idata address rather than looking up section name.  Print this
1953         section name rather than .idata.
1954         (pe_print_edata): Similarly.  Also print some fields as %08lx.
1955         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
1956         Win32Version.
1957
1958 Fri May  5 20:44:40 2000  Clinton Popetz  <cpopetz@cygnus.com>
1959
1960         * xcoff.h: Rename to xcoff-target.h
1961         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
1962         * coff-rs6000.c: Ditto.
1963         * coff64-rs6000.c: Ditto.
1964         * coff-pmac.c: Ditto.
1965         * Makefile.in: Regenerate.
1966
1967 Fri May  5 16:51:03 2000  Clinton Popetz  <cpopetz@cygnus.com>
1968
1969         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
1970         Change U802TOC64MAGIC to U803XTOCMAGIC.
1971
1972 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
1973
1974         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
1975         * bfd-in.h: Prototype bfd_elf_get_arch_size.
1976         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
1977
1978 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
1979
1980         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
1981
1982 2000-05-03  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1983
1984         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
1985         hidden and internal symbols.
1986         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
1987         visibility.
1988         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
1989         assign a PLT or GOT entry to symbols with hidden and
1990         internal visibility.
1991
1992 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
1993
1994         * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
1995         the .bss section.
1996         * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1997
1998 2000-05-02  H.J. Lu  <hjl@gnu.org>
1999
2000         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
2001         ELFOSABI_SYSV.
2002
2003 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
2004
2005         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
2006         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
2007         dependencies.
2008         * Makefile.in: Regenerate.
2009
2010 Mon May  1 16:56:47 2000  Jim Wilson  <wilson@cygnus.com>
2011
2012         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
2013         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
2014         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
2015         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
2016         * Makefile.in: Rebuild.
2017
2018 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
2019
2020         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
2021         doesn't work very well.
2022
2023         * elf-hppa.h (elf_hppa_internal_shdr): Define.
2024         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
2025         Set hdr->s_type to 1 if ARCH_SIZE == 32.
2026         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
2027         (elf_hppa_info_to_howto): Likewise.
2028         (elf_hppa_info_to_howto_rel): Likewise.
2029         (elf_hppa_reloc_type_lookup): Likewise.
2030         (elf_hppa_is_local_label_name): Likewise.
2031         (elf_hppa_fake_sections): Likewise.
2032         (elf_hppa_final_write_processing): Likewise.
2033         (elf_hppa_howto_table): Fully initialise all entries.
2034         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
2035         (elf_hppa_info_to_howto): Likewise.
2036         (elf_hppa_info_to_howto_rel): Likewise.
2037         (elf_hppa_reloc_type_lookup): Likewise.
2038         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
2039         elf_hppa_unmark_useless_dynamic_symbols,
2040         elf_hppa_remark_useless_dynamic_symbols,
2041         elf_hppa_record_segment_addrs, elf_hppa_final_link,
2042         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
2043         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
2044         elf32-hppa.c mess is cleaned up.
2045         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
2046         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
2047         r_field then call hppa_field_adjust inline func with variable
2048         r_field arg, instead call hppa_field_adjust with fixed arg.
2049         In case R_PARISC_PCREL22F, don't set r_field.
2050         (elf_hppa_relocate_insn): Change args and return type to unsigned
2051         int.  Call re_assemble_* funcs to do the work.
2052
2053         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
2054         sign extending.
2055
2056         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
2057         extending.
2058         (sign_extend): Mask first before sign extending.
2059         (low_sign_extend): Rewrite without condition expression.
2060         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
2061         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
2062         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2063         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
2064         result as function return value rather than through pointer arg.
2065         Accept unsigned int args, and return unsigned int.
2066         (re_assemble_3): New.  Combines function of dis_assemble_3 with
2067         re-assembly of opcode and immediate.
2068         (re_assemble_12): Likewise.
2069         (re_assemble_16): Likewise.
2070         (re_assemble_17): Likewise.
2071         (re_assemble_21): Likewise.
2072         (re_assemble_22): Likewise.
2073         (hppa_field_adjust): Rewrite and document, paying attention to
2074         size of types and signed/unsigned issues.
2075         (get_opcode): Shift before masking.
2076         (FDLW): Rename to FLDW.
2077         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
2078         (hppa_rebuild_insn): Change args and return value to unsigned
2079         int.  Make use of re_assemble_*.  Correct case 11.
2080
2081         * dep-in.sed: Handle ../opcodes/.
2082         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
2083         elf64-hppa.h, hppa_stubs.h, xcoff.h.
2084         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
2085         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
2086         elfarm-nabi.lo dependencies outside of auto-dependency area.
2087         Regenerate dependencies.
2088         * Makefile.in: Regenerate.
2089
2090         * configure.in (TRAD_HEADER): Test non-null before
2091         AC_DEFINE_UNQUOTED.
2092         * configure: Regenerate.
2093
2094         * reloc.c: Fix mis-spelling in comment.
2095
2096 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
2097
2098         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
2099         * vms.c (vms_openr_next_archived_file): Return NULL.
2100
2101 Fri Apr 28 21:34:44 2000  Clinton Popetz  <cpopetz@cygnus.com>
2102
2103         * coffcode.h Copy changes mistakenly done to libcoff.h in
2104         4/24/2000 patch.
2105
2106 2000-04-29  Andreas Jaeger  <aj@suse.de>
2107
2108         * libbfd-in.h: Correctly check GCC version.
2109         * bfd-in.h: Likewise.
2110         * libhppa.h: Likewise.
2111         * libbfd.h: Regenerate.
2112         * bfd-in2.h: Regenerate.
2113
2114 Fri Apr 28 14:58:37 2000  Clinton Popetz  <cpopetz@cygnus.com>
2115
2116         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
2117         coffdu-rs6000.{lo,c}.
2118         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
2119         on xcoff.h
2120         * Makefile.in: Regenerate.
2121         * xcoff.h: New file.
2122         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
2123         * coff-rs6000.c: Move all declarations and defines that are
2124         common to the xcoff backends into xcoff.h
2125         * coff64-rs6000.c: Ditto,
2126
2127 Fri Apr 28 08:35:21 2000  Clinton Popetz  <cpopetz@cygnus.com>
2128
2129         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
2130         _bfd_coff_force_symnames in strings and
2131         _bfd_coff_debug_string_prefix_length to their default values.
2132         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
2133
2134 Fri Apr 28 08:05:12 2000  Clinton Popetz  <cpopetz@cygnus.com>
2135
2136         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
2137         _bfd_coff_force_symnames in strings and
2138         _bfd_coff_debug_string_prefix_length to their default values.
2139
2140 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
2141
2142         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
2143         Check local_got_refcounts before dereferencing.
2144
2145         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
2146         before deciding we don't need R_PPC_PLT32 relocation.
2147         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
2148         dereferencing.
2149
2150         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
2151
2152         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
2153         .plt entries.
2154         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
2155         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
2156         (elf_i386_relocate_section): Allow for .plt to go missing.
2157         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
2158         can use a relative reloc for got as elf_i386_relocate_section.
2159         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
2160
2161 Wed Apr 26 16:31:28 2000  Clinton Popetz  <cpopetz@cygnus.com>
2162
2163         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
2164
2165 Mon Apr 24 15:20:35 2000  Clinton Popetz  <cpopetz@cygnus.com>
2166
2167         * Makefile.am (coff64-rs6000.lo): New rule.
2168         * Makefile.in: Regenerate.
2169         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
2170         xcoff_is_local_label_name, xcoff_rtype2howto,
2171         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
2172         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
2173         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
2174         (NO_COFF_SYMBOLS): Define.
2175         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
2176         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
2177         internally.
2178         (MINUS_ONE): New macro.
2179         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
2180         relocation.
2181         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
2182         coff_SWAP_aux_out): Map to the new functions.
2183         * coff64-rs6000.c: New file.
2184         * libcoff.h (bfd_coff_backend_data): Add new fields
2185         _bfd_coff_force_symnames_in_strings and
2186         _bfd_coff_debug_string_prefix_length.
2187         (bfd_coff_force_symnames_in_strings,
2188         bfd_coff_debug_string_prefix_length): New macros for above fields.
2189         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
2190         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
2191         of using coff_swap_sym_in directly.
2192         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
2193         (coff_set_flags) Set magic for XCOFF64.
2194         (coff_compute_section_file_positions): Add symbol name length to
2195         string section length if bfd_coff_debug_string_prefix_length is
2196         true.
2197         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
2198         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
2199         using coff_swap_lineno_in directly.
2200         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
2201         and _bfd_coff_debug_string_prefix_length fields.
2202         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
2203         symbol names into strings table when
2204         bfd_coff_force_symnames_in_strings is true.
2205         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
2206         SET_RELOC_VADDR): New macros.
2207         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
2208         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
2209         code.
2210         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
2211         changes within RS6000COFF_C specific code.
2212         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
2213         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
2214         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2215         Extend existing hack on target name.
2216         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
2217         target name.
2218         * coff-tic54x.c (ticof): Keep up to date with new fields
2219         in bfd_coff_backend_data.
2220         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
2221         targ_selvecs to include rs6000coff64_vec for rs6000.
2222         * configure.in: Add rs6000coff64_vec case.
2223         * cpu-powerpc.c: New bfd_arch_info_type.
2224
2225 Mon Apr 24 02:17:31 2000  Jeffrey A Law  (law@cygnus.com)
2226
2227         * config.bfd: Only disable elf32-hppa vectors, not all of the
2228         BSD and OSF configuration support.  Provide (disabled) clauses
2229         for PA64 support.
2230         * configure.in: Add clause for PA64 support.
2231         * configure: Rebuilt.
2232
2233         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
2234         (bfd_elf64_hppa_vec): Declare.
2235
2236         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
2237         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
2238         (elf64-hppa.lo): Add dependencies.
2239         * Makefile.in: Rebuilt.
2240
2241         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
2242
2243 Mon Apr 24 02:14:29 2000  Jason Eckhardt  <jle@cygnus.com>
2244
2245         * libhppa.h (dis_assemble_16): New function.
2246         (pa_arch): Added pa20w element.
2247
2248 Mon Apr 24 01:49:03 2000  Ulrich Drepper  <drepper@cygnus.com>
2249
2250         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
2251         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
2252         bfd_elf64_slurp_reloc_table.
2253
2254         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
2255         definitions to get external names.
2256         (elf_write_relocs): Renamed from write_relocs and make global.
2257         (elf_slurp_reloc_table): Make global.
2258         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
2259
2260         * archive.c (hpux_uid_gid_encode): New function.
2261         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
2262         defined and the ID is greater than 99999.
2263         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
2264         special uid/gid fields into 32 bit values.
2265
2266 2000-04-21  Matthew Green  <mrg@cygnus.com>
2267
2268         * config.bfd: Add NetBSD/sparc64 support.
2269
2270 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
2271                           David Mosberger  <davidm@hpl.hp.com>
2272                           Timothy Wall <twall@cygnus.com>
2273                           Jim Wilson  <wilson@cygnus.com>
2274
2275         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
2276         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
2277         (BFD64_BACKENDS): Add elf64-ia64.lo.
2278         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
2279         (cpu-ia64.lo, elf64-ia64.lo): New rules.
2280         * Makefile.in: Rebuild.
2281         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
2282         (bfd_ia64_arch): Declare.
2283         (bfd_archures_list): Add bfd_ia64_arch.
2284         * bfd-in2.h: Rebuild.
2285         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
2286         * configure: Rebuild.
2287         * configure.host: (ia64-*-linux*): New host.
2288         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
2289         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
2290         * elf.c (prep_headers): Add bfd_arch_ia64.
2291         * libbfd.h: Rebuild.
2292         * reloc.c: Add IA-64 relocations.
2293         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
2294         Declare.
2295         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
2296         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
2297
2298 2000-04-21  Richard Henderson  <rth@cygnus.com>
2299
2300         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
2301         contents when performing a partial link.
2302         (bfd_elf_d30v_reloc_21): Likewise.
2303
2304 2000-04-20  H.J. Lu  <hjl@gnu.org>
2305
2306         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
2307         patch to symbols defined by a shared object.
2308         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
2309
2310 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2311
2312         K&R compiler fixes.
2313         * dwarf2.c (concat_filename): Avoid string literal concatenation.
2314         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
2315
2316 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
2317
2318         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
2319         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
2320         (coff-ia64.lo): Add dependency.
2321         * Makefile.in: Regenerate.
2322         * coff-ia64.c: New file.
2323         * efi-app-ia32.c: Ditto.
2324         * efi-app-ia64.c: Ditto.
2325         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
2326         (coff_set_flags): Ditto.
2327         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
2328         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
2329         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
2330         * configure: Regenerate.
2331         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
2332         (PUT_OPTHDR_IMAGE_BASE): Ditto.
2333         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2334         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2335         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2336         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2337         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2338         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2339         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2340         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2341         (GET_PDATA_ENTRY): Ditto.
2342         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
2343         data_start.  Use above macros to read fields that are 64 bit wide for
2344         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
2345         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
2346         FileAlignment and SectionAlignment to minimum alignment if they
2347         are zero.
2348         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
2349         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
2350         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
2351         Use above macros to write fields that are 64 bit wide for
2352         COFF_WITH_PEP64.
2353         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
2354         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
2355         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
2356         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
2357         begin address, end address, and unwind info address only.  Use
2358         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
2359         print addresses.
2360         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
2361         HIGH3ADJ relocation names.
2362         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
2363         * targets.c: Declare bfd_efi_app_ia32_vec and
2364         bfd_efi_app_ia64_vec.
2365         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
2366         bfd_efi_app_ia64_vec.
2367
2368 2000-04-17  Timothy Wall  <twall@cygnus.com>
2369
2370         * bfd-in2.h: Add prototypes for tic54x load page access.
2371         * bfd-in.h: Regenerate.
2372         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
2373         in customized _set_arch_mach function.
2374         * coffcode.h (coff_set_alignment_hook): Set section load page if
2375         the appropriate macro is defined.
2376         (write_object_contents): Read section load page.
2377
2378 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
2379
2380         * elf32-hppa.h: Update copyright date.
2381
2382         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
2383         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
2384
2385         * elf32-d30v.c (MAX32): Don't use LL suffix.
2386         (MIN32): Define in terms of MAX32.
2387         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
2388
2389         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
2390         expression.
2391
2392         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
2393
2394 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
2395
2396         * dep-in.sed: Match space before file name, not after.
2397         * Makefile.am: Regenerate dependencies.
2398         * Makefile.in: Regenerate.
2399
2400         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
2401         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
2402         extend without an if statement.
2403
2404 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
2405
2406         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
2407         signed quantites.
2408         * elf32-mips.c (gprel16_with_gp): Likewise.
2409         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
2410         here using -0x40000, not (int)0xfffc0000.
2411         (elf32_hppa_size_of_stub): Likewise.
2412
2413 2000-04-11  Timothy Wall  <twall@cygnus.com>
2414
2415         * coff-tic54x.c: Now builds with all targets.
2416         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
2417         * Makefile.in: Regenerate.
2418         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
2419         unitialized variable.
2420
2421 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2422
2423         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
2424         --enable-build-warnings option.
2425         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
2426         * Makefile.in, configure: Re-generate.
2427
2428 2000-04-07  Nick Clifton  <nickc@cygnus.com>
2429
2430         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
2431         BFD_RELOC_THUMB_PCREL_BLX.
2432
2433         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2434         R_ARM_XPC25 and R_ARM_THM_PC22.
2435
2436         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
2437         R_ARM_XPC25 and R_ARM_THM_XPC22.
2438         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
2439         R_ARM_[XPC25|THM_XPC22].
2440
2441         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
2442         elf/arm-oabi.h to elf/arm.h
2443
2444         * Makefile.am: Fix dependency for elfarm-oabi.c
2445         * Makefile.in: Regenerate.
2446
2447         * bfd-in2.h: Regenerate.
2448         * libbfd.h: Regenerate.
2449
2450 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2451
2452         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
2453         and restore it on failure.  Release newly allocated tdata on
2454         failure.
2455
2456 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
2457
2458         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
2459         (decode_line_info): Set it.  Report error if unit->line_offset is
2460         equal to or larger than it.
2461
2462 2000-04-07  Timothy Wall  <twall@cygnus.com>
2463
2464         * targets.c: Added vecs for tic54x.
2465         * reloc.c: Added relocs for tic54x.
2466         * libbfd.h: Regenerated.
2467         * configure: Add TI COFF vecs for tic54x.
2468         * configure.in: Ditto.
2469         * config.bfd (targ_cpu): Recognize new tic54x target.
2470         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
2471         * bfd-in2.h: Add tic54x target and relocations.
2472         * Makefile.am, Makefile.in: Add tic54x target.
2473         * archures.c (bfd_archures_list): Add tic54x target.
2474         * coff-tic54x.c: New.
2475         * cpu-tic54x.c: New.
2476
2477 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2478
2479         * elfcore.h (elf_core_file_p): call backend_object_p which
2480         thereby gets an opportunity to update the arch/machine type.
2481
2482 2000-04-06  Timothy Wall  <twall@cygnus.com>
2483
2484         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
2485         class.  Handle SEC_CLINK and SEC_BLOCK flags.
2486         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
2487         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
2488
2489 2000-04-06  Nick Clifton  <nickc@cygnus.com>
2490
2491         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
2492         EF_INTERWORK if this is an unknown EABI.
2493         (elf32_arm_merge_private_bfd_data): Check EABI version
2494         numbers.  Only check EF_xxx flags if the EABI version number
2495         is unknown.
2496         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
2497         if the EABI version number is unknown.
2498         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
2499         if the EABI version number is unknown.
2500
2501 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
2502
2503         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
2504         BFD_RELOC_SH_LOOP_END.
2505         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
2506         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
2507         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
2508         (sh_elf_reloc_loop): New function.
2509         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
2510         any more.
2511         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
2512         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
2513         * bfd-in2.h, libbfd.h: Regenerate.
2514
2515 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
2516
2517         * po/bfd.pot: Regenerate.
2518
2519         * Makefile.am: Remove extraneous mkdep comment.
2520         (MKDEP): Use gcc -MM rather than mkdep.
2521         (DEP): Quote when passing vars to sub-make.  Add warning
2522         message to end.
2523         (DEP1): Rewrite for "gcc -MM".
2524         (CLEANFILES): Add DEP2.
2525         Update dependencies.
2526         * Makefile.in: Regenerate.
2527
2528 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
2529
2530         * configure.in: Added corefile support for AIX 4.3.  In particular,
2531         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
2532         compiling rs6000-core.c.
2533         * configure: Regenerated.
2534
2535 2000-04-03  H.J. Lu  <hjl@gnu.org>
2536
2537         * cache.c (bfd_open_file): Unlink the output file only if
2538         it has non-zero size.
2539
2540 2000-04-01  Ken Block USG  <block@zk3.dec.com>
2541
2542         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
2543         relative relocations for non-loaded sections in shared objects.
2544         (elf64_alpha_check_relocs): Similarly.
2545
2546 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
2547
2548         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
2549         BFD_RELOC_16 to switch for extended relocs.
2550         (MY_swap_ext_reloc_in): New.
2551         (MY_swap_ext_reloc_out): New.
2552         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
2553         than NAME(aout,swap_ext_reloc_in) for extended relocs.
2554         (NAME(aout,squirt_out_relocs)): Similarly use
2555         MY_swap_ext_reloc_out.
2556         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
2557
2558 2000-04-03  Kazu Hirata  <kazu@hxi.com>
2559
2560         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
2561         the R_PCRWORD_B case.
2562
2563 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
2564
2565         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
2566         on some targets.
2567         * ihex.c : Ditto.
2568
2569 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
2570
2571         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
2572         HOWTO references to bfd_elf_generic_reloc, that have
2573         partial_inplace == true, now use the new function.  The function
2574         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
2575         extends its fixes to the R_M32R_{16,24,32} relocs.
2576         The new logic in m32r_elf_lo16_reloc() has been removed, and
2577         it instead calls the new routine to obtain that functionality.
2578
2579 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
2580
2581         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
2582         elf32_avr_check_relocs, avr_final_link_relocate,
2583         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
2584         elf32_avr_object_p): Add prototypes.
2585         (elf32_avr_gc_mark_hook): Add default for h->root.type.
2586         (bfd_elf_avr_final_write_processing): Make static.
2587
2588 2000-03-27  Denis Chertykov  <denisc@overta.ru>
2589
2590         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
2591         * archures.c (bfd_architecture): Add AVR architecture.
2592         (bfd_archures_list): Add reference to AVR architecture info.
2593         * elf.c (prep_headers): Handle bfd_arch_avr.
2594         * reloc.c: Add various AVR relocation enums.
2595         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
2596         list.
2597         * Makefile.am: Add support for AVR elf.
2598         * configure.in: Likewise.
2599         * config.bfd: Likewise.
2600         * Makefile.in: Regenerate.
2601         * configure: This too.
2602         * bfd-in2.h: And this.
2603         * libbfd.h: And this.
2604
2605 2000-03-24  H.J. Lu  <hjl@gnu.org>
2606
2607         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
2608         (elf64_alpha_find_reloc_at_ofs): Likewise.
2609
2610 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
2611
2612         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
2613         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
2614         allowable range used to be -2**(n-1) to 2**n-1.
2615         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
2616         "boolean overflow" with "bfd_reloc_status_type flag".
2617
2618 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
2619
2620         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
2621
2622 2000-03-14  Kazu Hirata  <kazu@hxi.com>
2623
2624         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
2625         of shrinks properly, including the last reloc.
2626
2627 2000-03-13  Kazu Hirata  <kazu@hxi.com>
2628
2629         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
2630         check for R_MOVL2.
2631
2632 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
2633
2634         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
2635         a format mismatch rather than an "error" from bfd_read such as
2636         bfd_error_file_truncated.
2637
2638 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
2639
2640         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
2641         sign-extension and big-endian compensation for
2642         R_MIPS_64 even in ld -r.
2643
2644 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
2645
2646         * elf32-mips.c (mips_elf_next_relocation): Rename from
2647         mips_elf_next_lo16_relocation, and generalize to look
2648         for any relocation type.
2649         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
2650         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
2651         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
2652         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
2653         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
2654         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
2655         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
2656         (mips_rtype_to_howto): Likewise.
2657         (mips_elf_calculate_relocation): Handle new relocs.
2658         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
2659         are paired.  The addend for R_MIPS_GNU_REL16_S2
2660         is shifted right two bits.
2661
2662 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
2663
2664         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
2665         comment, and ensure it doesn't happen again.
2666         (bfd_install_relocation): Same here.
2667         (_bfd_relocate_contents): Don't bother assigning unused signmask
2668         shift result.  Fix typos in comments.
2669         Remove trailing whitespace throughout file.
2670
2671 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
2672
2673         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
2674         * bfd-in2.h: Rebuild.
2675
2676 2000-03-06  Nick Clifton  <nickc@cygnus.com>
2677
2678         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
2679         sym_ptr_ptr fields.
2680         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
2681         (SIZEOF_ILF_STRINGS): Redefine.
2682         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
2683         relative reloc, as opposed to a section relative reloc.
2684         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
2685         not C_LABEL.
2686         Add length of symbol's prefix to string pointer.
2687         Store a pointer to the symbol in the symbol pointer table.
2688         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
2689         Initialise the symbol pointer table.
2690         Store the hint in the Hint/Name table.
2691         Make the jump reloc be symbol realtive, not section relative.
2692         Create an import symbol for imported code.
2693
2694 2000-03-06  Catherine Moore  <clm@cygnus.com>
2695
2696         * elf.c (swap_out_syms):  Check for null type_ptr.
2697
2698 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
2699
2700         * aout-target.h (MY(write_object_contents)): Remove unused
2701         and unusable "#if CHOOSE_RELOC_SIZE".
2702         * pc532-mach.c (MY(write_object_contents)): Ditto.
2703         * netbsd.h (MY(write_object_contents)): Ditto.
2704         * hp300hpux.c (MY(write_object_contents)): Ditto.
2705         * freebsd.h (MY(write_object_contents)): Ditto.
2706         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
2707
2708 2000-02-29  H.J. Lu  <hjl@gnu.org>
2709
2710         * peicode.h (jtab): Make it static.
2711
2712         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
2713         defined and COFF_IMAGE_WITH_PE is not defined.
2714         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
2715         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
2716
2717 2000-03-01  Nick Clifton  <nickc@cygnus.com>
2718
2719         * coff-arm.c (bfd_arm_process_before_allocation): Make
2720         'symndx' signed to prevent compile time warning.
2721
2722         * coff-mcore.c: Remove unused prototype for pe_object_p.
2723
2724         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
2725         functions that are not used when COFF_IMAGE_WITH_PE is
2726         defined.
2727         (struct sh_opcode): Change type of 'flags' field to unsigned
2728         long so that it can hold the USESAS flag.
2729
2730         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
2731
2732         * elf-m10300.c (mn10300_elf_relax_section): Initialise
2733         'sym_sec'.
2734
2735         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
2736         parameters.
2737         Remove unusued variables and code.
2738         (elf_backend_add_symbol_hook): Fix prototype.
2739
2740         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
2741         'srelgot'.
2742
2743         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
2744         'oldinst'.
2745
2746         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
2747         parameters.
2748         Remove unusued variables and code.
2749         (elf_backend_add_symbol_hook): Fix prototype.
2750
2751         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
2752
2753         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
2754         to unused function parameter.
2755
2756         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
2757         parameters.
2758         Use EMPTY_HOWTO to initialise empty howto slots.
2759         Remove unused variables.
2760
2761         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
2762
2763 2000-03-01  H.J. Lu  <hjl@gnu.org>
2764
2765         * aoutx.h (aout_link_input_section_std): Pass "true" to
2766         the undefined_symbol callback.
2767         (aout_link_input_section_ext): Likewise.
2768         * bout.c (get_value): Likewise.
2769         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2770         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
2771         Likewise.
2772         (alpha_relocate_section): Likewise.
2773         * coff-arm.c (coff_arm_relocate_section): Likewise.
2774         * coff-i960.c (coff_i960_relocate_section): Likewise.
2775         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2776         * coff-mips.c (mips_relocate_section): Likewise.
2777         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2778         * coff-sh.c (sh_relocate_section): Likewise.
2779         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2780         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2781         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2782         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2783         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2784         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2785         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2786         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2787         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2788         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2789         * elf32-sh.c (sh_elf_relocate_section): Likewise.
2790         * elf32-v850.c (v850_elf_relocate_section): Likewise.
2791         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2792         * elflink.h (elf_link_output_extsym): Likewise.
2793         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
2794         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
2795         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
2796
2797         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
2798         undefined_symbol callback when building shared library with
2799         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
2800         "true".
2801         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2802         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2803         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2804         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2805         (elf32_mips_get_relocated_section_content): Likewise.
2806         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2807         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2808         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2809         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2810
2811 2000-02-28  Nick Clifton  <nickc@cygnus.com>
2812
2813         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
2814         * Makefile.in: Regenerate.
2815
2816         * configure.in: Add support for mips and sh pe vectors.
2817         * configure: regenerate.
2818
2819         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
2820         targets.
2821
2822         * targets.c: Add mips and sh pe vectors.
2823
2824         * libpei.h (coff_final_link_postscript): Only define if not
2825         already defined.
2826
2827         * coffcode.h: Add support for WinCE magic numbers.
2828
2829         * peigen.c (pe_print_reloc): Update comment and rearrange
2830         appending of newline character.
2831
2832         * peicode.h: Add support for Image Library Format.
2833         (pe_ILF_vars): Structure containing data used by ILF code.
2834         (pe_ILF_make_a_section): New function.  Create a section based
2835         on ILF data.
2836         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
2837         ILF data.
2838         (pe_ILF_make_a_symbol): New function.  Create a symbol based
2839         on ILF data.
2840         (pe_ILF_save_relocs): New function.  Store the relocs created
2841         by pe_ILF_make_a_reloc in a section.
2842         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
2843         an ILF object.
2844         (pe_ILF_object_p): New function.  Return a bfd_target pointer
2845         for an ILF object.
2846         (pe_bfd_object_p): If an ILF object is detected call
2847         pe_ILF_object_p on it.
2848
2849         * coff-arm.c: Add support for WinCE relocs which are different
2850         from normal ARM COFF relocs.
2851         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
2852
2853         * coff-sh.c: Add support for sh-pe target.
2854         * pe-sh.c: New file.  Support code for sh-pe target.
2855         * pei-sh.c: New file.  Support code for sh-pe target.
2856
2857         * pe-mips.c: New file.  Support code for mips-pe target.
2858         * pei-mips.c: New file.  Support code for mips-pe target.
2859
2860 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
2861
2862         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
2863         architecture if the object causing the bump is dynamic.
2864         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
2865         and also don't it for memory ordering.
2866         (sparc64_elf_write_relocs): Take src_rela out of the loop.
2867
2868 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
2869
2870         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
2871         calling bfd_get_section_size_before_reloc.
2872         (decode_line_info): Likewise.
2873         (_bfd_dwarf2_find_nearest_line): Likewise.
2874
2875 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
2876
2877         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
2878         name of the libtool directory.
2879         * Makefile.in: Rebuild.
2880
2881 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
2882
2883         * som.c (SOM_HOWTO): Define.
2884         (som_hppa_howto_table): Use it.
2885
2886 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2887
2888         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
2889
2890         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
2891
2892 2000-02-24  Catherine Moore  <clm@cygnus.com>
2893
2894         * som.c (som_misc_symbol_info):  Add field
2895         secondary_def.
2896         (som_bfd_derive_misc_symbol_info):  Initialize
2897         secondary_def.
2898         (som_build_and_write_symbol_table): Keep track
2899         of secondary_def field.
2900         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
2901         if secondary_def field is set.
2902         (som_bfd_ar_write_symbol_stuff): Initialize
2903         secondary_def.
2904
2905 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
2906
2907         * dwarf2.c (read_address): Read 16-bits addresses.
2908         (parse_comp_unit): Accept addr_size == 2.
2909
2910 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
2911
2912         * bfd-in.h: Update copyright date.
2913
2914 2000-02-23  Linas Vepstas <linas@linas.org>
2915
2916         * cpu-i370.c: New file.
2917         * elf32-i370.c:  New file.
2918         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
2919         (bfd_i370_arch): New.
2920         (bfd_archures_list): Add bfd_i370_arch.
2921         * elf.c (prep_headers): Add bfd_arch_i370.
2922         * Makefile.am: Add support for IBM 370 elf.
2923         * config.bfd: Likewise.
2924         * configure.in: Likewise.
2925         * libbfd.h (bfd_reloc_code_real_names): Likewise.
2926         * reloc.c (bfd_reloc_code_type): Likewise.
2927         * targets.c: Likewise.
2928
2929         * Makefile.in: Regenerate.
2930         * configure: Regenerate.
2931         * bfd-in2.h: Regenerate.
2932
2933 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
2934
2935         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
2936         invalid relocation types, and change them to R_386_NONE.
2937
2938 2000-02-22  H.J. Lu  <hjl@gnu.org>
2939
2940         * elflink.h (elf_link_add_object_symbols): If a version symbol is
2941         not defined, don't add a second ELF_VER_CHR.
2942
2943         * elflink.h (elf_bfd_final_link): Call output_extsym for global
2944         symbols converted to local symbols even when stripping all
2945         symbols.
2946         (elf_link_output_extsym): Process global symbols converted to
2947         local symbols even if they are being stripped.
2948
2949 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
2950
2951         * archures.c (bfd_octets_per_byte): Return unsigned int.
2952         (bfd_arch_mach_octets_per_byte): Ditto.
2953         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
2954         comparison warning.
2955         * section.c (bfd_get_section_size_before_reloc): Quell signed
2956         vs. unsigned comparison warning.
2957         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
2958         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
2959         change.  What was I thinking?
2960         * bfd-in2.h: Regenerate.
2961
2962         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
2963         (elf_gc_sections): Same here.
2964         (elf_gc_common_finalize_got_offsets): And here.
2965
2966 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
2967
2968         ELF HPPA doesn't work at present; remove it until it does.
2969         * config.bfd: Comment out setting targ_defvec to
2970         bfd_elf32_hppa_vec.
2971         * Makefile.am: Rebuild dependencies.
2972         (BFD32_BACKENDS): Remove elf32-hppa.lo.
2973         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
2974         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
2975         * Makefile.in: Rebuild.
2976         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
2977
2978 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
2979
2980         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
2981         is no bfd_free().  Revert bfd_free part of previous change.
2982
2983 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
2984
2985         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
2986         arrays.
2987         (coff_compute_section_file_positions): Use bfd_free to pair
2988         bfd_malloc.
2989         (coff_write_object_contents): Likewise.
2990
2991         * coff-rs6000.c (xcoff_howto_table_16): New variable.
2992         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
2993
2994 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
2995
2996         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
2997         (xcoff_ar_file_hdr_big): New structure.
2998         (SIZEOF_AR_FILE_HDR_BIG): New macro.
2999         (xcoff_ar_hdr_big): New structure.
3000         (SIZEOF_AR_HDR_BIG): New macro.
3001         (xcoff_big_format_p): New macro.
3002         (xcoff_ardata_big): New macro.
3003         (arch_xhdr_big): New macro.
3004         (xcoff_slurp_armap): Handle large archives.
3005         (xcoff_archive_p): Detect large archives.
3006         (xcoff_read_ar_hdr): Handle large archives.
3007         (xcoff_openr_next_archived_file): Handle large archives.
3008         (xcoff_generic_stat_arch_elt): Handle large archives.
3009         (xcoff_write_armap_old): Rename from xcoff_write_armap.
3010         (xcoff_write_armap_big): New function.
3011         (xcoff_write_armap): New function, dispatch to _old or _big.
3012         (xcoff_write_archive_contents_old): Rename from
3013         xcoff_write_archive_contents.
3014         (xcoff_write_archive_contents_big): New function.
3015         (xcoff_write_archive_contents): New function, dispatch to _old or
3016         _big.
3017
3018 2000-02-18  Richard Henderson  <rth@cygnus.com>
3019
3020         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
3021         and hide_symbol members.
3022         (elf_link_hash_copy_indirect): Remove.
3023         (elf_link_hash_hide_symbol): Remove.
3024         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
3025         and elf_backend_hide_symbol.
3026         (_bfd_elf_link_hash_copy_indirect): Declare.
3027         (_bfd_elf_link_hash_hide_symbol): Declare.
3028         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
3029         (_bfd_elf_link_hash_hide_symbol): Likewise.
3030         (_bfd_elf_link_hash_table_init): Don't init killed members.
3031         * elflink.h (elf_link_add_object_symbols): Use the bed function
3032         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
3033         (elf_link_assign_sym_version): Likewise.
3034         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
3035         (elf_backend_hide_symbol): Likewise.
3036         (elfNN_bed): Update for new members.
3037
3038 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
3039
3040         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
3041         STACK_END_ADDR): Define for new core file format.
3042         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
3043         for handling the vagaries of the various core file structures used
3044         by AIX over the years.
3045         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
3046         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
3047         core_dumpx structure.
3048
3049 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3050
3051         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
3052         (bfd_mach_sh3_dsp): Likewise.
3053         (bfd_mach_sh4): Reinstate.
3054         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
3055         * bfd-in2.h: Regenerate.
3056         * coff-sh.c (struct sh_opcode): flags is no longer short.
3057         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
3058         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
3059         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
3060         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
3061         (sh_opcodes): No longer const.
3062         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
3063         (sh_insn_uses_reg): Check for USESAS and USESR8.
3064         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
3065         (_bfd_sh_align_load_span): Return early for SH4.
3066         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
3067         Take into account that field b of a parallel processing insn
3068         could be mistaken for a separate insn.
3069         * cpu-sh.c (arch_info_struct): New array elements for
3070         sh2, sh-dsp and sh3-dsp.
3071         Reinstate element for sh4.
3072         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
3073         (SH4_NEXT): Reinstate.
3074         (SH3_NEXT, SH3E_NEXT): Adjust.
3075         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
3076         * elf32-sh.c (sh_elf_set_private_flags): New function.
3077         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
3078         (sh_elf_merge_private_data): New function.
3079         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
3080         (bfd_elf32_bfd_copy_private_bfd_data): Define.
3081         (bfd_elf32_bfd_merge_private_bfd_data): Change to
3082         sh_elf_merge_private_data.
3083
3084 2000-02-13  Richard Henderson  <rth@cygnus.com>
3085
3086         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
3087         hide_symbol members.
3088         (elf_link_hash_copy_indirect): New.
3089         (elf_link_hash_hide_symbol): New.
3090         * elflink.h (elf_link_add_object_symbols): Break out copy from
3091         indirect new new symbol to elf.c.
3092         (elf_link_assign_sym_version): Break out privatization of
3093         non-exported symbol to elf.c.
3094         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
3095         (_bfd_elf_link_hash_hide_symbol): New.
3096         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
3097
3098 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
3099
3100         * section.c (_bfd_strip_section_from_output): Add info parameter.
3101         If it passed as non-NULL, use it to check whether any input BFD
3102         has an input section which uses this output section.  Change all
3103         callers.
3104         * bfd-in2.h: Rebuild.
3105
3106         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
3107         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
3108         1999-11-29.
3109         * bfd-in2.h: Rebuild.
3110
3111 2000-02-10  Timothy Wall  <twall@cygnus.com>
3112
3113         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
3114         allow final modifications of swapped-in symbol.
3115         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
3116         * coffcode.h (coff_write_relocs): Use macro
3117         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
3118         symbol index should be set to -1.
3119
3120 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
3121
3122         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
3123         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
3124         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
3125         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
3126         sh_insns_uses_or_sets_freg): New functions.
3127         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
3128         * (sh_insns_conflict): Use new functions and new macros to
3129         detect conflicts when two instructions both set same integer registers,
3130         both set same fp register, and both set special register.
3131
3132 2000-02-09  Timothy Wall  <twall@cygnus.com>
3133
3134         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
3135         swapping in sections, so that the swapping routines have access to
3136         the arch/mach info.
3137
3138 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
3139
3140         * coff-go32.c: Update comment. Update copyright.
3141
3142 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
3143
3144         * syms.c (bfd_decode_symclass)
3145         Two new class characters were added - 'V' and 'v'.  The
3146         meaning of 'W' is now restricted to just weak non-object
3147         symbols.  This allows differentiation between, for example,
3148         weak functions vs weak objects.  nm for example now dumps:
3149         'W' = weak global
3150         'w' = weak unresolved
3151         'V' = weak global object
3152         'v' = weak unresolved object
3153
3154         (bfd_is_undefined_symclass): New function.  Return true if the
3155         given symbol class represents and undefined/unresolved symbol.
3156
3157         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
3158         unresolved symbols.
3159
3160         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
3161
3162         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
3163         STT_ARM_16BIT flag set, but it is not attached to a data object
3164         return STT_ARM_16BIT so that it will be treated as code by the
3165         disassembler.
3166
3167 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
3168
3169         * coff-i386.c (i3coff_object_p): Remove prototype.
3170         Update copyright.
3171
3172         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
3173         to name.  Update copyright.
3174
3175         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
3176         assignment to avoid warning.  Update copyright.
3177
3178 2000-01-24  Robert Lipe  (robertl@sco.com)
3179
3180         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
3181         instead of using GNU C extension.
3182
3183 2000-01-21  Nick Clifton  <nickc@cygnus.com>
3184
3185         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
3186         amount from a bfd_in_memory structure.
3187         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
3188         structure.
3189
3190 2000-01-14  Nick Clifton  <nickc@cygnus.com>
3191
3192         * linker.c (default_indirect_link_order): oops - fix incorrectly
3193         applied patch from Tim Wall.
3194
3195 2000-01-13  Timothy Wall (twall@tiac.net>
3196
3197         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
3198         = scnhsz, filhsz, relsz, aoutsz, etc)
3199
3200          * coffswap.h: Ditto.
3201
3202 2000-01-13  Nick Clifton  <nickc@cygnus.com>
3203
3204         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
3205         interwork thumb to arm stub.
3206
3207 2000-01-13  Timothy Wall (twall@tiac.net>
3208
3209         * archures.c (bfd_octets_per_byte): New function: Return
3210         target byte size.
3211         (bfd_arch_mach_octets_per_byte): New function: Return target
3212         byte size.
3213
3214         * section.c: Distinguish between octets and bytes for usage of
3215         _cooked_size,  _raw_size, and output_offset.  Clarify
3216         description of bfd_set_section_contents.
3217
3218         * bfd-in2.h: Regenerate.
3219
3220         * coffgen.c: Indicate that the offset parameter is in bytes, not
3221         octets.
3222
3223         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
3224         where appropriate to get the octet offset when calling
3225         bfd_set_section_contents.
3226         (bfd_coff_reloc_link_order): Ditto.
3227
3228         * linker.c (bfd_generic_reloc_link_order): Ditto.
3229         (_bfd_default_link_order): Ditto.
3230
3231         * reloc.c (bfd_perform_relocation):  Distinguish between octets
3232         and bytes.  Use octets when indexing into octet data; use bytes
3233         when calculating target addresses.
3234         (bfd_install_relocation): Ditto.
3235
3236         * srec.c (srec_write_section): Ditto.
3237
3238 2000-01-13  Nick Clifton  <nickc@cygnus.com>
3239
3240         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
3241         3 to 2.  This allows 4 byte sized sections, which is necessary for
3242         dlltool to build functioning DLLs.
3243
3244 2000-01-10  Philip Blundell  <pb@futuretv.com>
3245
3246         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
3247         (arm*-*-conix*): New target.
3248
3249 2000-01-10  Egor Duda  <deo@logos-m.ru>
3250
3251         * config.bfd: Include elf32_i386 vector to target list for cygwin
3252         and mingw.
3253
3254         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
3255         * configure.in: Test for structure win32_pstatus_t in
3256         <sys/procfs.h>
3257         * configure: Regenerate.
3258
3259         * elf.c (elfcore_grok_win32pstatus): New function: process
3260         win32_pstatus_t notes in elf core file.
3261         (elfcore_grok_note): Detect win32_pstatus notes.
3262
3263 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
3264
3265         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
3266         visibility.
3267         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
3268         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
3269
3270 1999-12-29  Richard Henderson  <rth@cygnus.com>
3271
3272         * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
3273         if no dynamic sections created.
3274
3275 1999-12-27  Nick Clifton  <nickc@cygnus.com>
3276
3277         * peicode.h (pe_bfd_object_p): Only define for PE format
3278         targets.
3279
3280 1999-12-17  Nick Clifton  <nickc@cygnus.com>
3281
3282         * coff-i386.c (i3coff_object_p): Delete.
3283         (i386coff_vec): Replace reference to i3coff_object_p with a
3284         reference to coff_object_p.
3285
3286         * coff-mcore.c (pe_object_p): Delete.
3287
3288         * peicode.h (pe_bfd_object_p): New function: Detect the
3289         presence of a PE format COFF object file.  Also detect and
3290         warn about the presence of LINK6 format Image Library Format
3291         object files.
3292
3293 1999-12-16  Nick Clifton  <nickc@cygnus.com>
3294
3295         * coff-arm.c (NUM_ELEM): New macro.
3296         (NUM_RELOCS): New macro: The number of known ARM relocs.
3297         (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
3298         (coff_arm_rtype_to_howto):  Return NULL if the reloc type is out
3299         of range.
3300         (bfd_arm_process_before_allocation): Produce a warning message if
3301         an out of range symbol index is encountered.
3302
3303 1999-12-14  Nick Clifton  <nickc@cygnus.com>
3304
3305         * elflink.h (is_global_symbol_definition): New Function: Return
3306         true iff the symbol is being given a global definition in this
3307         bfd.
3308         (elf_link_is_defined_archive_symbol): Do not bother processing
3309         symbols for an archive element that has already been included
3310         in the link.
3311         Use is_global_symbol_definition().
3312
3313 1999-12-09  Andrew Cagney  <cagney@cygnus.com>
3314
3315         * config.bfd: Add support for sparc-*-netbsdelf* and
3316         sparc-*-netbsdaout*.
3317
3318 1999-12-13  Nick Clifton  <nickc@cygnus.com>
3319
3320         * elflink.h (elf_link_is_defined_archive_symbol): Check to see
3321         if the symbol is in the common section.
3322
3323 1999-12-10  Nick Clifton  <nickc@cygnus.com>
3324
3325         * elflink.h (elf_link_is_defined_archive_symbol): New
3326         function: Decide if a symbol, in an archive map is there
3327         because it is defined in the archive element, or because it is
3328         just another common declaration of it.
3329         (elf_link_add_archive_symbols): Use
3330         elf_link_is_defined_archive_symbol to decide if an archive
3331         element contain a reference to a common symbol should be
3332         linked in or not.
3333
3334 1999-12-10  Nick Clifton  <nickc@cygnus.com>
3335
3336         * elflink.h: Revert previous patch.
3337         * targets.c: Revert previous patch.
3338         * libbfd-in2.h: Revert previous patch.
3339         * libbfd.h: Revert previous patch.
3340         * elfxx-target.h: Revert previous patch.
3341         * archive.c: Revert previous patch.
3342         * aout-target.h: Revert previous patch.
3343         * aout-tic30.h: Revert previous patch.
3344         * bfd.c: Revert previous patch.
3345         * coff-alpha.c: Revert previous patch.
3346         * coff-rs6000.c: Revert previous patch.
3347         * elf64-mips.c: Revert previous patch.
3348         * ieee.c: Revert previous patch.
3349         * libecoff.h: Revert previous patch.
3350         * oasys.c: Revert previous patch.
3351         * som.c: Revert previous patch.
3352         * vms.c: Revert previous patch.
3353
3354 1999-12-09  Nick Clifton  <nickc@cygnus.com>
3355
3356         * elflink.h (elf_link_add_archive_symbols): Add an archive
3357         element even if contains a symbol which is currently only
3358         considered to be a common.
3359
3360         * targets.c (struct bfd_target): Add new field
3361         _bfd_allow_commons_in_armap.
3362         * bfd-in2.h:Regenerate.
3363
3364         * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
3365         Define.
3366          (_bfd_archive_bsd_allow_commons_in_armap): Define.
3367         * libbfd.h: Regenerate.
3368
3369         * elfxx-target.h: If using COFF archive map, override
3370         definition of allow_commons_in_armap and replace with
3371         bfd_false.
3372
3373         * archive.c (bfd_compute_and_write_armap): Do not place common
3374         symbols into the archive map unless _bfd_allow_commons_in_armap
3375         returns true.
3376
3377         * aout-target.h (MY_allow_commons_in_armap): Define.
3378         * aout-tic30.h (MY_allow_commons_in_armap): Define.
3379         * bfd.c (bfd_allow_commons_in_armap): Define.
3380         * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
3381         * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
3382         * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
3383         * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
3384         * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
3385         * oasys.c (oasys_allow_commons_in_armap): Define.
3386         * som.c (som_allow_commons_in_armap): Define.
3387         * vms.c (vms_allow_commons_in_armap): Define.
3388
3389 1999-12-07  Jim Blandy  <jimb@cygnus.com>
3390
3391         Add support for SSE registers in ELF core files.
3392         * elf.c (elfcore_make_note_pseudosection): New function.
3393         (elfcore_grok_prfpreg): Use it.
3394         (elfcore_grok_prxfpreg): New function.
3395         (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
3396
3397 1999-12-03  Ian Lance Taylor  <ian@zembu.com>
3398
3399         * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
3400         value by 4 before storing it back in the field.  From
3401         Koundinya. K <kk@ddeorg.soft.net>.
3402
3403 Tue Nov 30 22:41:14 1999  Jeffrey A Law  (law@cygnus.com)
3404
3405         * archures.c (bfd_mach_am33): Define.
3406         * bfd-in2.h: Rebuilt.
3407         * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
3408         * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
3409         (compute_function_info): Handle additional registers saved by
3410         movm on the am33.
3411         (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
3412         (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
3413
3414 1999-11-29  Jim Blandy  <jimb@cygnus.com>
3415
3416         * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3417         functions.
3418         * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3419         declarations.
3420
3421 1999-11-27  Michael Meissner  <meissner@cygnus.com>
3422
3423         * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
3424         internal use within gas for alpha explicit relocations.
3425         (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
3426         (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
3427         (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
3428         (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
3429         (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
3430         (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
3431
3432         * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
3433         BFD_RELOC_ALPHA_USER_*.
3434
3435         * bfd-in2.h: Regenerate.
3436         * libbfd.h: Regenerate.
3437
3438 1999-11-26  Fred Fish  <fnf@cygnus.com>
3439
3440         * elf.c (elfcore_read_notes): Add prototype for static function.
3441         (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
3442         (bfd_section_from_phdr): Replacement function that calls
3443         _bfd_elf_make_section_from_phdr for generic segment types and
3444         backend fucntion pointed to by elf_backend_section_from_phdr for
3445         backend specific segment types.
3446         (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
3447         now called by _bfd_elf_make_section_from_phdr.  Note that this func
3448         is now just a stub between the caller and bfd_section_from_phdr.
3449
3450         * elf-bfd.h (struct elf_backend_data): Add new function pointer
3451         elf_backend_section_from_phdr.
3452         (elf_backend_section_from_phdr): Add prototype.
3453
3454         * elfxx-target.h (elf_backend_section_from_phdr): Define default.
3455         (elfNN_bed): Add elf_backend_section_from_phdr.
3456
3457 1999-11-25  Nick Clifton  <nickc@cygnus.com>
3458
3459         * coff-arm.c (bfd_arm_get_bfd_for_interworking):  Add
3460         SEC_CODE and SEC_READONLY flags to glue sections.
3461
3462         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
3463         SEC_CODE and SEC_READONLY flags to glue sections.
3464
3465 1999-11-20  Nick Clifton  <nickc@cygnus.com>
3466
3467         * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
3468         delta.
3469
3470 1999-11-19  Catherine Moore  <clm@cygnus.com>
3471
3472         * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
3473         (elf_cpu32_plt_entry): Likewise.
3474
3475 1999-11-18  Nick Clifton  <nickc@cygnus.com>
3476
3477         * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
3478         for RVA relocs.
3479         (coff_mcore_relocate_section): Initialise addend to 0.
3480         Special case processing of RVA reloc.
3481
3482 1999-11-17  Richard Henderson  <rth@cygnus.com>
3483
3484         * elf-bfd.h (struct elf_backend_data): Reorder collect and
3485         type_change_ok; add sign_extend_vma.
3486         * elf32-mips.c (elf_backend_sign_extend_vma): Define.
3487         * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
3488         (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
3489         * elfxx-target.h (elf_backend_sign_extend_vma): Default.
3490         (elfNN_bed): Follow struture changes.
3491
3492 1999-11-09  Ian Lance Taylor  <ian@zembu.com>
3493
3494         * libbfd.c (bfd_read): Check result of read against desired result
3495         using !=, not <.
3496         (_bfd_generic_get_section_contents): Set bfd_error if the seek is
3497         invalid compared to the section size.
3498
3499         * ieee.c (ieee_slurp_debug): Get the length of the debug
3500         information right if there is no data part.
3501
3502 Tue Nov  2 01:44:41 1999  Jeffrey A Law  (law@cygnus.com)
3503
3504         * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
3505         R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
3506
3507 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
3508
3509         * elflink.h (elf_bfd_final_link): Make last_local signed.
3510
3511 1999-10-27  Ian Lance Taylor  <ian@zembu.com>
3512
3513         * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
3514         starts with a zero.
3515
3516 Sat Oct 23 17:36:12 1999  Andrew Cagney  <cagney@b1.cygnus.com>
3517
3518         * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
3519         bfd_mach_d10v_ts3.
3520         * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
3521         * bfd-in2.h: Regenerate.
3522
3523 1999-10-15  Andrew Haley  <aph@cygnus.com>
3524
3525         * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
3526
3527 Sun Oct 17 17:19:00 1999  Jeffrey A Law  (law@cygnus.com)
3528
3529         * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
3530
3531 1999-10-08  Ian Lance Taylor  <ian@zembu.com>
3532
3533         * elflink.h (elf_merge_symbol): When overriding a weak symbol with
3534         a defined symbol in a shared library, clear the DEF_DYNAMIC flag
3535         too.
3536
3537 Fri Oct  8 13:03:45 1999  Geoffrey Keating  <geoffk@cygnus.com>
3538
3539         * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
3540         relocs also need the GP value.
3541         (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
3542         properly.  Handle sign-extension for R_MIPS_64 correctly.  Correct
3543         the GP value for R_MIPS_LITERAL relocs too.  Handle
3544         R_MIPS_64 relocs properly on big-endian MIPS.
3545         (mips_elf_sign_extend): Behave properly with 'long long'.
3546         (mips_elf_highest): Correct typo.
3547
3548 Mon Oct  4 17:49:45 1999  Nick Clifton  <nickc@cygnus.com>
3549
3550         * cpu-m32r.c (arch_info_struct): New static global.
3551         (bfd_m32r_arch): Refer to it.
3552         * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
3553         (m32r_elf_print_private_bfd_data): Ditto.
3554         (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
3555         * archures.c (bfd_mach_m32rx): Define it.
3556         * bfd-in2.h: Rebuild.
3557
3558 1999-09-28  Fred Fish  <fnf@cygnus.com>
3559
3560         * targets.c (cisco_core_vec): Replaced with two new vecs ...
3561         (cisco_core_big_vec): Add new bigendian vec.
3562         (cisco_core_little_vec): Add new little endian vec.
3563
3564         * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
3565         (crash_info_locs): Add array of possible offsets.
3566         (MASK_ADDR): Mask to apply to crash info offset.
3567         (crashinfo_external): Add textbase, database, bssbase and
3568         turn into a typedef.
3569         (cisco_core_file_validate): Renamed from cisco_core_file_p.
3570         Many small changes to account for additional hardware versions.
3571         Pick a reasonable size for ".reg" section.  Add a ".crash"
3572         section to allow access to crashinfo_external struct.
3573         (cisco_core_file_p): New version of this function that
3574         iterates over crash_info_locs, calling cisco_core_file_validate.
3575         (cisco_core_vec): Old big endian only vec replaced with ...
3576         (cisco_core_big_vec): Add big endian version.
3577         (cisco_core_little_vec): Add little endian version.
3578
3579         * configure.in (cisco_core_vec): Split to two new vectors ...
3580         (cisco_core_big_vec): New target vector.
3581         (cisco_core_little_vec): New target vector.
3582         * configure: Regenerate.
3583         * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
3584         to cisco_core_big_vec in targ_selvecs.
3585
3586 1999-09-28  Geoffrey Keating  <geoffk@cygnus.com>
3587
3588         * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
3589         (mips_elf_relocate_got_local): Unused, delete.
3590         (mips_elf_relocate_global_got): Unused, delete.
3591
3592 1999-09-24  Fred Fish  <fnf@cygnus.com>
3593
3594         * elf.c (bfd_section_from_phdr): Add typename variable.  Use p_type
3595         to initialize it to something meaningful.  Then use it to generate
3596         more useful segment names.
3597
3598 Sun Sep 19 12:16:47 1999  Jeffrey A Law  (law@cygnus.com)
3599
3600         * som.c (NO_PCREL_MODES): Define if the system does not define
3601         R_SHORT_PCREL_MODE.
3602         (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
3603         (som_write_fixups): Eliminate redundant pcrel mode relocs.  Handle
3604         R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
3605         * libhppa.h (dis_assemble_22): New function.
3606         (bfd_hppa_insn2fmt): Handle long branch.
3607
3608         * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
3609         in PA2.0.
3610
3611 1999-09-17  Alan Modra  <alan@spri.levels.unisa.edu.au>
3612
3613         * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
3614         BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
3615         (reloc_howto_type howto_table): Tidy comments and whitespace.
3616
3617 1999-09-17  Nick Clifton  <nickc@cygnus.com>
3618
3619         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
3620         previous delta.  Set sec->gc_mark instead.
3621
3622 Thu Sep 16 11:21:13 1999  Catherine Moore  <clm@cygnus.com>
3623
3624         * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
3625         (elf_cpu32_plt_entry): Likewise.
3626
3627 Thu Sep 16 10:48:17 1999  Jeffrey A Law  (law@cygnus.com)
3628
3629         * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
3630
3631         * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
3632         symbol table, then just compute a suitable value (but do not
3633         create a __gp symbol).
3634
3635         * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
3636         symbols when building shared libraries.
3637         (elf_hppa_final_link_relocate): Correct handling of PCREL
3638         relocations against undefined symbols.
3639
3640 1999-09-16  Nick Clifton  <nickc@cygnus.com>
3641
3642         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
3643         interworking sections as linker created so that they will not
3644         be removed by garbage collection.
3645
3646 Wed Sep 15 02:31:57 1999  Jeffrey A Law  (law@cygnus.com)
3647
3648         * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
3649         (elf_hppa_final_link_relocate): Consistently create an absolute
3650         address, then subtract out the value of __gp.
3651
3652 1999-09-14  Michael Meissner  <meissner@cygnus.com>
3653
3654         * configure.in (Canonicalization of target names): Remove adding
3655         ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
3656         generates $ac_config_sub with a ${CONFIG_SHELL} already.
3657         * configure: Regenerate.
3658
3659 1999-09-14  Nick Clifton  <nickc@cygnus.com>
3660
3661         * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
3662         Mitsubishi).
3663
3664 Mon Sep 13 20:01:47 1999  Jeffrey A Law  (law@cygnus.com)
3665
3666         * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
3667         (elf_hppa_final_link): Initialize text_segment_base and
3668         data_segment_base.
3669         (elf_hppa_final_link_relocate): Handle SEGREL relocations.
3670
3671         * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
3672         (elf_hppa_final_link_relocate): Likewise.
3673         (elf_hppa_relocate_insn): Likewise.
3674         (elf_hppa_relocate_section): Initialize HOWTO.
3675
3676 1999-09-13  Donn Terry  <donn@interix.com>
3677
3678         * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
3679         handling to support both GNU and MS objects.
3680
3681         * coffcode.h (coff_write_object_contents): Don't check reloc_count
3682         when determining whether to set F_RELFLG.
3683
3684 1999-09-13  Philip Blundell  <pb@nexus.co.uk>
3685
3686         * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
3687         PC24 relocs if the target is an undefined weak symbol.
3688         (arm_add_to_rel): Fix compiler warning.
3689         (elf32_arm_plt0_entry): Correct comments.
3690
3691 1999-09-13  Alan Modra  <alan@spri.levels.unisa.edu.au>
3692
3693         * elfcode.h (write_relocs): Check for the_bfd NULL when handling
3694         an absolute symbol in REL relocs.
3695
3696 Sun Sep 12 23:47:58 1999  Jeffrey A Law  (law@cygnus.com)
3697
3698         * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
3699         Stub SEGREL32.  Return an error for any relocation not handled.
3700
3701 1999-09-12  Ian Lance Taylor  <ian@zembu.com>
3702
3703         * cofflink.c (coff_link_add_symbols): Look for special MSVC string
3704         constant symbols, and avoid multiple definition errors on them.
3705
3706 1999-09-12  Donn Terry  <donn@interix.com>
3707
3708         * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
3709         significant bit is set.
3710
3711 1999-09-11  Ian Lance Taylor  <ian@zembu.com>
3712
3713         * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3714
3715         * elfcode.h (write_relocs): Handle an absolute symbol in REL
3716         relocs as we do for RELA relocs.
3717
3718 1999-09-11  Donn Terry  <donn@interix.com>
3719
3720         * libpei.h (_bfd_pei_final_link_postscript): Declare.
3721         (coff_final_link_postscript): Define.
3722         * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
3723         directory entries here.
3724         (_bfd_pei_final_link_postscript): New function.
3725
3726         * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
3727         section flags based on the section name.
3728
3729         * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
3730         get the overflow of the s_nlnno field from the s_nreloc field.
3731         * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
3732         the s_nlnno overflow of the .text section into the s_nreloc
3733         field.
3734
3735         * peigen.c (add_data_entry): Declare.
3736         (pei_swap_aouthdr_out): Get image size right.  Set linker version
3737         more intuitively.
3738         (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
3739         (pe_print_idata): Code cleanup, print more info, get rid of (now)
3740         extraneous ImageBase.
3741         (pe_print_edata): Likewise.
3742         (pe_print_pdata): Likewise.  Print exception entries.
3743         (pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
3744         (tbl): Make const, add "UNKNOWN".
3745         (_bfd_pe_print_private_bfd_data_common): Print timestamp.
3746         (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
3747         section data directory.
3748         (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
3749
3750         * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
3751         * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
3752         * peicode.h (coff_get_symbol_info): Define.
3753
3754         * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
3755         -DSTRICT_PE_FORMAT.
3756         * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
3757         than __INTERIX.
3758         (coff_classify_symbol): Re-revert 1999-08-08 patch if
3759         STRICT_PE_FORMAT.
3760
3761         * libpei.h: New file, broken out of peicode.h.
3762         * peigen.c: New file, broken out of peicode.h.
3763         * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
3764         * configure.in: Add peigen.lo to list of files required for each
3765         PE target.
3766         * Makefile.am: Rebuild dependencies.
3767         (BFD32_BACKENDS): Add peigen.lo.
3768         (BFD32_BACKENDS_CFILES): Add peigen.c.
3769         (SOURCE_HFILES): Add libpei.h.
3770         * configure, Makefile.in: Rebuild.
3771
3772         * peicode.h (coff_swap_scnhdr_in): Don't check for a special
3773         section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
3774         instead.  Don't clear the s_paddr field for an uninitialized data
3775         section.
3776
3777         * coffcode.h (coff_mkobject_hook): Set timestamp field in
3778         coff_data_type to f_timdat.
3779         * peicode.h (pe_mkobject_hook): Likewise.
3780
3781         * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
3782         number if COFF_IMAGE_WITH_PE.
3783
3784         * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
3785         to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
3786         (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
3787         there is no SEC_DEBUGGING section.
3788         * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
3789         IMAGE_FILE_DEBUG_STRIPPED.
3790
3791         * pe-i386.c (COFF_LONG_FILENAMES): Define.
3792         (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3793         * pei-i386.c (COFF_LONG_FILENAMES): Define.
3794         (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3795
3796         * coffswap.h (IMAGE_BASE): Don't define.
3797         * pei-arm.c (IMAGE_BASE): Don't define.
3798         * pei-i386.c (IMAGE_BASE): Don't define.
3799         * pei-mcore.c (IMAGE_BASE): Don't define.
3800         * pei-ppc.c (IMAGE_BASE): Don't define.
3801
3802         * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
3803         symbol, switch on the class when determining whether to modify the
3804         value.  For PE, don't modify the value of a C_FCN symbol not named
3805         .bf.
3806
3807         * libbfd-in.h (_bfd_abort): Declare.
3808         (abort): Define.
3809         * bfd.c (_bfd_abort): New function.
3810         * libbfd.h: Rebuild.
3811
3812         * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
3813         special handling.
3814
3815         * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
3816         don't write out the associated line numbers.
3817
3818         * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
3819         aux entries.
3820
3821         * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
3822         changes when the base type is unknown.
3823
3824         * coffgen.c (coff_print_symbol): Fix printing of aux record for
3825         function symbols.
3826
3827         * syms.c (BSF_DEBUGGING_RELOC): Define.
3828         * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
3829         for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
3830         symbols named .bf.
3831         * coffgen.c (fixup_symbol_value): Relocate a symbol which has
3832         BSF_DEBUGGING_RELOC set.
3833         * bfd-in2.h: Rebuild.
3834
3835 1999-09-10  Ian Lance Taylor  <ian@zembu.com>
3836
3837         * ecoff.c (bfd_debug_section): Update initialization for new
3838         comdat_info field.
3839         (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
3840         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
3841
3842 1999-09-10  H.J. Lu  <hjl@gnu.org>
3843
3844         * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
3845         _bfd_filnmlen field.
3846         * coff-mips.c (mips_ecoff_backend_data): Likewise.
3847
3848 Fri Sep 10 00:35:14 1999  Jeffrey A Law  (law@cygnus.com)
3849
3850         * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
3851         for FPTR relocs involving local symbols.
3852
3853         * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
3854         value for the stub address in a call through a stub.
3855         Install the value for a local symbol directly into the DLT
3856         instead of generating a reloc.  Correctly handle FPTR64 relocs.
3857
3858         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
3859         (elf_hppa_remark_useless_dynamic_symbols): Similarly.
3860         (elf_hppa_final_link): Call them.
3861
3862 1999-09-10  Ian Lance Taylor  <ian@zembu.com>
3863
3864         * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
3865         (elf_adjust_dynamic_symbol): ...from here.
3866
3867 Wed Sep  8 17:56:11 1999  Jeffrey A Law  (law@cygnus.com)
3868
3869         * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
3870         relocation, remove them.  SECREL64->LTOFF16WF.
3871         (elf_hppa_final_link_relocate): Handle LTOFF* relocations.  Handle
3872         DIR* relocations.
3873         (elf_hppa_relocate_insn): Similarly.
3874
3875         * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
3876         (elf_hppa_relocate_insn): Similarly.
3877
3878         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
3879         GPREL* relocations.
3880         (elf_hppa_relocate_insn): Similarly.
3881
3882         * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
3883         Handle LTOFF_TP* relocs.
3884         (elf_hppa_relocate_insn): Similarly.
3885
3886         * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
3887         Consistently deal with addends.  Handle DLTIND14F and DLTREL14F.
3888         (elf_hppa_relocate_insn): Handle PCREL* relocs.
3889
3890         * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
3891         DIR32, DIR64 and FPTR64 relocations.
3892         (elf_hppa_relocate_insn): Similarly.
3893
3894         * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
3895         address of the .PARISC.global section.
3896         (elf_hppa_relocate_section): Lookup and pass the PA64 hash
3897         table entry elf_hppa_final_link_relocate.  Do not give a warning
3898         for a reloc against an external symbol if it has a PA64 hash
3899         table entry.
3900         (elf_hppa_final_link_relocate): Significantly rework.  Handle
3901         DLTIND relocations.  Compute the final value of the relocation
3902         before passing the value of elf_hppa_relocate_insn.
3903         (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
3904         relocation support.  Handle DLTIND relocation requests just like
3905         DLTREL relocation requests.  Simplify branch handling.
3906
3907 1999-09-08  Ulrich Drepper  <drepper@cygnus.com>
3908
3909         * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
3910         non-allocated section as done in i386 version.
3911         (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
3912         statement since this is no know relocation.
3913
3914 Tue Sep  7 17:25:12 1999  Jeffrey A Law  (law@cygnus.com)
3915
3916         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
3917         relocs.
3918         (elf_hppa_relocate_insn): Similarly.
3919
3920         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
3921         DLTREL14WD relocs.
3922         (elf_hppa_relocate_insn): Similarly.
3923
3924         * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
3925         DLTREL21L relocs.  Pass the output bfd to elf_hppa_relocate_insn.
3926         Pass the relocate type rather than the insn format to
3927         elf_hppa_relocate_insn.
3928         (elf_hppa_relocate_insn): Make switch dependent on relocation type
3929         rather than the opcode.  Handle DLTREL21L and DLTREL14R relocs.
3930
3931 1999-09-07  Ian Lance Taylor  <ian@zembu.com>
3932
3933         * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
3934         (bfd_coff_filnmlen): Define.
3935         (bfd_coff_std_swap_table): Initialize new field.
3936         * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
3937         than FILNMLEN.
3938         (coff_write_symbols): Likewise.
3939         (coff_get_normalized_symtab): Likewise.
3940         * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
3941         * libcoff.h: Rebuild.
3942
3943 1999-09-06  Donn Terry  <donn@interix.com>
3944
3945         * coffcode.h (sort_by_secaddr): New static function if
3946         COFF_IMAGE_WITH_PE.
3947         (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
3948         sections by VMA when assigning target_index values.  Always set
3949         virt_size.
3950
3951         * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
3952         * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
3953         pe_flags field.
3954         * libcoff.h: Rebuild.
3955
3956         * coffcode.h (coff_set_custom_section_alignment): Add const to
3957         declaration to match definition.
3958         (coff_write_object_contents): Don't set F_AR32W(R)? if
3959         COFF_WITH_PE.
3960
3961         * coff-i386.c (in_reloc_p): Add declaration.
3962         (i386coff_vec): Simplify initialization of
3963         application_section_flags.
3964
3965         * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
3966         version.  Move COFF_WITH_PE specific code to new version.
3967         (stype_to_sec_flags): Likewise.  Add section parameter.
3968         * coffgen.c (make_a_section_from_file): Set target_index before
3969         calling styp_to_sec_flags.  Pass section to styp_to_sec_flags.
3970         * libcoff.h: Rebuild.
3971
3972         * syms.c (stt): Add some PE/PEI section names.
3973         (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
3974         symbol.
3975         (bfd_symbol_info): Check for 'w'.
3976
3977         * section.c (struct bfd_comdat_info): Define.
3978         (asection): Add comdat field.
3979         (STD_SECTION): Initialize comdat field.
3980         (bfd_make_section_anyway): Likewise.
3981         * bfd-in2.h: Rebuild.
3982
3983 1999-09-06  Andreas Schwab  <schwab@suse.de>
3984
3985         * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
3986         to version symbols.
3987
3988 1999-09-06  Nick Clifton  <nickc@cygnus.com>
3989
3990         * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
3991         bfd_realloc instead of calloc and realloc.
3992
3993 1999-09-04  Steve Chamberlain  <sac@pobox.com>
3994
3995         * cpu-pj.c: New file.
3996         * elf32-pj.c: New file.
3997         * config.bfd (pj*): New cpu.
3998         (pj-*-*, pjl-*-*): New targets.
3999         * configure.in (bfd_elf32_pj_vec): New target vector.
4000         (bfd_elf32_pjl_vec): New target vector.
4001         * archures.c (bfd_arch_pj): Define.
4002         * elf.c (prep_headers): Handle bfd_arch_pj.
4003         * reloc.c: Define BFD_RELOC_PJ_* relocations.
4004         * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
4005         to target vector list.
4006         * Makefile.am: Rebuild dependencies.
4007         (ALL_MACHINES): Add cpu-pj.lo.
4008         (ALL_MACHINES_CFILES): Add cpu-pj.c.
4009         (BFD32_BACKENDS): Add elf32-pj.lo.
4010         (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
4011         * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
4012
4013 1999-09-04  Ian Lance Taylor  <ian@zembu.com>
4014
4015         * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
4016         * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
4017         and NON_GOT_REF from weak defined symbol to real symbol.
4018         * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
4019         (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
4020         create a COPY reloc.
4021         * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
4022         (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
4023         don't create a COPY reloc.
4024
4025 1999-09-03  Ian Lance Taylor  <ian@zembu.com>
4026
4027         * elflink.h (elf_bfd_final_link): When counting relocations, don't
4028         count those in sections we are not including in the link.
4029
4030 Thu Sep  2 17:41:20 1999  Jeffrey A Law  (law@cygnus.com)
4031
4032         * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
4033         field in hpux11 shared libraries.
4034
4035 1999-09-02  Nick Clifton  <nickc@cygnus.com>
4036
4037         * elflink.h (elf_gc_record_vtentry): Fix memory leak.
4038
4039 Wed Sep  1 13:34:29 1999  Jeffrey A Law  (law@cygnus.com)
4040
4041         * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
4042         (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
4043         (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
4044
4045 1999-08-31  Alexandre Petit-Bianco  <apbianco@cygnus.com>
4046
4047         * elflink.h (record_link_assignment): When possible, keep the
4048         original type of the symbol.
4049
4050 Mon Aug 30 15:26:48 1999  Jeffrey A Law  (law@cygnus.com)
4051
4052         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
4053         R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
4054         tools were configured.
4055         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
4056
4057 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
4058
4059         * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
4060         GOT entries for GOT16 relocations; they're not required.
4061
4062 1999-08-24  Nick Clifton  <nickc@cygnus.com>
4063
4064         From a patch submitted by Roland McGrath  <roland@baalperazim.frob.com>
4065
4066         * config.bfd (arm-*-netbsd*): New target.
4067         * configure.in (armnetbsd_vec): New target vector.
4068         * configure: Regenerate
4069         * targets.c (bfd_target_vector): Add &armnetbsd_vec.
4070
4071         * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
4072         (ALL_MACHINES_CFILES): Add armnetbsd.c.
4073         (armnetbsd.lo): New rule with deps.
4074         * Makefile.in: Regenerate.
4075
4076         * armnetbsd.c: New file:  Definitions specific to arm-netbsd
4077         target.
4078
4079 Tue Aug 24 00:25:58 1999  Jeffrey A Law  (law@cygnus.com)
4080
4081         * som.c (som_slurp_symbol_table): Fix typo in comment.
4082
4083 Fri Aug 20 17:01:23 1999  Jeffrey A Law  (law@cygnus.com)
4084
4085         * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
4086         here instead of using elf_section_data...
4087
4088 1999-08-19  Nick Clifton  <nickc@cygnus.com>
4089
4090         * coff-mcore.c (mcore_emit_base_file_entry): New function:  Emit
4091         relocations into the base file.
4092         (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
4093         we are building a base file.
4094
4095 1999-08-19  Nick Clifton  <nickc@cygnus.com>
4096
4097         * elf32-arm.h (arm_add_to_rel): New function.  Add a value to
4098         a REL style reloc.
4099         (elf32_arm_relocate_section): Use arm_add_to_rel to increment
4100         REL relocs when performing a partial relocation.
4101
4102 1999-08-18  Donn Terry  <donn@interix.com>
4103
4104         * cofflink.c: Move definitions of N_TMASK, et. al., out of
4105         _bfd_coff_link_input_bfd into top level.
4106
4107         * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
4108         (RTYPE2HOWTO): Return NULL if reloc type is out of range.
4109         (coff_i386_rtype_to_howto): Likewise.
4110         * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
4111         Completely ignore symbols which are all zero.
4112         (dummy_reloc16_estimate): Add return 0.
4113         * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
4114         variable copy to name_copy to avoid shadowing outer scope
4115         variable.
4116         * libcoff-in.h (coff_data_type): Change raw_syment_count field
4117         from unsigned int to unsigned long.  Add timestamp field.
4118         * libcoff.h: Rebuild.
4119
4120 1999-08-17  H.J. Lu  <hjl@gnu.org>
4121
4122         * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
4123         macro definition.
4124
4125 1999-08-17  Ian Lance Taylor  <ian@zembu.com>
4126
4127         * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
4128         for special section symbols.
4129         * elflink.h (elf_merge_symbol): If we have no old BFD, check
4130         BSF_DYNAMIC on the section symbol to see whether the old BFD is
4131         dynamic.
4132
4133 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
4134
4135         * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
4136         coincidence of variable names between old and new code.
4137
4138 1999-08-12  Nick Clifton  <nickc@cygnus.com>
4139
4140         * elf32-arm.h (elf32_arm_to_thumb_stub):  Make 'offset' parameter
4141         into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
4142         (elf32_thumb_to_arm_stub):  Make 'offset' parameter into a bfd_vma
4143         and 'addend' parameter a 'bfd_signed_vma'.
4144         (elf32_arm_final_link_relocate): Do not involve stubs in
4145         R_ARM_THM_PC22 relocs relative to section symbols, they are long
4146         jumps, not function calls.
4147
4148 1999-08-11  Robin Farine <advanc@dial.eunet.ch>
4149
4150         * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
4151         in R_ARM_PC24 relocs.
4152
4153 Tue Aug 10 12:48:09 1999  Jeffrey A Law  (law@cygnus.com)
4154
4155         * elf-hppa.h (elf_hppa_fake_sections): New function.
4156         * elf32-hppa.c (elf_backend_fake_sections): Define.
4157
4158         * elf-hppa.h (elf_hppa_final_write_processing): Update for
4159         recent changes to the arch_info structure.
4160
4161         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
4162         R_HPPA_SEGBASE and R_HPPA_SEGREL32.
4163         * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
4164         list.
4165
4166 Tue Aug 10 00:34:29 1999  Mark P. Mitchell  <mark@codesourcery.com>
4167                           Ralf Baechle <ralf@uni-koblenz.de>
4168
4169         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
4170         output DT_MIPS_GOTSYM.
4171         (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
4172         DT_MIPS_SYMTABNO if there are no global GOT symbols.
4173
4174 Tue Aug 10 00:21:08 1999  Mark P. Mitchell  <mark@codesourcery.com>
4175
4176         * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
4177         prototype.  Handle local symbols.  Add commentary.
4178         (mips_elf_calculate_relocation): Adjust accordingly.
4179         (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
4180         relocations.
4181
4182         * elflink.h (elf_bfd_final_link): Tweak last change.
4183
4184 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4185
4186         * elflink.h (elf_link_size_reloc_section): Use the counts in the
4187         elf-section data to allocate just the right amount of relocation
4188         space.  Don't allocate the hash space twice.
4189         (elf_bfd_final_link): Calculate the amount of space to allocate in
4190         each relocation section.
4191
4192 Mon Aug  9 17:37:30 1999  Jeffrey A Law  (law@cygnus.com)
4193
4194         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
4195         64bit mode, generate a section relative relocation for a 32bit
4196         wide relocation.
4197         (elf_hppa_is_local_label_name): New function.
4198         * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted.  To be
4199         shared between 32bit and 64bit port.
4200
4201 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
4202
4203         * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
4204         R_MIPS_GOT16 and R_MIPS_CALL16.
4205         (mips_elf_got16_entry): Use mips_elf_high to calculate the value
4206         to use when looking for a preexisting GOT entry.
4207
4208 1999-08-09  Jakub Jelinek  <jj@ultra.linux.cz>
4209
4210         * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
4211         the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
4212         not binutils.
4213         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4214
4215 1999-08-09  Geoff Keating  <geoffk@cygnus.com>
4216
4217         * elflink.h (elf_link_output_extsym): Don't output a weak
4218         reference to an undefined symbol just because it was defined weak
4219         in a shared object.
4220
4221 1999-08-09  Eli Zaretskii  <eliz@is.elta.co.il>
4222
4223         * coffgen.c (coff_find_nearest_line): When looking for file, use
4224         last best match rather than first.  If address is beyond last line
4225         number record, don't return the last line as the correct value.
4226
4227 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4228
4229         * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
4230         * bfd-in2.h: Rebuild.
4231
4232 1999-08-08  Mark Elbrecht  <snowball3@bigfoot.com>
4233
4234         * libcoff-in.h (struct coff_section_alignment_entry): Define.
4235         * coffcode.h (coff_set_custom_section_alignment): New static
4236         function.
4237         (coff_section_alignment_table): New static array.
4238         (coff_new_section_hook): Use coff_set_customer_section_alignment.
4239         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4240         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4241         * libcoff.h: Rebuild.
4242
4243 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4244
4245         * Makefile.am: Rename .dep* files to DEP*.  Change DEP variable to
4246         MKDEP.
4247         * Makefile.in: Rebuild.
4248
4249 1999-08-08  Mumit Khan  <khan@xraylith.wisc.edu>
4250
4251         * section.c (SEC_SHARED): Define.
4252         * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
4253         (styp_to_sec_flags): Likewise.
4254         * peicode.h (coff_swap_scnhdr_out): Likewise.
4255         * bfd-in2.h: Rebuild.
4256
4257 1999-08-08  Ian Lance Taylor  <ian@zembu.com>
4258
4259         * coffcode.h (coff_classify_symbol): Comment out part of
4260         1999-08-05 change which breaks cygwin DLLs.
4261
4262         * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
4263         * aclocal.m4, configure: Rebuild.
4264
4265 1999-08-06  Ian Lance Taylor  <ian@zembu.com>
4266
4267         * section.c (global_syms): Only initialize union field if
4268         __STDC__.
4269
4270 1999-08-04  Mark Mitchell  <mark@codesourcery.com>
4271
4272         * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
4273         the size of a GOT entry here.
4274         (mips_elf_calculate_relocation): Don't create a local GOT entry
4275         for the symbol in a GOT16 relocation; just for it's high-order bit
4276         (_bfd_mips_elf_relocate_section): Fix thinko.
4277
4278 1999-08-05  Ian Lance Taylor  <ian@zembu.com>
4279
4280         Based on patches from Donn Terry <donn@interix.com>:
4281         * coffcode.h (enum coff_symbol_classification): Define.
4282         (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
4283         _bfd_coff_classify_symbol.  Change return type.
4284         (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
4285         (coff_slurp_symbol_table): Use coff_classify_symbol.
4286         (coff_classify_symbol): New static function.
4287         (coff_sym_is_global): Never define.
4288         (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
4289         * cofflink.c (coff_link_check_ar_symbols): Use
4290         bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
4291         (coff_link_add_symbols): Likewise.
4292         (_bfd_coff_link_input_bfd): Likewise.
4293         * coff-sh.c (bfd_coff_small_swap_table): Initialize with
4294         coff_classify_symbol.
4295         * libcoff.h: Rebuild.
4296
4297 Wed Aug  4 18:08:07 1999  Jeffrey A Law  (law@cygnus.com)
4298
4299         * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
4300         (e_ltpsel, e_rtpsel): Similarly.
4301
4302         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
4303         and 14bit ertpsel.  Handle 64bit psel.
4304
4305 1999-08-04  Mark Mitchell  <mark@codesourcery.com>
4306
4307         * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
4308         handling for REL relocations.  And only left-shift R_MIPS26
4309         relocation addends where necessary.
4310
4311 1999-08-03  Mark Mitchell  <mark@codesourcery.com>
4312
4313         * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
4314         (mips_elf_next_lo16_relocation): Don't compute the addend here.
4315         Just return the relocation found.
4316         (mips_elf_relocate_section): Pull the LO16 addend out of the
4317         section itself when using REL relocations.
4318
4319         * elf32-mips.c (mips_elf_calculate_relocation): Restore
4320         _DYNAMIC_LINK handling and handling of undefined symbols in shared
4321         libraries.
4322
4323 1999-08-03  Ian Lance Taylor  <ian@zembu.com>
4324
4325         * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
4326         value of a symbol in a SEC_DEBUGGING section.  Warn when doing a
4327         relocation against a symbol in an input section with no output
4328         section.  From Daniel Jacobowitz <drow@false.org>.
4329
4330         * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
4331
4332         * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
4333         look for generated file correctly.
4334         * aclocal.m4, configure: Rebuild.
4335
4336 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4337
4338         * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
4339         and R_MIPS16_26 relocations correctly when relocating.
4340         (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
4341         and R_MIPS_CALL_LO16 are for global symbols.
4342
4343 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
4344
4345         * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
4346         some fields.
4347         * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
4348         variables and initialize them.
4349
4350 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
4351
4352         * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
4353         there are no global symbols requiring GOT entries.
4354         (_bfd_mips_elf_size_dynamic_sections): Likewise.
4355         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4356         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4357
4358         * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
4359         symbols are considered to have the value zero.
4360         (_bfd_mips_elf_relocate_section): Don't try to perform a
4361         relocation for an undefined symbol.
4362         (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
4363         GOT16 relocations.
4364
4365 1999-07-30  Jakub Jelinek  <jj@ultra.linux.cz>
4366
4367         * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
4368         wants ba,a,pt %xcc instead of %icc.
4369         Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
4370         of large PLT entries.
4371         (sparc64_elf_plt_ptr_offset): Fix calculation.
4372         (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
4373         addend should be relative to load address, not .plt section start.
4374         (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
4375
4376 1999-07-30  Jakub Jelinek  <jj@ultra.linux.cz>
4377
4378         * elf-bfd.h (struct elf_backend_data): Add
4379         print_symbol_all and output_arch_syms backend methods.
4380         * elfxx-target.h: Likewise.
4381         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
4382         sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
4383         sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
4384         functions.
4385         (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
4386         symbols in .dynsym, add their names into .dynstr. Put those symbols
4387         into dynlocal.
4388         (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
4389         pointers to STT_REGISTER symbols in dynsym section.
4390         (sparc64_elf_print_symbol_all): New function.
4391         * elf.c (bfd_elf_print_symbol): Allow special backend symbol
4392         printing using the print_symbol_all hook.
4393
4394 1999-07-30  Catherine Moore  <clm@cygnus.com>
4395
4396         * elf32-arm.h (elf32_arm_check_relocs):  Use r_offset for
4397         R_ARM_GNU_VTENTRY.
4398
4399 1999-07-29  Richard Henderson  <rth@cygnus.com>
4400
4401         * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
4402         dynamic_sections_created.
4403
4404 1999-07-29  Richard Henderson  <rth@cygnus.com>
4405
4406         * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
4407         (mips_rtype_to_howto): ... new function.
4408         (_bfd_mips_elf_relocate_section): Use it.
4409
4410 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
4411
4412         * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
4413
4414 1999-07-27  Nick Clifton  <nickc@cygnus.com>
4415
4416         Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
4417
4418         * coff-arm.c (coff_arm_is_local_label_name): Change to strip
4419         out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
4420
4421 1999-07-23  Donn Terry  <donn@interix.com>
4422
4423         * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
4424         field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
4425         * cofflink.c (coff_link_add_symbols): If PE, handle section
4426         symbols specially.
4427         * libcoff.h: Rebuild.
4428
4429         * config.bfd (i[3456]86-*-interix*): New target.
4430
4431 1999-07-21  Mark Elbrecht  <snowball3@bigfoot.com>
4432
4433         * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
4434         COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
4435         .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
4436         * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
4437         (COFF_SUPPORT_GNU_LINKONCE): Define.
4438         * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
4439         (COFF_SUPPORT_GNU_LINKONCE): Define.
4440
4441 1999-07-21  Ian Lance Taylor  <ian@zembu.com>
4442
4443         From Mark Elbrecht:
4444         * makefile.dos: Remove; obsolete.
4445         * configure.bat: Remove; obsolete.
4446
4447 1999-07-21  H.J. Lu  <hjl@gnu.org>
4448
4449         * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
4450
4451 1999-07-21  Philippe De Muyter  <phdm@macqel.be>
4452
4453         * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
4454         message and fail if a symbol index is out of range.
4455
4456 1999-07-21  Ian Lance Taylor  <ian@zembu.com>
4457
4458         * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
4459         when looking at a R_MIPS_GOT16 relocation.
4460
4461 1999-07-20  Nick Clifton  <nickc@cygnus.com>
4462
4463         * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4464
4465 Mon Jul 19 14:03:44 1999  Mark P. Mitchell  <mark@codesourcery.com>
4466
4467         * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
4468         removed in previous change.
4469         (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
4470         in relocateable output.
4471
4472 1999-07-19  Ian Lance Taylor  <ian@zembu.com>
4473
4474         * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
4475         structure.
4476
4477         * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
4478         if they appear to be specially created by the linker.
4479
4480 1999-07-19  Nick Clifton  <nickc@cygnus.com>
4481
4482         * targets.c (alternative_target): New field in bfd_target
4483         structure.
4484         (bfd_search_for_target): New function:  Find a target that
4485         satisifies a search function.
4486         * bfd-in2.h: Regenerate.
4487
4488         * elfxx-target.h: Initialise the alternative_target field of
4489         the bfd_target structures to point to the other target (if
4490         defined).
4491         * nlm-target.h: Initialise the alternative_target field of
4492         the bfd_target structures to point to the other target (if
4493         defined).
4494
4495         * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
4496         (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
4497
4498         * aix386-core.c: Initialise new field of bfd_target structure.
4499         * aout-adobe.c: Initialise new field of bfd_target structure.
4500         * aout-arm.c: Initialise new field of bfd_target structure.
4501         * aout-target.h: Initialise new field of bfd_target structure.
4502         * aout-tic30.c: Initialise new field of bfd_target structure.
4503         * binary.c: Initialise new field of bfd_target structure.
4504         * bout.c: Initialise new field of bfd_target structure.
4505         * cisco-core.c: Initialise new field of bfd_target structure.
4506         * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4507         * coff-alpha.c: Initialise new field of bfd_target structure.
4508         * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
4509         * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4510         * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
4511         * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
4512         * coff-i386.c: Initialise new field of bfd_target structure.
4513         * coff-i860.c: Initialise new field of bfd_target structure.
4514         * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4515         * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4516         * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4517         * coff-mips.c: Initialise new field of bfd_target structure.
4518         * coff-ppc.c: Initialise new field of bfd_target structure.
4519         * coff-rs6000.c: Initialise new field of bfd_target structure.
4520         * coff-sh.c:  Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4521         * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
4522         * coff-tic30.c: Initialise new field of bfd_target structure.
4523         * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4524         * coff-w65.c:   Use CREATE_LITTLE_COFF_TARGET_VEC.
4525         * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4526         * coff-z8k.c:   Use CREATE_BIG_COFF_TARGET_VEC.
4527         * hppabsd-core.c: Initialise new field of bfd_target structure.
4528         * hpux-core.c: Initialise new field of bfd_target structure.
4529         * i386msdos.c: Initialise new field of bfd_target structure.
4530         * i386os9k.c: Initialise new field of bfd_target structure.
4531         * ieee.c: Initialise new field of bfd_target structure.
4532         * ihex.c: Initialise new field of bfd_target structure.
4533         * irix-core.c: Initialise new field of bfd_target structure.
4534         * mipsbsd.c: Initialise new field of bfd_target structure.
4535         * netbsd-core.c: Initialise new field of bfd_target structure.
4536         * oasys.c: Initialise new field of bfd_target structure.
4537         * osf-core.c: Initialise new field of bfd_target structure.
4538         * ppcboot.c: Initialise new field of bfd_target structure.
4539         * ptrace-core.c: Initialise new field of bfd_target structure.
4540         * sco5-core.c: Initialise new field of bfd_target structure.
4541         * som.c: Initialise new field of bfd_target structure.
4542         * srec.c: Initialise new field of bfd_target structure.
4543         * tekhex.c: Initialise new field of bfd_target structure.
4544         * trad-core.c: Initialise new field of bfd_target structure.
4545         * versados.c: Initialise new field of bfd_target structure.
4546         * vms.c: Initialise new field of bfd_target structure.
4547
4548 1999-07-19  Andreas Schwab  <schwab@suse.de>
4549
4550         * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
4551         and rel_hdr.
4552
4553 Sat Jul 17 02:28:28 1999  Mark P. Mitchell  <mark@codesourcery.com>
4554
4555         * elflink.h (elf_link_adjust_relocs): New function.
4556         (elf_bfd_final_link): Use it.
4557         (elf_link_input_bfd): Deal with the fact that there can be
4558         two relocation sections for a single section.
4559         (elf_reloc_link_order): Likewise.
4560
4561         * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
4562         a relocateable object.
4563         (_bfd_mips_elf_relocate_section): Handle relocateable links.
4564
4565 1999-07-16  Jakub Jelinek  <jj@ultra.linux.cz>
4566
4567         * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
4568         (sparc64_elf_get_reloc_upper_bound,
4569         sparc64_elf_get_dynamic_reloc_upper_bound,
4570         sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
4571         sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
4572         New functions.
4573         (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
4574         ELF64_R_TYPE_ID/DATA where appropriate.
4575
4576 1999-07-16  Jakub Jelinek  <jj@ultra.linux.cz>
4577
4578         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
4579         DT_SPARC_PLTFMT.
4580
4581 1999-07-16  Ian Lance Taylor  <ian@zembu.com>
4582
4583         * elf32-mips.c (mips_elf_local_relocation_p): New static
4584         function.
4585         (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
4586         (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
4587         Always set *require_jalxp.
4588         (mips_elf_stub_section_p): Mark abfd parameter as unused.
4589         (_bfd_mips_elf_relocate_section): Only look for LO16 following
4590         GOT16 if the GOT16 is against a local symbol.  Don't return false
4591         for an undefined symbol.  If there is an overflow, assert that we
4592         have a name.
4593
4594 1999-07-16  Andreas Schwab  <schwab@suse.de>
4595
4596         * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
4597         variables `link' and `elfsec'.
4598         (elf_bfd_final_link): Remove unused variable `os'.
4599
4600 Thu Jul 15 17:55:31 1999  Mark P. Mitchell  <mark@codesourcery.com>
4601
4602         * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
4603         a PT_PHDR program headers.
4604         (_bfd_mips_elf_final_link): Don't assume there are going to be
4605         section symbols when we're not building a shared object.
4606         (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
4607         we need one.
4608
4609 1999-07-15  J.T. Conklin  <jtc@redback.com>
4610
4611         * config.bfd (i[3456]86-*-vxworks*): New target.
4612
4613 1999-07-15  Mark Mitchell  <mark@codesourcery.com>
4614
4615         * elf32-mips.c (mips_elf_stub_section_p): New function.
4616         (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
4617         (mips_elf_relocate_section): Adjust calling sequence for
4618         mips_elf_calculate_relocation and mips_elf_perform_relocation.
4619         (mips_elf_perform_relocation): Turn `jal' into `jalx' where
4620         required.
4621
4622 1999-07-15  Ian Lance Taylor  <ian@zembu.com>
4623
4624         * configure.in: Bump version number to 2.9.5.
4625         * configure: Rebuild.
4626
4627 Thu Jul 15 02:56:15 1999  Jeffrey A Law  (law@cygnus.com)
4628
4629         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
4630         64bit format.
4631         (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
4632         to derive final type instead of hardwiring a selection.
4633
4634 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4635
4636         * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
4637         things relocated by R_MIPS16_GPREL.
4638         (mips_elf_perform_relocation): Likewise.
4639
4640 Wed Jul 14 15:23:19 1999  Jim Wilson  <wilson@cygnus.com>
4641
4642         * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
4643
4644 1999-07-14  Richard Henderson  <rth@cygnus.com>
4645
4646         * elf32-mips.c (struct mips_got_info): Add global_gotno.
4647         (_bfd_mips_elf_size_dynamic_sections): Set it.
4648         (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
4649         (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
4650         new argument max_local.
4651
4652 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4653
4654         * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
4655         subwords when handling an R_MIPS16_26 relocation.
4656         (mips_elf_perform_relocation): Don't be paranoid abour right-shift
4657         semantics.
4658
4659         * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
4660         dst_mask to match reality.
4661         (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
4662         (mips_elf_obtain_contents): Use bfd_get.
4663         (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
4664         (mips_elf_relocate_section): Likewise.
4665
4666 1999-07-13  Mark Mitchell  <mark@codesourcery.com>
4667
4668         * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
4669         (mips_elf_relocate_section): Adjust calling sequence for
4670         mips_elf_perform_relocation.
4671         (mips_elf_perform_relocation): Take additional argument.  Handle
4672         R_MIPS16_26.  Use bfd_put for convenience.
4673
4674 1999-07-13  Richard Henderson  <rth@cygnus.com>
4675
4676         * elf.c (assign_file_positions_for_segments): Thinko last change.
4677         Always overwrite p_flags.
4678
4679 1999-07-13  Richard Henderson  <rth@cygnus.com>
4680
4681         * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
4682         * elflink.c (_bfd_elf_create_dynamic_sections): Only create
4683         .dynbss and .rel[a].bss if want_dynbss.
4684         * elfxx-target.h (elf_backend_want_dynbss): Provide default.
4685
4686 1999-07-13  Richard Henderson  <rth@cygnus.com>
4687
4688         * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
4689
4690 1999-07-13  Richard Henderson  <rth@cygnus.com>
4691
4692         * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
4693         (struct elf_link_hash_table): Add dynlocal.
4694         (_bfd_elf_link_lookup_local_dynindx): Prototype.
4695         (_bfd_elf_link_adjust_dynindx): Delete.
4696         (_bfd_elf_link_renumber_dynsyms): Prototype.
4697         (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
4698         * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
4699         * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
4700         (_bfd_elf_link_lookup_local_dynindx): New function.
4701         (elf_link_renumber_hash_table_dynsyms): New function.
4702         (_bfd_elf_link_renumber_dynsyms): New function.
4703         * elflink.h (elf_link_record_local_dynamic_symbol): New function.
4704         (struct elf_assign_sym_version_info): Delete removed_dynamic.
4705         (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
4706         instead of elf_link_remove_section_and_adjust_dynindices.
4707         Remove removed_dynamic code.  Use _bfd_elf_link_renumber_dynsyms.
4708         (elf_link_assign_sym_version): Remove removed_dynamic code.
4709         (elf_link_renumber_dynsyms): Delete.
4710         (elf_bfd_final_link): Install section and local symbols into .dynsym.
4711
4712         * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
4713         (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
4714         (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
4715         * elf32-mips.c: Similarly.
4716         * elf32-ppc.c: Similarly.
4717         * elf32-sparc.c: Similarly.
4718         * elf64-alpha.c: Similarly.
4719         * elf64-sparc.c: Similarly.
4720
4721 1999-07-13  Mark Mitchell  <mark@codesourcery.com>
4722
4723         * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
4724         when _gp_disp is undefined.  Do not check R_MIPS_LO16 for overflow
4725         when the relocation is against _gp_disp.
4726
4727 1999-07-12  Mark Mitchell  <mark@codesourcery.com>
4728
4729         * dwarf2.c (read_attribute): Support DW_FORM_ref8.
4730         * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
4731         to possibly_dynamic_relocs.  Adjust usage throughout code.
4732         (elf_mips_howto_table): Handle R_MIPS_64 correctly.
4733         (elf_mips_ctor64_howto): Likewise.
4734         (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
4735         Adjust indentation.
4736         (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
4737         (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
4738         Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
4739         * elf64-mips.c (elf_backend_may_use_rel_p): Define.
4740
4741 1999-07-12  Ian Lance Taylor  <ian@zembu.com>
4742
4743         * Makefile.am: Rebuild dependencies.
4744         * Makefile.in: Rebuild.
4745
4746         * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
4747         * bfd-in2.h: Rebuild.
4748
4749         * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
4750         as appropriate.  Use EMPTY_HOWTO as appropriate.  Fill in
4751         structure initializations.  Add casts.
4752         * reloc.c (EMPTY_HOWTO): Define.
4753         * bfd-in2.h: Rebuild.
4754         * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
4755         comparisons against 0.
4756         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
4757         previous_ibfd_e_flags to unsigned long.
4758         * vms.h (struct vms_private_data_struct): Change section_count to
4759         unsigned.
4760         * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
4761         (_bfd_vms_write_gsd): Change symnum to unsigned.
4762         * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
4763         * vms-tir.c (etir_sta): Change psect to unsigned.
4764         (alloc_section): Change idx to unsigned.
4765         (tir_sta, tir_ctl): Change psect to unsigned.
4766         (_bfd_vms_write_tir): Change len and before to bfd_size_type.
4767         * vms.c (priv_section_count): Change to unsigned.
4768
4769 1999-07-12  Andreas Schwab  <schwab@suse.de>
4770
4771         * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
4772         * m68klinux.c: Likewise.
4773
4774 1999-07-12  Ian Lance Taylor  <ian@zembu.com>
4775
4776         * Many files: Changes to avoid gcc warnings: Remove unused local
4777         variables.  Add default case to enum switches.
4778         * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
4779         compile if not COFF_IMAGE_WITH_PE.
4780         (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
4781         (bfd_arm_get_bfd_for_interworking): Likewise.
4782         (bfd_arm_process_before_allocation): Likewise.
4783         * epoc-pei-arm.c: Don't rename bfd_arm functions.
4784         * pei-arm.c: Likewise.
4785         * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
4786         (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
4787         (mips_elf_got16_entry): Put parens around & in body of ==.
4788         (mips_elf_calculate_relocation): Correct test for empty string.
4789         * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
4790         stderr.
4791         * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
4792         format.
4793
4794 1999-07-11  Ian Lance Taylor  <ian@zembu.com>
4795
4796         * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
4797         as appropriate.  Fill in structure initializations.  Add variable
4798         initializations.  Add casts.
4799         * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
4800         (dwarf1_unit_find_nearest_line): Change i to unsigned long.
4801
4802         * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
4803         char *.
4804         * elf-bfd.h (bfd_elf_hash): Update declaration.
4805         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
4806         when calling bfd_elf_hash.
4807
4808 1999-07-11  Mark Mitchell  <mark@codesourcery.com>
4809
4810         * libbfd.c (bfd_put_8): Make it of type `void'.
4811         * bfd-in2.h: Regenerated.
4812         * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
4813         for 32-bit hosts.
4814         (_bfd_mips_elf_final_link): Likewise.
4815
4816         * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
4817
4818 Thu Jul  8 12:32:23 1999  John David Anglin <dave@hiauly1.hia.nrc.ca>
4819
4820         * config.bfd (hppa*-*-linux-gnu*): New target
4821
4822 1999-07-07  Mark Mitchell  <mark@codesourcery.com>
4823
4824         * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
4825         (_bfd_mips_elf_create_dynamic_sections): New function.
4826         (_bfd_mips_elf_add_symbol_hook): Likewise.
4827         (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
4828         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4829         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4830         (_bfd_mips_elf_gc_mark_hook): Likewise.
4831         (_bfd_mips_elf_gc_sweep_hook): Likewise.
4832         (_bfd_mips_elf_always_size_sections): Likewise.
4833         (_bfd_mips_elf_size_dynamic_sections): Likewise.
4834         (_bfd_mips_elf_check_relocs): Likewise.
4835         (_bfd_mips_elf_link_hash_table_create): Likewise.
4836         (_bfd_mips_elf_print_private_data): Likewise.
4837         (_bfd_mips_elf_link_output_symbol_hook): Likewise.
4838         (_bfd_mips_elf_final_link): Likewise.
4839         (_bfd_mips_elf_additional_program_headers): Likewise.
4840         (_bfd_mips_elf_modify_segment_map): Likewise.
4841         (_bfd_mips_elf_relocate_section): Likewise.
4842         * elf32-mips.c (mips_elf32_object_p): Move contents into
4843         _bfd_mips_elf_object_p.
4844         (mips_elf_additional_program_headers): Rename to
4845         _bfd_mips_elf_additional_program_headers.
4846         (mips_elf_modify_segment_map): Rename to
4847         _bfd_mips_elf_modify_segment_map.
4848         (elf_mips_abi_name): Change prototype.
4849         (mips_elf32_section_from_shdr): Merge into
4850         _bfd_mips_elf_section_from_shdr.
4851         (mips_elf32_section_processing): Merge into
4852         _bfd_mips_elf_section_processing.
4853         (mips_elf_final_link): Rename to _bfd_mips_elf_final_link.  Invoke
4854         the right back-end ELF linker.
4855         (mips_elf_relocate_section): Rename to
4856         _bfd_mips_elf_relocate_section.  Clean up.  Adjust for 64-bit code.
4857         (mips_elf_link_output_symbol_hook): Rename to
4858         _bfd_mips_elf_link_output_symbol_hook.
4859         (mips_elf_create_dynamic_section): Rename to
4860         _bfd_mips_elf_create_dynamic_section.
4861         (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
4862         Adjust for 64-bit code.  Use mips_elf_got_section.
4863         (mips_elf_adjust_dynamic_symbol): Rename to
4864         _bfd_mips_elf_adjust_dynamic_symbol.  Use
4865         mips_elf_allocate_dynamic_relocations.
4866         (mips_elf_finish_dynamic_symbol): Rename to
4867         _bfd_mips_elf_finish_dynamic_symbol.  Use mips_elf_got_section.
4868         Adjust for 64-bit code.
4869         (mips_elf_finish_dynamic_sections): Rename to
4870         _bfd_mips_elf_finish_dynamic_sections.  Adjust for 64-bit code.
4871         (mips_elf_always_size_sections): Rename to
4872         _bfd_mips_elf_always_size_sections.
4873         (mips_elf_add_symbol_hook): Rename to
4874         _bfd_mips_elf_add_symbol_hook.
4875         (mips_elf_next_lo16_addend): Constify.
4876         (mips_elf_calculate_relocation): Likewise.
4877         (mips_elf_obtain_contents): Likewise.
4878         (mips_elf_perform_relocation): Likewise.
4879         (mips_elf_create_dynamic_relocation): Likewise.
4880         (mips_elf_allocate_dynamic_relocations): New function.
4881         (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
4882         (MIPS_ELF_REL_SIZE): Likewise.
4883         (MIPS_ELF_DYN_SIZE): Likewise.
4884         (MIPS_ELF_GOT_SIZE): Likewise.
4885         (MIPS_ELF_SYM_SIZE): Likewise.
4886         (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
4887         (MIPS_ELF_GET_WORD): Likewise.
4888         (MIPS_ELF_PUT_WORD): Likewise.
4889         (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
4890         (STUB_LW): Conditionalize for 64-bit value.
4891         (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
4892         entries.
4893         (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
4894         Check it for inconsistency.
4895         (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
4896         ABI.
4897         (_bfd_mips_elf_fake_sections): Remove duplicate handling of
4898         .msym.
4899         (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
4900         (mips_elf_got_offset_from_index): Use misp_elf_got_section.
4901         (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
4902         (mips_elf_local_got_index): Likewise.
4903         (mips_elf_got_page): Likewise.
4904         (mips_elf_got_info): Likewise.
4905         (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
4906         (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
4907         (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
4908         instead of constant `2'.
4909         (mips_elf_create_got_section): Tidy.  Use MIPS_ELF_GOT_SIZE.
4910         (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
4911         (mips_elf_size_dynamic_sections): Use
4912         MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
4913         MIPS_ELF_ADD_DYNAMIC_ENTRY.  Remove #if 0'd code.
4914         Adjust all releveant entries in elf backend table.
4915         * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
4916         (mips_elf64_section_processing): Likewise.
4917         Adjust elf backend entries to use _bfd_mips_elf variants now
4918         publicly available.
4919
4920         * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
4921         hash-entry sizes.
4922         (size_dynamic_sections): Likewise.
4923         (elf_link_output_extsym): Likewise.
4924         * elf.c: (elf_fake_sections): Likewise.
4925         * libbfd.c (bfd_get): New macro.
4926         (bfd_put): Likewise.
4927         * bfd-in2.h: Regenerated.
4928
4929 1999-07-07  Mark Mitchell  <mark@codesourcery.com>
4930
4931         * elf-bfd.h (elf_size_info): Add hash_entry_size,
4932         int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
4933         wap_reloca_in, and swap_reloca_out.
4934         * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
4935         multiple internal relocations per external relocation.
4936         (link_read_relocs): Likewise.
4937         (elf_bfd_final_link): Likewise.
4938         (elf_link_input_bfd): Likewise.
4939         (elf_gc_mark): Likewise.
4940         (elf_gc_smash_unused_vtentry_relocs): Likewise.
4941         * elfcode.h (elf_swap_dyn_out): Adjust type to match
4942         elf_swap_dyn_in.
4943         (size_info): Add entries for new fields.
4944         * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
4945         (mips_elf64_be_swap_reloc_in): New function.
4946         (mips_elf64_be_swap_reloc_out): Likewise.
4947         (mips_elf64_be_swap_reloca_in): Likewise.
4948         (mips_elf64_be_swap_reloca_out): Likewise.
4949         (mips_elf64_size_info): Add entries for new fields.
4950
4951 1999-07-07  Ian Lance Taylor  <ian@zembu.com>
4952
4953         * elflink.h (elf_bfd_final_link): Assert that section reloc_count
4954         field equals the new rel_count field.
4955         (elf_link_input_bfd): When doing a relocateable link, use the new
4956         rel_count field rather than the reloc_count field.
4957         (elf_reloc_link_order): Likewise.
4958         (elf_finish_pointer_linker_section): Likewise.
4959
4960         Based on patch from H.J. Lu <hjl@gnu.org>:
4961         * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
4962         shared library to override a weak definition in a regular object.
4963
4964 Tue Jul  6 10:23:39 1999  Jeffrey A Law  (law@cygnus.com)
4965
4966         * libhppa.h: Revert July 2, 1999 patch.
4967
4968         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
4969         need to generate DLTIND relocations, not DLTREL relocations.
4970
4971 1999-07-05  Nick Clifton  <nickc@cygnus.com>
4972
4973         * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
4974         architectures.
4975         (coff_set_flags): Recognise arm 5 architectures.
4976
4977         * cpu-arm.c: Add support for strongarm and arm9 cpus.
4978         Add support for armv5 architecture.
4979
4980         * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
4981
4982         * reloc.c: Add new, assembler only, ARM reloc:
4983         BFD_RELOC_ARM_ADRL_IMMEDIATE.
4984
4985         * bfd-in2.h: Regenerate.
4986
4987 1999-07-02  Mark Mitchell  <mark@codesourcery.com>
4988
4989         * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
4990         (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
4991         * elf.c (_bfd_elf_find_nearest_line): Pass it.
4992         * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
4993         * elf32-mips.c (ABI_64_P): New macro.
4994         (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
4995         (_bfd_mips_elf_find_nearest_line): Adjust call to
4996         _bfd_dwarf2_find_nearest_line.
4997         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4998         * libbfd.h: Regenerated.
4999
5000 1999-07-02  Ian Lance Taylor  <ian@zembu.com>
5001
5002         * config.bfd: Add * at the end of i[3456]86-*-unixware.
5003
5004 Fri Jul  2 12:21:10 1999  Jeffrey A Law  (law@cygnus.com)
5005
5006         * libhppa.h (HPPA_R_ARG_RELOC): Delete.
5007         (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
5008
5009 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
5010
5011         * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
5012         fields.
5013         (_bfd_elf_init_reloc_shdr): New function.
5014         * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
5015         bfd_alloc followed by memset.
5016         (_bfd_elf_init_reloc_shdr): New function, split out from ...
5017         (elf_fake_sections): Here.
5018         (assign_section_numbers): Assign section numbers for the second
5019         relocation section, if required.
5020         * elflink.h (elf_link_output_relocs): New function.
5021         (elf_link_size_reloc_section): Likewise.
5022         (elf_bfd_final_link): Use elf_link_size_reloc_section.
5023         (elf_link_input_bfd): Use elf_link_output_relocs.
5024
5025         * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
5026         _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
5027
5028 Thu Jul  1 13:58:48 1999  Jeffrey A Law  (law@cygnus.com)
5029
5030         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
5031         with 22bit format.
5032
5033 1999-06-28  Mark Mitchell  <mark@codesourcery.com>
5034
5035         * elf32-mips.c (mips_elf_got_info): Move declaration before
5036         prototypes.  Change global_gotsym to be a pointer to a hash entry,
5037         rather than a number index.
5038         (mips_elf_link_hash_entry): Move declaration before prototypes.
5039         (mips_elf_irix6_finish_dynamic_symbol): New function.
5040         (mips_elf_sign_extend): Likewise.
5041         (mips_elf_high): Likewise.
5042         (mips_elf_higher): Likewise.
5043         (mips_elf_highest): Likewise.
5044         (mips_elf_global_got_index): Likewise.
5045         (mips_elf_local_got_index): Likewise.
5046         (mips_elf_got_offset_from_index): Likeiwse.
5047         (mips_elf_record_global_got_symbol): Likewise.
5048         (mips_elf_got_page): Likewise.
5049         (mips_elf_next_lo16_addend): Likewise.
5050         (mips_elf_calculate_relocation): Likewise.
5051         (mips_elf_obtain_contents): Likewise.
5052         (mips_elf_perform_relocation): Likewise.
5053         (mips_elf_assign_gp): Likewise.
5054         (mips_elf_sort_hash_table_f): Likewise.
5055         (mips_elf_sort_hash_table): Likewise.
5056         (mips_elf_got_section): Likewise.
5057         (mips_elf_got_info): Likewise.
5058         (mips_elf_create_local_got_entry): Likewise.
5059         (mips_elf_got16_entry): Likewise.
5060         (mips_elf_create_dynamic_relocation): Likewise.
5061         (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
5062         (mips_elf_final_gp): Use mips_elf_assign_gp.
5063         (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
5064         into SHN_SCOMMON automatically on IRIX6.
5065         (mips_elf_add_symbol_hook): Likewise.
5066         (mips_elf_relocate_section): Rewrite, using
5067         mips_elf_calculate_relocation and mips_elf_perform_relocation.
5068         (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
5069         Don't deal with .rld_map on IRIX6.
5070         (mips_elf_create_got_section): Adjust use of global_gotsym.  Set
5071         section flags appropriately for .got.
5072         (mips_elf_check_relocs): Handle IRIX6 relocations making use of
5073         the got.  Call mips_elf_record_global_got_symbol and allocate
5074         local got space appropriately.
5075         (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
5076         char *.  Rework calculation of GOT size.  Sort dynamic symbol
5077         table entries so entries that do not require GOT entries appear at
5078         the beginning.  Don't use DT_MIPS_HIPAGENO on IRIX6.  Remove dead
5079         code dealing with DT_INIT and DT_FINI.  Remove fiddling with
5080         global_gotsym.
5081         (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
5082         entries.
5083         (mips_elf_finish_dynamic_symbol): Use
5084         mips_elf_irix6_finish_dynamic_symbol.
5085         (mips_elf_finish_dynamic_sections): Correct off-by-one error
5086         setting DT_MIPS_UNREFEXTNO.  Adjust setting of DT_MIPS_GOTSYM for
5087         change to global_gotsym.  Set DT_MIPS_OPTIONS on IRIX6.
5088
5089 1999-06-30  Ian Lance Taylor  <ian@zembu.com>
5090
5091         * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
5092         relocateable link.  From Ralf Baechle <ralf@uni-koblenz.de>.
5093
5094 1999-06-04  Philip Blundell  <philb@gnu.org>
5095
5096         * elf32-arm.h (elf_backend_got_header_size): Define.
5097         (elf_backend_plt_header_size): Likewise.
5098
5099 1999-06-28  Jim Pick  <jim@jimpick.com>
5100
5101         * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
5102
5103 Tue Jun 29 02:25:03 1999  Jeffrey A Law  (law@cygnus.com)
5104
5105         * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
5106         relocation function.
5107         * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
5108
5109 1999-06-27  Mark Mitchell  <mark@codesourcery.com>
5110
5111         * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
5112         (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
5113         (MIPS_ELF_STUB_SECTION_NAME): Likewise.
5114         (_bfd_mips_elf_section_from_shdr): Use them.
5115         (_bfd_mips_elf_fake_sections): Likewise.  Add .srdata to the list
5116         of GP-relative sections.
5117         (_bfd_mips_elf_set_section_contents): Use them.
5118         (_bfd_mips_elf_section_processing): Share code between .sdata and
5119         .lit4/.lit8 sections.  Set appropriate flags for .srdata.
5120         (mips_elf_additional_program_headers): Add handling for
5121         PT_MIPS_OPTIONS segment on IRIX6.
5122         (mips_elf_modify_segment_map): Likeiwse.
5123         (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
5124         Include the options sections on IRIX6.  Don't look for GP-relative
5125         sections by name; use SHF_MIPS_GPREL instead.
5126         (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
5127         the N32 ABI.
5128         (mips_elf_create_dynamic_sections): Don't muck about with section
5129         alignments and such on IRIX6.
5130         (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5131         (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
5132         fact that ELF_DYNAMIC_INTERPRETER is no longer a constant.  Use
5133         bfd_zalloc rather than bfd_alloc and memset.
5134         (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5135         Don't assert the existence of .rld_map on IRIX6.
5136         (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
5137
5138         * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
5139         (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
5140         instead.
5141
5142 1999-06-26  Mark Mitchell  <mark@codesourcery.com>
5143
5144         * elf32-mips.c (mips_elf_swap_msym_in): New function.
5145         (mips_elf_swap_msym_out): New function.
5146         (mips_elf_create_msym_section): Likewise.
5147         (MIPS_ELF_MSYM_SECTION_NAME): New macro.
5148         (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
5149         (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
5150         section not named .msym.
5151         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
5152         .msym directly.  Set appropriate attributes for the .msym
5153         section.
5154         (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
5155         (mips_elf_link_hash_newfunc): Clear it.
5156         (mips_elf_create_dynamic_sections): Create the .msym section
5157         on IRIX6.
5158         (mips_elf_size_dynamic_sections):  Allocate space for the
5159         .msym section.  Add a DT_MIPS_MSYM entry.
5160         (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
5161         the symbol.
5162         (mips_elf_finish_dynamic_sections): Assign a value for
5163         DT_MIPS_MSYM.  Add .msym entries for the section symbols as well.
5164
5165         * elf32-mips.c (irix_compat_t): New enumeration.
5166         (ABI_N32_P): New macro.
5167         (IRIX_COMPAT): Likewise.
5168         (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
5169         (mips_elf_relocate_section): Fix typo.
5170
5171 1999-06-26  Mumit Khan  <khan@xraylith.wisc.edu>
5172
5173         * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
5174         as writable PE sections.
5175
5176 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
5177
5178         * dwarf2.c (struct arange): New type.
5179         (struct comp_unit): Replace LOW and HIGH by member ARANGE.
5180         (arange_add): New function.
5181         (decode_line_info): Keep track of address ranges that a compilation
5182         unit covers.
5183         (comp_unit_contains_address): Return true if address is contained
5184         in _any_ of the address ranges associated with a compilation unit.
5185         (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
5186         on the first comp_unit that contains the address.
5187
5188 1999-06-26  David Mosberger  <davidm@hpl.hp.com>
5189
5190         * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
5191         (decode_line_info): Add variable STASH and initialize it to point
5192         to the per-bfd dwarf2_debug info.  Remove static variable
5193         dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
5194
5195 1999-06-26  Ian Lance Taylor  <ian@zembu.com>
5196
5197         * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
5198         shared library to have an undefined symbol.
5199
5200         From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5201         * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
5202
5203 Thu Jun 24 20:59:11 1999  Jeffrey A Law  (law@cygnus.com)
5204
5205         * elf-hppa.c (elf_hppa_final_write_processing): New function.
5206         * elf32-hppa.c: Remove everything related to symbol extension
5207         sections & records.  Use the common elf_hppa_final_write_processing.
5208
5209 1999-06-22  Mark Mitchell  <mark@codesourcery.com>
5210
5211         * elflink.h (size_dynamic_sections): Use user-specified init/fini
5212         functions instead of _init/_fini if requested.
5213
5214 1999-06-23  Ian Lance Taylor  <ian@zembu.com>
5215
5216         * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
5217         field.
5218
5219 1999-06-22  Ian Lance Taylor  <ian@zembu.com>
5220
5221         From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5222         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
5223         field to 0, not -1.
5224         (ppc_elf_finish_dynamic_sections): Check for positive section
5225         dynindx field, rather than comparing against -1.
5226         (ppc_elf_relocate_section): Only return false if undefined_symbol
5227         or reloc_overflow fail, not always upon encountering an error.
5228
5229 1999-06-22  Mark Mitchell  <mark@codesourcery.com>
5230
5231         * elflink.h (link_read_relocs): Explicitly cast external_relocs to
5232         bfd_byte * before performing pointer arithmetic.
5233
5234 Tue Jun 22 13:06:25 1999  Jeffrey A Law  (law@cygnus.com)
5235
5236         * elf-hppa.h: New file.  Common stuff for elf32 and elf64 PA
5237         support.
5238         * elf32-hppa.c: Include elf-hppa.h.
5239         (ARCH_SIZE): Define.
5240         (elf_hppa_reloc_type_lookup): Delete.  Found in the common code
5241         now.
5242         (elf32_hppa_info_to_howto): Similarly.
5243         (elf_hppa_howto_table): Similarly.
5244         (elf_hppa_reloc_type_lookup): Similarly.
5245         (hppa_elf_gen_reloc_type): Similarly.
5246         * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
5247
5248 1999-06-22  Nick Clifton  <nickc@cygnus.com>
5249
5250         * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
5251         handling R_V850_22_PCREL relocation.
5252
5253 1999-06-21  Ian Lance Taylor  <ian@zembu.com>
5254
5255         * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
5256         type.
5257
5258 Sun Jun 20 14:13:57 1999  Richard Henderson  <rth@cygnus.com>
5259
5260         * section.c (_bfd_strip_section_from_output): Ignore sections
5261         DISCARDed by the link script.
5262
5263 1999-06-19  Ian Lance Taylor  <ian@zembu.com>
5264
5265         * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5266         Remove unused local variable spp.
5267
5268         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
5269         the entry symbol is not set.
5270
5271 Fri Jun 18 04:24:57 1999  Richard Henderson  <rth@cygnus.com>
5272
5273         * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
5274         GPDISP or LITUSE in a relocatable link.
5275
5276 Thu Jun 17 21:24:43 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5277
5278         * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
5279         * (alloc_dwarf1_func): Likewise.
5280
5281 Wed Jun 16 03:09:57 1999  Jeffrey A Law  (law@cygnus.com)
5282
5283         * libhppa.h: Fix various formatting errors.
5284         (assemble_3); Rewrite using CATENATE.
5285         (assemble_17): Fix various bugs.
5286
5287 1999-06-16  Nick Clifton  <nickc@cygnus.com>
5288
5289         * elf32-mcore.c (R_MCORE_RAW): Fix definition.
5290
5291 1999-06-15  Richard Henderson  <rth@cygnus.com>
5292
5293         * section.c (SEC_SHORT): Define.
5294         * bfd-in2.h: Rebuild.
5295
5296 1999-06-13  Mark Mitchell  <mark@codesourcery.com>
5297
5298         * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5299         Remove abfd parameter.  Use _bfd_strip_section_from_output.
5300         (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
5301
5302         * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
5303         * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
5304         * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
5305         function.
5306         (bfd_elf_size_dynamic_sections): Use it.
5307
5308 1999-06-13  Alan Modra  <alan@spri.levels.unisa.edu.au>
5309
5310         * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
5311         complain_overflow_bitfield to complain_overflow_signed.
5312
5313 1999-06-13  Mark Mitchell  <mark@codesourcery.com>
5314
5315         * elflink.h (elf_link_read_relocs_from_section): New function,
5316         split out from ...
5317         (elf_link_read_relocs): Here.  Use it for both relocation
5318         sections.
5319
5320 1999-06-12  Mark Mitchell  <mark@codesourcery.com>
5321
5322         * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
5323         asect->reloc_count is valid.
5324
5325 1999-06-12  Ian Lance Taylor  <ian@zembu.com>
5326
5327         * elf32-mips.c (mips_elf32_section_processing): Permit a
5328         SHT_MIPS_REGINFO section to have a size of 0.
5329
5330 1999-06-12  David O'Brien  <obrien@freebsd.org>
5331
5332         * config.bfd (alpha*-*-freebsd*): New target.
5333         (i[3456]86-*-freebsd*): Now defaults to ELF.
5334
5335 1999-06-11  Ian Lance Taylor  <ian@zembu.com>
5336
5337         * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
5338         wrap if the relocation covers the high bit of an address.
5339
5340         * dwarf2.c (decode_line_info): Remove unused variable first_time.
5341
5342 1999-06-10  Jakub Jelinek  <jj@ultra.linux.cz>
5343
5344         * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
5345         instead of R_SPARC_max.
5346         (sparc64_elf_info_to_howto): Likewise.
5347         * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
5348         (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
5349
5350 1999-06-07  Richard Henderson  <rth@cygnus.com>
5351
5352         * section.c (_bfd_strip_section_from_output): Remove output
5353         sections with no initial link_order.
5354
5355 1999-06-07  Nick Clifton  <nickc@cygnus.com>
5356
5357         * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
5358
5359 Mon Jun  7 11:49:43 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5360
5361         * Makefile.am (SOURCE_HFILES): Add missing headers.
5362         * Makefile.in: Regenerated.
5363
5364 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
5365
5366         * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
5367         the N32 ABI.
5368
5369 1999-06-04  Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5370
5371         * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
5372         range undefweak symbols.
5373         * hash.c: Add missing comma after @xref{}
5374         * linker.c: Likewise.
5375
5376 1999-06-04  Nick Clifton  <nickc@cygnus.com>
5377
5378         * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
5379         if not defined.
5380         * elf32-gen.c (ELF_MAXPAGESIZE): Define.
5381         * elf32-i860.c (ELF_MAXPAGESIZE): Define.
5382         * elf32-i960.c (ELF_MAXPAGESIZE): Define.
5383         * elf64-gen.c (ELF_MAXPAGESIZE): Define.
5384
5385 1999-06-04  Ian Lance Taylor  <ian@zembu.com>
5386
5387         * Makefile.am: Rebuild dependencies.
5388         (BFD32_BACKENDS): Add dwarf1.lo.
5389         (BFD32_BACKENDS_CFILES): Add dwarf1.c.
5390         * Makefile.in: Rebuild.
5391
5392 1999-06-04  Nick Clifton  <nickc@cygnus.com>
5393
5394         * Makefile.am: Add epoc-arm-pe target.
5395         * Makefile.in: Regenerate.
5396         * pe-arm.c: Only redefine interworking function names if they have
5397         not already been redefined.
5398         * pei-arm.c: Only redefine interworking function names if they have
5399         not already been redefined.
5400         * epoc-pe-arm.c: Redefine interworking function names to avoid a
5401         name space clash.
5402         * epoc-pei-arm.c: Redefine interworking function names to avoid a
5403         name space clash.
5404
5405 1999-06-03  Nick Clifton  <nickc@cygnus.com>
5406
5407         * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
5408
5409 Fri Jun  4 10:05:11 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5410
5411         * elf.c (elf_fake_sections): Undo change of 1999-05-10.
5412
5413 Fri Jun  4 03:10:49 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5414
5415         * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
5416         start / stop for recalculating of r_addend of R_SH_SWITCH*.
5417
5418 Fri Jun  4 02:53:13 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5419
5420         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
5421         in other text sections.
5422
5423 Fri Jun  4 02:29:34 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
5424
5425         * libbfd.c (_bfd_generic_verify_endian_match): New function.
5426         * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
5427         * libbfd.h: Regenerate.
5428         * coff-sh.c (sh_merge_private_data): Delete.
5429         (coff_bfd_merge_private_bfd_data): Change to
5430         _bfd_generic_verify_endian_match.
5431         (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
5432
5433 1999-06-03  Ulrich Drepper  <drepper@cygnus.com>
5434
5435         * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
5436
5437 1999-06-03  Ian Lance Taylor  <ian@zembu.com>
5438
5439         * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
5440         prototype.
5441         (bfd_elf32_arm_process_before_allocation): Likewise.
5442         * bfd-in2.h: Rebuild.
5443
5444 1999-06-03  David Mosberger  <davidm@hpl.hp.com>
5445
5446         * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
5447         track of end_sequence markers.
5448         (add_line_info): Add END_SEQUENCE arg.
5449         (decode_line_info): Don't try to infer lo_pc and hi_pc from the
5450         debug-line info---it doesn't work right if a compilation unit
5451         consists of multiple discontiguous code-sequences.  It would be
5452         worthwhile to optimize for the common case where a compilation
5453         unit results in a contiguous set of code sequences, but this is
5454         quite tricky to get right for arbitrary DWARF2 files.
5455         (lookup_address_in_line_info_table): Don't use the last line entry
5456         for a compilation unit for anything with an address higher than
5457         this line entry.  Also, check for end_sequence markers to
5458         correctly handle discontinuities.
5459         (_bfd_dwarf2_find_nearest_line): When checking previously loaded
5460         compilation units, check all compilation units with each->high==0
5461         just like when reading compilation units.
5462
5463         * dwarf2.c (decode_line_info): Initialize table->files and
5464         table->last_line to NULL to avoid segfaults due to random
5465         values in these members.
5466         (concat_filename): Check for out-of-range file number before
5467         indexing filename table.  Segfaults suck.
5468
5469         * dwarf2.c (decode_line_info): Don't truncate address to least
5470         significant 32 bits (breaks 64 bit targets).
5471         (lookup_address_in_function_table): Ditto.
5472         (comp_unit_contains_address): Ditto.
5473
5474 1999-06-02  Mark Mitchell  <Mark Mitchell <mark@codesourcery.com>>
5475
5476         * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
5477         * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
5478         (mips_elf64_howto_table_rela): Likewise.
5479
5480         * elfcode.h (elf_slurp_reloc_table_from_section): New function,
5481         split out from ...
5482         (elf_slurp_reloc_table): Here.  Use it to handle the case where a
5483         single section has two associated relocation sections.
5484
5485 1999-06-02  Mark Salter  <msalter@cygnus.com>
5486
5487         * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
5488         COFF_WITH_PE defined.
5489
5490 1999-06-02  Nick Clifton  <nickc@cygnus.com>
5491
5492         * pe-arm.c: Rename global arm interworking functions to avoid name
5493         collision when all targets BFD is built.
5494         * pei-arm.c: Ditto.
5495
5496 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
5497
5498         * elf-bfd.h (elf_backend_data): Remove use_rela_p.  Add
5499         may_use_rel_p, may_use_rela_p, default_use_rela_p.
5500         (bfd_elf_section_data): Add use_rela_p.
5501         * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
5502         (_bfd_elf_new_section_hook): Likewise.
5503         (elf_fake_sections): Use may_use_rela_p, etc., instead of
5504         use_rela_p.
5505         (_bfd_elf_copy_private_section_data): Copy use_rela_p.
5506         * elfcode.h (write_relocs): Determine whether or not use rela
5507         relocs based on the relocation section header.
5508         * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
5509         instead of use_rela_p.
5510         * elfxx-target.h (elf_backend_may_use_relp): New macro.
5511         (elf_backend_may_use_rela_p): Likewise.
5512         (elf_backend_default_use_rela_p): Likewise.
5513         (elfNN_bed): Use them.
5514
5515 Wed Jun  2 12:38:49 1999  Miodrag Vallat <miodrag@multimania.com>
5516
5517         * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
5518
5519 Tue Jun  1 17:57:58 1999  Mark P. Mitchell  <mitchell@n02.acl.lanl.gov>
5520
5521         * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
5522         (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
5523         (BFD_RELOC_MIPS_GOT_OFST): Likewise.
5524         (BFD_RELOC_MIPS_GOT_DISP): Likewise.
5525         * bfd-in2.h: Regenerated.
5526         * libbfd.h: Likewise.
5527         * elf32-mips.c (mips_info_to_howto_rela): New function.
5528         (USE_REL): Adjust for new conventions.
5529         (MINUS_ONE): New macro.
5530         (elf_mips_howto_table): Add R_MIPS_SUB.
5531         (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
5532         and MIPS_GOT_DISP.
5533         (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
5534         .MIPS.content section.
5535         (_bfd_mips_elf_fake_sections): Treat all sections that begin
5536         with .MIPS.content as .MIPS.content sections.  Set
5537         SHF_MNIPS_NOSTRIP for such section.
5538         (elf_info_to_howto): Define to mips_info_to_howto_rela.
5539         * elf64-mips.c (mips_r):  Add entries for MIPS_SUB, MIPS_GOT_PAGE,
5540         MIPS_GOT_OFST, and MIPS_GOT_DISP.
5541
5542 Wed Jun  2 11:51:12 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5543
5544         * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
5545         variable.
5546
5547         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
5548         `else'.
5549
5550 1999-05-30  Philip Blundell  <philb@gnu.org>
5551
5552         * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
5553         1993-03-25 (!!).  Take into account the bitmasks for the reloc so
5554         the addend does not overflow into the rest of the word.
5555
5556 1999-05-29  Nick Clifton  <nickc@cygnus.com>
5557
5558         * bfd-in.h: Amend prototype for
5559         bfd_elf32_arm_process_before_allocation .
5560         * bfd-in.h: Regenerate.
5561
5562         * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
5563         elements in a fixed sized array.
5564         (ARM_ELF_ABI_VERSION): Define.
5565         (ARM_ELF_OS_ABI_VERSION): Define.
5566         (R_ARM_THM_ABS5): Fix rightshift and size.
5567         (R_ARM_THM_PC22): Fix size.
5568         (R_ARM_PLT32): Define Howto.
5569         (find_howto): New function: Locate a howto based on a reloc
5570         number.
5571         (elf32_arm_info_to_howto): Use find_howto if necessary.
5572         (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5573         bfd_reloc_code_real_type.
5574         (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
5575         and BFD_RELOC_VTABLE_ENTRY.
5576         (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
5577
5578         * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
5579         elements in a fixed sized array.
5580         (ARM_ELF_ABI_VERSION): Define.
5581         (ARM_ELF_OS_ABI_VERSION): Define.
5582         (R_ARM_THM_ABS5): Fix rightshift and size.
5583         (R_ARM_THM_PC22): Fix size.
5584         (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
5585         (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5586         bfd_reloc_code_real_type.
5587
5588         * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
5589         no_pipeline_knowledge.
5590         (elf32_arm_link_hash_create): Initialise new field to zero.
5591         (bfd_elf32_arm_process_before_allocation): Add new paraemter:
5592         no_pipeline_knowledge.  Use this parameter to initialise the field
5593         in the globals data structure.
5594         (elf32_arm_final_link_relocate): Only add in pipeline offset if
5595         no_pipeline_knowledge is false and the binary is from an old
5596         toolchain.
5597         (elf32_arm_merge_private_data): Generate an error if an attempt is
5598         made to link together big endian and little endian code.
5599         (elf32_arm_post_process_headers): New function:  Initialise the
5600         EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
5601         header.
5602         (elf_backend_post_process_headers): Define.
5603
5604 1999-05-28  Nick Clifton  <nickc@cygnus.com>
5605
5606         * elf-bfd.h (struct elf_backend_data): Add new field:
5607         elf_backend_post_process_headers.
5608
5609         * elfxx-target.h (elf_backend_post_process_headers): Define to
5610         NULL if not already defined.
5611         (elfNN_bed): Initialise elf_backend_post_process_headers field.
5612
5613         * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
5614         to zero.
5615         (_bfd_elf_compute_section_file_positions): Call
5616         elf_backend_post_process_headers if defined.
5617
5618 1999-05-28  Ian Lance Taylor  <ian@zembu.com>
5619
5620         * configure.in: Check whether getuid and getgid exist.
5621         * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
5622         HAVE_GETGID are not defined, respectively.
5623         (bfd_write_armap): Don't special case on _WIN32 for getuid and
5624         getgid.
5625         * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
5626         * configure, config.in: Rebuild.
5627
5628 1999-05-28  Martin Dorey  <mdorey@madge.com>
5629
5630         * elf32-i960.c: New file.
5631         * elf.c (prep_headers): Handle bfd_arch_i960.
5632         * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
5633         * config.bfd (i960-*-elf*): New target.
5634         * configure.in (bfd_elf32_i960_vec): New target vector.
5635         * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
5636         (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
5637         * Makefile.in, aclocal.m4, configure: Rebuild.
5638
5639 1999-05-27  Nick Clifton  <nickc@cygnus.com>
5640
5641         * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
5642         R_ARM_PLT32.
5643         (find_howto): New function: Find entries in the
5644         elf32_arm_howto_table.
5645         (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
5646         computed simply.
5647         (elf32_arm_reloc_type_lookup): Add lookup for
5648         BFD_RELOC_ARM_PLT32.
5649
5650 1999-05-25  Philip Blundell  <pb@nexus.co.uk>
5651
5652         * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
5653         (elf32_arm_link_hash_table_create): Use above function as the
5654         constructor for hash table entries.
5655         (elf32_arm_relocate_section): Avoid crash when there is no output
5656         section.
5657         (elf32_arm_final_link_relocate): New parameter h.
5658         (elf32_arm_relocate_section): Pass symbol hash entry to above
5659         routine.
5660         (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
5661         comments.
5662
5663 1999-05-25  Catherine Moore  <clm@cygnus.com>
5664
5665         * coff-arm.c (coff_arm_relocate_section): Don't emit
5666         base file entries for pc-relative values.
5667
5668 1999-05-25  DJ Delorie  <dj@cygnus.com>
5669
5670         * peicode.h (coff_swap_sym_in): When we create the actual section
5671         to reflect the not-there section C_SECTION symbols refer to,
5672         change the symbol class to C_STAT as the section is now really
5673         there.
5674
5675 1999-05-24  Philip Blundell  <pb@nexus.co.uk>
5676
5677         * elf32-arm.h (elf32_arm_relocate_section): Undo change of
5678         1999-03-25.
5679
5680 Mon May 17 13:35:35 1999  Stan Cox  <scox@cygnus.com>
5681
5682         * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
5683         F_PIC_INT to F_PIC.
5684         * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
5685         F_ARM_3M labels.  Changed F_PIC_INT to F_PIC.
5686
5687 1999-05-16  Nick Clifton  <nickc@cygnus.com>
5688
5689         * coff-mcore.c (in_reloc_p): Reinstate.
5690
5691 1999-05-15  Nick Clifton  <nickc@cygnus.com>
5692
5693         * reloc.c (BFD_RELOC_MCORE_RVA): Define.
5694         * bfd-in2.h: Regenerate.
5695         * coff-mcore.c (in_reloc_p): Remove defintion.
5696         (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
5697         (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
5698         IMAGE_REL_MCORE_RVA.
5699         (coff_mcore_rtype_to_howto): Add special processing for
5700         IMAGE_REL_MCORE_RVA.
5701         (coff_mcore_relocate_section): Add support for
5702         IMAGE_REL_MCORE_RVA.
5703         * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
5704         (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
5705         R_MCORE_RELATIVE.
5706         (mcore_elf_relocate_section): Delete redundant case labels.
5707
5708 Fri May 14 10:59:55 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5709
5710         * elf32-arm.h (elf32_arm_relocate_section): Fix operator
5711         precedence between bit-and and comparison.
5712
5713 Thu May 13 09:45:23 1999  Joel Sherrill (joel@OARcorp.com)
5714
5715         * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
5716         list of target formats (targ_selvecs).
5717         (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
5718         (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
5719
5720 1999-05-10  DJ Delorie  <dj@cygnus.com>
5721
5722         * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
5723         reasonable mode until "ar x" is smart enough to skip it (fixes
5724         gcc/libgcc.a builds on mips-ecoff targets
5725
5726         * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
5727         to work.  Hack to support MS import libraries, which use different
5728         COMDAT types than GNU.
5729         (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
5730         to implied zero-length sections (see peicode below)
5731         * coffgen.c (coff_get_normalized_symtab): Properly read long MS
5732         filename symbols, which use one *or more* auxents.
5733         * coffswap.h (coff_swap_aux_in): ditto
5734         * peicode.h (coff_swap_sym_in): Build the implied zero-length
5735         sections
5736
5737 Tue May 11 15:51:58 1999  Jeffrey A Law  (law@cygnus.com)
5738
5739         * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
5740         for all relocations.
5741
5742 1999-05-10  Catherine Moore  <clm@cygnus.com>
5743
5744         * bfd-in.h (bfd_arm_allocate_interworking_sections):  Static
5745         if COFF_IMAGE_WITH_PE.
5746         (bfd_arm_process_before_allocation): Likewise.
5747         (bfd_arm_get_bfd_for_interworking): Likewise.
5748         * coff-arm.c: Likewise.
5749         * bfd-in2.h: Regenerate.
5750         * configure.in (armpe_little_vec): Remove coff-arm.lo.
5751         (armpe_big_vec): Likewise.
5752         * configure: Rebuild.
5753
5754 1999-05-10  Nick Clifton  <nickc@cygnus.com>
5755
5756         * elf.c (elf_fake_sections): Check for .rel. as start of rel
5757         section, not just .rel.  Same for .rela.
5758
5759 1999-05-07  Nick Clifton  <nickc@cygnus.com>
5760
5761         * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
5762         endianism with an error message.
5763
5764 Thu May  6 17:09:09 1999  Fred Fish  <fnf@be.com>
5765
5766         * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
5767         assignment from "unsigned char *" to "char *".
5768         (decode_line_info): Likewise for dwarf_line_buffer assignment.
5769
5770 1999-05-05  Catherine Moore  <clm@cygnus.com>
5771
5772         * coff-arm.c (coff_arm_relocate_section):  Add one to
5773         address of ARM_RVA32 thumb functions.
5774
5775 1999-05-05  Catherine Moore  <clm@cygnus.com>
5776
5777         * elf32-m68k.c (elf32_m68k_set_private_flags): New.
5778         (elf32_m68k_copy_private_bfd_data): New.
5779         (elf32_m68k_merge_private_bfd_data): New.
5780         (elf32_m68k_print_private_bfd_data): New.
5781         (CPU32_FLAG): Define.
5782         (PLT_CPU32_ENTRY_SIZE): Define.
5783         (elf_cpu32_plt0_entry): Declare.
5784         (elf_cpu32_plt_entry): Declare.
5785         (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
5786         (elf_m68k_finish_dynamic_symbol): Likewise.
5787         (elf_m68k_finish_dynamic_sections): Likewise.
5788         (elf_backend_plt_header_size): Remove definition.
5789         (bfd_elf32_bfd_copy_private_bfd_data): Define.
5790         (bfd_elf32_bfd_merge_private_bfd_data): Define.
5791         (bfd_elf32_bfd_set_private_flags): Define.
5792         (bfd_elf32_bfd_print_private_bfd_data): Define.
5793
5794 Mon May  3 09:24:49 1999  Jeffrey A Law  (law@cygnus.com)
5795
5796         * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
5797         and R_LONG_PCREL_MODE.
5798
5799 1999-04-29  Nick Clifton  <nickc@cygnus.com>
5800
5801         * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
5802
5803 Fri Apr 28 16:36:19 1999  Stan Cox  <scox@cygnus.com>
5804
5805         * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
5806         in relocation calculation.
5807
5808 1999-04-26  Tom Tromey  <tromey@cygnus.com>
5809
5810         * aclocal.m4, configure: Updated for new version of libtool.
5811
5812 1999-04-21  Nick Clifton  <nickc@cygnus.com>
5813
5814         * coff-mcore.c: Add support for mcore relocs.
5815
5816 1999-04-20  Gavin Romig-Koch  <gavin@cygnus.com>
5817
5818         * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
5819         incorrect use EF_MIPS_xxBITPTRS.
5820
5821 1999-04-18  Ian Lance Taylor  <ian@zembu.com>
5822
5823         * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
5824         variable insn.
5825
5826         * bfd-in2.h: Rebuild.
5827         * libbfd.h: Rebuild.
5828
5829 Sat Apr 17 20:55:15 1999  Catherine Moore  <clm@cygnus.com>
5830
5831         * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
5832         (coff_arm_relocate_section):  Add ARM26D transform.  Only
5833         change to ARM26D for relocateable links.
5834
5835 1999-04-16  Gavin Romig-Koch  <gavin@cygnus.com>
5836
5837         * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
5838         (bfd_elf32_bfd_print_private_bfd_data): New.
5839
5840 1999-04-15  Doug Evans  <devans@casey.cygnus.com>
5841
5842         * elf32-arm.h (elf32_arm_final_link_relocate):  For R_ARM_THM_ABS5,
5843         refetch addend if USE_REL, add many comments regarding current state.
5844         For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
5845         * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
5846         size and rightshift.  For R_ARM_THM_PC22, fix bitsize.
5847         * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
5848
5849 Wed Apr 14 14:33:08 1999  Richard Henderson  <rth@cygnus.com>
5850
5851         * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
5852         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
5853
5854 1999-04-13  David Mosberger  <davidm@hpl.hp.com>
5855
5856         * dwarf2.c (decode_line_info): Don't truncate address to least
5857         significant 32 bits (breaks 64 bit targets).
5858         (lookup_address_in_function_table): Ditto.
5859         (comp_unit_contains_address): Ditto.
5860
5861 Tue Apr 13 21:27:19 1999  Catherine Moore  <clm@cygnus.com>
5862
5863         * coff-arm.c (arm_emit_base_file_entry): New routine.
5864         (A2T3_OFFSET): Define.
5865         (T2A3_OFFSET): Define.
5866         (coff_arm_relocate_section):  Emit base file entries for interworking
5867         stubs.
5868
5869 1999-04-13  Philip Blundell  <philb@gnu.org>
5870
5871         * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
5872         relocs 17 through 19.
5873
5874 Sun Apr 11 01:25:17 1999  Richard Henderson  <rth@cygnus.com>
5875
5876         * elfcode.h: Remove fnmatch.h.
5877         * elflink.h (elf_link_assign_sym_version): Call back to ld
5878         instead of calling fnmatch.
5879
5880         * config.bfd (i?86-*-beoself): Include pe vecs.
5881
5882 Sun Apr 11 01:14:06 1999  Richard Henderson  <rth@cygnus.com>
5883
5884         * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
5885         to go missing.
5886
5887 1999-04-10  Richard Henderson  <rth@cygnus.com>
5888
5889         * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
5890         when trying to resolve dynamic symbol references.
5891         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5892         * elf32-mips.c (mips_elf_relocate_section): Likewise.
5893         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5894         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5895         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5896         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5897         * elflink.h (elf_link_output_extsym): Likewise.
5898
5899 Sat Apr 10 15:12:09 1999  Richard Henderson  <rth@cygnus.com>
5900
5901         * section.c (_bfd_strip_section_from_output): New function moved from
5902         * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
5903         * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
5904         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5905         * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
5906         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
5907         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5908         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
5909         * bfd-in2.h: Update.
5910
5911 1999-04-09  Ian Lance Taylor  <ian@zembu.com>
5912
5913         * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
5914
5915 1999-04-08  Nick Clifton  <nickc@cygnus.com>
5916
5917         * coff-mcore.c: New File: Support for mcore-pe targets.
5918         * cpu-mcore.c: New File: Support for mcore targets.
5919         * elf32-mcore.c: New File: Support for mcore-elf target.
5920         * pe-mcore.c: New File: Definitions for mcore-pe target.
5921         * pei-mcore.c: New File: Definitions for mcore-pei target.
5922         * Makefile.am: Add support for MCore targets.
5923         * Makefile.in: Regenerate.
5924         * config.bfd: Add support for MCore targets.
5925         * configure.in: Add support for MCore targets.
5926         * configure: Regenerate.
5927         * archures.c: Add support for MCore architecture.
5928         * bfd-in2.h: Regenerate.
5929         * coffcode.h: Add support for mcore-pe targets.
5930         * elf.c: Add support for mcore-elf target.
5931         * reloc.c: Add support for MCore relocs.
5932         * targets.c: Add support for MCore targets.
5933
5934 1999-04-07  Nick Clifton  <nickc@cygnus.com>
5935
5936         * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
5937         R_ARM_XPC25 and R_ARM_THM_XPC22.
5938         (elf32_arm_reloc_map): Remove redundant entries.
5939
5940 1999-04-06  Ian Lance Taylor  <ian@zembu.com>
5941
5942         * sysdep.h (LC_MESSAGES): Never define.
5943
5944 1999-04-06  Chris Torek  <torek@bsdi.com>
5945
5946         * reloc.c (bfd_check_overflow): Add addrsize parameter.  Change
5947         all callers.  Rewrite completely.
5948         (_bfd_relocate_contents): Rewrite overflow checking.
5949         * bfd-in2.h: Rebuild.
5950
5951 1999-04-05  Ian Lance Taylor  <ian@zembu.com>
5952
5953         From Gabriel Paubert <paubert@iram.es>:
5954         * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
5955         R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
5956         Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
5957         have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
5958         * ppcboot.c (ppcboot_vec): Use little endian routines for
5959         headers.
5960
5961         * elf.c (elfcore_strndup): Only define if it will be used.
5962         * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
5963         and irelend.
5964         (ppc_elf_check_relocs): Remove unused local i.
5965         (ppc_elf_gc_mark_hook): Add default case to switch.
5966
5967         From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
5968         * srec.c (srec_scan): Accept \r in symbol definitions.
5969         (srec_object_p): Set HAS_SYMS if we saw any symbols.
5970         (symbolsrec_object_p): Likewise.
5971
5972 1999-04-04  Don Bowman <don@pixsci.com>
5973
5974         * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
5975
5976 1999-04-04  Ian Lance Taylor  <ian@zembu.com>
5977
5978         * dwarf1.c (parse_line_table): Remove unused locals last_pc and
5979         last_line.
5980         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
5981         * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
5982         switch.
5983         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
5984         local i.
5985         * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
5986         local val.
5987
5988 1999-03-31  Nick Clifton  <nickc@cygnus.com>
5989
5990         * config.bfd: Add support for arm-epoc-pe target.
5991         * configure.in: Add support for arm-epoc-pe target.
5992         * configure: Regenerate.
5993         * targets.c: Add support for arm-epoc-pe target.
5994         * coff-arm.c: Allow header files to override definition of
5995         TARGET_UNDERSCORE and USER_LABEL_PREFIX.
5996         * pe-arm.h: Allow previous header files to override definition of
5997         TARGET_LITTLE_SYM and TARGET_BIG_SYM.
5998         * pei-arm.h: Allow previous header files to override definition of
5999         TARGET_LITTLE_SYM and TARGET_BIG_SYM.
6000         * epoc-pe-arm.c: New file.  Support arm-epoc-pe target.
6001         * epoc-pei-arm.c: New file.  Support arm-epoc-pei target.
6002
6003 1999-03-30  Nick Clifton  <nickc@cygnus.com>
6004
6005         * elf.c (elf_map_symbols): Handle the case where section
6006         symbols are generated for content-less sections which are
6007         not mapped to the output file.
6008
6009         * linker.c: Replace direct references to fields in BFD structure
6010         with accessor macros.
6011
6012         * elflink.h: Replace direct references to fields in BFD structure
6013         with accessor macros.
6014
6015 1999-03-25  Philip Blundell  <pb@nexus.co.uk>
6016
6017         * config.bfd: Eliminate redundancy in checks for Linux/ARM.
6018
6019         * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
6020         account when adjusting section symbols during a partial link.
6021
6022 1999-03-24  Nick Clifton  <nickc@cygnus.com>
6023
6024         * coff-sparc.c (struct coff_reloc_map): Change type of field
6025           'bfd_reloc_val' to bfd_reloc_code_real_type.
6026         * elf-m10200.c (struct mn10200_reloc_map): Ditto.
6027         * elf-m10300.c (struct mn10300_reloc_map): Ditto.
6028         * elf32-arc.c (struct arc_reloc_map): Ditto.
6029         * elf32-d10v.c (struct d10v_reloc_map): Ditto.
6030         * elf32-d30v.c (struct d30v_reloc_map): Ditto.
6031         * elf32-fr30.c (struct fr30_reloc_map): Ditto.
6032         * elf32-m32r.c (struct m32r_reloc_map): Ditto.
6033         * elf32-sh.c (struct elf_reloc_map): Ditto.
6034         * elf32-sparc.c (struct elf_reloc_map): Ditto.
6035         * elf32-v850.c (struct v850_reloc_map): Ditto.
6036         * elf64-sparc.c (struct elf_reloc_map): Ditto.
6037         * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
6038         * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
6039
6040 1999-03-17  Martin Hunt  <hunt@cygnus.com>
6041
6042         * syms.c (_bfd_stab_section_find_nearest_line): Changed this
6043         function so source-level assembly works.  If multiple N_SOs
6044         are seen without and N_FUNs, create an indextable entry with
6045         a NULL function name.
6046
6047 1999-03-16  Gavin Romig-Koch  <gavin@cygnus.com>
6048
6049         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
6050         of certian similar cpus.
6051
6052 1999-03-16  Gavin Romig-Koch  <gavin@cygnus.com>
6053
6054         * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6055         Add the 5000.  Change the architecture for the 5400 to mips4.
6056         (elf_mips_mach): Add r5000.
6057
6058 1999-03-11  Doug Evans  <devans@casey.cygnus.com>
6059
6060         * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
6061
6062 1999-03-11  Nick Clifton  <nickc@cygnus.com>
6063
6064         * binary.c (binary_set_section_contents): Generate warning about
6065         huge file offsets for any section that will occupy file space, not
6066         just those that are loadable.
6067
6068 1999-02-24  Jim Blandy  <jimb@zwingli.cygnus.com>
6069
6070         * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
6071
6072 1999-02-22  Jim Lemke  <jlemke@cygnus.com>
6073
6074         * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
6075
6076 Mon Feb 22 18:26:51 1999  Ian Lance Taylor  <ian@cygnus.com>
6077
6078         * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
6079         * elflink.h: Revert all changes since Feb 16.  Instead:
6080         (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
6081         appropriate.  Copy it to version symbols.
6082         (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
6083         symbols if appropriate.
6084         (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
6085         symbol if appropriate.
6086         (elf_link_output_extsym): If symbol is marked as undefined, and
6087         has no nonweak references, mark it as weak undefined.
6088
6089 Fri Feb 19 16:01:12 1999  Ian Lance Taylor  <ian@cygnus.com>
6090
6091         * elflink.h (elf_merge_symbol): When overriding a dynamic
6092         definition with a weak undefined symbol, set NEEDS_PLT if it is a
6093         function.
6094         (elf_link_add_object_symbols): Don't copy the other field if we
6095         are overridding.
6096
6097 Thu Feb 18 18:07:43 1999  Ian Lance Taylor  <ian@cygnus.com>
6098
6099         * elflink.h (elf_merge_symbol): Do not merge any symbol from a
6100         shared object with a weak undefined symbol.
6101
6102 1999-02-18  Nick Clifton  <nickc@cygnus.com>
6103
6104         * elfarm-nabi.c: Set partial_inplace back to false.
6105
6106 1999-02-17  Nick Clifton  <nickc@cygnus.com>
6107
6108         * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
6109         (USER_LABEL_PREFIX): Set to "_".
6110
6111         The following patches are from: Scott Bambrough
6112         <scottb@corelcomputer.com>
6113
6114         * libaout.h (M_ARM6_NETBSD): Set to 143.
6115
6116         * reloc.c: Add ARM PIC relocs:   BFD_RELOC_ARM_GOT12,
6117         BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
6118         BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
6119         BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
6120         * bfd-in2.h: Regenerate.
6121
6122         * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
6123         'true' as REL relocs are now being used.  Add new PIC relocs:
6124         R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
6125         R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
6126
6127         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
6128         of targets.
6129         (elf32_arm_final_link_relocate): Change parameters so that entire
6130         reloc is passed.  Add support for PIC relocs.
6131         (elf32_arm_relocate_section): Pass entire reloc to
6132         elf32_arm_final_link_relocate.
6133         (elf32_arm_check_relocs): Handle new PIC relocs.
6134         (elf32_arm_adjust_dynamic_symbol): New function.
6135         (elf32_arm_size_dynamic_sections): New function.
6136         (elf32_arm_discard_copies): New function.
6137         (elf32_arm_finish_dynamic_symbol): New function.
6138         (elf32_arm_finish_dynamic_sections): New function.
6139         (ELF_MAXPAGE_SIZE): Define.
6140         (bfd_elf32_bfd_reloc_type_lookup): Define.
6141         (elf_backend_relocate_section): Define.
6142         (elf_backend_adjust_dynamic_symbol): Define.
6143         (elf_backend_create_dynamic_sections): Define.
6144         (elf_backend_finish_dynamic_symbol): Define.
6145         (elf_backend_finish_dynamic_sections): Define.
6146         (elf_backend_size_dynamic_sections): Define.
6147         (elf_backend_plt_readonly): Define.
6148         (elf_backend_want_got_plt): Define.
6149         (elf_backend_want_plt_sym): Define.
6150
6151 Wed Feb 17 12:02:26 1999  Stan Cox  <scox@cygnus.com>
6152
6153         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
6154         sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
6155         (_bfd_mips_elf_fake_sections): Likewise.
6156
6157 Wed Feb 17 12:07:23 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6158
6159         * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
6160         bfd_elf32_arm_get_bfd_for_interworking,
6161         bfd_elf32_arm_process_before_allocation): Define to avoid clash
6162         with elfarm-nabi.c.
6163
6164         * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
6165         (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
6166         elf32_arm_find_nearest_line): Make them static.
6167
6168 Tue Feb 16 22:44:37 1999  Ian Lance Taylor  <ian@cygnus.com>
6169
6170         * elflink.h (elf_merge_symbol): Add pflags parameter.  Change all
6171         callers.  Do not merge a definition from a shared object with a
6172         weak undefined symbol.
6173         (elf_link_add_object_symbols): Do not change the symbol type or
6174         size if the old symbol overrides the new one.
6175
6176 1999-02-08  Nick Clifton  <nickc@cygnus.com>
6177
6178         * config.bfd: Add support for strongarm target.
6179
6180 Mon Feb  8 11:18:14 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6181
6182         * elf32-m68k.c (reloc_map): Use the correct types for the struct
6183         fields instead of unsigned char.
6184
6185 Fri Feb  5 00:22:36 1999  Ian Lance Taylor  <ian@cygnus.com>
6186
6187         * Makefile.am: Rebuild dependencies.
6188         * Makefile.in: Rebuild.
6189
6190 Thu Feb  4 22:30:13 1999  Ian Lance Taylor  <ian@cygnus.com>
6191
6192         * configure.in: Change AC_PREREQ to 2.13.  Remove AM_CYGWIN32.
6193         Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
6194         AC_PROG_INSTALL.  Add comments to uses of AC_DEFINE.
6195         * acinclude.m4: Add comments to uses of AC_DEFINE.
6196         * acconfig.h: Remove.
6197         * configure: Rebuild with current autoconf/automake.
6198         * aclocal.m4: Likewise.
6199         * config.in: Likewise.
6200         * Makefile.in: Likewise.
6201
6202 1999-02-04  DJ Delorie  <dj@cygnus.com>
6203
6204         * libbfd.c (real_read): don't call fread for zero bytes.  This
6205         covers up a bug (or misuse of bfd) that's exposed by Solaris.
6206
6207 Thu Feb  4 12:38:10 1999  Stan Cox  <scox@cygnus.com>
6208
6209         * elf32-mips.c (mips_elf_relocate_section): Insure that the target
6210         of a jump is in the current 256 MB region.
6211
6212 Thu Feb  4 12:15:38 1999  Ian Lance Taylor  <ian@cygnus.com>
6213
6214         * format.c (bfd_check_format_matches): Change last patch to only
6215         take effect for the binary target.
6216
6217 Wed Feb  3 19:40:12 1999  Ian Lance Taylor  <ian@cygnus.com>
6218
6219         * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
6220
6221 Wed Feb  3 15:02:44 1999  Catherine Moore  <clm@cygnus.com>
6222
6223         * elf32-fr30.c (fr30_elf_check_relocs):  New routine.
6224
6225 Tue Feb  2 21:38:28 1999  Ian Lance Taylor  <ian@cygnus.com>
6226
6227         * format.c (bfd_check_format_matches): If the target was
6228         previously specified, don't check other targets when checking for
6229         an archive file.
6230
6231 Tue Feb  2 18:16:43 1999  Catherine Moore  <clm@cygnus.com>
6232
6233         * elf32-arm.h (elf32_arm_reloc_map):  Removed.
6234         (elf32_arm_reloc_type_lookup):  Removed
6235         * elfarm-nabi.c (elf32_arm_reloc_map):  New.
6236         (elf32_arm_reloc_type_lookup):  New.
6237         * elfarm-oabi.c (elf32_arm_reloc_map):  New.
6238         (elf32_arm_reloc_type_lookup):  New.
6239
6240 Mon Feb  1 19:49:21 1999  Catherine Moore  <clm@cygnus.com>
6241
6242         * elfarm-nabi.c:  Renamed from elf32-arm-newabi.c.
6243         * elfarm-oabi.c:  Renamed from elf32-arm-oldabi.c
6244         * Makefile.am:  Use new files.
6245         * Makefile.in:  Regenerate.
6246         * configure.in:  Use new files.
6247         * configure:  Regenerate.
6248
6249 1999-02-01  Nick Clifton  <nickc@cygnus.com>
6250
6251         * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
6252         (fr30_elf_gc_sweep_hook): New function.
6253         (elf_backend_can_gc_sections): Define.
6254
6255 Mon Feb  1 12:21:47 1999  Catherine Moore  <clm@cygnus.com>
6256
6257         * targets.c (bfd_target_vector):  Add bfd_elf32_littlearm_oabi_vec
6258         and bfd_elf32_bigarm_oabi_vec.
6259
6260 Mon Feb  1 11:46:31 1999  Catherine Moore  <clm@cygnus.com>
6261
6262         * Makefile.am (elf32-arm-oldabi.lo):  New.
6263         (elf32-arm-newabi.lo):  New.
6264         * Makefile.in:  Regenerate.
6265         * config.bfd (thumb-*-elf):  Remove definition of targ_underscore.
6266         (arm-*-elf):  Likewise.
6267         (arm-*-oabi):  New.
6268         (thumb-*-oabi):  New.
6269         * configure:  Regenerate.
6270         * configure.in (bfd_elf32_littlearm_oabi_vec):  New.
6271         (bfd_elf32_bigarm_oabi_vec):  New.
6272         * elf32-arm-newabi.c:  New.
6273         * elf32-arm-oldabi.c:  New.
6274         * elf32-arm.c:  Removed.
6275         * elf32-arm.h:  New.
6276
6277 Mon Feb  1 11:52:12 1999  Frank Ch. Eigler  <fche@cygnus.com>
6278
6279         * binary.c (binary_set_section_contents): Omit warnings for
6280         unloadable sections.
6281
6282 1999-01-31  Michael Meissner  <meissner@cygnus.com>
6283
6284         * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
6285         powerpc{,le}-*-eabi.
6286
6287 1999-01-29  Nick Clifton  <nickc@cygnus.com>
6288
6289         * dwarf2.c (read_unsigned_leb128): Remove unused variables.
6290         * dwarf2.c (read_signed_leb128): Remove unused variables.
6291
6292 Fri Jan 29 00:47:21 1999  H.J. Lu  <hjl@gnu.org>
6293
6294         * elf.c (assign_file_positions_for_segments): Only adjust
6295         p_align when needed.
6296
6297 Thu Jan 28 20:05:22 1999  Ian Lance Taylor  <ian@cygnus.com>
6298
6299         * binary.c (binary_set_section_contents): Don't return early for a
6300         non-loadable section, in case the first section is non-loadable.
6301         Don't set the low lma for a SEC_NEVER_LOAD section.  From Maciej
6302         W. Rozycki <macro@ds2.pg.gda.pl>.
6303
6304 1999-01-28  Nick Clifton  <nickc@cygnus.com>
6305
6306         * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
6307         R_FR30_GNU_VTENTRY relocs.
6308
6309 Thu Jan 28 11:08:16 1999  Catherine Moore  <clm@cygnus.com>
6310
6311         * elflink.h (elf_link_output_sym):  Zero syms which are
6312         part of sections which have been excluded.
6313
6314 Wed Jan 27 13:35:35 1999  Stan Cox  <scox@cygnus.com>
6315
6316         * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
6317         to F_PIC_INT.
6318         * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
6319         F_ARM_3M labels.  Changed F_PIC to F_PIC_INT.
6320
6321 1999-01-27  Nick Clifton  <nickc@cygnus.com>
6322
6323         * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
6324         relocation.
6325         (fr30_final_link_relocate): Use computed value as result of
6326         relocation.
6327
6328 1999-01-26  Frank Ch. Eigler  <fche@cygnus.com>
6329
6330         * binary.c (binary_set_section_contents): Emit warning for
6331         huge file offsets due to widely-dispersed section LMAs.
6332
6333 Mon Jan 18 03:35:35 1999  Ian Lance Taylor  <ian@cygnus.com>
6334
6335         * elf.c (assign_file_positions_for_segments): If not D_PAGED,
6336         align first section to largest section alignment, not first
6337         section alignment.
6338
6339 1999-01-04  Jason Molenda  (jsm@bugshack.cygnus.com)
6340
6341         * configure.in: Require autoconf 2.12.1 or higher.
6342
6343 Tue Dec 22 15:21:41 1998  Catherine Moore  <clm@cygnus.com>
6344
6345         * archures.c (bfd_mach_i386_i386_intel_syntax):  Define.
6346         * bfd-in2.h:  Likewise.
6347         * cpu-i386.c (bfd_i386_arch_intel_syntax):  New.
6348
6349 1998-12-16  Gavin Romig-Koch  <gavin@cygnus.com>
6350
6351         * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
6352         * cpu-mips.c: Add support for and independent 4111.
6353         * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
6354         (_bfd_mips_elf_final_write_processing):
6355         bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
6356
6357 1998-12-15  Gavin Romig-Koch  <gavin@cygnus.com>
6358
6359         * elf32-mips.c (elf_mips_abi_name): New.
6360         (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
6361
6362 1998-12-12  Gavin Romig-Koch  <gavin@cygnus.com>
6363
6364         * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6365         Handle bfd_mach_mips4300.
6366
6367 1998-12-11  Ulrich Drepper  <drepper@cygnus.com>
6368
6369         * elf32-i386.c: Remove leaked development code from patch
6370         1998-12-10 by Richard Henderson.
6371
6372 1998-12-10  Richard Henderson  <rth@cygnus.com>
6373
6374         * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
6375         in debug sections for symbol defined externally.
6376
6377 Thu Dec 10 10:58:38 1998  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
6378
6379         * targets.c (bfd_target_vector): Remove duplicate entry for
6380         tekhex_vec.
6381
6382 1998-12-09  Nick Clifton  <nickc@cygnus.com>
6383
6384         * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
6385         since we are using RELAs.
6386
6387 Tue Dec  8 22:15:48 1998  Ian Lance Taylor  <ian@cygnus.com>
6388
6389         SCO Open Server Release 5 core file support, from Jouke Numan
6390         <jnuman@hiscom.nl>:
6391         * sco5-core.c: New file.
6392         * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
6393         (sco5-core.lo): Define SCO5_CORE in COREFLAG.
6394         * Makefile.am: Rebuild dependencies.
6395         (OPTIONAL_BACKENDS): Add sco5-core.lo.
6396         (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
6397         * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
6398         * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
6399         * bfd-in2.h, configure, Makefile.in: Rebuild.
6400
6401 Tue Dec  8 19:38:42 1998  Mark Klein  <mklein@dis.com>
6402
6403         * config.bfd (hppa*-*-mpeix*): New target.
6404         * configure.in: Add AC_HEADER_DIRENT.
6405         (hppa*-*-mpeix*): New target.
6406         * configure.host (hppa*-*-mpeix*): New host.
6407         * hpux-core.c: Check HOST_HPPAMPEIX.  Use HAVE_DIRENT_H and
6408         friends rather than just including <sys/dir.h>.
6409         * som.h (struct som_symbol): Add hppa_priv_level and apto
6410         tc_data.  Change all users.
6411         (struct somdata): Add comp_unit field.
6412         (obj_som_compilation_unit): Define.
6413         (bfd_som_attach_compilation_unix): Declare.
6414         * som.c: Check HOST_HPPAMPEIX.
6415         (struct som_misc_symbol_info): Add new field priv_level.
6416         (som_object_setup): Add current_offset parameter.  Change all
6417         callers.
6418         (setup_sections): Likewise.
6419         (som_object_p): For EXECLIBMAGIC, read the lst header.
6420         (som_write_symbol_strings): Add compilation_unit parameter.
6421         Change all callers.
6422         (som_finish_writing): Write out compilation_unit.
6423         (som_bfd_derive_misc_symbol_info): Set priv_level.
6424         (som_build_and_write_symbol_table): Set xleast field to 3.
6425         (som_slurp_symbol_table): Set symbol priv_level.
6426         (bfd_som_attach_compilation_unit): New function.
6427         (som_bfd_ar_write_symbol_stuff): Set xleast field to 3.  Set
6428         priv_level into symbol_value.
6429         * configure, config.in: Rebuild.
6430
6431 Tue Dec  8 16:21:35 1998  Ian Lance Taylor  <ian@cygnus.com>
6432
6433         * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
6434         warning function to call _bfd_error_handler instead.
6435
6436         * libbfd.c (COERCE32): Cast through unsigned long and long to
6437         avoid bug in old version of gcc.
6438
6439         * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
6440         (elf_backend_additional_program_headers): Don't define.
6441
6442 1998-12-08  Nick Clifton  <nickc@cygnus.com>
6443
6444         * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
6445         relocations to include offset of 2 included in the insns, and the
6446         offset of the relocs within the section.
6447
6448 Wed Dec  2 15:03:59 1998  David Taylor  <taylor@texas.cygnus.com>
6449
6450         The following changes were made by David Taylor
6451         <taylor@texas.cygnus.com>, Edith Epstein
6452         <eepstein@sophia.cygnus.com>, Jim Blandy
6453         <jimb@zwingli.cygnus.com>, and Elena Zannoni
6454         <ezannoni@kwikemart.cygnus.com> as part of the project to merge in
6455         changes originally made by HP; HP did not create ChangeLog
6456         entries.
6457
6458         * aclocal.m4, configure, Makefile.in: Rebuilt using latest
6459         automake macro library.
6460
6461         * hpux-core.c (hpux_core_core_file_p): this function now
6462         understands HPUX 10.30 thread info. Yes, the thread stacks can be
6463         found in the corefile! Also, in hpux_core_core_file_p, if we
6464         encounter a section with an unknown type, don't punt.  Instead,
6465         just skip it.  Also, count the number of sections of known type
6466         that we encounter.  If we encounter at least one good one, then
6467         we'll declare that the file is a core file.  If we encounter any
6468         unknown ones but some known ones, then we'll issue a warning (but
6469         still declare it to be a core file). Also, correctly decide when a
6470         file is not a core.
6471         (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
6472         (CORE_ANON_SHMEM): define if not defined.
6473         (hpux_core_struct): add members lwpid and user_tid.
6474         (core_kernel_thread_id, core_user_thread_id): new macros.
6475         (make_bfd_asection): use bfd_alloc to allocate room for a copy of
6476         the name before storing it in the bfd.
6477         (hpux_core_core_file_p): handle threads.
6478
6479         * libhppa.h (GET_FIELD): protect against redefinition.
6480         (HPPA_WIDE): define.
6481         (GET_FIELD): define.
6482         (GET_BIT): define.
6483         (MASK): define.
6484         (CATENATE): define.
6485         (ELEVEN): define.
6486         (sign_extend): redefine.
6487         (assemble_6): define.
6488         (assemble_12): rewrite.
6489         (assemble_16): define.
6490         (assemble_16a): define.
6491         (assemble_17): rewrite.
6492         (assemble_22): define.
6493
6494 1998-12-07  Nick Clifton  <nickc@cygnus.com>
6495
6496         * elf32-fr30.c (fr30_final_link_relocate): Using signed
6497         relocations for signed values.
6498
6499 Sun Dec  6 16:30:33 1998  Ian Lance Taylor  <ian@cygnus.com>
6500
6501         * mipsbsd.c (MY(set_arch_mach)): Make static.
6502         * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
6503         bfd_mach_mips* macros rather than simple numbers.
6504
6505         COFF weak symbol support, based on patches from Mark Elbrecht
6506         <snowball3@usa.net>:
6507         * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
6508         * coffgen.c (coff_renumber_symbols): Handle weak symbols.
6509         (coff_write_alien_symbol): Likewise.
6510         * cofflink.c (coff_link_check_ar_symbols): Likewise.
6511         (coff_link_add_symbols): Likewise.
6512         (_bfd_coff_link_input_bfd): Likewise.
6513         (_bfd_coff_write_global_sym): Likewise.
6514
6515         * elf.c (copy_private_bfd_data): Always initialize the
6516         includes_phdrs field.
6517
6518         * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
6519         file defines a symbol first mentioned in an ELF file.
6520
6521         * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
6522         possible, rather than only if BFD64.
6523         * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
6524         not __GNUC__.
6525         * bfd-in2.h: Rebuild.
6526
6527         * srec.c (srec_set_section_contents): Correct test to avoid
6528         switching to 4 byte addresses after seeing a second section which
6529         requires 3 byte addresses.  From Joel Schantz
6530         <joel.schantz@argosys.boeing.com>.
6531
6532         * config.bfd (m68*-*-gnu*): New target.  From Aymeric Vincent
6533         <aymeric.vincent@emi.u-bordeaux.fr>.
6534
6535 1998-12-04  Jim Blandy  <jimb@zwingli.cygnus.com>
6536
6537         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
6538         decide whether the output file is -mrelocatable-lib,
6539         -mrelocatable, or neither.  (gdb.base/nodebug.exp)
6540
6541 1998-12-03  Nick Clifton  <nickc@cygnus.com>
6542
6543         * elf32-fr30.c: Add support for R_FR30_48 reloc.
6544         * reloc.c: Add BFD_RELOC_FR30_48 relocation.
6545         * bfd-in2.h: Regenerate.
6546         * libbfd.h: Regenerate
6547
6548 Wed Dec  2 00:58:37 1998  Ian Lance Taylor  <ian@cygnus.com>
6549
6550         * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
6551         link against a dynamic symbol with no type or size.
6552
6553 1998-12-01  Ulrich Drepper  <drepper@cygnus.com>
6554
6555         * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
6556         relocation for section which does not get loaded.
6557         (elf_i386_relocate_section) [R_386_32]: Likewise.
6558
6559 Tue Dec  1 11:33:33 1998  Jim Wilson  <wilson@cygnus.com>
6560
6561         * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
6562         reloc_count and i long instead of unsigned long.  Handle error
6563         return from bfd_canonicalize_reloc.
6564
6565 1998-12-01  Nick Clifton  <nickc@cygnus.com>
6566
6567         * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
6568         a hash table.
6569
6570 Mon Nov 30 15:28:09 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
6571
6572         * elf32-sh.c (elf/sh.h): Include.
6573         sh_reloc_type: Delete.  Changed all references to elf_sh_reloc_type.
6574         (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
6575         (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
6576         (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6577         * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
6578
6579 Fri Nov 27 17:51:38 1998  Geoff Keating  <geoffk@ozemail.com.au>
6580
6581         * elflink.h (compute_bucket_count): Don't allow minsize==0, it
6582         causes division by zero later on.
6583
6584 Thu Nov 26 11:19:35 1998  Dave Brolley  <brolley@cygnus.com>
6585
6586         * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
6587         needed.
6588
6589 1998-11-25  DJ Delorie  <dj@cygnus.com>
6590
6591         * coff-i386.c (i3coff_object_p): Remove hack.  Use new emulation
6592         hook now.
6593
6594 Tue Nov 24 10:25:27 1998  Nick Clifton  <nickc@cygnus.com>
6595
6596         * elf32-fr30.c (fr30_elf_relocate_section): Call
6597         fr30_final_link_relocate.
6598         (fr30_final_link_relocate): New function: Handle I20 and I32
6599         relocs.
6600         (fr30_elf_i32_reloc): New function: Handle I32 relocs.
6601         (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
6602         (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
6603
6604         * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
6605         chain to empty.
6606
6607         The following changes are based on a patch submitted by Gianluca
6608         Moro <glctr@abc.it>:
6609
6610         (v850_elf_perform_relocation): Only update a hi16s reloc if it has
6611         not already been updated.
6612         (find_remembered_hi16s_reloc): New parameter 'already_found'
6613         returns state of remembered hi16s reloc.
6614         (remember_hi16s_reloc): Set 'found' field to false.
6615         (hi16s_location): Add 'found' field.
6616
6617 1998-11-23  DJ Delorie  <dj@cygnus.com>
6618
6619         * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
6620         to see .DLL files as unrecognized.
6621         (i3coff_object_p): Sorry, had to hack it to not recognize these
6622         files (pei-i386) on request.
6623
6624 1998-11-23  DJ Delorie  <dj@cygnus.com>
6625
6626         * opncls.c (bfd_make_readable): need more cleanup for symbols and
6627         relents.  Call bfd_check_format to reinitialize.
6628
6629 Fri Nov 20 14:21:36 1998  Nick Clifton  <nickc@cygnus.com>
6630
6631         * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
6632         warnings.
6633
6634 Thu Nov 19 14:42:15 1998  Geoffrey Noer  <noer@cygnus.com>
6635
6636         * aclocal.m4: regenerate
6637         * configure: regenerate
6638
6639 Tue Nov 17 20:23:35 1998  Richard Henderson  <rth@cygnus.com>
6640
6641         * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
6642         * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
6643         * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
6644         respect it as an upper bound on what memory to reference.
6645         (elf_gc_smash_unused_vtentry_relocs): Likewise.
6646         (elf_gc_record_vtentry): Handle as-yet undefined vtables.  Set and
6647         update vtable_entries_size appropriately.
6648
6649 Tue Nov 17 15:28:31 1998  Nick Clifton  <nickc@cygnus.com>
6650
6651         * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
6652         reloc number.
6653
6654 Mon Nov 16 22:19:21 1998  DJ Delorie  <dj@cygnus.com>
6655
6656         * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
6657         bfds; they have no "file" so we fake it.
6658         * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
6659         * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
6660         resizing the memory buffer.
6661         * opncls.c (bfd_make_writable): New function; lets you write a
6662         bfd_create'd bfd to an in-memory buffer.
6663         (bfd_make_readable): New function; lets you read back that buffer
6664         as if it were from bfd_openr.  Used to build generated archive
6665         members (winsup's ld's dlltool)
6666
6667 Mon Nov 16 19:15:19 1998  Dave Brolley  <brolley@cygnus.com>
6668
6669         * po/bfd.pot: Regenerated.
6670
6671 Mon Nov 16 10:57:06 1998  Nick Clifton  <nickc@cygnus.com>
6672
6673         * elf32-v850.c (hi16s_location): Replaced fixed size array with
6674         linked list.
6675
6676 Sun Nov 15 20:28:25 1998  Richard Henderson  <rth@cygnus.com>
6677
6678         * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
6679         element of the gotentry list for local symbols too.
6680         (elf64_alpha_relocate_section): Unify local and global handling.
6681         Assert that gotent->use_count > 0.
6682
6683 Sat Nov 14 15:16:01 1998  Ian Lance Taylor  <ian@cygnus.com>
6684
6685         * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
6686         update for file name changes of July 2, 1998.
6687         (vms_vax_vec): New.
6688         * configure: Rebuild.
6689
6690 Thu Nov 12 19:19:54 1998  Dave Brolley  <brolley@cygnus.com>
6691
6692         * po/bfd.pot: Regenerated.
6693
6694 Tue Nov 10 16:17:06 1998  Geoffrey Noer  <noer@cygnus.com>
6695
6696         * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
6697         * aclocal.m4, configure: regenerate
6698
6699 Tue Nov 10 15:13:59 1998  Nick Clifton  <nickc@cygnus.com>
6700
6701         * elf.c (prep_headers): Add support for bfd_arch_fr30.
6702
6703 Tue Nov 10 13:37:36 1998  Felix Lee  <flee@cygnus.com>
6704
6705         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
6706         BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
6707         was cached.
6708         * aclocal.m4, configure: regenerated.
6709
6710 Tue Nov 10 14:31:01 1998  Catherine Moore  <clm@cygnus.com>
6711
6712         * elf32-d10v.c (reloc_type):  Add R_D10V_GNU_VTINHERIT and
6713         R_D10V_GNU_VTENTRY relocs.
6714         (elf_d10v_howto_table):  Likewise.
6715         (d10v_reloc_map d10v_reloc_map):  Likewise.
6716         (elf32_d10v_gc_mark_hook):  New.
6717         (elf32_d10v_gc_sweep_hook):  New.
6718         (elf32_d10v_check_relocs):  New.
6719         (elf32_d10v_relocate_section):  New.
6720         (elf_backend_relocate_section):  Define.
6721         (elf_backend_can_gc_sections):  Define.
6722
6723 Sat Nov  7 18:07:51 1998  Peter Schauer  <peter.schauer@regent.e-technik.tu-muenchen.de>
6724
6725         * Makefile.am (BFD32_BACKENDS): Move vms files here...
6726         (BFD64_BACKENDS): ...from here.
6727         (BFD32_BACKENDS_CFILES): Move vms files here...
6728         (BFD64_BACKENDS_CFILES): ...from here.
6729         * Makefile.in: Rebuild.
6730
6731 Wed Nov  4 15:58:48 1998  Nick Clifton  <nickc@cygnus.com>
6732
6733         * Makefile.am: Add FR30 target.
6734         * Makefile.in: Add FR30 target.
6735         * archures.c: Add support for FR30.
6736         * config.bfd: Add support for FR30.
6737         * configure.in: Add support for FR30.
6738         * reloc.c: Add support for FR30 relocations.
6739         * targets.c: Add support for FR30 relocations.
6740         * bfd-in2.h: Regenerate.
6741         * configure: Regenerate.
6742         * libbfd.h:  Regenerate.
6743         * cpu-fr30.c: New file.
6744         * elf32-fr30.c: New file.
6745
6746 Mon Nov  2 14:59:33 1998  Geoffrey Noer  <noer@cygnus.com>
6747
6748         * configure.in: detect cygwin* instead of cygwin32*
6749         * configure: regenerate
6750
6751 Sun Nov  1 19:32:28 1998  Jeffrey A Law  (law@cygnus.com)
6752
6753         * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
6754         use bfd_malloc and free instead and check return value from bfd_malloc.
6755
6756 Sun Nov  1 16:20:35 1998  Ian Lance Taylor  <ian@cygnus.com>
6757
6758         * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
6759         * libbfd.h: Rebuild.
6760
6761         * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
6762         (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
6763         (MIPS_TEXT_DYNSYM_SECN): Likewise.
6764         (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
6765         section.
6766         (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
6767         field.
6768         (mips_elf_link_hash_table_create): Don't initialize
6769         dynsym_sec_strindex.
6770         (mips_elf_gc_mark_hook): Add default case to avoid warning.
6771         (mips_elf_size_dynamic_sections): Generate a section symbol for
6772         every output section.
6773         (mips_elf_finish_dynamic_sections): Count all sections for
6774         DT_MIPS_UNREFEXTNO.
6775         (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
6776         output sections.
6777
6778 Sun Nov  1 12:46:53 1998  Geoff Keating  <geoffk@ozemail.com.au>
6779
6780         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
6781         for later PLT entries in large PLTs.
6782         (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
6783
6784 Sat Oct 31 20:10:09 1998  Jeffrey A Law  (law@cygnus.com)
6785
6786         * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
6787
6788 1998-10-26 15:58  Ulrich Drepper  <drepper@cygnus.com>
6789
6790         * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
6791         * elflink.h (elf_collect_hash_codes): New function.  This function is
6792         called for each exported symbol and we compute the ELF hash value for
6793         it.
6794         (compute_bucket_value): New function.  It is called from
6795         size_dynamic_sections to determine the hash table size.  When we are
6796         optimizing a better, but slower, algorithm is used.
6797         (size_dynamic_sections): Call compute_bucket_value.
6798
6799         * elf.c (bfd_elf_hash): Optimize the hash function a bit.
6800
6801 Mon Oct 19 20:03:21 1998  Catherine Moore  <clm@cygnus.com>
6802
6803         * elf32-sh.c:  Add HOWTO entries for R_SH_GNU_VTINHERIT and
6804         R_SH_GNU_VTENTRY.
6805         (sh_elf_gc_mark_hook):  New.
6806         (sh_elf_gc_sweep_hook):  New.
6807         (sh_elf_check_relocs):  New.
6808         (elf_backend_can_gc_sections):  Define.
6809
6810 Mon Oct 19 16:57:05 1998  Felix Lee  <flee@cygnus.com>
6811
6812         * acinclude.m4: undo previous gettext change
6813         * aclocal.m4: rebuild with right version of aclocal.
6814
6815 Mon Oct 19 01:47:21 1998  Felix Lee  <flee@cygnus.com>
6816
6817         * acinclude.m4, aclocal.m4: move gettext-related fragments from
6818         aclocal.m4 to acinclude.m4, so they don't get lost.
6819
6820         * elfcore.h: rewrite for better corefile support.
6821         * elf.c (elfcore_*): new functions.
6822         * elf-bfd.h (elf_obj_tdata): new structure members.
6823         * acconfig.h, acinclude.m4, configure.in: add feature-tests for
6824         flavor of procfs.
6825         * aclocal.m4, config.in, configure, Makefile.in: regenerated.
6826
6827 Fri Oct 16 14:07:45 1998  Catherine Moore  <clm@cygnus.com>
6828
6829         * elf32-m32r.c:  Add HOWTO entries for R_M32R_GNU_VTINHERIT
6830         and R_M32R_GNU_VTENTRY.
6831         (elf_backend_can_gc_sections):  Define.
6832         (m32r_elf_check_relocs):  New.
6833         (m32r_elf_gc_mark_hook):  New.
6834         (m32r_elf_gc_sweep_hook):  New.
6835         (m32r_elf_relocate_section):  Handle VT relocs.
6836
6837 Mon Oct 12 14:18:40 1998  Nick Clifton  <nickc@cygnus.com>
6838
6839         * coff-arm.c (arm_relocate_section): Remove redundant test.
6840
6841         * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
6842         cleat that the 'bitsize' field is the size of the bitfield AFTER
6843         relocation not before.
6844
6845         * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
6846
6847         * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
6848         relocs.
6849
6850 Tue Oct  6 09:20:44 1998  Catherine Moore  <clm@cygnus.com>
6851
6852         * elf32-sparc.c:  Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
6853         R_SPARC_GNU_VTENTRY.
6854         (elf32_sparc_check_relocs):  Handle them.
6855         (elf32_sparc_reloc_type_lookup):  Likewise.
6856         (elf32_sparc_relocate_section):  Likewise.
6857         (elf32_sparc_gc_mark_hook):  New.
6858         (elf32_sparc_gc_sweep_hook):  New.
6859
6860 Mon Oct  5 14:55:30 1998  Jeffrey A Law  (law@cygnus.com)
6861
6862         * som.c (som_finish_writing): Perform some sanity checks when
6863         writing an executable or shared library.
6864
6865 Mon Oct  5 12:02:31 1998  Gavin Romig-Koch  <gavin@cygnus.com>
6866
6867         * dwarf1.c : New file.  Adds _bfd_dwarf1_find_nearest_line.
6868         * configure.in (elf): Add dwarf1.lo.
6869         * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
6870         * elf.c (_bfd_elf_find_nearest_line): Add call to
6871         _bfd_dwarf1_find_nearest_line.
6872         * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
6873         Add call to _bfd_dwarf1_find_nearest_line.
6874         * configure: Rebuilt.
6875
6876 Mon Oct  5 10:06:22 1998  Catherine Moore  <clm@cygnus.com>
6877
6878         * elflink.h (elf_gc_sections):  Do not allow garbage
6879         collection if dynamic sections have been created.
6880
6881 Mon Oct  5 09:07:37 1998  Catherine Moore  <clm@cygnus.com>
6882
6883         * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
6884         R_V850_GNU_VTENTRY.
6885         (v850_elf_check_relocs):  Handle VTINHERIT and VTENTRY relocs.
6886         (v850_elf_perform_relocation):  Likewise.
6887         (v850_elf_final_link_relocate):  Likewise.
6888         (v850_elf_relocate_section):  Likewise.
6889         (v850_elf_gc_sweep_hook):  New routine.
6890         (v850_elf_gc_mark_hook):  New routine.
6891         (elf_backend_can_gc_sections):  Define.
6892
6893 Mon Oct  5 09:04:25 1998  Catherine Moore  <clm@cygnus.com>
6894
6895         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Don't assume
6896         that dynobj exists.
6897
6898 Sun Oct  4 23:29:34 1998  David Edelsohn  <edelsohn@mhpcc.edu>
6899
6900         * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
6901         Declare size as bfd_size_type.
6902         (rs6000coff_get_section_contents): Declare count as bfd_size_type.
6903
6904 Sun Oct  4 20:38:29 1998  Jeffrey A Law  (law@cygnus.com)
6905
6906         * cpu-hppa.c (bfd_hppa20_arch): Define.  Link it into the bfd_hppa_arch
6907         structure.
6908         * som.c (CPU_PA_RISC2_0): Define.
6909         (_PA_RISC2_0_ID): Likewise.
6910         (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
6911
6912 Sun Oct  4 21:19:09 1998  Ian Lance Taylor  <ian@cygnus.com>
6913
6914         * elflink.h (elf_link_add_object_symbols): When a versioned symbol
6915         has a base which is already defined, only add the referenced
6916         symbol to the dynamic symbol table if it is defined or referenced
6917         by a regular file.
6918
6919         * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
6920         correctly.
6921
6922 1998-09-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6923
6924         * elflink.h (elf_link_add_object_symbols): Undo last change.
6925
6926 Wed Sep 23 16:09:31 1998  Richard Henderson  <rth@cygnus.com>
6927
6928         * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
6929         symbol for the indirect alias to a versioned symbol.
6930
6931 Mon Sep 21 12:15:22 1998  Catherine Moore  <clm@cygnus.com>
6932
6933         * elf32-i386.c (elf32_i386_vtinherit_howto): New.
6934         (elf32_i386_vtentry_howto): New.
6935         (elf_i386_reloc_type_lookup):  Return elf32_i386_vtentry_howto
6936         or elf32_i386_vtinherit_howto  on lookup.
6937
6938 Sun Sep 20 00:48:07 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6939
6940         * elf32-m68k.c: Include "elf/m68k.h".  Remove definition of enum
6941         reloc_type.  Rename R_68K__max to R_68K_max.
6942         (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
6943         reloc.
6944
6945 Sun Sep 20 00:09:25 1998  Chris Torek  <torek@bsdi.com>
6946
6947         * libbfd.c (bfd_getb32): Rewrite expression to get better code.
6948         (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6949
6950         * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
6951         after.
6952
6953 Sat Sep 19 22:42:23 1998  Doug Rabson  <dfr@nlsystems.com>
6954
6955         * elflink.h (elf_link_add_object_symbols): Ensure that the warning
6956         message has a null byte terminator.
6957
6958 Fri Sep 18 14:35:29 1998  Nick Clifton  <nickc@cygnus.com>
6959
6960         * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
6961         word subject to R_V850_32 relocation.
6962
6963 Thu Sep 17 17:20:36 1998  Nick Clifton  <nickc@cygnus.com>
6964
6965         * dwarf2.c: Add comment describing problem computing line numbers
6966         for undefined symbols at link time.
6967
6968 Thu Sep 17 16:03:28 1998  Richard Henderson  <rth@cygnus.com>
6969
6970         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
6971         transform a defweak into a plt entry.
6972         (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
6973         plt entry references to receive a RELATIVE reloc.
6974         (elf64_alpha_finish_dynamic_symbol): Fill them in.
6975         (elf64_alpha_relocate_section): Assert we don't overrun
6976         the allocated relocation space.
6977
6978 Wed Sep 16 18:03:13 1998  Nick Clifton  <nickc@cygnus.com>
6979
6980         * elf.c (swap_out_syms): Always treat section symbols as
6981         special, even if they are attached to a common section.
6982
6983 Wed Sep 16 10:34:13 1998  Nick Clifton  <nickc@cygnus.com>
6984
6985         * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
6986         sections with v850 common section attributes into named v850
6987         common sections.
6988         (v850_elf_add_symbol_hook): Move symbols in sections with v850
6989         common section attributes into named v850 common sections.
6990
6991 Wed Sep 16 11:26:49 CDT 1998  Catherine Moore  <clm@cygnus.com>
6992
6993         * elf32-arm.c (elf32_arm_gc_mark_hook):  Remove print
6994         statement.
6995
6996 1998-09-15  Geoff Keating  <geoffk@ozemail.com.au>
6997
6998         * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
6999         part of Vladimir's change of 1998-08-19.  Make a R_PPC_SDAREL16
7000         reloc to the wrong section a warning, not an error.  .dynsbss
7001         is not an output section, so there is no need to check for it.
7002
7003 Tue Sep 15 12:40:05 1998  Catherine Moore  <clm@cygnus.com>
7004
7005         * elf-bfd.h:  Add argument to elf_backend_get_symbol_type.
7006
7007 Tue Sep 15 08:34:40 1998  Catherine Moore  <clm@cygnus.com>
7008
7009         * elf.c (swap_out_syms):  Pass type to elf_backend_get_symbol_type.
7010         * elf32-arm.c:  Add HOWTO entries for R_ARM_GNU_VTINHERIT and
7011         R_ARM_GNU_VTENTRY.
7012         (elf32_arm_gc_mark_hook): New.
7013         (elf32_arm_gc_sweep_hook): New.
7014         (elf32_arm_check_relocs): New.
7015         (elf32_arm_final_link_relocate):  Handle VTINHERIT and VTENTRY
7016         relocations.
7017         (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
7018         relocations.
7019
7020 1998-09-10  Geoff Keating  <geoffk@ozemail.com.au>
7021
7022         * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
7023         assume there is no PLT or GOT.
7024
7025 Wed Sep  9 14:24:12 1998  Nick Clifton  <nickc@cygnus.com>
7026
7027         * elf32-arm.c (elf32_arm_find_nearest_line): New function:  just
7028         like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
7029         also accepted as a function symbol type.
7030
7031 Mon Sep  7 13:24:03 1998  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
7032
7033         * rs6000-core.c (_LONG_LONG):  Define for AIX 4.x only.
7034
7035 Sat Sep  5 20:40:18 1998  Ian Lance Taylor  <ian@cygnus.com>
7036
7037         * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
7038         match definition of _bfd_gc_sections field.
7039         * libbfd.h: Rebuild.
7040
7041 Fri Sep  4 13:54:23 1998  David Miller  <davem@dm.cobaltmicro.com>
7042
7043         * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
7044         the addend of a dynamic relocation referencing a section.
7045         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7046         (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
7047
7048 Thu Sep  3 17:28:50 1998  Richard Henderson  <rth@cygnus.com>
7049
7050         * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
7051         bed has a size_dynamic_sections routine before trying to use it.
7052
7053 Mon Aug 31 14:49:22 1998  Richard Henderson  <rth@cygnus.com>
7054
7055         * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
7056         _bfd_elf_rel_vtable_reloc_fn.
7057
7058 Mon Aug 31 10:23:40 1998  Catherine Moore  <clm@cygnus.com>
7059
7060         * Makefile.am:  Add elf32-arm.c.
7061         * Makefile.in:  Rebuild.
7062         * elf-bfd.h:  Add elf_backend_get_symbol_type.
7063         * elf.c (swap_out_syms):  If defined, call
7064         elf_backend_get_symbol_type.
7065         * elf32-arm.c: Define elf_backend_get_symbol_type.
7066         (elf32_arm_get_symbol-type):  New routine.
7067         (record_thumb_to_arm_glue):  Change to use STT_ARM_TFUNC.
7068         (bfd_elf32_arm_process_before_allocation):  Change to
7069         check for STT_ARM_TFUNC.
7070         (elf32_arm_final_link_relocate):  Likewise.
7071         * elfxx-target.h:  Add elf_backend_get_symbol_type.
7072
7073 Fri Aug 28 19:44:07 1998  Richard Henderson  <rth@cygnus.com>
7074
7075         * archures.c (bfd_mach_alpha_ev[456]): New.
7076         * cpu-alpha.c: Rework to match these types.
7077         * bfd-in2.h: Rebuild.
7078
7079 Fri Aug 28 19:38:53 1998  Richard Henderson  <rth@cygnus.com>
7080
7081         * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
7082         * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
7083
7084         * elf32-i386.c (elf_howto_table): Add vtable relocs.
7085         (elf_i386_reloc_type_lookup): Recognize them.
7086         (elf_i386_check_relocs): Pass them off to generic code.
7087         (elf_i386_relocate_section): Ignore them.
7088         (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
7089         (elf_backend_can_gc_sections): True.
7090
7091 Thu Aug 20 15:03:45 1998  Nick Clifton  <nickc@cygnus.com>
7092
7093         * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
7094         before looking at owner field.
7095         (elf32_arm_to_thumb_stub): Ditto.
7096         (elf32_arm_relocate_section): Compute name before calling
7097         elf32_arm_final_link_relocate().
7098
7099 Thu Aug 20 11:30:17 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
7100
7101         * elf.c: comment and formatting cleanups.
7102         * elfcore.h: ditto.
7103
7104 Wed Aug 19 15:43:26 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
7105
7106         * elfcode.h (elf_object_p): Reject files of header type ET_CORE
7107         (core files are treated differently than object files).
7108         * elf-bfd.h (_bfd_elf_write_corefile_contents,
7109         bfd_elf_mkcorefile): declare.
7110         * elfxx-target.h (_bfd_elf_write_corefile_contents,
7111         bfd_elf_mkcorefile): add to bfd_target vector.
7112         * elfcore.h (elf_core_file_p): save the program header table,
7113         and set the bfd architecture from the elf file header.
7114         * elf.c (bfd_elf_mkcorefile): new function.
7115         (_bfd_elf_write_corefile_contents): new function.
7116         (assign_file_positions_for_segments): add cases for handling
7117         PT_NOTE segments.  (assign_file_positions_except_relocs):
7118         core files should be handled the same as exec files.
7119         (prep_headers): identify core files as type ET_CORE.
7120         (copy_private_bfd_data): identify the sections belonging to
7121         the PT_NOTE segment.
7122
7123         * elf32-sparc.c (elf32_sparc_final_write_processing):
7124         add break statement to default case.
7125
7126 1998-08-19  Vladimir N. Makarov  <vmakarov@cygnus.com>
7127
7128         * elf32-ppc.c (ppc_elf_relocate_section): Check that output
7129         section (not input) will be in sections ".sbss", ".sbss2",
7130         ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
7131         R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA.  In all these cases also ignore
7132         output_offset for correct evaluation of addend.
7133
7134 Tue Aug 18 11:48:12 1998  Catherine Moore  <clm@cygnus.com>
7135
7136         * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
7137         elf32_arm_allocate_interworking_sections and
7138         elf32_arm_process_before_allocation.
7139
7140 Tue Aug 18 11:46:00 1998  Nick Clifton  <nickc@cygnus.com>
7141
7142         * bfd-in.h: Ammend prototype for
7143         elf32_arm_process_before_allocation to remove surplus third
7144         argument.
7145
7146         * bfd-in2.h: Regenerate.
7147
7148 Sat Aug 15 20:55:08 1998  Richard Henderson  <rth@cygnus.com>
7149
7150         * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
7151
7152 Fri Aug 14 09:12:28 1998  Stan Cox  <scox@cygnus.com>
7153
7154         * aoutx.h (aout_link_input_section_ext): Use the relocation already
7155         calculated for RELOC_SPARC_REV32 case.
7156
7157 Thu Aug 13 14:02:02 1998  Catherine Moore  <clm@cygnus.com>
7158
7159         * bfd-in.h:  Add prototypes for elf32_arm_get_bfd_for_interworking,
7160         elf32_arm_allocate_interworking_sections and
7161         elf32_arm_process_before_allocation.
7162         * bfd-in2.h:  Regenerated.
7163         * elf32-arm.c Define elf32_arm_link_hash_table.
7164         (insert_thumb_branch): New routine.
7165         (find_thumb_glue): New routine.
7166         (find_arm_glue): New routine.
7167         (record_arm_to_thumb_glue): New routine.
7168         (record_thumb_to_arm_glue): New routine.
7169         (elf32_arm_link_hash_table_create): New routine.
7170         (elf32_arm_get_bfd_for_interworking): New routine.
7171         (elf32_arm_allocate_interworking_sections) New routine.
7172         (elf32_arm_process_before_allocation) New routine.
7173         (elf32_thumb_to_arm_stub): New routine.
7174         (elf32_arm_to_thumb_stub): New routine.
7175         (elf32_print_private_bfd_data): Fix typo.
7176         (elf32_arm_final_link_relocate):  Add argument sym_sec.
7177         Check for branches to thumb symbols in case R_ARM_PC24.
7178         Check for branches to arm symbols in case R_ARM_THM_PC22.
7179         (elf32_arm_relocate_section):  Pass symbol section to
7180         elf32_arm_final_link_relocate.
7181
7182 Wed Aug 12 19:00:39 1998  Geoff Keating  <geoffk@ozemail.com.au>
7183
7184         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
7185         entries unless the symbol is defined in the executable; in
7186         particular, undefined weak symbols get a PLT entry.
7187
7188 Wed Aug 12 14:48:33 1998  Ian Lance Taylor  <ian@cygnus.com>
7189
7190         * libaout.h: Remove nested comment to avoid warning.
7191
7192 Wed Aug 12 08:10:11 1998 Catherine Moore  <clm@cygnus.com>
7193
7194         * elf32-arm.c (elf32_arm_final_link_relocate):  Rework
7195         R_ARM_PC24 relocation.
7196
7197 Tue Aug 11 14:42:26 1998  Catherine Moore  <clm@cygnus.com>
7198
7199         * elf32-arm.c (elf32_arm_final_link_relocate):  Remove unused
7200         argument is_local.  Add argument sym_flags.  Check sym_flags
7201         in R_ARM_ABS32 case.  Include addend for R_ARM_THM_PC22 case.
7202         (elf32_arm_relocate_section):  Don't pass local sym and pass
7203         sym_flags to elf32_arm_final_link_relocate.
7204
7205 Mon Aug 10 20:38:39 1998  Richard Henderson  <rth@cygnus.com>
7206
7207         * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
7208         to not count too few relocs for dynamicly linked executables.
7209
7210 Mon Aug 10 15:35:34 1998  Richard Henderson  <rth@cygnus.com>
7211
7212         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
7213         symbols without a dynamic index dynamic.  Consider all weak
7214         symbols dynamic.
7215         (elf64_alpha_strip_section_from_output): Don't assume 1-1
7216         correspondance between input and output sections.
7217
7218 Mon Aug 10 15:31:39 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7219
7220         * elflink.h (elf_gc_common_finalize_got_offsets): For backends
7221         that use a .got.plt section start the got offset at zero.
7222
7223 Mon Aug 10 17:31:21 1998  Ian Lance Taylor  <ian@cygnus.com>
7224
7225         * ieee.c (ieee_write_processor): Correct the processor ID written
7226         out for bfd_arch_m68k, accommodating change of March 25.
7227
7228 Sun Aug  9 20:55:44 1998  Catherine Moore  <clm@cygnus.com>
7229
7230         * elf32-arm.c (elf32_arm_final_link_relocate):  Rework
7231         R_ARM_THM_RPC22 relocations.
7232
7233 Sat Aug  8 15:15:30 1998  Richard Henderson  <rth@cygnus.com>
7234
7235         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
7236         are always dynamic.
7237         (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
7238         .got relocs in -Bsymbolic shared objects.
7239
7240 Wed Aug  5 15:48:08 1998  Nick Clifton  <nickc@cygnus.com>
7241
7242         * elf32-arm.c: Add private flags to ELF header.
7243         (elf32_arm_print_private_bfd_data): New Function.
7244         (elf32_arm_set_private_flags): New Function.
7245         (elf32_arm_copy_private_flags): New Function.
7246         (elf32_arm_merge_private_bfd_data): New Function.
7247
7248 Mon Aug  3 17:10:15 1998  Ian Lance Taylor  <ian@cygnus.com>
7249
7250         * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
7251         a local symbol.
7252         (elf32_sparc_relocate_section): Likewise.
7253
7254 Sun Aug  2 03:19:23 1998  Richard Henderson  <rth@cygnus.com>
7255
7256         * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL.  Create the
7257         .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
7258         (ppc_elf_relocate_section): Pull sgot and splt search to the start
7259         of the function.  Recognize no .plt as static linking.
7260
7261 1998-08-01  Ulrich Drepper  <drepper@cygnus.com>
7262
7263         * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
7264         ".liblist" string through gettext.
7265
7266 Fri Jul 31 16:38:14 1998  Catherine Moore  <clm@cygnus.com>
7267
7268         * Makefile.am: Add support for elf32-arm.lo.
7269         * Makefile.in: Rebuild.
7270         * config.bfd (arm-*-elf):  Define targ_defvec and targ_selvecs.
7271         (thumb-*-elf): Define targ_defvec and targ_selvecs.
7272         * configure.in:  Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
7273         * configure: Regenerate.
7274         * elf.c: (prep_headers):  Support arch_type of EM_ARM.
7275         * targets.c:  Support new targets bfd_elf32_bigarm_vec and
7276         bfd_target bfd_elf32_littlearm_vec.
7277         * elf32-arm.c:  New file.
7278
7279 Tue Jun 28 19:05:28 1998  Stan Cox  <scox@cygnus.com>
7280
7281         * libaout.h (M_SPARCLITE_LE): New machine.
7282         * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
7283         * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
7284         (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
7285         * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
7286         (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
7287         (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
7288         * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7289         elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
7290         * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
7291         be BFD_RELOC_SPARC_REV32.
7292         * reloc.c: Ditto.
7293         * config.bfd (sparc86x-*-aout): New
7294
7295 Fri Jul 24 13:54:19 1998  Nick Clifton  <nickc@cygnus.com>
7296
7297         * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
7298         actually mapping the output sections.
7299
7300 Fri Jul 24 11:24:29 1998  Jeffrey A Law  (law@cygnus.com)
7301
7302
7303         * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
7304         (mn10300_elf_reloc_map): Similarly.
7305         (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
7306
7307 Fri Jul 24 12:36:04 1998  Ian Lance Taylor  <ian@cygnus.com>
7308
7309         * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
7310         Irix 6.
7311         (bfd_elf32_bfd_reloc_type_lookup): Add default case.
7312         * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
7313         elf_mips_reloc_type defined in elf/mips.h.
7314
7315 1998-07-24  Ulrich Drepper  <drepper@cygnus.com>
7316
7317         * elf64-mips.c: Remove reloc_type definition completely.  It's now
7318         in elf/mips.h.
7319
7320 Thu Jul 23 13:33:19 1998  Doug Evans  <devans@canuck.cygnus.com>
7321
7322         * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
7323         as they are defined in elf/mips.h now.
7324
7325 Thu Jul 23 11:29:43 1998  Jeffrey A Law  (law@cygnus.com)
7326
7327
7328         * Re-add lost change:
7329         * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
7330         "movm_stack_size".
7331         (mn10300_elf_relax_section): Include stack space for register saves
7332         in the imm8 field of a "call" instruction.
7333         (compute_function_info): Determine how much stack is allocated by
7334         the movm instruction.  Fix typo.
7335         (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
7336
7337 Thu Jul 23 11:38:05 1998  Ian Lance Taylor  <ian@cygnus.com>
7338
7339         * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
7340         * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
7341
7342 1998-07-22  Ulrich Drepper  <drepper@cygnus.com>
7343
7344         * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
7345
7346 Wed Jul 22 16:27:18 1998  Nick Clifton  <nickc@cygnus.com>
7347
7348         * elf32-hppa.h: Let ELF header define the enum containing the
7349         external reloc numbers.
7350         * elf32-i386.h: Likewise.
7351
7352 1998-07-22 14:57  Ulrich Drepper  <drepper@cygnus.com>
7353
7354         * elf-m10300.c: Let ELF header now define the macros to get the enum.
7355         * elf32-mips.c: Likewise.
7356         * elf32-ppc.c: Likewise.
7357
7358 Wed Jul 22 13:53:52 1998  Nick Clifton  <nickc@cygnus.com>
7359
7360         * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
7361         bfd_coff_set_symbol_class(), in order to avoid K&R compatability
7362         prblems.
7363         * bfd-in.h: Regenerate.
7364         * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
7365         parameter to 'unsigned int' to avoid K&R compatability problems.
7366
7367 Wed Jul 22 16:43:24 1998  Ian Lance Taylor  <ian@cygnus.com>
7368
7369         * ieee.c (ieee_find_nearest_line): Change filename_ptr and
7370         functionname_ptr to be const.  Change line_ptr to be unsigned.
7371
7372         * coffcode.h (coff_link_output_has_begun): Simplify handling when
7373         macro is not defined.  Change second parameter from bfd_link_info
7374         to coff_final_link_info.  Add prototype.
7375         (coff_final_link_postscript): Simplify handling when macro is not
7376         defined.  Add prototype.
7377
7378 1998-07-22 13:08  Ulrich Drepper  <drepper@cygnus.com>
7379
7380         * elf-mn10300.c: Before include system specific ELF header define
7381         START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
7382         * elf32-mips.c: Likewise.
7383         * elf32-ppc.c: Likewise.
7384
7385 Wed Jul 22 13:46:51 1998  Ian Lance Taylor  <ian@cygnus.com>
7386
7387         * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
7388         temporary patch over to elf64-mips.c as well.
7389
7390 1998-07-21  Ulrich Drepper  <drepper@cygnus.com>
7391
7392         * elf32-mips.c (reloc_type): Temporarily disable definition of
7393         standard relocation since they are now defined in elf/mips.h.
7394
7395 Tue Jul 21 09:47:00 1998  Catherine Moore  <clm@cygnus.com>
7396
7397         * elf-m10200.c (mn10200_elf_final_link_relocate):
7398         Modify range test for case R_MN10200_8.
7399
7400         * elf-m10300.c (mn10300_elf_final_link_relocate):
7401         Modify range test for case R_MN10300_8.
7402
7403 Mon Jul 20 18:50:54 1998  Richard Henderson  <rth@cygnus.com>
7404
7405         * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
7406         * elf32-i386.c (elf_backend_got_header_size): Define.
7407         (elf_backend_plt_header_size): Define.
7408         * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
7409         * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
7410         * elfxx-target.h: Provide a default of zero.
7411         * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
7412         * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
7413
7414         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
7415         entry from an executable, even if the plt refcount goes to 0.
7416
7417 Mon Jul 20 12:47:26 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7418
7419         * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
7420         directory name at the line number.
7421
7422         * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
7423         with an unspecified type.
7424
7425 Wed Jul 15 11:20:01 1998  Ian Lance Taylor  <ian@cygnus.com>
7426
7427         * sunos.c: Add undef of valid to avoid problem on SunOS.
7428
7429 Tue Jul 14 15:30:59 1998  Richard Henderson  <rth@cygnus.com>
7430
7431         * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
7432
7433 Tue Jul 14 11:22:21 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7434
7435         * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
7436         R_68K_PCxx and R_68K_xx relocations.  Make sure that
7437         ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
7438         (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
7439         R_68K_xx relocations.
7440         (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
7441         that has no plt entry.
7442         (elf_m68k_relocate_section): Ignore the plt offset in a static
7443         link.
7444         * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
7445         an ignored symbol.
7446         (elf_gc_common_finalize_got_offsets): Set the got offsets also in
7447         a static link.
7448
7449         * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
7450         types.
7451         (howto_table, reloc_map): Add entries for them.
7452         (elf_m68k_check_relocs): Handle them.  Implement reference
7453         counting for got and plt entries.
7454         (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
7455         (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
7456         symbols.
7457         (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
7458         (elf_m68k_relocate_section): Handle the new reloc types.
7459         (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
7460         elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
7461         * elflink.h (elf_link_add_object_symbols): When creating an
7462         indirect reference for symbol versioning also copy the plt
7463         offset.
7464         (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
7465         flag also reset the plt offset.
7466         (elf_link_assign_sym_version): Likewise.
7467         (elf_gc_common_finalize_got_offsets): Increment the got offset by
7468         the size of the entry in bytes.
7469         (elf_gc_allocate_got_offsets): Likewise.
7470
7471 Tue Jul 14 11:18:14 1998  Ian Lance Taylor  <ian@cygnus.com>
7472
7473         * elflink.h (elf_gc_sections): Return true rather than falling off
7474         the bottom.
7475
7476         * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
7477         xmalloc.
7478
7479 Mon Jul 13 11:06:31 1998  Nick Clifton  <nickc@cygnus.com>
7480
7481         * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
7482         comment describing when it should be enabled.
7483         Changed definition of USER_LABEL_PREFIX to "", to fall into line
7484         with GCC sources.
7485
7486 Mon Jul 13 13:06:54 1998  Ian Lance Taylor  <ian@cygnus.com>
7487
7488         * ieee.c (ieee_slurp_external_symbols): Handle call optimization
7489         information ATN records.
7490
7491 Fri Jul 10 16:31:06 1998  Ian Lance Taylor  <ian@cygnus.com>
7492
7493         * ieee.c (ieee_slurp_external_symbols): Select an appropriate
7494         section for an absolute symbol in a fully linked file.  Based on
7495         patch from Christian Holland <CHolland@de.lucent.com>.
7496
7497 Wed Jul  8 11:29:56 1998  Manfred Hollstein  <manfred@s-direktnet.de>
7498
7499         * coff-m88k.c (m88k_special_reloc): Don't lose the information
7500         that a symbol is undefined.
7501
7502 Tue Jul  7 21:47:02 1998  Jeffrey A Law  (law@cygnus.com)
7503
7504         * som.c (som_bfd_gc_sections): Define.
7505
7506 Mon Jul  6 11:35:50 1998  Nick Clifton  <nickc@cygnus.com>
7507
7508         * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
7509         overflows in ARM_26D patches, since they have already been
7510         implmented.  Patch submitted by Dr. R.J. Black <rjb@dcs.gla.ac.uk>
7511
7512 Sat Jul  4 12:25:36 1998  Ian Lance Taylor  <ian@cygnus.com>
7513
7514         * coffcode.h (coff_write_object_contents): If we have any long
7515         section names, call coff_write_symbols even if there are no
7516         symbols.
7517
7518 Fri Jul  3 13:11:35 1998  Ian Lance Taylor  <ian@cygnus.com>
7519
7520         * elf.c (copy_private_bfd_data): Only set phdr_included once for a
7521         PT_LOAD segment, rather than only setting it once for the entire
7522         file.
7523
7524         * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
7525         rather than ignoring every phdr with a p_paddr of 0, ignore all
7526         the phdrs if they all have a p_paddr of 0.
7527
7528         * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
7529         section was discarded from the link.
7530
7531 Fri Jul  3 14:39:05 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
7532
7533         * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
7534
7535 Fri Jul  3 14:35:48 1998  J"orn Rennecke <amylaar@cygnus.co.uk>
7536
7537         * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
7538         floating point operations.
7539
7540 Thu Jul  2 18:37:25 1998  Ian Lance Taylor  <ian@cygnus.com>
7541
7542         * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
7543         function symbols.
7544
7545 Thu Jul  2 14:59:42 1998  Klaus Kaempf  <kkaempf@rmi.de>
7546
7547         Merge of vax/vms (read-only) support
7548         * configure.com: Support Vax target.
7549         * makefile.vms: Support Vax target.
7550         * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
7551         * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
7552         support.
7553         * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
7554         support.
7555         * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
7556         support.
7557         * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
7558         support.
7559         * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
7560         support.
7561         * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
7562         * targets.c (bfd_target_ovax_flavour): New flavour.
7563         (vms_alpha_vec): Renamed from evax_alpha_vec.
7564         (vms_vax_vec): New.
7565         (target_vector): Update accordingly.
7566         * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
7567         evax_alpha_vec.
7568         (vax*-*-*vms*): New target.
7569         * Makefile.am: Update for renamed files.  Rebuild dependencies.
7570         * bfd-in2.h: Rebuild.
7571         * configure.in, Makefile.in, aclocal.m4: Rebuild.
7572
7573 Thu Jul  2 13:31:55 1998  Ian Lance Taylor  <ian@cygnus.com>
7574
7575         Based on patch from Matt Semersky <matts@scd.hp.com>:
7576         * linker.c (_bfd_generic_final_link): Force a trailing NULL
7577         pointer on abfd->outsymbols.
7578         (generic_add_output_symbol): Handle NULL sym parameter.
7579
7580 Wed Jul  1 17:05:53 1998  Nick Clifton  <nickc@cygnus.com>
7581
7582         * elf.c (copy_private_bfd_data): Add support for changing VMA or
7583         LMA of sections.
7584
7585 Wed Jul  1 16:58:50 1998  Ian Lance Taylor  <ian@cygnus.com>
7586
7587         * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
7588         when handling 32 bit immediate relocs.
7589         * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
7590
7591 Tue Jun 30 09:55:03 1998  Jeffrey A Law  (law@cygnus.com)
7592
7593         * section.c (STD_SECTION): Account for recently added gc_mark
7594         field in struct asection.
7595
7596         * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
7597         (bfd_elf32_bfd_merge_private_bfd_data): Define.
7598
7599 Thu Jun 25 18:31:41 1998  Richard Henderson  <rth@cygnus.com>
7600
7601         ELF Section-level Garbage Collection:
7602         * bfd.c (bfd_gc_sections): New.
7603         * aout-adobe.c: Hook to default implementation.
7604         * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
7605         * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
7606         * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
7607         * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
7608         * tekhex.c, versados.c: Likewise.
7609         * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
7610         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
7611
7612         * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
7613         (bfd_generic_gc_sections): New.
7614         * section.c (SEC_KEEP): New.
7615         (asection): Add gc_mark member.
7616
7617         * elfcode.h (elf_gc*): New name remappings.
7618         * elflink.h (elf_link_input_bfd): Don't set contents on stabs
7619         sections to be excluded.
7620         (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
7621         (elf_gc_propogate_vtable_entries_used): New.
7622         (elf_gc_smash_unused_vtentry_relocs): New.
7623         (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
7624         (elf_gc_common_finalize_got_offsets): New.
7625         (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
7626         * elfxx-target.h: Add and default gc hooks.
7627
7628         * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
7629         for unions.
7630         (struct elf_obj_tdata): Likewise for local_got_offsets.
7631         * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
7632         * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
7633         * elf64-sparc.c, elflink.h: Likewise.
7634
7635         * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
7636         (ELF_LINK_HASH_MARK): Define.
7637         (struct elf_backend_data): Add GC hooks.
7638         * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
7639
7640         * elf-m10300.c (mn10300_elf_check_relocs): New.
7641         (mn10300_elf_gc_mark_hook): New.
7642         (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
7643         (elf_mn10300_howto, mn10300_reloc_map): Handle them.
7644         (mn10300_elf_final_link_relocate): Likewise.
7645         (mn10300_elf_relocate_section): Likewise.
7646         (elf_backend_can_gc_sections): Define.
7647         * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
7648         (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
7649         (bfd_elf32_bfd_reloc_type_lookup): Handle them.
7650         (mips_info_to_howto_rel): Likewise.
7651         (mips_elf_relocate_section): Likewise.
7652         (mips_elf_check_relocs): Likewise.
7653         (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
7654         (elf_backend_can_gc_sections): Define.
7655         * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
7656         (ppc_elf_howto_raw): Handle them.
7657         (ppc_elf_reloc_type_lookup): Likewise.
7658         (ppc_elf_relocate_section): Likewise.
7659         (ppc_elf_check_relocs): Reference count .got and .plt entries.
7660         Handle new vtable relocs.
7661         (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
7662         (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
7663         (elf_backend_can_gc_sections): Define.
7664
7665 Fri Jun 26 10:48:23 1998  Jeffrey A Law  (law@cygnus.com)
7666
7667         * archures.c (bfd_mach_mn10300): Define.
7668         * elf-m10300.c: Include elf/mn10300.h
7669         (elf_mn10300_mach): New function.
7670         (_bfd_mn10300_elf_final_write_processing): Likewise.
7671         (_bfd_mn10300_elf_object_p): Likewise.
7672         (elf_backendfinal_write_processing): Define.
7673         (elf_backend_object_p): Likewise.
7674
7675 Thu Jun 25 18:31:08 1998  Nick Clifton  <nickc@cygnus.com>
7676
7677         * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
7678         relocation.
7679
7680 Wed Jun 24 17:17:57 1998  Ian Lance Taylor  <ian@cygnus.com>
7681
7682         * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
7683         link_next field, not the next field.
7684
7685 Sun Jun 21 19:38:39 1998  Ian Lance Taylor  <ian@cygnus.com>
7686
7687         * elf.c (map_sections_to_segments): Check the section address
7688         against the phdr size both with and without a modulo of
7689         maxpagesize.
7690
7691 Fri Jun 19 17:08:18 1998  Ian Lance Taylor  <ian@cygnus.com>
7692
7693         * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
7694         linker created empty input section if the output section has the
7695         same name.
7696
7697         * elflink.h (elf_link_output_extsym): Print an error message if
7698         _bfd_elf_section_from_bfd_section fails.
7699
7700         * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
7701         failure.
7702
7703 Tue Jun 16 11:55:55 1998  Ian Lance Taylor  <ian@cygnus.com>
7704
7705         * elf.c (copy_private_bfd_data): Improve handling of Solaris
7706         native linker output.  Avoid putting an empty section in more than
7707         one segment.
7708
7709 Fri Jun 12 13:30:17 1998  Tom Tromey  <tromey@cygnus.com>
7710
7711         * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
7712         ($(PACKAGE).pot): Unconditionally depend on POTFILES.
7713
7714 Fri Jun 12 13:34:02 1998  Doug Evans  <devans@canuck.cygnus.com>
7715
7716         * elf.c (swap_out_syms): New arg relocatable_p.
7717         Don't add section VMA to symbols for relocatable output.
7718         (_bfd_elf_compute_section_file_positions): Update call to
7719         swap_out_syms.
7720
7721 Mon Jun  8 15:20:57 1998  Nick Clifton  <nickc@cygnus.com>
7722
7723         * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
7724         against 'addend' be signed rather than unsigned.
7725
7726 Sat Jun  6 00:31:21 1998  Nick Clifton  <nickc@cygnus.com>
7727
7728         * elf32-m32r.c: Add prototyps for static functions.
7729
7730         * coff-arm.c: Add prototypes for static functions.
7731
7732 Fri Jun  5 17:21:51 1998  Nick Clifton  <nickc@cygnus.com>
7733
7734         * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
7735         LMA is used to order sections in a segment.
7736
7737         * elf32-v850.c: Add prototypes for static functions.
7738         Change type of addend parameter to bfd_vma in various functions.
7739
7740 Fri Jun  5 18:09:58 1998  Ian Lance Taylor  <ian@cygnus.com>
7741
7742         * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
7743         complain_overflow_signed instead of complain_overflow_bitfield.
7744
7745 Fri Jun  5 15:11:11 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7746
7747         * elf.c (elf_map_symbols): Don't add section VMA to symbol value
7748         when comparing against 0.
7749
7750 Wed Jun  3 17:52:49 1998  Ian Lance Taylor  <ian@cygnus.com>
7751
7752         * Makefile.am (config.status): New target.
7753         * Makefile.in: Rebuild.
7754
7755 Wed Jun  3 12:18:24 1998  Stan Cox  <scox@equinox.cygnus.com>
7756
7757         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
7758         error if previous object endianness doesn't match current object.
7759
7760 Tue Jun  2 17:50:59 1998  Nick Clifton  <nickc@cygnus.com>
7761
7762         * elf32-v850.c (v850_elf_print_private_bfd_data): Call
7763         _bfd_elf_print_private)bfd_data ().
7764
7765 Tue Jun  2 15:29:35 1998  Ian Lance Taylor  <ian@cygnus.com>
7766
7767         * elflink.h (elf_merge_symbol): Don't always set type_change_ok
7768         and size_change_ok.
7769         (elf_link_add_object_symbols): Set type_change_ok and
7770         size_change_ok before calling elf_merge_symbol.
7771
7772         * elf32-mips.c (mips_elf_relocate_section): If we issue an
7773         undefined symbol error, don't also issue an overflow error.
7774
7775 Tue Jun  2 13:51:00 1998  Geoff Keating  <geoffk@ozemail.com.au>
7776
7777         * elf32-ppc.c (ppc_elf_relocate_section): The target of an
7778         R_PPC_LOCAL24PC relocation should be local; if not, print an error
7779         message instead of crashing.
7780
7781 Mon Jun  1 18:23:12 1998  Yuli Barcohen  <yuli.barcohen@telrad.co.il>
7782
7783         * archures.c (bfd_mach_cpu32): Define.
7784         (bfd_default_scan): Add case for 68060.  Fix 68332 case to use
7785         bfd_mach_cpu32.
7786         * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
7787         * ieee.c: Include <ctype.h>.
7788         (ieee_object_p): Parse out process ID string to make it more
7789         likely to be acceptable for bfd_scan_arch.
7790         * bfd-in2.h: Rebuild.
7791
7792 Mon Jun  1 11:12:02 1998  Nick Clifton  <nickc@cygnus.com>
7793
7794         * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
7795         _bfd_elf_print_private_bfd_data() so that the program header will
7796         be displayed.
7797
7798 Mon Jun  1 12:14:28 1998  Ian Lance Taylor  <ian@cygnus.com>
7799
7800         * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
7801         0x68.  Reindent.  Add some comments.
7802
7803 Fri May 29 09:58:08 1998  Nick Clifton  <nickc@cygnus.com>
7804
7805         * elf.c (copy_private_bfd_data): Adjust physical address of
7806         segment in output BFD to contain LMAs of its sections.
7807
7808 Tue May 26 19:37:47 1998  Stan Cox  <scox@equinox.cygnus.com>
7809
7810         * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7811         elf32_sparc_relocate_section): Added R_SPARC_32LE for little
7812         endian data 32 bit relocations.
7813         (elf32_sparc_merge_private_bfd_data): Check if linking little
7814         endian objects with big endian objects.
7815         (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
7816         (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
7817         * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
7818         * reloc.c: Same.
7819         * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
7820         * archures.c (bfd_mach_sparc_sparclite_le): New.
7821         * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
7822
7823 Thu May 21 16:59:28 1998  Nick Clifton  <nickc@cygnus.com>
7824
7825         * peicode.h (add_data_entry): Fix precedence of operators in if ()
7826         statement.
7827
7828 Tue May 19 18:41:19 1998  Ian Lance Taylor  <ian@cygnus.com>
7829
7830         * bfd-in.h: Move over patch to bfd-in2.h.
7831
7832         * reloc.c (bfd_check_overflow): Add casts before shifts which may
7833         not fit in 32 bits.
7834         (_bfd_relocate_contents): Likewise.
7835
7836 Mon May 18 14:44:15 1998  Nick Clifton  <nickc@cygnus.com>
7837
7838         * peicode.h (add_data_entry): If the section has no private data
7839         then do not create a Data Dictionary entry for it.
7840
7841 Mon May 18 00:09:28 1998  Richard Henderson  <rth@cygnus.com>
7842
7843         * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
7844         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
7845         elf64_alpha_size_got_sections): Rewrite, handling multiple got
7846         subsections during relaxation more correctly.
7847
7848 Thu May 14 14:22:58 1998  Nick Clifton  <nickc@cygnus.com>
7849
7850         * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
7851         Add extra argument to bfd_arm_process_before_allocation ().
7852         * bfd-in.h: Reflect changes made in bfd-in2.h.
7853         * coffgen.c (bfd_coff_set_symbol_class): New function.  Set the
7854         coff class of a BFD symbol.
7855         * coff-arm.c: Add support for interworking between Thumb code and
7856         non-interworking aware ARM code.
7857
7858 Sun May 10 22:33:59 1998  Jeffrey A Law  (law@cygnus.com)
7859
7860         * po/Make-in (install-info): New target.
7861
7862 Thu May  7 17:40:56 1998  Ian Lance Taylor  <ian@cygnus.com>
7863
7864         * filemode.c: Remove; not used.
7865
7866         If sysdep.h includes a header file, don't include it again:
7867         * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
7868         <errno.h>.
7869         * aoutx.h: Don't include <string.h>.  Use "sysdep.h" rather than
7870         <sysdep.h>.
7871         * archive.c: Don't include <string.h> or <errno.h>.
7872         * evax-alpha.c; Don't include <stdio.h>.
7873         * evax-egsd.c: Likewise.
7874         * evax-etir.c: Likewise.
7875         * evax-misc.c: Likewise.
7876         * evax-emh.c: Likewise.  Also, don't include <sys/types.h>.
7877         * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
7878         <errno.h>.
7879         * hpux-core.c: Likewise.
7880         * netbsd-core.c: Likewise.
7881         * som.c: Likewise.
7882         * libbfd.c: Don't include <sys/types.h>.
7883         * nlmcode.h: Don't include <string.h>.
7884         * osf-core.c: Don't include <string.h> or <stdio.h>.
7885         * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
7886         <errno.h>, or <unistd.h>.
7887         * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
7888
7889 Thu May  7 13:12:50 1998  Klaus Kaempf  <kkaempf@progis.de>
7890
7891         * configure.com: If the version number can not be found in
7892         configure.in, set it to "unknown" rather than "2.8.1".
7893
7894 Wed May  6 09:46:05 1998  Gavin Koch  <gavin@cygnus.com>
7895
7896         * elf32-mips.c (elf_mips_mach): New.
7897         (_bfd_mips_elf_object_p): Use elf_mips_mach.
7898         (_bfd_mips_elf_final_write_processing): Use the names
7899         of machines, rather than the numbers.  Set both the ARCH
7900         and MACH in e_flags.  Handle a few more specific machines.
7901         (_bfd_mips_elf_merge_private_bfd_data): Merge both
7902         EF_MIPS_ARCH and EF_MIPS_MACH.
7903
7904 Tue May  5 21:01:53 1998  Richard Henderson  <rth@cygnus.com>
7905
7906         * syms.c (bfd_is_local_label): Revert last change.
7907         * srec.c (srec_write_symbols): Discard debugging symbols.
7908
7909 Tue May  5 23:36:06 1998  Ian Lance Taylor  <ian@cygnus.com>
7910
7911         * som.c: Include <ctype.h>.
7912         * som.h: Don't include sysdep.h.
7913
7914 Tue May  5 18:29:24 1998  Tom Tromey  <tromey@cygnus.com>
7915
7916         * libbfd.h: Rebuilt.
7917         * libbfd-in.h: Removed gettext includes and defines.
7918         * sysdep.h: Moved gettext-related includes and defines here.
7919
7920 Tue May  5 16:47:54 1998  Richard Henderson  <rth@cygnus.com>
7921
7922         * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
7923         an ad-hoc test.  Kill bogus #if 0 code.
7924         * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
7925
7926 Mon May  4 16:10:33 1998  Ian Lance Taylor  <ian@cygnus.com>
7927
7928         * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
7929         when generating a normal executable for a symbol defined in a
7930         regular file.  When copying a reloc into the output file, adjust
7931         the addend for a PC relative reloc against a global symbol.
7932
7933 Mon May  4 10:08:18 1998  Tom Tromey  <tromey@cygnus.com>
7934
7935         * libbfd.h: Rebuilt.
7936         * libbfd-in.h (_): Define as dgettext.
7937
7938 Mon May  4 11:02:23 1998  Ian Lance Taylor  <ian@cygnus.com>
7939
7940         * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
7941         not signed.
7942         * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
7943         when declaring parameter types.
7944         (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
7945
7946 Wed Apr 29 15:35:03 1998  Ian Lance Taylor  <ian@cygnus.com>
7947
7948         * config.bfd: If we include any ELF targets in targ_defvec and/or
7949         targ_selvecs, then add the generic ELF targets to targ_selvecs.
7950         * elf32-gen.c (dummy): New static const variable.
7951         (elf_generic_info_to_howto): New static function.
7952         (elf_generic_info_to_howto_rel): New static function.
7953         (elf_info_to_howto): Define as elf_generic_info_to_howto.
7954         (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
7955         * elf64-gen.c: Same changes as elf32-gen.c.
7956         * elfcode.h (elf_object_p): For the generic target, ignore a
7957         failure of bfd_default_set_arch_mach.  Fix indentation a bit.
7958
7959 Tue Apr 28 20:05:52 1998  Ian Lance Taylor  <ian@cygnus.com>
7960
7961         * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
7962         * configure: Rebuild.
7963
7964 Tue Apr 28 12:16:57 1998  Jason Molenda  (crash@bugshack.cygnus.com)
7965
7966         * config.bfd:  Update OSR5/Unixware patterns.
7967
7968 Mon Apr 27 18:02:24 1998  Richard Henderson  <rth@cygnus.com>
7969
7970         * elf.c (assign_file_positions_for_segments): Allow for holes
7971         between sections added by a link script.
7972
7973 Mon Apr 27 11:49:55 1998  Ian Lance Taylor  <ian@cygnus.com>
7974
7975         * configure.in: Change version number to 2.9.4
7976         * configure: Rebuild.
7977
7978         Based on patch from H.J. Lu <hjl@gnu.org>:
7979         * elf.c (bfd_elf_get_bfd_needed_list): New function.
7980         * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
7981         * bfd-in2.h: Rebuild.
7982
7983 Sat Apr 25 20:07:53 1998  Richard Henderson  <rth@cygnus.com>
7984
7985         * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
7986         Change all users.
7987
7988 Sat Apr 25 18:29:07 1998  Richard Henderson  <rth@cygnus.com>
7989
7990         * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
7991         (elf64_alpha_relax_section): Fill them in.
7992         (elf64_alpha_relax_opt_call): Implement more than a stub.
7993         (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
7994         alignment on .scommon.
7995         (elf64_alpha_merge_gots): Merge use counts as well.
7996
7997 Sat Apr 25 14:07:29 1998  Richard Henderson  <rth@cygnus.com>
7998
7999         * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
8000         for calculating a local symbol's address.
8001         (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
8002         Set the .got's cooked size as well as the raw size.
8003
8004 Fri Apr 24 09:16:00 1998  Nick Clifton  <nickc@cygnus.com>
8005
8006         * elf32-v850.c (v850_elf_print_private_bfd_data): Add
8007         internationalisation of printed information.
8008
8009         * coff-arm.c (coff_arm_print_private_bfd_data): Add
8010         internationalisation of printed information.
8011
8012 Fri Apr 24 12:09:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8013
8014         * syms.c (struct indexentry): Change directory_name, file_name,
8015         and function_name fields to char *.
8016         (struct stab_find_info): Change cached_file_name field to char *.
8017
8018 Thu Apr 23 08:13:04 1998  Nick Clifton  <nickc@cygnus.com>
8019
8020         * peicode.h (dir_names): Add missing N_() macros to dir_names array.
8021
8022 Wed Apr 22 13:06:15 1998  Tom Tromey  <tromey@cygnus.com>
8023
8024         * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
8025
8026 Wed Apr 22 17:48:48 1998  Ian Lance Taylor  <ian@cygnus.com>
8027
8028         * Makefile.am (install-data-local): Make $(includedir).
8029         * Makefile.in: Rebuild.
8030
8031 Wed Apr 22 13:06:15 1998  Tom Tromey  <tromey@cygnus.com>
8032
8033         * libbfd-in.h: Use `gettext' and not `dgettext' for now.
8034
8035 Wed Apr 22 12:53:40 1998  Ian Lance Taylor  <ian@cygnus.com>
8036
8037         * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
8038         * Makefile.in: Rebuild.
8039
8040         * bfd-in2.h: Rebuild for Nick's changes.
8041
8042 Tue Apr 21 23:11:51 1998  Richard Henderson  <rth@cygnus.com>
8043
8044         * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
8045         change wrt length == max_namelen.
8046
8047 Tue Apr 21 21:19:36 1998  Tom Tromey  <tromey@scribbles.cygnus.com>
8048
8049         * Many files: Added gettext invocations around user-visible
8050         strings.
8051         * libbfd-in.h: Added gettext includes and defines.
8052         * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
8053         HAVE_LC_MESSAGES): Define.
8054         * configure.in: Call CY_GNU_GETTEXT.  Create po/Makefile.in and
8055         po/Makefile.
8056         * Makefile.am (SUBDIRS): Added po.
8057         (POTFILES): New macro.
8058         (po/POTFILES.in): New target.
8059         (SOURCE_HFILES): New macro.
8060         (HFILES): Use it.
8061         * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
8062
8063 Tue Apr 21 13:38:18 1998 Peter Schauer  (pes@regent.e-technik.tu-muenchen.de)
8064
8065         * elfcore.h (bfd_prstatus):  Copy core_prstatus from the first
8066         NT_PRSTATUS note section encountered, it contains the status of
8067         the currently executing thread when the core file was written.
8068
8069 Tue Apr 21 10:00:12 1998  Nick Clifton  <nickc@cygnus.com>
8070
8071         * libcoff.h: Add extra parameter to
8072         bfd_coff_link_output_has_begun overrideable function.
8073         * cofflink.c: Pass extra parameter to
8074         bfd_coff_link_output_has_begun function.
8075         * bfd-in.h: Add prototypes for exported ARM interworking
8076         functions.
8077         * peicode.h: ARM specific code reorganised to conform to BFD
8078         coding conventions.
8079         * coffcode.h: ARM specific code reorganised to conform to BFD
8080         coding conventions.
8081         * coff-arm.c: Code reorganised to conform to the BFD coding
8082         conventions.  Global variables have been moved into an ARM
8083         specific hash table structure and a new function:
8084         bfd_arm_get_bfd_for_interworking() has been created which is
8085         called from the linker scripts.
8086
8087 Tue Apr 21 00:11:51 1998  Richard Henderson  <rth@cygnus.com>
8088
8089         * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
8090
8091         * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
8092         elf64_alpha_relax_find_reloc_ofs.  Changed all callers.
8093         (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
8094         (elf64_alpha_size_got_sections): Don't merge .got sections twice.
8095
8096 Sat Apr 18 01:21:04 1998  Stan Cox  <scox@cygnus.com>
8097
8098         * config.bfd: Added sparc86x support.
8099
8100 Fri Apr 17 22:29:04 1998  Ian Lance Taylor  <ian@cygnus.com>
8101
8102         * elf32-mips.c (mips_elf_relocate_section): Do not complain about
8103         an out of range pc-relative jump/call to an undefined weak symbol.
8104
8105 Thu Apr 16 13:49:00 1998  Richard Henderson  <rth@cygnus.com>
8106
8107         * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
8108         comparisons signed.
8109
8110 Thu Apr 16 11:43:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8111
8112         * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
8113         an error other than bfd_error_system_call, set the error to
8114         bfd_error_wrong_format.
8115
8116         * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
8117         bfd_elf32_powerpcle_vec.
8118
8119         * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
8120         program segments are zero, don't set p_paddr_valid.
8121
8122 Wed Apr 15 22:15:16 1998  Richard Henderson  <rth@cygnus.com>
8123
8124         * elf64-alpha.c: Initial implementation of relaxation --
8125         (struct alpha_elf_link_hash_entry): Add use_count member.
8126         (elf64_alpha_check_relocs): Initialize and increment it.
8127         (elf64_alpha_can_merge_gots): Check it when considering merging.
8128         (elf64_alpha_merge_gots): Drop entries with zero use.
8129         (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8130         (elf64_alpha_always_size_sections): Split out got sizing ...
8131         (elf64_alpha_size_got_sections): ... here.  New function.
8132         (elf64_alpha_relax_find_reloc_ofs): New function.
8133         (elf64_alpha_relax_with_lituse): Likewise.
8134         (elf64_alpha_relax_without_lituse): Likewise.
8135         (elf64_alpha_relax_opt_call): Likewise.
8136         (elf64_alpha_relax_section): Likewise.
8137         (elf64_alpha_add_symbol_hook): Likewise.
8138         (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
8139         (elf64_alpha_relocate_section): Likewise.
8140         (bfd_elf64_bfd_relax_section): Define.
8141         (elf_backend_add_symbol_hook): Likewise.
8142
8143 Wed Apr 15 16:08:46 1998  Richard Henderson  <rth@cygnus.com>
8144
8145         * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
8146         * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
8147         (ELF_MACHINE_ALT1): New.  Set to EM_OLD_SPARC64.
8148
8149 Wed Apr 15 11:34:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8150
8151         * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
8152         * configure: Rebuild.
8153
8154 Mon Apr 13 16:46:27 1998  Ian Lance Taylor  <ian@cygnus.com>
8155
8156         * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
8157         (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
8158         * configure.in: Define and substitute WIN32LDFLAGS and
8159         WIN32LIBADD.
8160         * aclocal.m4: Rebuild with new libtool.
8161         * configure, Makefile.in: Rebuild.
8162
8163 Fri Apr 10 13:44:27 1998  Ian Lance Taylor  <ian@cygnus.com>
8164
8165         * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
8166         before any other symbols in the same section.
8167
8168 Wed Apr  8 14:50:23 1998  Michael Meissner  <meissner@cygnus.com>
8169
8170         * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
8171         systems.
8172
8173 Tue Apr  7 16:25:31 1998  Gavin Romig-Koch  <gavin@cygnus.com>
8174
8175         * dwarf2.c (comp_unit): Move it earlier in the source. Add
8176         addr_size.
8177         (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
8178         Use addr_size for address size, rather than sizeof(bfd_vma).
8179         (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
8180         Fix call to read_address.
8181         (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
8182         Scrap other unneeded arguments.  Fix call to read_address.
8183         (scan_unit_for_functions): Fix call to read_attribute.
8184         (parse_comp_unit): We now handle more values for addr_size.
8185         Set addr_size in unit.  Fix call to read_attribute and
8186         decode_line_info.
8187
8188 Tue Apr  7 15:44:47 1998  Gavin Romig-Koch <gavin@cygnus.com>
8189
8190         * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
8191
8192 Tue Apr  7 12:35:18 1998  Ian Lance Taylor  <ian@cygnus.com>
8193
8194         * archures.c (bfd_default_scan): Add m68k cases back to default
8195         switch, reverting patch of March 25, since IEEE support depends
8196         upon them.
8197
8198 Mon Apr  6 14:06:40 1998  Ian Lance Taylor  <ian@cygnus.com>
8199
8200         * Makefile.am (diststuff): New target.
8201         * Makefile.in: Rebuild.
8202
8203 Sun Apr  5 16:21:44 1998  Jeffrey A Law  (law@cygnus.com)
8204
8205         * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
8206         som_offset when we have an extended name table.
8207
8208 Sun Apr  5 16:04:39 1998  H.J. Lu  <hjl@gnu.org>
8209
8210         * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
8211         trying to copy it.
8212         * Makefile.in: Rebuild.
8213
8214 Fri Apr  3 11:09:42 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8215
8216         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
8217         symbols when creating a shared library.
8218         (elf_m68k_adjust_dynindx): New function, used by above code.
8219         (elf_m68k_finish_dynamic_sections): Initialize the section
8220         symbols.
8221         (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
8222
8223 Wed Apr  1 16:04:02 1998  Nick Clifton  <nickc@cygnus.com>
8224
8225         * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
8226         value 11.
8227
8228 Wed Apr  1 13:36:58 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8229
8230         * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
8231         assertion.
8232
8233 Tue Mar 31 00:12:12 1998  Jeffrey A Law  (law@cygnus.com)
8234
8235         * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
8236         absolute symbols.
8237
8238 Mon Mar 30 12:46:15 1998  Ian Lance Taylor  <ian@cygnus.com>
8239
8240         * configure.in: Set version to 2.9.1.
8241         * configure: Rebuild.
8242
8243         * Branched binutils 2.9.
8244
8245 Mon Mar 30 12:20:50 1998  Brent Baccala  <baccala@freesoft.org>
8246
8247         * syms.c (ENABLE_CACHING): Define.
8248         (struct indexentry): Define.
8249         (struct stab_cache): Remove.
8250         (cmpindexentry): New static function.
8251         (struct stab_find_info): Add new fields: indextable,
8252         indextablesize, cached_indexentry, cached_offset, cached_stab, and
8253         cached_file_name.  Remove fields: file_cache, function_cache, and
8254         line_cache.
8255         (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
8256         index table and search it.
8257
8258 Mon Mar 30 10:39:34 1998  Ian Lance Taylor  <ian@cygnus.com>
8259
8260         * elf.c (_bfd_elf_copy_private_section_data): Call
8261         copy_private_bfd_data once we've seen the last SEC_ALLOC section.
8262
8263         * cpu-mips.c: Remove trailing comma at end of enumeration list.
8264
8265 Sat Mar 28 16:33:02 1998  Ian Lance Taylor  <ian@cygnus.com>
8266
8267         * coff-arm.c: Define all globally visible variables and functions
8268         only when COFF_WITH_PE is not defined.
8269         * configure.in (armpe_little_vec, armpe_big_vec): Add
8270         coff-arm.lo.
8271         * configure: Rebuild.
8272
8273 Fri Mar 27 16:06:02 1998  Ian Lance Taylor  <ian@cygnus.com>
8274
8275         Fix some gcc -Wall warnings:
8276         * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
8277         * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
8278         * archures.c (bfd_default_scan): Likewise.
8279         * bfd.c (bfd_scan_vma): Likewise.
8280         * binary.c (mangle_name): Likewise
8281         * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
8282         * coff-sh.c (sh_relocate_section): Likewise.
8283         * coff-stgo32.c (create_go32_stub): Likewise.
8284         * coffcode.h (coff_slurp_line_table): Likewise.
8285         * ecoff.c (_bfd_ecoff_write_armap): Likewise.
8286         * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
8287         (assign_file_positions_for_segments): Likewise.
8288         * elf32-mips.c (mips_elf_relocate_section): Likewise.
8289         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
8290         * oasys.c (oasys_write_sections): Likewise.
8291         * ppcboot.c (ppcboot_object_p): Likewise.
8292         (mangle_name): Likewise.
8293         * riscix.c (riscix_fix_pcrel_26): Likewise.
8294         * srec.c (srec_scan): Likewise.
8295         * stabs.c (_bfd_write_section_stabs): Likewise.
8296         * sunos.c (sunos_add_dynamic_symbols): Likewise.
8297         * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
8298         switch.  Declare parameters for function pointers.
8299         * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
8300         warning.
8301         * elf.c (elf_sort_sections): Likewise.
8302         * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
8303         Add default cases to switches.
8304         (coff_arm_relocate_section): Remove unused local variables.
8305         Always set rstat.
8306         (coff_arm_bfd_set_private_flags): Change flag variable to type
8307         flagword.
8308         * coff-mips.c (mips_relocate_section): Initialize use_lo.
8309         * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
8310         (dump_toc): Change cat to const, and initialize it.
8311         * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
8312         * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8313         (sh_elf_relocate_section): Initialize r_symndx.
8314         * coffcode.h (coff_compute_section_file_positions): Only declare
8315         old_sofar if ALIGN_SECTIONS_IN_FILE.
8316         (coff_write_object_contents): Initialize csym.
8317         * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
8318         * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
8319         switch.
8320         * dwarf2.c: Include libiberty.h.
8321         (read_2_signed_bytes, read_4_signed_bytes): Comment out.
8322         (decode_line_info): Remove unused local variables.
8323         * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
8324         (m32r_elf_relocate_section): Likewise.
8325         * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
8326         (v850_elf_reloc): Likewise.
8327         * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
8328         (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
8329         * elf.c (assign_file_positions_for_segments): Always set adjust.
8330         * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr.  Fully
8331         parenthesize expression.
8332         * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
8333         (m32r_elf_object_p): Return a value.
8334         (m32r_elf_print_private_bfd_data): Change fprintf format string.
8335         * elf32-mips.c (mips_elf_final_link): Initialize last.
8336         (mips_elf_finish_dynamic_sections): Initialize last and dindx.
8337         * elf32-v850.c (v850_elf_object_p): Return a value.
8338         (v850_elf_print_private_bfd_data): Change fprintf format string.
8339         * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
8340         unsigned long.
8341         * elflink.h (elf_link_add_object_symbols): Change vernum to
8342         unsigned int, and initialize it.  Change fprintf format string.
8343         (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
8344         when setting or comparing to soname_indx.
8345         (elf_create_pointer_linker_section): Change num_symbols to
8346         unsigned int.
8347         * libcoff-in.h (coff_data_type): Change flags to flagword.
8348         * peicode.h (pe_print_idata): Initialize idx.  Change j to
8349         bfd_size_type.  Initialize hint_member.  Remove useless test to
8350         time_stamp.
8351         (pe_print_edata): Change num_functions and num_names in struct
8352         EDT_type to unsigned long.  Remove cast.  Change fprintf format
8353         string.
8354         * ppcboot.c (ppcboot_object_p): Change i to size_t.
8355         * reloc.c (bfd_get_reloc_size): Change return type to unsigned
8356         int.
8357         * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
8358         int *.  Update uses.  Change j to long.
8359         * bfd-in2.h, libcoff.h: Rebuild.
8360
8361 Fri Mar 27 10:10:46 1998  Catherine Moore <clm@cygnus.com>
8362
8363         * elf32-v850.c Remove definition of USE_REL.
8364         (v850_elf_info_to_howto_rela): New function.
8365         (v850_elf_perform_relocation):  Renamed from
8366         v850_elf_store_addend_in_insn.  Removed replace argument.
8367         (v850_elf_reloc): store the relocation in the addend field instead
8368         of the insn.
8369         (v850_elf_final_link_relocate):  Now calls
8370         v850_elf_perform_relocation.
8371         (v850_elf_relocate_section):  Remove code to generate REL
8372         relocations.
8373
8374 Thu Mar 26 13:32:17 1998  Ian Lance Taylor  <ian@cygnus.com>
8375
8376         * coffcode.h (coff_new_section_hook): Set the type and storage
8377         class in the native symbol information allocated for a new section
8378         symbol.
8379
8380 Thu Mar 26 10:13:41 1998  Nick Clifton  <nickc@cygnus.com>
8381
8382         * peicode.h: Chain together calls to
8383         coff_bfd_copy_private_bfd_data and
8384         coff_bfd_print_private_bfd_data.
8385
8386         * coff-arm.c: Add prototypes for
8387         coff_arm_bfd_print_private_bfd_data and
8388         coff_arm_bfd_copy_private_bfd_data.
8389
8390 Wed Mar 25 15:45:55 1998  Nick Clifton  <nickc@cygnus.com>
8391
8392         * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
8393         build.
8394
8395         * peicode.h: Call arm-coff private data functions after handling
8396         pe private data.
8397
8398         * coff-arm.c: Turn statics into globals so that they can be shared
8399         both pe and pei backends.
8400
8401 Wed Mar 25 15:19:38 1998  Ian Lance Taylor  <ian@cygnus.com>
8402
8403         * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
8404         plain numbers.
8405         (sunos_write_object_contents): Likewise.
8406         * aoutx.h (NAME(aout,machine_type)): Likewise.
8407         * coffcode.h (coff_set_arch_mach_hook): Likewise.
8408
8409 Wed Mar 25 13:59:24 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8410
8411         * archures.c (bfd_mach_m68*): Add definitions for various m68k
8412         variants.
8413         (bfd_default_scan): Remove m68k special cases.
8414         * bfd-in2.h: Rebuild.
8415         * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
8416         than plain numbers.
8417         * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
8418         * cpu-m68k.c (arch_info_struct): Likewise.  Add entry for
8419         m68k:68000.
8420         (bfd_m68k_arch): Set mach field to zero to signal no explicit
8421         selection, change printable_name to just "m68k" and make that the
8422         default instead of m68k:68020.
8423
8424         * aout-tic30.c (NAME): Define this to avoid multiple definitions
8425         from aoutx.h.
8426         (MY_get_section_contents): Define as aout_32_get_section_contents
8427         rather than NAME(aout,get_section_contents).
8428
8429         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
8430
8431         * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
8432         and call bfd_default_set_arch_mach to do the real work.
8433
8434 Wed Mar 25 10:41:35 1998  Richard Henderson  <rth@cygnus.com>
8435
8436         * bout.c (BALX): Include return register g14 as part of the insn.
8437         (BALX_MASK): New.
8438         (calljx_callback): Use it.
8439
8440 Wed Mar 25 11:19:28 1998  Ian Lance Taylor  <ian@cygnus.com>
8441
8442         * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
8443         * libbfd.h: Rebuild.
8444
8445         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
8446         byte_count to unsigned int.
8447         (mn10300_elf_relax_section): Initialize internal_relocs.  Remove
8448         unused local variables.
8449
8450         * evax-alpha.c (evax_close_and_cleanup): Remove unused local
8451         variables er and er1.
8452
8453         * cpu-v850.c: Include <ctype.h>.
8454         (scan): Case isdigit argument to unsigned char.
8455
8456         From Yan Meroth <YAN.MEROTH@st.com>:
8457         * ihex.c (ihex_scan): Add extbase variable so that getting an
8458         extended linear address record does not ignore any previous
8459         extended address.
8460         (ihex_write_object_contents): When writing out an extended linear
8461         address record, zero out any previous extended address.
8462
8463 Tue Mar 24 16:09:43 1998  Manfred Hollstein  <manfred@s-direktnet.de>
8464
8465         * ieee.c (do_one): Check section before dereferencing it.
8466         (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
8467         (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
8468
8469 Mon Mar 23 18:51:47 1998  Joel Sherrill  <joel@OARcorp.com>
8470
8471         * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
8472
8473 Mon Mar 23 14:23:36 1998  Nick Clifton  <nickc@cygnus.com>
8474
8475         * coff-arm.c: Add interworking functions to pe backends.
8476
8477 Fri Mar 20 18:47:20 1998  Ian Lance Taylor  <ian@cygnus.com>
8478
8479         * configure.in: Use AM_DISABLE_SHARED.
8480         * aclocal.m4, configure: Rebuild with libtool 1.2.
8481
8482 Fri Mar 20 11:25:41 1998  Nick Clifton  <nickc@cygnus.com>
8483
8484         * coff-arm.c (coff_arm_relocate_section): Better error messages
8485         when interowrking conflucts occur.  Courtesy of Jonathan Walton
8486         and Tony Thompson.
8487         (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
8488         relocations.  Patch courtesy of Jonathan Walton and Tony
8489         Thompson.
8490
8491 Fri Mar 20 02:26:43 1998  Richard Henderson  <rth@cygnus.com>
8492
8493         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
8494         part of Feb 22 change controling when to override the existing
8495         symbol with the .plt entry.
8496
8497 Wed Mar 18 09:26:25 1998  Nick Clifton  <nickc@cygnus.com>
8498
8499         * config.bfd (targ_cpu): Add thumb-pe target.
8500
8501         * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
8502         functions in PE build.
8503
8504 Sun Mar  8 23:37:26 1998  Stan Cox  <scox@equinox.cygnus.com>
8505
8506         * config.bfd (sparclite-*-elf*): Added.
8507
8508 Mon Feb 23 19:31:19 1998  Ian Lance Taylor  <ian@cygnus.com>
8509
8510         * configure.in: Add elf.lo to elf shell variable.
8511         * Makefile.am (BFD_LIBS): Remove elf.lo.
8512         (BFD_LIBS_CFILES): Remove elf.c.
8513         (BFD32_BACKENDS): Add elf.lo.
8514         (BFD32_BACKENDS_CFILES): Add elf.c.
8515         * configure, Makefile.in: Rebuild.
8516
8517 1998-02-23 15:53  Richard Henderson  <rth@cygnus.com>
8518
8519         * elf32-i386.c (elf_i386_relocate_section): A pc-relative
8520         relocation against a non-local symbol should not have a dynamic
8521         relocation.
8522
8523 Mon Feb 23 16:17:08 1998  Ian Lance Taylor  <ian@cygnus.com>
8524
8525         * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
8526         COFF filehdr flags.
8527         (pe_print_private_bfd_data): Print PE flags.  From Mikey
8528         <jeffdb@netzone.com>.
8529
8530 Sun Feb 22 20:39:00 1998  Richard Henderson  <rth@cygnus.com>
8531
8532         * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
8533         a plt entry when we can determine that we authoritatively define
8534         the symbol.
8535
8536 Sun Feb 22 20:33:05 1998  Richard Henderson  <rth@cygnus.com>
8537
8538         * configure.in (COREFILE selection): Remove sparc-*-linux*.  They
8539         don't actually use trad-core, but a SunOS-style core file handled
8540         by gdb directly.
8541         * hosts/sparclinux.h: Remove.
8542
8543 Wed Feb 18 15:31:06 1998  Ian Lance Taylor  <ian@cygnus.com>
8544
8545         * peicode.h (pe_print_idata): If there is no .idata section, look
8546         for the import tables in some other section.  Make the initial
8547         label line up better with the data.  Print the import address
8548         table even if there is no import name table.  If the import
8549         address table holds actual addresses, print them.
8550
8551 Tue Feb 17 12:58:34 1998  Ian Lance Taylor  <ian@cygnus.com>
8552
8553         * libbfd.c (bfd_seek): If fseek fails, save errno around call to
8554         bfd_tell.  If errno is EINVAL, set bfd_error_file_truncated, not
8555         bfd_error_system_call.
8556
8557 Fri Feb 13 13:11:33 1998  Ian Lance Taylor  <ian@cygnus.com>
8558
8559         * Makefile.am (AUTOMAKE_OPTIONS): Define.
8560         * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
8561
8562         From H.J. Lu <hjl@gnu.org>:
8563         * Makefile.am (libbfd_la_LDFLAGS): Define.
8564         * Makefile.in: Rebuild.
8565
8566 Thu Feb 12 17:31:11 1998  Ian Lance Taylor  <ian@cygnus.com>
8567
8568         NetBSD patches from Gordon W. Ross <gwr@mc.com>:
8569         * netbsd.h (MACHTYPE_OK): Define.
8570         (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
8571         calling N_SET_MACHTYPE, rather than having a switch.
8572         * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
8573         and M_ALPHA_NETBSD.
8574         * i386netbsd.c (MACHTYPE_OK): Don't define.
8575         (DEFAULT_MID): Define.
8576         * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
8577         (MACHTYPE_OK): Don't define.
8578         (DEFAULT_MID): Define.
8579         * m68knetbsd.c: (MACHTYPE_OK): Don't define.
8580         (DEFAULT_MID): Define.
8581         * ns32knetbsd.c (MACHTYPE_OK): Don't define.
8582         (DEFAULT_MID): Define.
8583         * sparcnetbsd.c (MACHTYPE_OK): Don't define.
8584         (DEFAULT_MID): Define.
8585
8586         NetBSD patches from Gordon W. Ross <gwr@mc.com>:
8587         * vaxnetbsd.c: New file.
8588         * netbsd-core.c: Clean up.  Remove unused macros.  Use netbsd
8589         rather than netbsd_core.
8590         * targets.c (vaxnetbsd_vec): Declare.
8591         (bfd_target_vector): Add vaxnetbsd_vec.  If NETBSD_CORE is
8592         defined, add netbsd_core_vec.
8593         * configure.in: Set COREFILE for alpha*-*-netbsd* and
8594         powerpc-*-netbsd* to netbsd-core.lo.  If COREFILE is
8595         netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
8596         * config.bfd (alpha*-*-netbsd*): New target.
8597         * Makefile.am: Rebuild dependencies.
8598         (BFD32_BACKENDS): Add vaxnetbsd.lo.
8599         (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
8600         * configure, Makefile.in: Rebuild.
8601
8602         * configure.host: Remove the old shared library build stuff.  We
8603         now use libtool instead.
8604
8605 Wed Feb 11 17:13:09 1998  Richard Henderson  <rth@cygnus.com>
8606
8607         * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
8608
8609 Tue Feb 10 19:23:28 1998  H.J. Lu  <hjl@gnu.org>
8610
8611         * configure.in: Take stab-syms.lo out of sparclinux_vec list.
8612         * configure: Rebuild.
8613
8614 Tue Feb 10 15:16:38 1998  Nick Clifton  <nickc@cygnus.com>
8615         * elf32-v850.c (remember_hi16s_reloc): New function.
8616         (find_remembered_hi16s_reloc): New function.
8617         (v850_elf_store_addend_in_insn): Use the above new functions to
8618         match up HI6S relocs with LO16 relocs.
8619
8620 Tue Feb 10 15:01:39 1998  Ian Lance Taylor  <ian@cygnus.com>
8621
8622         * configure.in: Change -linux* to -linux-gnu*.
8623         * config.bfd, configure.host: Likewise.
8624         * configure: Rebuild.
8625
8626 Mon Feb  9 19:40:59 1998  Nick Clifton  <nickc@cygnus.com>
8627
8628         * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
8629         LO16/HI16S bug and improve comments about what is going on.
8630
8631 Sat Feb  7 15:27:03 1998  Ian Lance Taylor  <ian@cygnus.com>
8632
8633         * configure, aclocal.m4: Rebuild with new libtool.
8634
8635 Fri Feb  6 14:48:20 1998  Nick Clifton  <nickc@cygnus.com>
8636
8637         * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
8638         when merging v850 code into v850e/v850ea code.  Do not initialise
8639         output flags if the input is the default architecture.
8640
8641 Fri Feb  6 11:50:22 1998  Jeffrey A Law  (law@cygnus.com)
8642
8643         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
8644         get the size from bfd_arch_bits_per_address instead of directly
8645         from the isa.
8646
8647 Thu Feb  5 14:21:34 1998  Michael Meissner  <meissner@cygnus.com>
8648
8649         * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
8650         to wrap, just return all 1's bits instead.
8651         * libbfd.h: Regenerate.
8652
8653 Thu Feb  5 11:51:05 1998  Ian Lance Taylor  <ian@cygnus.com>
8654
8655         * coff-i386.c (coff_pe_i386_relocate_section): New static function
8656         if COFF_WITH_PE.
8657         (coff_relocate_section): If COFF_WITH_PE, define as
8658         coff_pe_i386_relocate_section.
8659         * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
8660         skip empty sections, to match coff_write_object_contents.
8661
8662         * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
8663         rather than swapping out r_offset twice.  From Luke Deller
8664         <luked@cse.unsw.edu.au>.
8665
8666 Wed Feb  4 19:11:28 1998  Ian Lance Taylor  <ian@cygnus.com>
8667
8668         * configure.in: Set libtool_enable_shared rather than
8669         libtool_shared.  Remove diversion hack.
8670         * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
8671         with new libtool.
8672
8673 Wed Feb  4 16:10:21 1998  Brent Baccala  <baccala@freesoft.org>
8674
8675         * syms.c (struct stab_cache): Define.
8676         (struct stab_find_info): Remove cached_offset, cached_stab,
8677         cached_str, and cached_stroff fields.  Add file_cache,
8678         function_cache, and line_cache fields.
8679         (_bfd_stab_section_find_nearest_line): Use extensive caching to
8680         speed up searches.
8681
8682 Wed Feb  4 13:34:22 1998  Ian Lance Taylor  <ian@cygnus.com>
8683
8684         * peicode.h (pe_print_idata): Check for import of ordinal rather
8685         than name.
8686         (pe_print_edata): If there is no .edata section, look for the
8687         export data in some other section.
8688
8689 Mon Feb  2 20:05:42 1998  Jason Molenda  (crash@bugshack.cygnus.com)
8690
8691         * configure.in: Change version to 2.8.4.
8692         * configure: Regenerated.
8693
8694 Mon Feb  2 17:39:39 1998  Steve Haworth  <steve@pm.cse.rmit.EDU.AU>
8695
8696         Add tms320c30 support:
8697         * cpu-tic30.c: New file.
8698         * aout-tic30.c: New file.
8699         * coff-tic30.c: New file.
8700         * archures.c (bfd_arch_tic30): Define.
8701         (bfd_tic30_arch): Declare.
8702         (bfd_archures_list): Add bfd_tic30_arch.
8703         * targets.c (bfd_target_vector): Add tic30_aout_vec and
8704         tic30_coff_vec.
8705         * reloc.c (BFD_RELOC_TIC30_LDP): Define.
8706         * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
8707         (coff_set_flags): Likewise.
8708         * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
8709         * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
8710         * Makefile.am: Rebuild dependencies.
8711         (ALL_MACHINES): Add cpu-tic30.lo.
8712         (ALL_MACHINES_CFILES): Add cpu-tic30.c.
8713         (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
8714         (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
8715         * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
8716
8717 Mon Feb  2 12:25:12 1998  Nick Clifton  <nickc@cygnus.com>
8718
8719         * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
8720         to lag behind LO16 reloc by a couple of instructions.
8721
8722 Mon Feb  2 14:09:46 1998  Ian Lance Taylor  <ian@cygnus.com>
8723
8724         * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
8725         make to reexamine the file timestamp.
8726         ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
8727
8728         * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
8729         0x100000.
8730
8731 Fri Jan 30 19:07:07 1998  Geoff Keating  <geoffk@ozemail.com.au>
8732
8733         * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
8734         to create .dynsbss and .rela.sbss sections.
8735         (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
8736         copied from dynamic objects into .sbss.
8737         (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
8738         use it.  Correct typo of .rela.sdata2.
8739         (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
8740         put the data, which may now be in .sbss.
8741         (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
8742         (elf_backend_create_dynamic_sections): Define as
8743         ppc_elf_create_dynamic_sections.
8744
8745         * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
8746         against _GLOBAL_OFFSET_TABLE_.
8747         (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
8748         shared libraries which refer to local symbols.  Make sure that the
8749         test for allocating space for a reloc in a shared object is the
8750         same as the test for emitting a reloc.
8751
8752 Thu Jan 29 15:55:35 1998  J.J. van der Heijden  <J.J.vanderHeijden@student.utwente.nl>
8753
8754         * config.bfd (i[3456]-*-mingw32*): New target.
8755         * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
8756         * aclocal.m4, configure: Rebuild.
8757
8758 Wed Jan 28 13:41:26 1998  Ian Lance Taylor  <ian@cygnus.com>
8759
8760         * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
8761         have a bfd_object.
8762
8763 Tue Jan 27 21:43:55 1998  Richard Henderson  <rth@cygnus.com>
8764
8765         Sparc v9 ABI compliant PLT:
8766         * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
8767         (plt_templates, sparc64_elf_build_plt_entry): Delete.
8768         (LARGE_PLT_THRESHOLD): New define.
8769         (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
8770         (sparc64_elf_build_plt): New function.
8771         (sparc64_elf_plt_entry_offset): Likewise.
8772         (sparc64_elf_plt_ptr_offset): Likewise.
8773         (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
8774         contain the index for convenience.  Skip the initial entries
8775         in .rela.plt.
8776         (sparc64_elf_size_dynamic_sections): Zero the allocated contents
8777         memory for the benefit of .rela.plt.
8778         (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
8779         (sparc64_elf_finish_dynamic_symbol): Kill template stuff.  Use
8780         sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
8781         (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
8782         Call sparc64_elf_build_plt.
8783         (elf_backend_want_got_plt): No.
8784         (elf_backend_plt_readonly): No.
8785         (elf_backend_plt_alignment): 8.
8786
8787         * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
8788         * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
8789         * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
8790         to be called.
8791
8792 Tue Jan 27 21:45:15 1998  Jeffrey A Law  (law@cygnus.com)
8793
8794         * archures.c (bfd_mach_mips*): Add definitions for various MIPS
8795         processors.
8796         * cpu-mips.c (arch_info_struct): Add mips variants.
8797         * bfd-in2.h: Rebuilt.
8798
8799 Tue Jan 27 15:06:04 1998  Nick Clifton  <nickc@cygnus.com>
8800
8801         * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
8802         t2a3_b_insn.
8803
8804 Tue Jan 27 12:47:27 1998  Robert Lipe  <robertl@dgii.com>
8805
8806         * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
8807         (i[3456]86sco3.2v5*coff): New target.
8808
8809 Mon Jan 26 15:41:30 1998  Ian Lance Taylor  <ian@cygnus.com>
8810
8811         * bfd-in2.h: Rebuild with changes to chew--tab expansion.
8812
8813 Thu Jan 22 21:26:48 1998  Richard Henderson  <rth@cygnus.com>
8814
8815         * bfd.c (bfd_get_error_handler): Add orthogonal function.
8816         * bfd-in2.h: Regenerate.
8817
8818 Thu Jan 22 21:13:39 1998  Richard Henderson  <rth@cygnus.com>
8819
8820         * tekhex.c (tekhex_write_object_contents): Check for no symbols.
8821
8822 Wed Jan 21 21:19:03 1998  Ian Lance Taylor  <ian@cygnus.com>
8823
8824         * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
8825         adjust addend for an output common symbol (from Jimmy Blair
8826         <jimmyb@wrs.com>).  If COFF_WITH_PE, adjust addend for PC relative
8827         defined symbol to counteract adjustment made in generic relocation
8828         code.
8829
8830         * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
8831
8832 Wed Jan 21 21:16:06 1998  Manfred Hollstein  <manfred@s-direktnet.de>
8833
8834         * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
8835         (GET_SCNDHR_NLNNO): Likewise.
8836
8837 Mon Jan 19 12:49:52 1998  Ian Lance Taylor  <ian@cygnus.com>
8838
8839         * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
8840
8841 Wed Jan 14 17:23:27 1998  Nick Clifton  <nickc@cygnus.com>
8842
8843         * elf32-m32r.c: Add macros to handle NOP insertion.
8844
8845 Wed Jan 14 16:15:22 1998  Richard Henderson  <rth@cygnus.com>
8846
8847         * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
8848         (xcoff_mark): Likewise.
8849         (xcoff_build_ldsyms): Mark absolute symbols.
8850
8851 Wed Jan 14 16:03:11 1998  Richard Henderson  <rth@cygnus.com>
8852
8853         * bout.c (b_out_write_object_contents): Sort symbols before output
8854         to keep {CALL,BAL}NAME symbols adjacent.
8855         (b_out_symbol_cmp): New function.
8856
8857 For older changes see ChangeLog-9697
8858 \f
8859 Local Variables:
8860 mode: change-log
8861 left-margin: 8
8862 fill-column: 74
8863 version-control: never
8864 End: