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