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