fixes for elf_find_nearest_line
[external/binutils.git] / bfd / ChangeLog
1 2001-02-14  H.J. Lu  <hjl@gnu.org>
2
3         * elf.c (elf_find_function): New function.
4         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
5         the file name and function name.
6
7 2001-02-14  Nick Clifton  <nickc@redhat.com>
8
9         * ecoff.c (bfd_debug_section): Update to initialise new fields in
10         asection structure.
11
12         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
13         (BFD64_BACKENDS): Add pepigen.c
14         Add rules to create peigen.c and pepigen.c from peXXigen.c.
15
16         * Makefile.in: Regenerate.
17         * configure:  Regenerate.
18         * po/POTFILES.in: Regenerate.
19         * po/bfd.pot: Regenerate.
20
21 2001-02-14  H.J. Lu  <hjl@gnu.org>
22
23         * libcoff-in.h (pe_tdata): Add members target_subsystem and
24         force_minimum_alignment.
25
26 2001-02-14  Bo Thorsen  <bo@suse.de>
27
28         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
29         (elf64_86_64_size_info): Struct added to fix a problem
30         with the hashtable string entries.
31         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
32         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
33         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
34         remove the FIXME for this.
35         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
36         section. Also removed the FIXME for it.
37         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
38         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
39         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
40
41 2001-02-13  Richard Henderson  <rth@redhat.com>
42
43         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
44         and not user provided.
45
46 2001-02-13  Kazu Hirata  <kazu@hxi.com>
47
48         * vms.c (vms_print_symbol): Remove unreachable code.
49
50         * rs6000-core.c: Fix formatting.
51
52 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
53
54         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
55         as _bfd_XXi_only_swap_filehdr_out.
56         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
57         pe->force_minimum_alignment to TRUE.
58         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
59         PEI_TARGET_SUBSYSTEM.
60         (pe_print_private_bfd_data): Call
61         _bfd_XX_print_private_bfd_data_common() instead of
62         _bfd_pe_print_private_bfd_data_common().
63         (pe_bfd_copy_private_bfd_data): Call
64         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
65         _bfd_pe_bfd_copy_private_bfd_data_common().
66         (coff_bfd_copy_private_section_data): Define as
67         _bfd_XX_bfd_copy_private_section_data instead of
68         _bfd_pe_bfd_copy_private_section_data.
69         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
70         of a _bfd_pe_get_symbol_info.
71
72         * peigen.c: Delete.
73
74         * peXXigen.c: Renamed from peigen.c.
75         (COFF_WITH_XX): Define this macro (will get expanded into
76         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
77         compiled as peigen.c or pepigen.c.
78         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
79         define the canonical PEP structures and definitions.
80         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
81         effect, enforce minimum file and section alignments.  If
82         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
83         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
84         so, by default, this is a no-op).
85
86         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
87         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
88         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
89         _bfd_pefoo if it's not defined.  Use these macros to define
90         coff swap macros.
91
92         * libcoff.h (pe_tdata): Add members target_subsystem and
93         force_minimum_alignment.
94
95         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
96         COFF_WITH_pep.
97         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
98
99         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
100         peigen.lo.
101
102         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
103         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
104         PEPAOUTHDR.
105
106         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
107         (BFD64_BACKENDS_CFILES): Mention pepigen.c
108         (peigen.c): Add rule to generate from peXXigen.c.
109         (pepigen.c): Ditto.
110         (pepigen.lo): List dependencies for pepigen.lo.
111
112 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
113
114         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
115         $global$ referenced but not defined, set its value here.
116
117 2001-02-09  Bo Thorsen  <bo@suse.de>
118
119         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
120         alignment to 3.
121         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
122         and relocation.
123         (elf64_x86_64_relocate_section): Fix formatting.
124         (elf64_x86_64_relocate_section): Fix addend for relocation of
125         R_X86_64_(8|16|32|PC8|PC16|PC32).
126
127 2001-02-12  Jan Hubicka  <jh@suse.cz>
128
129         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
130
131 2001-02-11  H.J. Lu  <hjl@gnu.org>
132
133         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
134         alignment.
135
136 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
137
138         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
139         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
140         relocations against dynsym symbols.
141
142         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
143         the R_MIPS_26 relocation.
144         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
145         the R_MIPS_26 relocation.
146         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
147         relocation.
148         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
149         the R_MIPS_26 relocation.
150         (mips_elf64_howto_table_rela): Likewise.
151
152         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
153         member to mark symbols that have non-CALL relocations against
154         them.
155         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
156         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
157         R_MIPS_GOT16.
158         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
159         non-CALL relocation against it is encountered.
160         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
161         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
162         no_fn_stub is not set.
163
164         * elf32-mips.c (mips_elf_output_extsym): Get the output section
165         information from the real symbol for indirect ones.
166         Check no_fn_stub to find out if a symbol has a function stub
167         indeed.
168
169 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
170
171         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
172         * Makefile.in: Regenerate.
173
174 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
175
176         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
177         true if section name is an unwind table section name.
178         (elfNN_ia64_additional_program_headers): Count each unwind section
179         separately.
180         (elfNN_ia64_modify_segment_map): Install one unwind program header
181         for each unwind separate section.  Note: normally the linker
182         script merges the unwind sections that go into a single segment,
183         so this still generates at most one unwind program header per
184         segment.
185
186         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
187         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
188         (elfNN_ia64_fake_sections): Mark sections with names that start
189         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
190         unwind section.
191
192         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
193         Use it to make sh_info in unwind section point to the text section
194         it applies to.
195
196 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
197
198         * Makefile.am: Add linux target for S/390.
199         * archures.c: Likewise.
200         * bfd-in2.h: Likewise.
201         * config.bfd: Likewise.
202         * configure.in: Likewise.
203         * elf.c: Likewise.
204         * libbfd.h: Likewise.
205         * targets.c: Likewise.
206         * cpu-s390.c: New file.
207         * elf32-s390.c: New file.
208         * elf64-s390.c: New file.
209
210 2001-02-09  Nick Clifton  <nickc@redhat.com>
211
212         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
213         ImageBase.  This has already been done by coff_swap_hdr_in.
214
215 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
216
217         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
218
219 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
220
221         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
222         (sparc64_elf_relocate_section): Likewise.
223
224 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
225
226         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
227         similar to R_SPARC_32.
228         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
229
230 2001-02-08  H.J. Lu  <hjl@gnu.org>
231
232         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
233         relocation entries for weak definitions when building DSO with
234         -Bsymbolic.
235
236 2001-02-08  Richard Henderson  <rth@redhat.com>
237
238         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
239         before visibility.  Locally defined protected symbols are not
240         dynamic.
241
242 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
243
244         * config.bfd: Enable coff64 for rs6000-*.  Patch from
245         <hzoli@austin.ibm.com>.
246
247 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
248
249         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
250         found, do not attempt to find dwarf2 info before returning.
251
252 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
253
254         * elflink.h (is_global_symbol_definition): Rename to
255         is_global_data_symbol_definition and have it reject function
256         symbols.
257         (elf_link_is_defined_archive_symbol): Use renamed function.
258
259 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
260
261         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
262         * libbfd.h (bfd_target_vector): Likewise.
263         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
264         make static; create pointer reference named bfd_target_vector.
265         (_bfd_target_vector_entries): Calculate this based on the array
266         typed _bfd_target_vector.
267
268 2001-02-06  H.J. Lu  <hjl@gnu.org>
269
270         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
271         internal symbols are not dynamic.
272         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
273
274 2001-02-06  Nick Clifton  <nickc@redhat.com>
275
276         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
277         that it will not be pulled into the list of files that make up
278         po/POTFILES.in.
279         * Makefile.in: Regenerate.
280         * po/bfd.pot:  Regenerate.
281
282 2001-02-06  H.J. Lu  <hjl@gnu.org>
283
284         * bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic
285         checking.
286         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
287         external_PEI_IMAGE_hdr.
288
289 2001-02-06  Kazu Hirata  <kazu@hxi.com>
290
291         * elf-m10200.c: Fix formatting.
292
293 2001-02-04  Nick Clifton  <nickc@redhat.com>
294
295         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
296         rel, it will be handled later on.
297
298 2001-02-02  Fred Fish  <fnf@ninemoons.com>
299
300         * Makefile.in: Fix typo.
301
302 2001-02-01  Kazu Hirata  <kazu@hxi.com>
303
304         * elf-m10300.c: Fix formatting.
305
306 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
307
308         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
309         (elf_backend_get_symbol_type): Define.
310         (elf64_hppa_object_p): Set architecture and machine from elf
311         header flags.
312
313 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
314
315         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
316         before mdebug.
317
318 2001-01-26  Richard Henderson  <rth@redhat.com>
319
320         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
321         for non-default visibility.
322         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
323         delete ugly macro and replace with pretty function.
324
325 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
326
327         * coff-go32.c: Update copyright.
328         * coff-stgo32.c: Likewise.
329         * coff-go32.c (COFF_LONG_FILENAMES): Define.
330         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
331         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
332         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
333
334 2001-01-25  Kazu Hirata  <kazu@hxi.com>
335
336         * bfd-in2.h: Rebuild.
337         * libbfd.h: Likewise.
338
339 2001-01-23  H.J. Lu  <hjl@gnu.org>
340
341         * bfd-in2.h: Rebuild.
342
343 2001-01-23  H.J. Lu  <hjl@gnu.org>
344
345         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
346         is NULL or PRIV(vms_rec) is outside of the buffer.
347
348 2001-01-23  Kazu Hirata  <kazu@hxi.com>
349
350         * coff64-rs6000.c: Fix formatting.
351         * coff-arm.c: Likewise.
352         * coffgen.c: Likewise.
353         * cofflink.c: Likewise.
354         * coff-mcore.c: Likewise.
355         * coff-mips.c: Likewise.
356         * coff-pmac.c: Likewise.
357         * coff-ppc.c: Likewise.
358         * coff-rs6000.c: Likewise.
359         * elf32.c: Likewise.
360         * elf32-fr30.c: Likewise.
361         * elf32-i370.c: Likewise.
362         * elf32-i860.c: Likewise.
363         * elf32-m32r.c: Likewise.
364         * elf32-m68k.c: Likewise.
365         * elf32-mcore.c: Likewise.
366         * elf32-ppc.c: Likewise.
367         * elf32-sh.c: Likewise.
368         * elf32-v850.c: Likewise.
369         * elf64-alpha.c: Likewise.
370         * elf64-sparc.c: Likewise.
371         * elflink.c: Likewise.
372         * elflink.h: Likewise.
373         * elf-m10200.c: Likewise.
374         * elf-m10300.c: Likewise.
375         * elfxx-ia64.c: Likewise.
376
377         * aoutx.h: Fix formatting.
378         * bfd.c: Likewise.
379         * bfd-in2.h: Likewise.
380         * bfd-in.h: Likewise.
381         * cpu-i386.c: Likewise.
382         * cpu-m68hc11.c: Likewise.
383         * dwarf2.c: Likewise.
384         * elf64-x86-64.c: Likewise.
385         * format.c: Likewise.
386         * freebsd.h: Likewise.
387         * hash.c: Likewise.
388         * hp300hpux.c: Likewise.
389         * hppabsd-core.c: Likewise.
390         * hpux-core.c: Likewise.
391
392 2001-01-22  Bo Thorsen  <bo@suse.de>
393
394         * elf64-x86-64.c: Added PIC support for X86-64.
395         (elf64_x86_64_link_hash_newfunc): Function added.
396         (elf64_x86_64_link_hash_table_create): Likewise.
397         (elf64_x86_64_check_relocs): Likewise.
398         (elf64_x86_64_gc_mark_hook): Likewise.
399         (elf64_x86_64_gc_sweep_hook): Likewise.
400         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
401         (elf64_x86_64_size_dynamic_sections): Likewise.
402         (elf64_x86_64_discard_copies): Likewise.
403         (elf64_x86_64_finish_dynamic_symbol): Likewise.
404         (elf64_x86_64_finish_dynamic_sections): Likewise.
405         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
406
407 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
408
409         * Makefile.am (install-data-local): Make use of $(DESTDIR).
410         * Makefile.in: Regenerate.
411
412 2001-01-21  Kazu Hirata  <kazu@hxi.com>
413
414         * coff-a29k.c: Fix formatting.
415
416 2001-01-19  H.J. Lu  <hjl@gnu.org>
417
418         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
419         relocation section names.
420         (elf_i386_relocate_section): Report files with bad relocation
421         section names and return false.
422
423 2001-01-17  Bo Thorsen  <bo@suse.de>
424
425         * targets.c: Alphabetize list of xvecs.
426
427 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
428
429         * config.bfd: Add linux target variant for elfxx-hppa.
430         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
431         bfd_elf64_hppa_linux_vec.
432         * configure: Regenerate.
433         * elf64-hppa.c: Include elf64-target.h again to support linux
434         target variant.
435         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
436         * elf32-hppa.c: Include elf32-target.h again to support linux
437         target variant.
438         (elf32_hppa_post_process_headers): New function.
439         (elf_backend_post_process_headers): Define.
440         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
441         bfd_elf32_hppa_linux_vec.
442
443         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
444         and data_segment_base fields.
445         (elf32_hppa_link_hash_table_create ): Init them.
446         (elf32_hppa_check_relocs): Update comments.
447         (hppa_record_segment_addr): New function.
448         (elf32_hppa_relocate_section): Call it.
449         (final_link_relocate): Handle R_PARISC_SEGREL32.
450         (elf32_hppa_final_link): New function.
451         (bfd_elf32_bfd_final_link): Define to call it.
452         (hppa_unwind_entry_compare): New function.
453         * cache.c (bfd_open_file): Create files in write+read mode.
454
455         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
456         SEGREL32 and numerous other relocs.  Change duplicate
457         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
458
459         * opncls.c (bfd_fdopenr): Add parens like the comment says around
460         O_ACCMODE.
461
462         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
463         .plt entries for DT_INIT and DT_FINI.
464         (elf32_hppa_finish_dynamic_sections): Remove special handling of
465         DT_INIT and DT_FINI.
466
467         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
468         offsets for stub .plt access if wide mode.  Check offset in range.
469
470 2001-01-13  Nick Clifton  <nickc@redhat.com>
471
472         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
473         line.
474
475         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
476         line.
477
478 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
479
480         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
481         * configure: Regenerate.
482
483 2001-01-11  Peter Targett  <peter.targett@arccores.com>
484
485         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
486         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
487         * cpu-arc.c (arch_info_struct): Add entries for variants.
488         (bfd_arc_arch) Set default to bfd_mach_arc_5.
489         (arc_get_mach) Don't assume machine names prefixed arc- before
490         testing.
491         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
492         selections.
493         (arc_elf_final_write_processing) Likewise.
494         (ELF_MACHINE_CODE) Use EM_ARC.
495
496 2001-01-10  Nick Clifton  <nickc@redhat.com>
497
498         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
499
500 2001-01-07  Philip Blundell  <philb@gnu.org>
501
502         * README: Replace `bug-gnu-utils@gnu.org' with
503         `bug-binutils@gnu.org'.
504
505 2001-01-04  Kazu Hirata  <kazu@hxi.com>
506
507         * som.c: Fix formatting.
508
509 2001-01-03  Kazu Hirata  <kazu@hxi.com>
510
511         * ecoffswap.h: Fix formatting.
512         * elf-bfd.h: Likewise.
513         * elfarm-nabi.c: Likewise.
514         * elfarm-oabi.c: Likewise.
515         * elfcode.h: Likewise.
516         * elfcore.h: Likewise.
517         * elflink.c: Likewise.
518         * elflink.h: Likewise.
519         * elfxx-ia64.c: Likewise.
520         * elfxx-target.h: Likewise.
521         * libbfd.c: Likewise
522         * linker.c: Likewise.
523         * lynx-core.c: Likewise.
524
525 2001-01-02  Kazu Hirata  <kazu@hxi.com>
526
527         * pc532-mach.c: Fix formatting.
528         * pe-arm.c: Likewise.
529         * pe-i386.c: Likewise.
530         * pe-mips.c: Likewise.
531         * pe-ppc.c: Likewise.
532         * pe-sh.c: Likewise.
533         * pei-mips.c: Likewise.
534         * pei-sh.c: Likewise.
535         * peicode.h: Likewise.
536         * ppcboot.c: Likewise.
537         * ptrace-core.c: Likewise.
538
539 2001-01-01  Kazu Hirata  <kazu@hxi.com>
540
541         * reloc.c: Fix formatting.
542         * riscix.c: Likewise.
543         * rs6000-core.c: Likewise.
544         * xcoff-target.h: Likewise.
545
546 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
547
548         * elfcode.h (elf_object_p): Also restore the bfd mach field on
549         error, by calling bfd_default_set_arch_mach with incoming
550         values.
551
552 2000-12-26  Kazu Hirata  <kazu@hxi.com>
553
554         * vaxnetbsd.c: Fix formatting.
555         * versados.c: Likewise.
556         * vms-gsd.c: Likewise.
557         * vms-hdr.c: Likewise.
558         * vms-misc.c: Likewise.
559
560 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
561
562         * archive.c (coff_write_armap): Don't write more than symbol_count
563         `archive_member_file_ptr's.
564
565 2000-12-25  Kazu Hirata  <kazu@hxi.com>
566
567         * vms-tir.c: Fix formatting.
568
569 2000-12-23  Kazu Hirata  <kazu@hxi.com>
570
571         * vms.c: Fix formatting.
572         * vms.h: Likewise.
573
574 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
575
576         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
577
578         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
579
580         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
581         arithmetic.
582
583         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
584
585         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
586
587 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
588
589         * libbfd.c (bfd_get_bits): Added
590         (bfd_put_bits): Likewise
591         * bfd-in.h: Declared the above.
592         * bfd-in2.h: Regenerated.
593
594 2000-12-20  Kazu Hirata  <kazu@hxi.com>
595
596         * targets.c: Fix formatting.
597         * tekhex.c: Likewise.
598         * trad-core.c: Likewise.
599
600 2000-12-19  Kazu Hirata  <kazu@hxi.com>
601
602         * sco5-core.c: Fix formatting.
603         * section.c: Likewise.
604         * sparclinux.c: Likewise.
605         * sparclynx.c: Likewise.
606         * sparcnetbsd.c: Likewise.
607         * srec.c: Likewise.
608         * stabs.c: Likewise.
609         * stab-syms.c: Likewise.
610         * sunos.c: Likewise.
611         * syms.c: Likewise.
612         * sysdep.h: Likewise.
613
614 2000-12-18  Nick Clifton  <nickc@redhat.com>
615
616         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
617         defined.
618         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
619         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
620
621 2000-12-18  Nick Clifton  <nickc@redhat.com>
622
623         * vms-misc.c (_bfd_vms_get_record): Add default case to
624         file_format switch.
625
626 2000-12-15  Miloslav Trmac <mitr@volny.cz>
627
628         * elfcore.h (elf_core_file_p): Move to the start of the program
629         headers before attempting to read them.
630
631 2000-12-14  Kazu Hirata  <kazu@hxi.com>
632
633         * peigen.c: Fix formatting.
634         * som.c: Likewise.
635         * som.h: Likewise.
636
637 2000-12-13  Kazu Hirata  <kazu@hxi.com>
638
639         * peigen.c: Fix formatting.
640
641 2000-12-12  Jim Wilson  <wilson@redhat.com>
642
643         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
644
645 2000-12-08  Mark Salter  <msalter@redhat.com>
646
647         * binary.c (binary_set_section_contents): Ignore sections
648         with zero size.
649
650 2000-12-12  Kazu Hirata  <kazu@hxi.com>
651
652         * m68klinux.c: Fix formatting.
653         * m68knetbsd.c: Likewise.
654         * mipsbsd.c: Likewise.
655         * netbsd-core.c: Likewise.
656         * netbsd.h: Likewise.
657         * newsos3.c: Likewise.
658         * nlm32-alpha.c: Likewise.
659         * nlm32-i386.c: Likewise.
660         * nlm32-ppc.c: Likewise.
661         * nlm32-sparc.c: Likewise.
662         * nlmcode.h: Likewise.
663         * nlmswap.h: Likewise.
664         * nlm-target.h: Likewise.
665         * ns32knetbsd.c: Likewise.
666
667 2000-12-10  Fred Fish  <fnf@be.com>
668
669         * elflink.h (elf_link_output_extsym): Don't complain about undefined
670         symbols in shared objects if allow_shlib_undefined is true.
671
672 2000-12-12  Nick Clifton  <nickc@redhat.com>
673
674         * cpu-sh.c: Fix formattng.
675         * elf.c: Fix formattng.
676         * elf32-mips.c: Fix formattng.
677         * elf32-sh.c: Fix formattng.
678         * elf64-alpha.c: Fix formattng.
679
680 2000-12-09  Nick Clifton  <nickc@redhat.com>
681
682         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
683         dwarf2_find_line_info as last parameter to invocation of
684         _bfd_dwarf2_find_nearest_line.
685         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
686         dwarf2_find_line_info as last parameter to invocation of
687         _bfd_dwarf2_find_nearest_line.
688
689 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
690
691         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
692         (BFD_LIBS): ...to here.
693         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
694         (BFD_LIBS_CFILES): ...to here.
695         * Makefile.in: Regenerate.
696         * configure.in: Remove dwarf.lo from the elf shell variable.
697         * configure: Regenerate.
698         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
699         * libcoff.h: Regenerate.
700         * coffgen.c (coff_find_nearest_line): Call
701         _bfd_dwarf2_find_nearest_line.
702         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
703         accordingly.
704         (read_abbrevs): Likewise
705         (decode_line_info): Likewise.
706         (parse_comp_unit): Likewise.
707         (comp_unit_find_nearest_line): Likewise.
708         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
709         * libbfd.h: Regenerate.
710         * elf.c (_bfd_elf_find_nearest_line): Update call.
711         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
712         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
713         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
714         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
715         (styp_to_sec_flags): Handle DWARF2 sections.
716         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
717         to _bfd_find_nearest_line.
718         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
719         call to _bfd_find_nearest_line.
720
721 2000-12-08  Kazu Hirata  <kazu@hxi.com>
722
723         * coffgen.c: Fix formatting.
724         * elf-m10300.c: Likewise.
725         * elf32-i386.c: Likewise.
726         * elf32-i960.c: Likewise.
727         * elf32-m68k.c: Likewise.
728         * elf32-mcore.c: Likewise.
729         * elf32-ppc.c: Likewise.
730         * elf32-sh.c: Likewise.
731         * elf32-sparc.c: Likewise.
732         * elf32-v850.c: Likewise.
733         * elf64-alpha.c: Likewise.
734         * elf64-hppa.c: Likewise.
735         * elf64-mips.c: Likewise.
736         * elf64-sparc.c: Likewise.
737
738 2000-12-07  Kazu Hirata  <kazu@hxi.com>
739
740         * elf32-ppc.c: Fix formatting.
741         * elf64-x86-64.c: Likewise.
742
743 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
744
745         From  Ralf Baechle  <ralf@gnu.org>
746
747         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
748         BFDs containing no sections or empty .text, .data or .bss sections
749         to be merged, regardless of their flags.
750
751 2000-12-06  Kazu Hirata  <kazu@hxi.com>
752
753         * elf32-m32r.c: Fix formatting.
754         * elf32-m68hc11.c: Likewise.
755         * elf32-m68hc12.c: Likewise.
756         * elf32-m68k.c: Likewise.
757         * elf32-mcore.c: Likewise.
758         * elf32-pj.c: Likewise.
759         * elf32-ppc.c: Likewise.
760
761 2000-12-05  Kazu Hirata  <kazu@hxi.com>
762
763         * elf32-fr30.c: Fix formatting.
764         * elf32-hppa.c: Likewise.
765         * elf32-i370.c: Likewise.
766         * elf32-i386.c: Likewise.
767         * elf32-i860.c: Likewise.
768         * elf32-i960.c: Likewise.
769
770 2000-12-03  Kazu Hirata  <kazu@hxi.com>
771
772         * elf32-arm.h: Fix formatting.
773         * elf32-avr.c: Likewise.
774         * elf32-cris.c: Likewise.
775         * elf32-d10v.c: Likewise.
776         * elf32-d30v.c: Likewise.
777         * elf-hppa.h: Likewise.
778         * elf-m10200.c: Likewise.
779         * elf-m10300.c: Likewise.
780
781 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
782
783         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
784         bfd_mach_mips32_4k.  Update FIXME comment.
785         * archures.c (bfd_mach_mips32): New constant.
786         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
787         the latter, renumber it.
788         * bfd-in2.h (bfd_mach_mips32): New constant.
789         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
790         the latter, renumber it.
791         * cpu-mips.c (I_mips32): New constant.
792         (I_mips4K, I_mips32_4k): Rename the former to the latter.
793         (arch_info_struct): Add bfd_mach_mips32 entry, replace
794         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
795         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
796         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
797         with E_MIPS_MACH_MIPS32_4K.
798         (_bfd_mips_elf_final_write_processing): Replace
799         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
800         bfd_mach_mips32 case.
801         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
802         comparison with support for MIPS32.
803         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
804         MIPS32.
805
806         * aoutx.h (NAME(aout,machine_type)): Add cases for
807         bfd_mach_mips5 and bfd_mach_mips64.
808         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
809         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
810         * cpu_mips.c (I_mips5, I_mips64): New definitions.
811         (arch_info_struct): Add entries for bfd_mach_mips5 and
812         bfd_mach_mips64.
813         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
814         _bfd_mips_elf_print_private_bfd_data): Add cases for
815         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
816         (_bfd_mips_elf_final_write_processing): Add cases for
817         bfd_mach_mips5 and bfd_mach_mips64.
818
819         * bfd/aoutx.h (NAME(aout,machine_type)): Add a
820         bfd_mach_mips_sb1 case.
821         * bfd/archures.c (bfd_mach_mips_sb1): New constant.
822         * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant.
823         * bfd/cpu-mips.c (I_sb1): New constant.
824         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
825         * bfd/elf32-mips.c (elf_mips_mach): Add case for
826         E_MIPS_MACH_SB1.
827         (_bfd_mips_elf_final_write_processing): Add case for
828         bfd_mach_mips_sb1.
829
830 2000-12-01  Joel Sherrill <joel@OARcorp.com>
831
832         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
833         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
834         (sparc*-*-rtems*): Switched from a.out to ELF.
835
836 2000-11-30  Jan Hubicka  <jh@suse.cz>
837
838         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
839         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
840         (elf64-x86-64.lo): Add dependencies.
841         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
842         bfd_mach_x86_64_intel_syntax.
843         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
844         * config.bfd (x86_64): Add.
845         * configure.in: Add support for bfd_elf64_x86_64_vec.
846         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
847         (bfd_i386_arch, i8086_ar): Link in.
848         * elf64-x86-64.c: New file.
849         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
850         * targets.c (bfd_elf64_x86_64_vec): Add.
851         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
852
853 2000-11-30  Kazu Hirata  <kazu@hxi.com>
854
855         * xcofflink.c: Fix formatting.
856
857 2000-11-28  Kazu Hirata  <kazu@hxi.com>
858
859         * aoutx.h: Fix formatting.
860         * bfd-in.h: Likewise.
861         * bfd-in2.h: Likewise.
862         * cache.c: Likewise.
863         * cisco-core.c: Likewise.
864         * coff64-rs6000.c: Likewise.
865         * coffcode.h: Likewise.
866         * coffswap.h: Likewise.
867         * corefile.c: Likewise.
868         * elf32-mips.c: Likewise.
869
870 2000-11-27  Kazu Hirata  <kazu@hxi.com>
871
872         * aout-adobe.c: Fix formatting.
873         * coff64-rs6000.c: Likewise.
874         * coffgen.c: Likewise.
875         * cofflink.c: Likewise.
876
877 2000-11-27  Philip Blundell  <pb@futuretv.com>
878
879         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
880         (obj_coff_strings_written): New accessor macro for above.
881         * libcoff.h: Regenerate.
882         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
883         strings.
884         * coffcode.h (coff_write_object_contents): No need to write out
885         the string table if it's already been done.
886
887 2000-11-22  Philip Blundell  <pb@futuretv.com>
888
889         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
890         weak undefined symbols.
891
892 2000-11-24  Nick Clifton  <nickc@redhat.com>
893
894         * archures.c (bfd_mach_arm_5TE): Define.
895         (bfd_mach_arm+XScale): Define.
896         * bfd-in2.h: Regenerate.
897
898         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
899         BFD_RELOC_ARM_PCREL_BLX.
900
901         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
902         XScale machine numbers.
903
904         * config.bfd (xscale-elf): Add target.
905         (xscale-coff): Add target.
906
907         * cpu-arm.c: Add xscale machine name.
908         Add v5t, v5te and XScale machine numbers.
909
910 2000-11-23  Kazu Hirata  <kazu@hxi.com>
911
912         * aix386-core.c: Fix formatting.
913
914 2000-11-22  Jim Wilson  <wilson@redhat.com>
915
916         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
917         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
918         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
919         (ins_imms_scaled): Initialize sign_bit at function entry.
920         (elf64_ia64_operands): Add missing initializers.
921         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
922         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
923         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
924         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
925         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
926         parameters.
927         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
928         and free_extsyms at function entry.
929         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
930         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
931         (get_got): Delete unused local srel.
932         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
933         (elfNN_ia64_relocate_section): Delete unused local dynindx.
934
935 2000-11-21  Kazu Hirata  <kazu@hxi.com>
936
937         * coff-a29k.c: Fix formatting.
938         * coff-h8500.c: Likewise.
939         * coff-i960.c: Likewise.
940         * coff-ppc.c: Likewise.
941         * coff-rs6000.c: Likewise.
942         * coff-stgo32.c: Likewise.
943         * coff-tic54x.c: Likewise.
944         * coff-w65.c: Likewise.
945         * cpu-h8500.c: Likewise.
946         * cpu-hppa.c: Likewise.
947         * cpu-ns32k.c: Likewise.
948         * ecoff.c: Likewise.
949         * ecofflink.c: Likewise.
950
951 2000-11-21  Nick Clifton  <nickc@redhat.com>
952
953         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
954         remove possibility of infinite loop.
955
956 2000-11-20  Kazu Hirata  <kazu@hxi.com>
957
958         * aix386-core.c: Fix formatting.
959         * aout-adobe.c: Likewise.
960         * aout-arm.c: Likewise.
961         * aout-encap.c: Likewise.
962         * aout-ns32k.c: Likewise.
963         * aout-target.h: Likewise.
964         * aout-tic30.c: Likewise.
965         * aoutf1.h: Likewise.
966         * aoutx.h: Likewise.
967         * archive.c: Likewise.
968         * bfd-in.h: Likewise.
969         * bfd-in2.h: Likewise.
970         * bfd.c: Likewise.
971         * bout.c: Likewise.
972
973 2000-11-17  H.J. Lu  <hjl@gnu.org>
974
975         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
976         pltoff entries for DT_INIT and DT_FINI.
977         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
978         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
979         entries.
980
981 2000-11-16  Richard Henderson  <rth@redhat.com>
982
983         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
984         (allocate_dynrel_entries): Likewise.
985         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
986         (set_pltoff_entry): Likewise.
987         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
988         (elfNN_ia64_reloc_type_lookup): Likewise.
989         (elfNN_ia64_install_value): Likewise.
990         (elfNN_ia64_relocate_section): Likewise.
991         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
992         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
993
994 2000-11-16  Kazu Hirata  <kazu@hxi.com>
995
996         * cpu-a29k.c: Fix formatting.
997         * cpu-alpha.c: Likewise.
998         * cpu-arm.c: Likewise.
999         * cpu-avr.c: Likewise.
1000         * cpu-d10v.c: Likewise.
1001         * cpu-h8500.c: Likewise.
1002         * cpu-hppa.c: Likewise.
1003         * cpu-i370.c: Likewise.
1004         * cpu-i386.c: Likewise.
1005         * cpu-i960.c: Likewise.
1006         * cpu-ia64-opc.c: Likewise.
1007         * cpu-ia64.c: Likewise.
1008         * cpu-m32r.c: Likewise.
1009         * cpu-m68hc11.c: Likewise.
1010         * cpu-m68hc12.c: Likewise.
1011         * cpu-m68k.c: Likewise.
1012         * cpu-m88k.c: Likewise.
1013         * cpu-mips.c: Likewise.
1014         * cpu-ns32k.c: Likewise.
1015         * cpu-pj.c: Likewise.
1016         * cpu-powerpc.c: Likewise.
1017         * cpu-sh.c: Likewise.
1018         * cpu-sparc.c: Likewise.
1019         * cpu-tic54x.c: Likewise.
1020         * cpu-v850.c: Likewise.
1021         * cpu-vax.c: Likewise.
1022         * cpu-w65.c: Likewise.
1023         * cpu-we32k.c: Likewise.
1024         * cpu-z8k.c: Likewise.
1025         * dwarf1.c: Likewise.
1026         * dwarf2.c: Likewise.
1027
1028 2000-11-15  Kazu Hirata  <kazu@hxi.com>
1029
1030         * coff-arm.c: Fix formatting.
1031         * coff-ppc.c: Likewise.
1032         * coff-rs6000.c: Likewise.
1033         * coff-sh.c: Likewise.
1034         * coff-sparc.c: Likewise.
1035         * coff-tic30.c: Likewise.
1036         * coff-tic54x.c: Likewise.
1037         * coff-tic80.c: Likewise.
1038         * coff-w65.c: Likewise.
1039         * coff-we32k.c: Likewise.
1040         * coff-z8k.c: Likewise.
1041
1042 2000-11-15  Richard Henderson  <rth@redhat.com>
1043
1044         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
1045         section with the same ALLOC|LOAD flags as the source section.
1046
1047 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
1048
1049         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
1050         by STO_ALPHA constants.
1051
1052 2000-11-14  Kazu Hirata  <kazu@hxi.com>
1053
1054         * coff-pmac.c: Fix formatting.
1055         * coff-ppc.c: Likewise.
1056
1057 2000-11-13  H.J. Lu  <hjl@gnu.org>
1058
1059         * elflink.h (elf_link_add_object_symbols): Also add indirect
1060         symbols for common symbols with the default version.
1061
1062 2000-11-09  Philip Blundell  <pb@futuretv.com>
1063
1064         * section.c (STD_SECTION): Set gc_mark flag.
1065
1066 2000-11-11  Kazu Hirata  <kazu@hxi.com>
1067
1068         * coff-i960.c: Likewise.
1069         * coff-m68k.c: Likewise.
1070         * coff-m88k.c: Likewise.
1071         * coff-mcore.c: Likewise.
1072         * coff-mips.c: Likewise.
1073
1074 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
1075
1076         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
1077
1078 2000-11-10  Kazu Hirata  <kazu@hxi.com>
1079
1080         * coff-h8300.c: Fix formatting.
1081         * coff-h8500.c: Likewise.
1082         * coff-i386.c: Likewise.
1083         * coff-i860.c: Likewise.
1084         * coff-i960.c: Likewise.
1085         * coff-ia64.c: Likewise.
1086
1087 2000-11-09  Kazu Hirata  <kazu@hxi.com>
1088
1089         * archive.c: Fix formatting.
1090         * archures.c: Likewise.
1091
1092 2000-11-07  Richard Henderson  <rth@redhat.com>
1093
1094         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
1095         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
1096         * section.c (bfd_set_section_contents): Call memcpy if
1097         section->contents set and location not equal to contents plus offset.
1098
1099 2000-11-08  Kazu Hirata  <kazu@hxi.com>
1100
1101         * bfd-in.h: Fix formatting.
1102         * bfd-in2.h: Likewise.
1103         * bfd.c: Likewise.
1104         * binary.c: Likewise.
1105         * bout.c: Likewise.
1106         * coff-a29k.c: Likewise.
1107         * coff-alpha.c: Likewise.
1108         * coff-apollo.c: Likewise.
1109         * coff-aux.c: Likewise.
1110
1111 2000-11-07  Kazu Hirata  <kazu@hxi.com>
1112
1113         * aix386-core.c: Fix formatting.
1114         * aoutf1.h: Likewise.
1115         * aoutx.h: Likewise.
1116         * archures.c: Likewise.
1117         * armnetbsd.c: Likewise.
1118
1119 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
1120
1121         * coff-h8300.c (special): Adjust reloc address.
1122
1123 2000-11-06  Steve Ellcey <sje@cup.hp.com>
1124
1125         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
1126         to differentiate elf32 and elf64 on ia64.
1127         * bfd-in2.h: Regenerate.
1128         * config.bfd: Add target for "ia64*-*-hpux*".
1129         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
1130         * configure: Regenerate.
1131         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
1132         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
1133
1134         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
1135         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
1136         * Makefile.in: Regnerate.
1137         * elf64-ia64.c: Deleted.
1138         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
1139
1140 2000-11-06  Kazu Hirata  <kazu@hxi.com>
1141
1142         * aout-adobe.c: Fix formatting.
1143         * aout-arm.c: Likewise.
1144         * aout-cris.c: Likewise.
1145         * aout-encap.c: Likewise.
1146         * aout-ns32k.c: Likewise.
1147         * aout-target.h: Likewise.
1148         * aout-tic30.c: Likewise.
1149
1150 2000-11-05  Philip Blundell  <philb@gnu.org>
1151
1152         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
1153         BFDs containing no sections to be merged, regardless of their flags.
1154
1155 2000-11-04  Philip Blundell  <philb@gnu.org>
1156
1157         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
1158         if a relocation for an undefined symbol also results in an
1159         overflow.
1160
1161 2000-11-06  Christopher Faylor <cgf@cygnus.com>
1162
1163         * config.bfd: Add support for Sun Chorus.
1164
1165 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
1166
1167         * configure.in: Recognize alpha-*-freebsd*.
1168         * configure: Regenerate.
1169
1170 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
1171
1172         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
1173         (Chunk): New global variable set by a parameter in objcopy.c.
1174         (S3Forced): New global variable set by a parameter in
1175         objcopy.c.
1176         (srec_set_section_contents): If S3Forced is true, always generate
1177         S3 records.
1178         (srec_write_section): Use 'Chunk' to limit maximum length of S
1179         records.
1180
1181 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
1182
1183         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
1184         * Makefile.in: Regenerate.
1185         * bfd-in2.h: Regenerate.
1186         * po/bfd.pot: Regenerate.
1187
1188 2000-10-31  Philip Blundell  <philb@gnu.org>
1189
1190         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
1191         EF_SOFT_FLOAT if it is defined.
1192
1193 2000-10-27  Philip Blundell  <philb@gnu.org>
1194
1195         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
1196         attempts to mix PIC code with non-PIC, just mark the output as
1197         being position dependent.
1198         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
1199         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
1200         all mismatches, not just the first one.
1201
1202 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
1203
1204         * ieee.c (ieee_archive_p): Plug one of many possible
1205         memory leaks in error handling.
1206
1207 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
1208
1209         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
1210         elf32_sparc_object_p, elf32_sparc_final_write_processing):
1211         Support v8plusb.
1212         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
1213         sparc64_elf_object_p): Support v9b.
1214         * archures.c: Declare v8plusb and v9b machines.
1215         * bfd-in2.h: Ditto.
1216         * cpu-sparc.c: Ditto.
1217
1218 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
1219
1220         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
1221         of a GOT reloc.
1222
1223         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
1224         (SYMBOL_CALLS_LOCAL): New macro.
1225         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1226         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
1227         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1228         (ppc_elf_relocate_section): Use flag variable to determine
1229         whether the relocation refers to a local symbol.
1230         Test whether a PLTREL24 reloc will produce a reloc by looking
1231         to see whether a PLT entry was made.
1232
1233 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
1234
1235         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
1236         entries that could serve as a definition for a weak symbol.
1237
1238 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
1239
1240         From  Ralf Baechle  <ralf@gnu.org>
1241
1242         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
1243         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
1244         against local symbols.
1245         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
1246
1247 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
1248
1249         * section.c (struct sec): Add kept_section.
1250         (struct bfd_comdat_info): Remove sec, we can use above.
1251         (STD_SECTION): Add initializer.
1252         (bfd_make_section_anyway): Init here too.
1253
1254         * bfd-in2.h: Regenerate.
1255
1256         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
1257         zeroing of `flags'.
1258         (elf_link_input_bfd): Set all asection->symbol->value's here, and
1259         fudge values for discarded link-once section symbols.
1260
1261         * elf64-hppa.c: Include alloca-conf.h
1262
1263 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
1264
1265         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
1266
1267         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
1268
1269 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
1270
1271         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
1272
1273 2000-10-10  Tom Rix <trix@redhat.com>
1274
1275         * section.c (bfd_make_section_anyway): Release newsect ptr when
1276         newsect->symbol fails to alloc.  Use bfd_release instead of free.
1277
1278 2000-10-09  Richard Henderson  <rth@cygnus.com
1279
1280         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
1281         (elf64_ia64_unwind_entry_compare): New.
1282         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
1283
1284 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
1285
1286         * elflink.h (size_dynamic_sections): Don't create various tags if
1287         .dynstr is excluded from the link.  Don't set first dynsym entry
1288         if dynsymcount is zero.
1289         (elf_bfd_final_link): Don't try to swap out dynamic syms if
1290         .dynsym excluded from the link.  Don't try to write any dynamic
1291         sections excluded from the link.
1292
1293         * elf.c (swap_out_syms): Handle global section symbols.
1294
1295 2000-10-05  DJ Delorie  <dj@redhat.com>
1296
1297         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
1298         * coffcode.h (coff_set_alignment_hook): read extended reloc count
1299         (coff_write_relocs): write extended reloc count
1300         (coff_write_object_contents): account for extended relocs
1301
1302 2000-10-05  Jim Wilson  <wilson@cygnus.com>
1303
1304         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
1305         field.
1306         * elf.c (_bfd_elf_make_section_from_shdr): Call the
1307         elf_backend_section_flags function.
1308         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
1309         code.
1310         (elf64_ia64_section_flags): New function containing flag conversion
1311         code.
1312         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
1313         * elfxx-target.h (elf_backend_section_flags): Define.
1314         (elfNN_bed): Initialize elf_backend_section_flags field.
1315
1316 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
1317
1318         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
1319         _bfd_elf32_gc_record_vtable.  Correct a comment.
1320
1321 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
1322
1323         From  Ralf Baechle  <ralf@gnu.org>
1324
1325         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
1326         produces binaries with got[1] = 0x80000001 to differenciate them
1327         for the dynamic linker from the broken binaries produced by old
1328         versions.
1329
1330 2000-09-30  Petr Sorfa <petrs@sco.com>
1331
1332         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
1333         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
1334         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
1335         * configure: Regenerate.
1336
1337 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
1338
1339         Define two bfd_targets for absence and presence of leading
1340         underscore on symbols.  Make sure to only link same kind.
1341         * elf32-cris.c (cris_elf_object_p,
1342         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
1343         cris_elf_merge_private_bfd_data): New.
1344         (elf_backend_object_p, elf_backend_final_write_processing,
1345         bfd_elf32_bfd_print_private_bfd_data,
1346         bfd_elf32_bfd_merge_private_bfd_data): Define.
1347         <Target vector definition>: Include elf32-target.h twice with
1348         different macro settings:
1349         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
1350         bfd_elf32_us_cris_vec.
1351         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
1352         (elf_symbol_leading_char): First as 0, then '_'.
1353         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
1354         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
1355         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
1356         * configure: Regenerate.
1357         * targets.c: Declare bfd_elf32_us_cris_vec.
1358         * po/bfd.pot: Regenerate.
1359
1360 2000-09-29  Momchil Velikov  <velco@fadata.bg>
1361
1362         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
1363         R_ARM_THM_PC22 relocations.
1364
1365 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
1366
1367         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
1368
1369 2000-09-29  Momchil Velikov <velco@fadata.bg>
1370
1371         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
1372         is has the SEC_HAS_CONTENTS flag set.
1373
1374 2000-09-28  Vrjan Friberg  <orjanf@axis.com>
1375             Hans-Peter Nilsson  <hp@axis.com>
1376
1377         * aout-cris.c (N_TXTADDR): Define.
1378
1379 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
1380
1381         * som.c: Include alloca-conf.h.
1382         * Makefile.am: "make dep-am"
1383         * Makefile.in: Regenerate.
1384
1385 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
1386
1387         * elf32-hppa.c (plt_stub): New.
1388         (PLT_STUB_ENTRY): Define.
1389         (elf32_hppa_link_hash_table): Change multi_subspace to packed
1390         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
1391         (elf32_hppa_link_hash_table_create): Init to suit.
1392         (elf32_hppa_check_relocs): Set has_12bit_branch and
1393         has_17bit_branch as appropriate.
1394         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
1395         non-local functions.
1396         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
1397         Add space for plt_stub as needed.
1398         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
1399         functions at plt_stub.
1400         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
1401         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
1402
1403         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
1404         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
1405         of fixed size, and if negative, disable handling of input sections
1406         before stub section.  Set up default stub group size depending
1407         on detected branch relocs.
1408         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
1409         ensure different offsets from sym_value aren't rounded to
1410         different 2k blocks.  Use lrsel and rrsel for other stubs too for
1411         consistency rather than necessity.
1412         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
1413         (final_link_relocate): Likewise.
1414         (elf32_hppa_relocate_section): Likewise.
1415
1416         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
1417         (_bfd_elf_hppa_gen_reloc_type): Generate them.
1418         (elf_hppa_final_link_relocate): Handle them.
1419         (elf_hppa_relocate_insn): Likewise.
1420         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
1421
1422 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
1423
1424         * elfcode.h (elf_object_p): Preserve and clear abfd section
1425         information.  Restore at error.
1426
1427 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
1428
1429         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
1430         is empty, make sure that its rva also 0. NT loader dislikes
1431         having otherwise.
1432
1433 2000-09-26  Steve Ellcey <sje@cup.hp.com>
1434
1435         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
1436         global by default.
1437
1438 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
1439
1440         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
1441         currently unused RELATIVE_DYNAMIC_RELOCS code.
1442         (hppa_discard_copies): Likewise.
1443         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
1444         comments.  Don't check non-code output sections for stub grouping.
1445
1446 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
1447
1448         * section.c (bfd_get_unique_section_name): Return NULL if
1449         bfd_malloc fails.
1450
1451 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1452
1453         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
1454         instruction sequence to actually work.
1455         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
1456         accordingly.
1457
1458 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
1459
1460         * elf32-sh.c (sh_elf_relocate_section): Use
1461         _bfd_final_link_relocate to apply the relocation against a section
1462         symbol, when doing relocatable links.
1463
1464 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
1465
1466         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
1467         to id_sec.
1468         (stub_hash_newfunc): Here too.
1469         (hppa_add_stub): And here.
1470         (elf32_hppa_link_hash_table): Remove stub_section_created,
1471         reloc_section_created, first_init_sec and first_fini_sec.  Add
1472         stub_group.
1473         (elf32_hppa_link_hash_table_create): Init to suit.
1474         (hppa_get_stub_entry): Add support for grouping stub sections.
1475         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
1476         section code.  Index stub vars by section->id.
1477         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
1478         exit paths.  Zap allocation of above removed vars.  Refine
1479         link-once test.
1480
1481         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
1482         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
1483         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
1484         rather than pointer to bfd_link_info.
1485         (hppa_add_stub): Likewise.
1486         (final_link_relocate): Likewise.
1487
1488 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
1489
1490         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
1491         link-once sections.
1492
1493 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
1494
1495         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
1496         ld/emulparams/shelf.sh.
1497
1498 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1499
1500         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
1501         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
1502         * bfd-in2.h: Regenerate.
1503
1504 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
1505
1506         * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
1507         LITUSE relocations incorrectly if -relax is specified on the ld
1508         command line and the displacement field of the load or store
1509         instruction is non-zero. (Patch by paul.winalski@compaq.com)
1510
1511 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
1512
1513         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
1514         first_fini_sec here.
1515         (elf32_hppa_size_stubs): Instead correctly find the first .init
1516         and .fini section here.
1517
1518 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
1519
1520         * elf32-hppa.c (clobber_millicode_symbols): New function.
1521         (elf32_hppa_size_dynamic_sections): Call it.
1522
1523 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
1524
1525         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
1526         packed.  Add plabel, plt_abs packed booleans.
1527         (hppa_link_hash_newfunc): Init new fields.
1528         (PLABEL_PLT_ENTRY_SIZE): Define.
1529         (hppa_stub_name): Use size_t len vars.
1530         (hppa_add_stub): Likewise.
1531         (elf32_hppa_build_stubs): Likewise.
1532         (hppa_build_one_stub): Kill some compiler warnings.
1533         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
1534         if dynamic linking.  Munge the local plt offsets into
1535         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
1536         size_t len vars.  Add assert for plabel addend.
1537         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
1538         (elf32_hppa_hide_symbol): New function.
1539         (elf_backend_hide_symbol): Define.
1540         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
1541         with h->plabel set.  Don't make plt entries to have dynamic syms
1542         when they have been forced local.  If plt entry is used by a
1543         plabel, make it PLABEL_PLT_ENTRY_SIZE.
1544         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
1545         Set up .plt offsets for local syms.
1546         (elf32_hppa_relocate_section): Initialise plt entries for local
1547         syms.  Leave weak undefined plabels zero.  Make global plabel
1548         relocs against function symbol, and leave the addend zero.
1549         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
1550         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
1551         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
1552         relocs instead of SEGREL32 for dynamic got relocs.
1553         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
1554         (elf_backend_got_header_size): Adjust.
1555         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
1556
1557         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
1558         (hppa_type_of_stub): Use it instead of #if 0
1559         (hppa_discard_copies): Use it here too.
1560         (elf32_hppa_size_dynamic_sections): And here.
1561
1562         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
1563         (elf32_hppa_link_hash_table_create): And here.
1564         (hppa_build_one_stub): And here.  Instead keep track of stub
1565         offset using _raw_size.
1566         (elf32_hppa_size_stubs): Likewise.
1567         (elf32_hppa_build_stubs): Likewise.
1568         (hppa_size_one_stub): Likewise.  Resize reloc section too.
1569
1570         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
1571         first_fini_sec handling.  Don't search for reloc section or set
1572         hplink->reloc_section_created here.
1573         (elf32_hppa_size_stubs): Instead search for reloc sections, and
1574         set reloc_section_created here.
1575         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
1576         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
1577         and DT_FINI.
1578         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
1579
1580         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
1581         with `hplink->root.'.
1582         (elf32_hppa_check_relocs): Likewise.
1583         (elf32_hppa_gc_sweep_hook): Likewise.
1584         (elf32_hppa_adjust_dynamic_symbol): Likewise.
1585         (hppa_handle_PIC_calls): Likewise.
1586         (elf32_hppa_size_dynamic_sections): Likewise.
1587         (elf32_hppa_set_gp): Likewise.
1588         (elf32_hppa_relocate_section): Likewise.
1589         (elf32_hppa_finish_dynamic_symbol): Likewise.
1590         (elf32_hppa_finish_dynamic_sections): Likewise.
1591
1592         From  David Huggins-Daines  <dhd@linuxcare.com>
1593         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
1594         defined weak symbols in shared links.
1595         (final_link_relocate): Calls to defined weak symbols in shared
1596         objects must go via import stubs, as the target might not be known
1597         at link time.
1598
1599 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
1600
1601         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
1602         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
1603         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
1604         the original entries with EMPTY_HOWTOs, and added new ones to fill
1605         in the gap.
1606         (sh_elf_info_to_howto): Make sure the new gap isn't used.
1607         (sh_elf_relocate_section): Likewise.
1608
1609 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
1610
1611         * cpu-mips.c (arch_info_struct): Add mips:4K
1612         * bfd-in2.h (bfd_mach_mips4K): New define.
1613         * archures.c: Add bfd_mach_mips4K to comment.
1614         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
1615         E_MIPS_ARCH_2 for bfd_mach_mips4K.
1616
1617 2000-09-13  Marco Franzen <marcof@thyron.com>
1618
1619         * som.c (som_write_symbol_strings): Do not used fixed buffers,
1620         use size_t as a counter.
1621         (som_write_space_strings): Similarly.
1622
1623 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
1624
1625         * elf32-i860.c (elf32_i860_relocate_pc26): New function
1626         and prototype.
1627         (elf32_i860_relocate_section): Invoke new function from here.
1628
1629 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1630
1631         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
1632         static.
1633
1634 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1635
1636         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
1637         target section name instead of dumping core when the target symbol is
1638         undefined.
1639
1640 2000-09-09  Kazu Hirata  <kazu@hxi.com>
1641
1642         * riscix.c: Remove DEFUN.
1643
1644 2000-09-08  Nick Clifton  <nickc@redhat.com>
1645
1646         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
1647         initialise flags in output bfd if the input bfd is the default
1648         architecture with the default flags.
1649
1650 2000-09-08  Kazu Hirata  <kazu@hxi.com>
1651
1652         * archive.c: Fix formatting.
1653         * coff-arm.c: Likewise.
1654         * doc/chew.c: Likewise.
1655
1656 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
1657
1658         * section.c (bfd_get_unique_section_name): Put a dot before the
1659         numeric suffix.
1660
1661 2000-09-07  Kazu Hirata  <kazu@hxi.com>
1662
1663         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
1664         * elf.c: Fix formatting.
1665
1666 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
1667
1668         * config.bfd (sh-*-linux*): Added.
1669         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
1670         * targets.c: Declare them.
1671         * elf32-sh-lin.c: New file.
1672         * Makefile.am: Compile it.
1673         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
1674         * configure, Makefile.in: Rebuilt.
1675
1676 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
1677
1678         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
1679         pseduo-section when determining where the TOC ends.
1680
1681         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
1682         output x_tvndx as it is only two bytes wide.
1683
1684         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
1685         reloc is 26 or 32 bits wide.
1686
1687         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
1688         for relocs that don't change anything.  Also look at the full
1689         6 bits of bitsize.
1690
1691 2000-09-06  Philip Blundell  <philb@gnu.org>
1692
1693         * config.bfd (arm*-*-uclinux*): New target.
1694
1695 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
1696
1697         * configure: Rebuilt with new libtool.m4.
1698
1699 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
1700
1701         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
1702         word for variable name.
1703         * bfd-in2.h: Regenerate.
1704
1705 2000-09-05  Nick Clifton  <nickc@redhat.com>
1706
1707         * config.in: Regenerate.
1708         * libbfd.h: Regenerate.
1709         * po/bfd.pot: Regenerate.
1710         * doc/bfdint.texi: Remove CVS date string - it foils compares with
1711         local versions.
1712
1713 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
1714
1715         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
1716
1717 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
1718
1719         Shared library and PIC support.
1720         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
1721         (GOT_ENTRY_SIZE): New.
1722         (ELF_DYNAMIC_INTERPRETER): New.
1723         (STUB_SUFFIX): Define.
1724         (LONG_BRANCH_PIC_IN_SHLIB): Define.
1725         (RELATIVE_DYNAMIC_RELOCS): Define.
1726         (enum elf32_hppa_stub_type): New.
1727         (struct elf32_hppa_stub_hash_entry): Rename offset to
1728         stub_offset.  Add a number of new fields.
1729         (struct elf32_hppa_link_hash_entry): New.
1730         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
1731         global_value.
1732         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
1733         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
1734         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
1735         new fields.
1736         (hppa_link_hash_newfunc): New function.
1737         (elf32_hppa_link_hash_table_create): Use above function. Init new
1738         fields.
1739         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
1740         instead of addend, and remove sym_name from args.  Don't use
1741         symbol name for local syms, instead use sym index.
1742         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
1743         stub type rather than size.  Pass in hash and handle import stub
1744         case.  Also pass in reloc instead of offset so we can calculate
1745         PCREL22F and PCREL12F branches properly.
1746         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
1747         import and export stubs too.
1748         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
1749         import and export stub sizing.
1750         (elf32_hppa_check_relocs): New function.
1751         (elf32_hppa_adjust_dynamic_symbol): New function.
1752         (hppa_discard_copies): New function.
1753         (elf32_hppa_size_dynamic_sections): New function.
1754         (elf_backend_size_dynamic_sections): Define.
1755         (elf32_hppa_finish_dynamic_symbol): New function.
1756         (elf_backend_finish_dynamic_symbol): Define.
1757         (elf32_hppa_size_stubs): Stash params in link hash table, and move
1758         some local vars into the link hash table too.  For shared links,
1759         trundle over function syms, generating export stubs.  Handle
1760         PCREL22F branches.  Break out stub creation code from here..
1761         (hppa_add_stub): .. to here.  New function.
1762         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
1763         call the bfd linker.  Use elf_gp to record global pointer.
1764         Calculate a value from sections if $global$ is missing.
1765         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
1766         (elf32_hppa_gc_mark_hook): New function.
1767         (elf_backend_gc_mark_hook): Define.
1768         (elf32_hppa_gc_sweep_hook): New function.
1769         (elf_backend_gc_sweep_hook): Define.
1770         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
1771         Add rel to args, and remove howto, input_bfd, offset, addend,
1772         sym_name as we can recalculate these locally.  Handle calls to
1773         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
1774         handling of undefined weak syms.  Check that stubs are in range.
1775         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
1776         message on hitting a DPREL21L reloc that needs fixing.  Subtract
1777         off PC for PCREL14F.  Break out code that does a stub lookup from
1778         here..
1779         (hppa_get_stub_entry): ..to here.  New function.
1780         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
1781         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
1782         relocs, etc. etc.
1783         (elf32_hppa_finish_dynamic_sections): New function.
1784         (elf_backend_finish_dynamic_sections): Define.
1785         (elf_backend_final_write_processing) Define.
1786         (hppa_handle_PIC_calls): New function.
1787         (elf32_hppa_build_stubs): Call it.  Pass link_info to
1788         hppa_build_one_stub.
1789         (elf32_hppa_create_dynamic_sections): New function
1790         to create .plt and .got then set .plt flags correctly.
1791         (elf_backend_create_dynamic_sections): Define.
1792         (elf32_hppa_object_p): New function.
1793         (elf_backend_object_p): Define.
1794         (elf32_hppa_elf_get_symbol_type): New function.
1795         (elf_backend_get_symbol_type): Define.
1796         (elf_backend_can_gc_sections): Define.
1797         (elf_backend_want_got_plt): Define.
1798         (elf_backend_plt_alignment): Set to 2.
1799         (elf_backend_plt_readonly): Define.
1800         (elf_backend_want_plt_sym): Define.
1801         (elf_backend_got_header_size): Reserve one entry.
1802
1803         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
1804         (elf32_hppa_size_stubs): Pass in multi_subspace.
1805         (elf32_hppa_set_gp): Declare.
1806
1807         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
1808         (bfd_get_unique_section_name): New function.
1809         * bfd_in2.h: Regenerate.
1810
1811         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
1812         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
1813         comment.
1814
1815         From  David Huggins-Daines  <dhd@linuxcare.com>
1816         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
1817         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
1818         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
1819         been updated in finish_dynamic_symbol before modifying function
1820         symbol.
1821
1822         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
1823         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
1824         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
1825         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
1826         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
1827         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
1828         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
1829         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
1830
1831         From David Huggins-Daines  <dhd@linuxcare.com>
1832         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
1833         style of local labels as well.
1834
1835 2000-09-03  Philip Blundell  <philb@gnu.org>
1836
1837         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
1838         references to undefined symbols in debugging sections.
1839
1840 2000-09-02  H.J. Lu  <hjl@gnu.org>
1841
1842         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1843         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
1844         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
1845         section.
1846
1847 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
1848
1849         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
1850         (elf32_i860_is_local_label_name): New function and prototype.
1851
1852 2000-09-02  Nick Clifton  <nickc@redhat.com>
1853
1854         * configure.in: Increase version number to 2.10.91.
1855         * configure: Regenerate.
1856         * aclocal.m4: Regenerate.
1857         * config.in: Regenerate.
1858         * po/bfd.pot: Regenerate.
1859
1860 2000-09-02  Daniel Berlin <dberlin@redhat.com>
1861
1862         * elf.c (_bfd_elf_make_section_from_shdr): Add
1863         .gnu.linkobce.wi. to the list of debug section names.
1864
1865 2000-09-02  Nick Clifton  <nickc@redhat.com>
1866
1867         * dwarf2.c (find_debug_info): New function: Locate a section
1868         containing dwarf2 debug information.
1869         (bfd_dwarf2_find_nearest_line): Find all sections containing
1870         debug information and include them in the stash.
1871
1872 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
1873
1874         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
1875         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
1876         (sh_reloc_map): Add new relocs.
1877         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
1878         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
1879         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
1880         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
1881         functions.
1882         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
1883         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
1884         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
1885         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
1886         New array constants.
1887         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
1888         New variables.
1889         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
1890         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
1891         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
1892         elf_sh_plt_reloc_offset): Define.
1893         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
1894         elf_sh_link_hash_table): New structs.
1895         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
1896         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
1897         relocation types.
1898         (elf_backend_create_dynamic_sections,
1899         bfd_elf32_bfd_link_hash_table_create,
1900         elf_backend_adjust_dynamic_symbol,
1901         elf_backend_size_dynamic_sections,
1902         elf_backend_finish_dynamic_symbol,
1903         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1904         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1905         elf_backend_got_header_size, elf_backend_plt_header_size):
1906         Define.
1907         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
1908         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
1909         New relocs.
1910         * bfd-in2.h, libbfd.h: Rebuilt.
1911
1912 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
1913
1914         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
1915         change.
1916
1917 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
1918
1919         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
1920         not initialized, set them to indicate the SH1 instruction set.
1921
1922 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
1923
1924         * acinclude.m4: Include libtool and gettext macros from the
1925         top level.
1926         * aclocal.m4, configure: Rebuilt.
1927
1928 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
1929
1930         * elf.c: Eliminate references to __sparcv9 macro; replace with
1931         autoconf variables HAVE_PSINFO32_T etc.
1932         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
1933         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
1934         * config.in: Ditto.
1935         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
1936         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
1937         * aclocal.m4: Ditto.
1938         * configure: Regenerate.
1939
1940 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
1941
1942         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
1943         for any shared link, not just shared -Bsymbolic.
1944         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
1945         any shared link, and pass link info to it.
1946         (elf_i386_size_dynamic_sections): Update comment.
1947         (elf_i386_discard_copies): Modify to discard relocs for symbols
1948         that have been forced local.
1949         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
1950         that have been forced local.
1951
1952 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
1953
1954         * elflink.h (elf_link_add_object_symbols): Allow common
1955         symbols to have an alignment of 1 if explicitly requested, and
1956         not overridden by other definitions.
1957
1958 2000-08-22  Doug Kwan <dkwan@transmeta.com>
1959
1960         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
1961         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
1962
1963 2000-08-22  H.J. Lu  <hjl@gnu.org>
1964
1965         * elf-bfd.h (elf_link_hash_table): Add runpath.
1966
1967         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
1968         * bfd-in2.h: Rebuilt.
1969
1970         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
1971         "runpath" field to NULL.
1972         (bfd_elf_get_runpath_list): New function.
1973
1974         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
1975         DT_RUNPATH entries.
1976
1977 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
1978
1979         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
1980         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
1981         explicitly.  Improve validation of r_type.
1982
1983 2000-08-21  H.J. Lu  <hjl@gnu.org>
1984
1985         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
1986         dynamic allocated content space.  Add a comment to remind us that
1987         one day this ought to be fixed.
1988         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
1989         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1990         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
1991
1992 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
1993
1994         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
1995         field with the newly relocated value instead of adding it to the
1996         existing immediate field.
1997         (elf32_i860_relocate_splitn): Likewise.
1998         (elf32_i860_relocate_highadj): Likewise.
1999
2000 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
2001
2002         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
2003         was previously just a stub).
2004
2005 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
2006
2007         * elflink.c (_bfd_elf_create_got_section): Don't abort().
2008         Formatting fixes.
2009         (_bfd_elf_create_dynamic_sections): Likewise.
2010
2011 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
2012
2013         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
2014         for undefined symbols to be the beginning of the section.
2015
2016         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
2017         four extra entries at the beginning of the .rela.plt section.
2018         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
2019         section to account for the four reserved entries in the .plt section.
2020
2021 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
2022
2023         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
2024         to the list of NOPs we recognize after a branch-and-link.
2025         Use the ori NOP when one is needed.
2026
2027         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
2028         for large archives.
2029
2030 2000-08-14  Jim Wilson  <wilson@cygnus.com>
2031
2032         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
2033         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
2034         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
2035         EF_IA_64_ABSOLUTE.
2036
2037 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
2038
2039         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
2040
2041 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
2042
2043         * elf32-i860.c (elf32_i860_relocate_section): New function.
2044         (i860_final_link_relocate): New function.
2045         (elf32_i860_relocate_splitn): New function.
2046         (elf32_i860_relocate_pc16): New function.
2047         (elf32_i860_relocate_highadj): New function.
2048         (elf32_i860_howto): Minor adjustments to some relocations.
2049         (elf_info_to_howto_rel): Define.
2050         (elf_backend_relocate_section): Define.
2051
2052 2000-08-10  Nick Clifton  <nickc@cygnus.com>
2053
2054         * elf32-arm.h: Fix formatting.
2055
2056 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
2057
2058         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
2059
2060 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
2061
2062         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
2063
2064 2000-08-07  Kazu Hirata  <kazu@hxi.com>
2065
2066         * ieee.c (ieee_write_debug_part): Rewrite a comment.
2067         * elf64-ia64.c: Fix a typo.
2068
2069 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
2070
2071         * elf32-i860 (elf32_i860_howto_table): New structure.
2072         (lookup_howto): New function.
2073         (elf32_i860_reloc_type_lookup): New function.
2074         (elf32_i860_info_to_howto_rela): New function.
2075         (elf_code_to_howto_index): New structure.
2076         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
2077         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
2078         elf32_i860_reloc_type_lookup.
2079
2080 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
2081
2082         * som.c (struct fixup_format): Constify `format'.
2083         (som_hppa_howto_table): Use SOM_HOWTO macro.
2084         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
2085         (som_bfd_reloc_type_lookup): Likewise.
2086         (compare_subspaces): Remove unused `count1', `count2'.
2087         (som_begin_writing): Remove unused `total_reloc_size'.
2088         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
2089         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
2090         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
2091         (som_find_nearest_line): Decorate unused parameter(s).
2092         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
2093         (som_bfd_link_split_section): Likewise.
2094
2095 2000-08-03  Nick Clifton  <nickc@cygnus.com>
2096
2097         * section.c: Restore backed out code.
2098         * elf.c: Restore backed out code.
2099         (copy_private_bfd_data): Fix bug preventing stipped dynamic
2100         binaries from working.
2101         * bfd-in2.h: Regenerate.
2102
2103 2000-08-03  H.J. Lu  <hjl@gnu.org>
2104
2105         * section.c: Back out the change made by Nick Clifton
2106         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
2107         binaries.
2108         * bfd-in2.h: Likewise.
2109         * elf.c: Likewise.
2110
2111 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
2112
2113         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
2114
2115 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
2116
2117         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
2118         * bfd-in2.h, libbfd.h: Regenerate.
2119
2120 2000-07-31  Nick Clifton  <nickc@cygnus.com>
2121
2122         * section.c (struct sec): Add new boolean field 'segment_mark'.
2123         (STD_SECTION): Initialise new field to zero.
2124
2125         * bfd-in2.h: Regenerate.
2126
2127         * elf.c (copy_private_bfd_data): Reorganise section to segment
2128         mapping to cope with moved sections requiring new segments,
2129         and overlapping segments.
2130         (SEGMENT_END): New macro: Return the end address of a segment.
2131         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
2132         contains a section by comparing their VMA addresses.
2133         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
2134         contains a section by comparing their LMA addresses.
2135         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
2136         section should be included in a segment.
2137         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
2138         follows another in memory.
2139         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
2140         segments overlap.
2141
2142 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
2143
2144         * cpu-i860.c: Added comments.
2145
2146         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
2147         bfd_elf32_i860_little_vec.
2148         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
2149         (ELF_MAXPAGESIZE): Changed to 4096.
2150
2151         * targets.c (bfd_elf32_i860_little_vec): Declaration of
2152         new target.
2153         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
2154
2155         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
2156         config for little endian elf32 i860.
2157         (targ_defvec): Define for the new config above
2158         as "bfd_elf32_i860_little_vec".
2159         (targ_selvecs): Define for the new config above
2160         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
2161
2162         * configure.in (bfd_elf32_i860_little_vec): Added recognition
2163         of new target vec.
2164
2165         * configure: Regenerated.
2166
2167 2000-07-27  H.J. Lu  <hjl@gnu.org>
2168
2169         * elflink.h (elf_merge_symbol): Take one more argument,
2170         dt_needed, to indicate if the symbol comes from a DT_NEEDED
2171         entry. Don't overide the existing weak definition if dt_needed
2172         is true.
2173         (elf_link_add_object_symbols): Pass dt_needed to
2174         elf_merge_symbol ().
2175
2176 2000-07-27  Nick Clifton  <nickc@cygnus.com>
2177
2178         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
2179         allocated contents.
2180
2181 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
2182
2183         * configure.host (*-*-aix*): AIX has 'long long' always.
2184
2185         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
2186         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
2187         (xcoff_write_archive_contents_big): Don't update the offset
2188         of the symbol table, xcoff_write_armap will do it.
2189
2190 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
2191
2192         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
2193         of dynobj for SGI_COMPAT checks.
2194
2195 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2196
2197         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
2198         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
2199         * bfd-in2.h: Regenerate.
2200
2201 2000-07-21  Nick Clifton  <nickc@cygnus.com>
2202
2203         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
2204         range symbol indices in relocs and issue an error message.
2205
2206 2000-07-20  H.J. Lu  <hjl@gnu.org>
2207
2208         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
2209         info->new_dtags when setting DT_FLAGS_1. It will only be set
2210         by the new linker options. It shouldn't break anything.
2211
2212 2000-07-20  H.J. Lu  <hjl@gnu.org>
2213
2214         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
2215         only if info->new_dtags is true.
2216
2217 2000-07-20  H.J. Lu  <hjl@gnu.org>
2218
2219         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
2220         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
2221
2222 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
2223
2224         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
2225         (ALL_MACHINES_CFILES): Add cpu-cris.c.
2226         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
2227         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
2228         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
2229         * Makefile.in: Rebuild.
2230         * aclocal.m4: Rebuild.
2231         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
2232         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
2233         (bfd_cris_arch): Declare.
2234         (bfd_archures_list): Add bfd_cris_arch.
2235         * bfd-in2.h: Rebuild.
2236         * config.bfd: (cris-*-*): New target.
2237         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
2238         * configure: Rebuild.
2239         * elf.c (prep_headers): Add bfd_arch_cris.
2240         * libbfd.h: Rebuild.
2241         * libaout.h (enum machine_type): Add M_CRIS.
2242         * reloc.c: Add CRIS relocations.
2243         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
2244         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
2245         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
2246         * po/POTFILES.in, po/bfd.pot: Regenerate.
2247
2248 2000-07-19  H.J. Lu  <hjl@gnu.org>
2249
2250         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
2251         DF_TEXTREL if DT_TEXTREL is set.
2252         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2253         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2254         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2255         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
2256         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2257         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2258         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2259         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2260         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
2261         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
2262
2263         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
2264         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
2265         DT_RPATH is set.
2266         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
2267
2268 2000-07-19  H.J. Lu  <hjl@gnu.org>
2269
2270         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
2271         * bfd-in2.h: Rebuild.
2272
2273         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
2274         (elf_dt_soname): New.
2275
2276         * elf.c (bfd_elf_set_dt_needed_soname): New.
2277
2278         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
2279         entry if the shared object loaded by DT_NEEDED is used to
2280         resolve the reference in a regular object.
2281
2282 2000-07-19  H.J. Lu  <hjl@gnu.org>
2283
2284         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
2285         DT_DEPAUDIT and DT_AUDIT as strings.
2286
2287 2000-07-19  Nick Clifton  <nickc@cygnus.com>
2288
2289         * format.c: Fix formatting.
2290
2291 2000-07-19  H.J. Lu  <hjl@gnu.org>
2292
2293         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
2294
2295 2000-07-19  H.J. Lu  <hjl@gnu.org>
2296
2297         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
2298         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
2299         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
2300         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
2301         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
2302         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
2303         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
2304
2305 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
2306
2307         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
2308         renamed functions from here...
2309         (assign_section_numbers): Use renamed functions.
2310         (prep_headers): Use renamed functions.
2311
2312         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
2313         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
2314         * bfd-in2.h: Regenerate.
2315
2316 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
2317
2318         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
2319         parenthesis in if statement.
2320
2321 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
2322
2323         Enable the support for Traditional MIPS.
2324         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
2325         return ict_none appropriately for traditional mips targets.
2326         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
2327         (STUB_MOVE): Conditionalize for traditonal mips.
2328         (STUB_LI16): Likewise.
2329         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
2330         room for RTPROC header.
2331         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
2332         the permission for the PT_DYNAMIC as read, write and execute.
2333         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
2334         for traditonal mips.
2335         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
2336         _DYNAMIC_LINKING for traditonal mips.
2337         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
2338         in case of traditonal mips.
2339         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
2340         entry is required. For a function if PLT is not required then set the
2341         corresponding hash table entry to 0.
2342         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
2343         traditonal mips.
2344         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
2345         shared object set the value to 0.
2346         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
2347         _DYNAMIC_LINKING for traditonal mips.
2348         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
2349         for traditonal mips.
2350
2351 2000-07-15  H.J. Lu  <hjl@gnu.org>
2352
2353         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
2354
2355 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
2356
2357         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
2358         out a structure that is BFD_IN_MEMORY.
2359
2360 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
2361
2362         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
2363         bfd pointer.  Print section id instead of bfd pointer for local
2364         syms.  Prefix addend with `+' for global syms as well as local.
2365         Correct calculation of name component lengths.
2366         (elf64_hppa_check_relocs): Update call to get_dyn_name.
2367
2368         From David Huggins-Daines  <dhd@linuxcare.com>
2369         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
2370         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
2371         (elf64_hppa_modify_segment_map): Likewise.
2372
2373 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2374
2375         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
2376         addresses to be "naturally" sign extended.  Return -1 if unknown.
2377         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
2378         * bfd-in2.h: Regenerate.
2379
2380 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2381
2382         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
2383         and ECOF_SIGNED_64 to list ways to extract an offset.
2384         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
2385         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
2386         Update.
2387         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
2388         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
2389
2390 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2391
2392         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
2393         bfd_get_start_address.
2394         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
2395         (elf_swap_ehdr_out): Ditto.
2396
2397 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
2398
2399         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
2400         compatibility with older binutils.
2401
2402 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
2403
2404         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
2405         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
2406
2407         From Ryan Bradetich  <rbradetich@uswest.net>
2408         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
2409         (parse_line_table): Ditto.
2410         (_bfd_dwarf1_find_nearest_line): Ditto.
2411         * syms.c (cmpindexentry): Remove extra `*' from params.
2412
2413 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
2414
2415         * elf32-mips.c (sort_dynamic_relocs): New Function.
2416         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
2417         via qsort to sort the dynamic relocations in increasing r_symndx
2418         value.
2419
2420 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
2421
2422         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
2423         ATTRIBUTE_UNUSED to unused args.
2424         (get_opd): Likewise.
2425         (get_plt): Likewise.
2426         (get_dlt): Likewise.
2427         (get_stub): Likewise.
2428         (elf64_hppa_adjust_dynamic_symbol): Likewise.
2429         (elf64_hppa_link_output_symbol_hook): Likewise.
2430         (elf64_hppa_check_relocs): Delete unused var.
2431         (elf64_hppa_size_dynamic_sections): Likewise.
2432         (elf64_hppa_finalize_opd): Likewise.
2433         (elf64_hppa_finalize_dynreloc): Likewise.
2434         (elf64_hppa_modify_segment_map): Likewise.
2435         (elf64_hppa_finish_dynamic_sections): Likewise.
2436
2437         * elf-hppa.h (elf_hppa_final_write_processing): Add
2438         ATTRIBUTE_UNUSED to unused args.
2439         (elf_hppa_final_link_relocate): Likewise.
2440         (elf_hppa_record_segment_addrs): Add paretheses.
2441         (elf_hppa_relocate_section): Constify dyn_name.
2442
2443         From  David Huggins-Daines  <dhd@linuxcare.com>
2444         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
2445         rearrange case statement so that it gets preferred to 32-bit ones.
2446
2447         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
2448         asection->id instead of address of asection structure.
2449         (elf32_hppa_size_stubs): Likewise.
2450
2451         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
2452         for .init* and .fini*.
2453
2454         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
2455         and addends used in stub names to 32 bits.
2456         (elf32_hppa_size_stubs): Likewise.
2457
2458         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
2459         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
2460         not bfd_put_64.  Fix minor comment typo and formatting.
2461
2462         Changes to create multiple linker stubs, positioned immediately
2463         before the section where they are required.
2464         * elf32-hppa.c: Don't include hppa_stubs.h.
2465         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
2466         (elf32_hppa_stub_hash_table): Delete.
2467         (elf32_hppa_link_hash_entry): Delete.
2468         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
2469         stub_hash_table, and store the struct here rather than a pointer.
2470         Delete output_symbol_count.  Add offset array.  Change
2471         global_value to a bfd_vma.
2472         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
2473         (elf32_hppa_stub_hash_traverse): Delete.
2474         (elf32_hppa_name_of_stub): Delete.
2475         (elf32_hppa_link_hash_lookup): Delete.
2476         (elf32_hppa_link_hash_traverse): Delete.
2477         (elf32_hppa_stub_hash_table_init): Delete.
2478         (elf32_hppa_size_of_stub): Pass input section and offset rather
2479         than location and calculate location here.  Don't pass name as all
2480         stubs are now the same size.
2481         (elf32_hppa_stub_hash_newfunc): Init new fields.
2482         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
2483         too.
2484         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
2485         comparing against ints.  Rewrite stub handling code.
2486         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
2487         Case enums to int before comparing against ints.  Remove
2488         bfd_reloc_dangerous case.
2489         (elf32_hppa_build_one_stub): Rewrite.
2490         (elf32_hppa_size_one_stub): New function.
2491         (elf32_hppa_build_stubs): Rewrite.
2492         (elf32_hppa_size_stubs): Pass in linker call-back functions.
2493         Rewrite stub-handling specific code.
2494
2495         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
2496
2497         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
2498
2499         * hppa_stubs.h: Delete.
2500         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
2501         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
2502         * Makefile.in: Regenerate.
2503
2504         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
2505         e_nlrsel.
2506
2507         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
2508
2509         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
2510         and section name for bfd_reloc_notsupported error message.
2511         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
2512         bfd_reloc_notsupported.
2513         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
2514
2515         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
2516         undefined weak symbols for all relocs.
2517         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
2518         offsets are relative to one past the delay slot.
2519         (elf32_hppa_size_stubs): Account for reloc addend when calculating
2520         branch destination.  Put addend into stub name too.
2521         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
2522         adjust by 8 when deciding whether a linker stub is needed.  Put
2523         addend into stub name as for above.
2524
2525         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
2526         various args and vars.
2527         (elf32_hppa_bfd_final_link_relocate): Here too.
2528         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
2529         inner block var to avoid shadowing.
2530
2531         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
2532         unsigned.
2533         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
2534         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
2535         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
2536
2537         * libhppa.h: Change practically all unsigned ints to plain ints.
2538         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
2539         prototypes.
2540
2541         From Ryan Bradetich  <rbradetich@uswest.net>
2542         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
2543         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
2544         suit above.
2545         From  David Huggins-Daines  <dhd@linuxcare.com>
2546         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
2547         to the new OP_* ones.
2548
2549         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
2550         error exit.  Bail out earlier on plabel relocs that we aren't
2551         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
2552         string, and then don't free our copy.
2553         (elf32_hppa_build_one_stub): Make insn unsigned int.
2554
2555         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
2556         available with BL, not BE and BLE.
2557
2558         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
2559         code for elf arg relocs.
2560         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
2561         argument with elf_link_hash_entry h.  Handle undefined weak
2562         symbols.  Move $global$ lookup from here...
2563         (elf32_hppa_relocate_section): ...to here.  Return correct error
2564         message for non-handled relocs.
2565         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
2566         wrong test was -0x3ffff to +0x40000.
2567
2568         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
2569         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
2570         Handle them as such.
2571         (elf_hppa_relocate_insn): Fix a typo.
2572
2573         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
2574         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2575         assemble_17, assemble_21): Delete.
2576         Supply defines for all 64 possible opcodes.
2577         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
2578         formats.  Handle COMICLR.
2579         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
2580         -10, -16, 16, 22.
2581
2582         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
2583         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
2584         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
2585         to suit.
2586         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
2587         the local syms - did this code get deleted accidentally?  Ignore
2588         undefined and undefweak syms.
2589
2590         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
2591         block.  Use it instead of elf64_hppa_hash_table (info).
2592         (elf_hppa_final_link_relocate): Use hppa_info instead of
2593         elf64_hppa_hash_table (info).
2594
2595         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
2596         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
2597         (hppa_rebuild_insn): Mask immediate bits here instead.
2598         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
2599
2600 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
2601
2602         * section.c (struct sec): Add id field.  Tidy comment formatting.
2603         (bfd_make_section_anyway): Set id.
2604         (STD_SECTION): Init id too.
2605         Change CONST to const throughout.
2606         * archures.c (bfd_arch_info): Tidy comment.
2607         (bfd_arch_list): Change a CONST to const.
2608         * libbfd-in.h: Tidy comments and replace CONST with const.
2609         * elf-bfd.h: Likewise.
2610         * libbfd.h: Regenerate.
2611         * bfd-in2.h: Regenerate.
2612         * libcoff.h: Regenerate.
2613
2614 2000-07-07  DJ Delorie  <dj@redhat.com>
2615
2616         * archive.c (_bfd_write_archive_contents): Add an informative
2617         comment.
2618
2619 2000-07-06  Kazu Hirata  <kazu@hxi.com>
2620
2621         * srec.c: Fix formatting.
2622
2623 2000-06-05  DJ Delorie  <dj@redhat.com>
2624
2625         * MAINTAINERS: new
2626
2627 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
2628
2629         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
2630         value of PC-relative offsets.
2631
2632 2000-07-03  Jim Wilson  <wilson@cygnus.com>
2633
2634         * elf64-alpha.c (alpha_elf_size_info): New.
2635         (elf_backend_size_info): Define to alpha_elf_size_info.
2636         * elfcode.h (elf_size_info): Change hash bucket size to 4.
2637
2638 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
2639
2640         * elf32-mips.c: Include elf32-target.h again for the traditional
2641         MIPS targets.
2642
2643 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
2644
2645         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
2646         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
2647         (avr_info_to_howto_rela): Likewise.
2648         (elf32_avr_gc_mark_hook): Likewise.
2649         (elf32_avr_gc_sweep_hook): Likewise.
2650         (elf32_avr_relocate_section): Likewise.
2651
2652 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
2653
2654         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
2655         an external symbol for a non-shared, non-relocatable link.
2656
2657 2000-07-03  Nick Clifton  <nickc@redhat.com>
2658
2659         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
2660         is an external symbol.
2661         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
2662         external symbol.
2663
2664 2000-07-03  Kazu Hirata  <kazu@hxi.com>
2665
2666         * reloc16.c: Fix formatting.
2667
2668 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
2669
2670         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
2671         to add a new target for traditional mips i.e
2672         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
2673         * configure.in: Likewise.
2674         * configure: Rebuild.
2675         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
2676         bfd_target_vector.
2677         (bfd_elf32_tradlittlemips_vec): Likewise.
2678         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
2679         to see that elfNN_bed does not get redefined even if the target file
2680         is included twice for a chip. See elf32-mips.c.
2681
2682 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
2683
2684         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
2685         (CLEANFILES): Add DEPA.
2686         * Makefile.in: Regenerate.
2687
2688 2000-06-30  DJ Delorie  <dj@cygnus.com>
2689
2690         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
2691         can't assume the PE header is at 0x80.
2692
2693 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
2694
2695         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
2696
2697 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
2698
2699         * go32stub.h: Update stub.
2700
2701 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
2702
2703         * archures.c (bfd_mach_avr5): Define.
2704         * bfd-in2.h (bfd_mach_avr5): Define.
2705         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
2706         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
2707         (compatible): Update comment.  Add missing test.
2708         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
2709         for avr2 and avr4.  Simplify 8K wrap code.
2710         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
2711         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
2712
2713 2000-06-26  Kazu Hirata  <kazu@hxi.com>
2714
2715         * coff-h8300.c: Fix formatting.
2716         * cpu-h8300.c: Likewise.
2717
2718 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
2719
2720         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
2721         for local symbols whose names are unknown.
2722
2723 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
2724
2725         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
2726         find one.
2727         * Makefile.in: Regenerate.
2728         * doc/Makefile.in: Regenerate.
2729
2730 2000-06-20  H.J. Lu  <hjl@gnu.org>
2731
2732         * Makefile.am: Rebuild dependency.
2733         * Makefile.in: Rebuild.
2734
2735 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2736
2737         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
2738         (elf_backend_copy_indirect_symbol): Map to the new function.
2739
2740 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
2741
2742         * archive.c (normalize): Correct pointer comparison when checking
2743         for backslashes.
2744         (bfd_bsd_truncate_arname): Likewise.
2745         (bfd_gnu_truncate_arname): Likewise.
2746
2747 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
2748
2749         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
2750         sections elf_{text,data}_{section,symbol}.
2751         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
2752         (_bfd_mips_elf_hide_symbol): New function.
2753         (elf_backend_hide_symbol): Map to the new function.
2754         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
2755         definitions of mips_elf_{text,data}_{section,symbol}.
2756         (mips_elf_local_relocation_p): Try to find the direct symbol
2757         based on new check_forced argument.
2758         (mips_elf_calculate_relocation): Use new version of
2759         mips_elf_local_relocation_p.
2760         (mips_elf_relocate_section): Likewise.
2761         (_bfd_mips_elf_relocate_section): Likewise.
2762         (mips_elf_sort_hash_table): Only assert that have enough GOT
2763         space.
2764         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
2765         entry if the relocation based on the new external argument.
2766         (mips_elf_create_dynamic_relocation): Assert that we have a
2767         section contents allocated where we can swap out the dynamic
2768         relocations.
2769         (mips_elf_calculate_relocation): Find the real hash-table entry
2770         correctly by using h->root.root.type.  Only create a dynamic
2771         relocation entry if the symbol is defined in a shared library.
2772         Create an external GOT entry for the GOT16 relocation if the
2773         symbol was forced local.
2774         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
2775         dynamic index if the symbol was forced local.
2776
2777 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2778
2779         * elf32-mips.c: Fix typos in comments.
2780
2781 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
2782
2783         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
2784         CORE_VERSION_1.
2785
2786 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
2787
2788         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
2789         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
2790         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
2791         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
2792         (bfd_elf32_m68hc11_vec): Likewise.
2793         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
2794         Supports 68hc11 & 68hc12  at the same time.
2795         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
2796         bfd_target_vector.
2797         (bfd_elf32_m68hc11_vec): Likewise.
2798         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
2799         * archures.c (bfd_m68hc12_arch): Define and register in global list
2800         (bfd_m68hc11_arch): Likewise.
2801         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
2802         BFD_RELOC_M68HC11_3B): Define.
2803         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
2804         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
2805
2806 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
2807
2808         * elf_bfd.h (struct elf_backend_data): Add info argument to
2809         elf_backend_hide_symbol.
2810         (_bfd_elf_link_hash_hide_symbol): Likewise.
2811         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
2812         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
2813         * elflink.h (elf_link_add_object_symbols): Likewise.
2814         (elf_link_assign_sym_version): Likewise.
2815
2816 2000-06-18  H.J. Lu  <hjl@gnu.org>
2817
2818         * coff-i386.c (coff_i386_reloc): Don't return in case of
2819         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
2820         Compensate PE relocations when linking with non-PE object
2821         files to generate a non-PE executable.
2822
2823 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
2824
2825         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
2826         GOT entries if we're doing a static link or -Bsymbolic link.
2827
2828 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
2829
2830         * elflink.h (elf_link_adjust_relocs): Check for and call backend
2831         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
2832         available.
2833         (elf_link_output_relocs): Likewise.
2834         (elf_reloc_link_order): Likewise.
2835
2836 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2837
2838         * archures.c (enum bfd_architecture): #define constants for
2839         PowerPc and RS6000 machine numbers.
2840         * bfd-in2.h: Regenerate.
2841         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
2842         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
2843         and RS6000 machine numbers using #defined constants from
2844         archures.c.
2845         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
2846         machine numbers using #defined constants from archures.c.  Add
2847         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
2848         64-bit words in 620 entry.
2849         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
2850         RSC, and RS2.
2851         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
2852
2853 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
2854
2855         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
2856         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
2857         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
2858
2859 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2860
2861         * bfd-in.h (bfd_family_coff): Define.
2862         * bfd-in2.h: Regenerate.
2863         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
2864         coff_find_nearest_line): Check COFFness using bfd_family_coff()
2865         instead of bfd_target_coff_flavour.
2866         * cofflink.c (_bfd_coff_final_link): Likewise.
2867         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
2868         exclude XCOFF files.
2869         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2870         Likewise.
2871         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
2872         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
2873         * xcofflink.c (XCOFF_XVECP): Delete.
2874         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
2875         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
2876         bfd_xcoff_record_link_assignment,
2877         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
2878         check for bfd_target_xcoff_flavour.
2879
2880 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
2881
2882         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
2883         files on AIX 4.3.
2884         (read_hdr): New function.
2885         (rs6000coff_core_p): Store mstsave or __context64 struct instead
2886         of trying to extract individual registers.  Set abfd->arch_info
2887         to match the architecture that created the core file.
2888         (rs6000coff_get_section_contents): Delete.
2889         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
2890
2891 2000-06-14  H.J. Lu  <hjl@gnu.org>
2892
2893         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
2894         is NULL.
2895
2896 2000-06-13  H.J. Lu  <hjl@gnu.org>
2897
2898         * configure: Regenerate.
2899
2900 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
2901
2902         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
2903         armpei_little_vec.
2904
2905 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
2906
2907         * configure.in (VERSION): Update to show this is the CVS mainline.
2908
2909 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
2910
2911         * elf32-d10v.c: Include elf/d10v.h
2912         (enum reloc_type): Delete.
2913         * elf32-d30v.c: Include elf/d30v.h
2914         (enum reloc_type): Delete.
2915
2916         * Makefile.am: Run "make dep-am" to regenerate dependencies.
2917         * Makefile.in: Regenerate.
2918
2919         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
2920         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
2921         move HOWTOs into elf_howto_table.
2922         (R_386_standard, R_386_ext_offset): Define.
2923         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
2924         (elf_i386_reloc_type_lookup): Modify calculation of index into
2925         elf_howto_table since we've removed the padding.
2926         (elf_i386_info_to_howto_rel): Likewise.
2927         (elf_i386_relocate_section): Likewise.
2928
2929 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
2930
2931         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
2932
2933 2000-06-05  H.J. Lu  <hjl@gnu.org>
2934
2935         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
2936         an error when seeing an undefined symbol with hidden/internal
2937         attribute. It is handled in *_relocate_section ().
2938
2939 2000-06-05  H.J. Lu  <hjl@gnu.org>
2940
2941         * elflink.h (elf_fix_symbol_flags): Follow the link for the
2942         indirect symbol for the ELF_LINK_NON_ELF bit.
2943         (elf_link_output_extsym): Don't output the indirect symbol even
2944         if the ELF_LINK_NON_ELF bit is set.
2945
2946 2000-06-01  J.T. Conklin  <jtc@redback.com>
2947
2948         * config.bfd (i[3456]86-*-netbsdelf*): New target.
2949         (i[3456]86-*-netbsdaout*): New target.
2950         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
2951         (i[3456]86-*-openbsd*): Likewise.
2952
2953 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
2954
2955         * trad-core.c: From hpux-core.c, include <dirent.h> or
2956         <sys/ndir.h> when possible.
2957
2958 2000-05-31  Nick Clifton  <nickc@cygnus.com>
2959
2960         * opintl.h (_(String)): Explain why dgettext is used instead
2961         of gettext.
2962
2963 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
2964
2965         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
2966         definitions.  We must not assume they are sorted in the file
2967         according to their index numbers.
2968
2969 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
2970
2971         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
2972         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
2973         R_PARISC_DIR17F are for absolute branches; Handle them as such.
2974
2975 2000-05-30  Nick Clifton  <nickc@cygnus.com>
2976
2977         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
2978         80960CA, 80960MC as valid machine names.
2979
2980 2000-05-30  H.J. Lu  <hjl@gnu.org>
2981
2982         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
2983         visibility bits if the symbol is undefined. Correctly handle
2984         weak undefined symbols with hidden and internal attributes.
2985
2986         * elflink.h (elf_link_add_object_symbols): Always turn the
2987         symbol into local if it has the hidden or internal attribute.
2988
2989 2000-05-29  Philip Blundell  <philb@gnu.org>
2990
2991         * ppcboot.c:  Add packed attribute if compiling with GCC.
2992
2993 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
2994
2995         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
2996
2997 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
2998
2999         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
3000         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
3001         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
3002         a few old comments.
3003
3004 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
3005
3006         * Makefile.am: Update dependencies with "make dep-am"
3007         * Makefile.in: Regenerate.
3008
3009         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
3010         bindtextdomain): Replace defines with those from intl/libgettext.h
3011         to quieten gcc warnings.
3012
3013 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
3014
3015         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
3016
3017         * archive.c (normalize, bfd_bsd_truncate_arname,
3018         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
3019         file names with backslashes.
3020
3021         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
3022         before opening it.
3023
3024         * sysdep.h: Include filenames.h.
3025
3026 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
3027
3028         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
3029
3030 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
3031
3032         * elf64-sparc.c (sparc64_elf_relax_section): New.
3033         (sparc64_elf_relocate_section): Optimize tail call into branch always
3034         if possible.
3035         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3036         (elf32_sparc_relax_section): New.
3037
3038 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
3039
3040         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
3041         Remove unusued variables.
3042         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
3043         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
3044         previous fix, so that shared libs really don't influence targets
3045         extension mask and memory model.
3046
3047 2000-05-23  H.J. Lu  <hjl@gnu.org>
3048
3049         * elf64-alpha.c (elf64_alpha_relocate_section): Check
3050         h->root.other not h->other.
3051         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3052
3053         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
3054
3055 2000-05-23  H.J. Lu  <hjl@gnu.org>
3056
3057         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
3058         undefined symbol with the non-default visibility attributes.
3059         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3060         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3061         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3062         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3063         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3064         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3065         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3066         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3067         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3068         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
3069         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3070
3071 2000-05-22  Richard Henderson  <rth@cygnus.com>
3072
3073         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
3074         PCREL22, PCREL64I.  Zero size of special relocs.
3075         (elf64_ia64_reloc_type_lookup): Likewise.
3076         (USE_BRL, oor_brl, oor_ip): New.
3077         (elf64_ia64_relax_section): New.
3078         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
3079         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
3080         (elf64_ia64_relocate_section): Likewise.
3081         (bfd_elf64_bfd_relax_section): New.
3082         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
3083         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
3084         * bfd-in2.h, libbfd.h: Regenerate.
3085
3086 2000-05-22  Nick Clifton  <nickc@cygnus.com>
3087
3088         * configure.in : Add peigen.lo to MIPS PE targets.
3089         * configure: Regenerate.
3090
3091 2000-05-22  Momchil Velikov  <velco@fadata.bg>
3092
3093         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
3094         only if it is known for both input and output bfds. Separate
3095         error message strings as in some languages, it may be necessary
3096         to change more than one place in the string to change between
3097         'big' and 'little'.
3098
3099         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
3100         endianess checks, call _bfd_generic_verify_endian_match() instead.
3101
3102         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3103
3104         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
3105
3106         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
3107         endianess before checking bfd flavours.
3108
3109 2000-05-22  H.J. Lu  <hjl@gnu.org>
3110
3111         * elflink.h (elf_link_output_extsym): Clear the visibility
3112         field for symbols not defined locally.
3113
3114 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
3115
3116         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3117         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3118         (hppa_rebuild_insn): Mask immediate bits here instead.
3119         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3120
3121 2000-05-18  Momchil Velikov <velco@fadata.bg>
3122
3123         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
3124         relocs for an executable, ensure that they are virtual addresses.
3125
3126 2000-05-18  Jeffrey A Law  (law@cygnus.com)
3127
3128         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
3129
3130 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
3131             Rick Gorton             <gorton@scrugs.lkg.dec.com>
3132
3133         * elflink.h: Add emitrelocations support: when enabled, relocation
3134         information and relocation sections are put into final output
3135         executables.  If the emitrelocations flag is set, do the following:
3136         (elf_bfd_final_link): Emit relocation sections.
3137         (elf_link_input_bfd): Compute relocation section contents.
3138         (elf_gc_sections): Don't clean relocation sections.
3139
3140 2000-05-16  Catherine Moore  <clm@cygnus.com>
3141
3142         * som.c (som_decode_symclass):  Recognize weak symbols.
3143
3144 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
3145
3146         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
3147         read idata section only from dataoff.
3148         (pe_print_edata): Correctly check for valid eat_member.
3149
3150 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
3151
3152         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
3153
3154 2000-05-14  Philip Blundell  <philb@gnu.org>
3155
3156         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
3157
3158 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
3159
3160         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
3161
3162         * peigen.c (pe_print_idata): Look for .idata section and print
3163         info even if data directory has zero entries.  Read idata section
3164         starting from dataoff, and adjust all data offsets to suit.  Cast
3165         all bfd_vma vars to unsigned long before passing to fprintf.
3166         * peigen.c (pe_print_edata): Similarly, look for .edata section
3167         and print info even if data directory has zero entries.  Cast
3168         all bfd_vma vars to unsigned long before passing to fprintf.
3169
3170         From Szabolcs Szakacsits <szaka@F-Secure.com>
3171         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
3172         directory size which may be bogus.
3173         * peigen.c (pe_print_edata): Similarly.
3174
3175 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
3176
3177         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
3178         section is empty.
3179         (copy_private_bfd_data): Allow for space possibly taken up by elf
3180         headers when calculating segment physical address from lma.
3181
3182 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
3183
3184         * versados.c (versados_scan): Init stringlen and pass_2_done.
3185
3186         * trad-core.c (trad_unix_core_file_p): Return
3187         bfd_error_wrong_format rather than bfd_error_file_truncated.
3188
3189         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
3190         add_data_entry.  DataDirectory virtual address is relative.
3191         (pe_print_idata): Account for relative DataDirectory virtual
3192         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
3193         (pe_print_edata): Similarly.
3194
3195         From Szabolcs Szakacsits <szaka@F-Secure.com>
3196         * peigen.c (dir_names): Add Delay Import Directory.
3197         (pe_print_idata):  Always search for bfd section containing
3198         idata address rather than looking up section name.  Print this
3199         section name rather than .idata.
3200         (pe_print_edata): Similarly.  Also print some fields as %08lx.
3201         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
3202         Win32Version.
3203
3204 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
3205
3206         * xcoff.h: Rename to xcoff-target.h
3207         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
3208         * coff-rs6000.c: Ditto.
3209         * coff64-rs6000.c: Ditto.
3210         * coff-pmac.c: Ditto.
3211         * Makefile.in: Regenerate.
3212
3213 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
3214
3215         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
3216         Change U802TOC64MAGIC to U803XTOCMAGIC.
3217
3218 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
3219
3220         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
3221         * bfd-in.h: Prototype bfd_elf_get_arch_size.
3222         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
3223
3224 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
3225
3226         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
3227
3228 2000-05-03  Martin v. Lvwis  <loewis@informatik.hu-berlin.de>
3229
3230         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
3231         hidden and internal symbols.
3232         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
3233         visibility.
3234         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
3235         assign a PLT or GOT entry to symbols with hidden and
3236         internal visibility.
3237
3238 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
3239
3240         * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
3241         the .bss section.
3242         * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3243
3244 2000-05-02  H.J. Lu  <hjl@gnu.org>
3245
3246         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
3247         ELFOSABI_SYSV.
3248
3249 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
3250
3251         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
3252         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
3253         dependencies.
3254         * Makefile.in: Regenerate.
3255
3256 2000-05-01  Jim Wilson  <wilson@cygnus.com>
3257
3258         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
3259         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
3260         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
3261         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
3262         * Makefile.in: Rebuild.
3263
3264 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
3265
3266         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
3267         doesn't work very well.
3268
3269         * elf-hppa.h (elf_hppa_internal_shdr): Define.
3270         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
3271         Set hdr->s_type to 1 if ARCH_SIZE == 32.
3272         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
3273         (elf_hppa_info_to_howto): Likewise.
3274         (elf_hppa_info_to_howto_rel): Likewise.
3275         (elf_hppa_reloc_type_lookup): Likewise.
3276         (elf_hppa_is_local_label_name): Likewise.
3277         (elf_hppa_fake_sections): Likewise.
3278         (elf_hppa_final_write_processing): Likewise.
3279         (elf_hppa_howto_table): Fully initialise all entries.
3280         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
3281         (elf_hppa_info_to_howto): Likewise.
3282         (elf_hppa_info_to_howto_rel): Likewise.
3283         (elf_hppa_reloc_type_lookup): Likewise.
3284         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
3285         elf_hppa_unmark_useless_dynamic_symbols,
3286         elf_hppa_remark_useless_dynamic_symbols,
3287         elf_hppa_record_segment_addrs, elf_hppa_final_link,
3288         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
3289         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
3290         elf32-hppa.c mess is cleaned up.
3291         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
3292         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
3293         r_field then call hppa_field_adjust inline func with variable
3294         r_field arg, instead call hppa_field_adjust with fixed arg.
3295         In case R_PARISC_PCREL22F, don't set r_field.
3296         (elf_hppa_relocate_insn): Change args and return type to unsigned
3297         int.  Call re_assemble_* funcs to do the work.
3298
3299         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
3300         sign extending.
3301
3302         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
3303         extending.
3304         (sign_extend): Mask first before sign extending.
3305         (low_sign_extend): Rewrite without condition expression.
3306         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
3307         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
3308         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3309         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
3310         result as function return value rather than through pointer arg.
3311         Accept unsigned int args, and return unsigned int.
3312         (re_assemble_3): New.  Combines function of dis_assemble_3 with
3313         re-assembly of opcode and immediate.
3314         (re_assemble_12): Likewise.
3315         (re_assemble_16): Likewise.
3316         (re_assemble_17): Likewise.
3317         (re_assemble_21): Likewise.
3318         (re_assemble_22): Likewise.
3319         (hppa_field_adjust): Rewrite and document, paying attention to
3320         size of types and signed/unsigned issues.
3321         (get_opcode): Shift before masking.
3322         (FDLW): Rename to FLDW.
3323         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
3324         (hppa_rebuild_insn): Change args and return value to unsigned
3325         int.  Make use of re_assemble_*.  Correct case 11.
3326
3327         * dep-in.sed: Handle ../opcodes/.
3328         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
3329         elf64-hppa.h, hppa_stubs.h, xcoff.h.
3330         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
3331         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
3332         elfarm-nabi.lo dependencies outside of auto-dependency area.
3333         Regenerate dependencies.
3334         * Makefile.in: Regenerate.
3335
3336         * configure.in (TRAD_HEADER): Test non-null before
3337         AC_DEFINE_UNQUOTED.
3338         * configure: Regenerate.
3339
3340         * reloc.c: Fix mis-spelling in comment.
3341
3342 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
3343
3344         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
3345         * vms.c (vms_openr_next_archived_file): Return NULL.
3346
3347 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3348
3349         * coffcode.h Copy changes mistakenly done to libcoff.h in
3350         4/24/2000 patch.
3351
3352 2000-04-29  Andreas Jaeger  <aj@suse.de>
3353
3354         * libbfd-in.h: Correctly check GCC version.
3355         * bfd-in.h: Likewise.
3356         * libhppa.h: Likewise.
3357         * libbfd.h: Regenerate.
3358         * bfd-in2.h: Regenerate.
3359
3360 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3361
3362         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
3363         coffdu-rs6000.{lo,c}.
3364         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
3365         on xcoff.h
3366         * Makefile.in: Regenerate.
3367         * xcoff.h: New file.
3368         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
3369         * coff-rs6000.c: Move all declarations and defines that are
3370         common to the xcoff backends into xcoff.h
3371         * coff64-rs6000.c: Ditto,
3372
3373 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3374
3375         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
3376         _bfd_coff_force_symnames in strings and
3377         _bfd_coff_debug_string_prefix_length to their default values.
3378         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
3379
3380 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3381
3382         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
3383         _bfd_coff_force_symnames in strings and
3384         _bfd_coff_debug_string_prefix_length to their default values.
3385
3386 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
3387
3388         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
3389         Check local_got_refcounts before dereferencing.
3390
3391         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
3392         before deciding we don't need R_PPC_PLT32 relocation.
3393         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
3394         dereferencing.
3395
3396         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
3397
3398         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
3399         .plt entries.
3400         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
3401         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
3402         (elf_i386_relocate_section): Allow for .plt to go missing.
3403         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
3404         can use a relative reloc for got as elf_i386_relocate_section.
3405         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
3406
3407 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
3408
3409         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
3410
3411 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
3412
3413         * Makefile.am (coff64-rs6000.lo): New rule.
3414         * Makefile.in: Regenerate.
3415         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
3416         xcoff_is_local_label_name, xcoff_rtype2howto,
3417         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
3418         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
3419         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
3420         (NO_COFF_SYMBOLS): Define.
3421         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
3422         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
3423         internally.
3424         (MINUS_ONE): New macro.
3425         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
3426         relocation.
3427         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
3428         coff_SWAP_aux_out): Map to the new functions.
3429         * coff64-rs6000.c: New file.
3430         * libcoff.h (bfd_coff_backend_data): Add new fields
3431         _bfd_coff_force_symnames_in_strings and
3432         _bfd_coff_debug_string_prefix_length.
3433         (bfd_coff_force_symnames_in_strings,
3434         bfd_coff_debug_string_prefix_length): New macros for above fields.
3435         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
3436         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
3437         of using coff_swap_sym_in directly.
3438         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
3439         (coff_set_flags) Set magic for XCOFF64.
3440         (coff_compute_section_file_positions): Add symbol name length to
3441         string section length if bfd_coff_debug_string_prefix_length is
3442         true.
3443         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
3444         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
3445         using coff_swap_lineno_in directly.
3446         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
3447         and _bfd_coff_debug_string_prefix_length fields.
3448         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
3449         symbol names into strings table when
3450         bfd_coff_force_symnames_in_strings is true.
3451         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
3452         SET_RELOC_VADDR): New macros.
3453         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
3454         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
3455         code.
3456         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
3457         changes within RS6000COFF_C specific code.
3458         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
3459         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
3460         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3461         Extend existing hack on target name.
3462         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
3463         target name.
3464         * coff-tic54x.c (ticof): Keep up to date with new fields
3465         in bfd_coff_backend_data.
3466         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
3467         targ_selvecs to include rs6000coff64_vec for rs6000.
3468         * configure.in: Add rs6000coff64_vec case.
3469         * cpu-powerpc.c: New bfd_arch_info_type.
3470
3471 2000-04-24  Jeffrey A Law  (law@cygnus.com)
3472
3473         * config.bfd: Only disable elf32-hppa vectors, not all of the
3474         BSD and OSF configuration support.  Provide (disabled) clauses
3475         for PA64 support.
3476         * configure.in: Add clause for PA64 support.
3477         * configure: Rebuilt.
3478
3479         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
3480         (bfd_elf64_hppa_vec): Declare.
3481
3482         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
3483         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
3484         (elf64-hppa.lo): Add dependencies.
3485         * Makefile.in: Rebuilt.
3486
3487         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
3488
3489 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
3490
3491         * libhppa.h (dis_assemble_16): New function.
3492         (pa_arch): Added pa20w element.
3493
3494 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
3495
3496         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
3497         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
3498         bfd_elf64_slurp_reloc_table.
3499
3500         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
3501         definitions to get external names.
3502         (elf_write_relocs): Renamed from write_relocs and make global.
3503         (elf_slurp_reloc_table): Make global.
3504         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
3505
3506         * archive.c (hpux_uid_gid_encode): New function.
3507         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
3508         defined and the ID is greater than 99999.
3509         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
3510         special uid/gid fields into 32 bit values.
3511
3512 2000-04-21  Matthew Green  <mrg@cygnus.com>
3513
3514         * config.bfd: Add NetBSD/sparc64 support.
3515
3516 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
3517                           David Mosberger  <davidm@hpl.hp.com>
3518                           Timothy Wall <twall@cygnus.com>
3519                           Jim Wilson  <wilson@cygnus.com>
3520
3521         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
3522         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
3523         (BFD64_BACKENDS): Add elf64-ia64.lo.
3524         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
3525         (cpu-ia64.lo, elf64-ia64.lo): New rules.
3526         * Makefile.in: Rebuild.
3527         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
3528         (bfd_ia64_arch): Declare.
3529         (bfd_archures_list): Add bfd_ia64_arch.
3530         * bfd-in2.h: Rebuild.
3531         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
3532         * configure: Rebuild.
3533         * configure.host: (ia64-*-linux*): New host.
3534         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
3535         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
3536         * elf.c (prep_headers): Add bfd_arch_ia64.
3537         * libbfd.h: Rebuild.
3538         * reloc.c: Add IA-64 relocations.
3539         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
3540         Declare.
3541         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
3542         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
3543
3544 2000-04-21  Richard Henderson  <rth@cygnus.com>
3545
3546         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
3547         contents when performing a partial link.
3548         (bfd_elf_d30v_reloc_21): Likewise.
3549
3550 2000-04-20  H.J. Lu  <hjl@gnu.org>
3551
3552         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
3553         patch to symbols defined by a shared object.
3554         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
3555
3556 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3557
3558         K&R compiler fixes.
3559         * dwarf2.c (concat_filename): Avoid string literal concatenation.
3560         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
3561
3562 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
3563
3564         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
3565         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
3566         (coff-ia64.lo): Add dependency.
3567         * Makefile.in: Regenerate.
3568         * coff-ia64.c: New file.
3569         * efi-app-ia32.c: Ditto.
3570         * efi-app-ia64.c: Ditto.
3571         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
3572         (coff_set_flags): Ditto.
3573         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
3574         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
3575         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
3576         * configure: Regenerate.
3577         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
3578         (PUT_OPTHDR_IMAGE_BASE): Ditto.
3579         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
3580         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
3581         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
3582         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
3583         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
3584         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
3585         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
3586         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
3587         (GET_PDATA_ENTRY): Ditto.
3588         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
3589         data_start.  Use above macros to read fields that are 64 bit wide for
3590         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
3591         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
3592         FileAlignment and SectionAlignment to minimum alignment if they
3593         are zero.
3594         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
3595         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
3596         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
3597         Use above macros to write fields that are 64 bit wide for
3598         COFF_WITH_PEP64.
3599         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
3600         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
3601         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
3602         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
3603         begin address, end address, and unwind info address only.  Use
3604         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
3605         print addresses.
3606         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
3607         HIGH3ADJ relocation names.
3608         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
3609         * targets.c: Declare bfd_efi_app_ia32_vec and
3610         bfd_efi_app_ia64_vec.
3611         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
3612         bfd_efi_app_ia64_vec.
3613
3614 2000-04-17  Timothy Wall  <twall@cygnus.com>
3615
3616         * bfd-in2.h: Add prototypes for tic54x load page access.
3617         * bfd-in.h: Regenerate.
3618         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
3619         in customized _set_arch_mach function.
3620         * coffcode.h (coff_set_alignment_hook): Set section load page if
3621         the appropriate macro is defined.
3622         (write_object_contents): Read section load page.
3623
3624 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
3625
3626         * elf32-hppa.h: Update copyright date.
3627
3628         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
3629         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
3630
3631         * elf32-d30v.c (MAX32): Don't use LL suffix.
3632         (MIN32): Define in terms of MAX32.
3633         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
3634
3635         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
3636         expression.
3637
3638         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
3639
3640 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
3641
3642         * dep-in.sed: Match space before file name, not after.
3643         * Makefile.am: Regenerate dependencies.
3644         * Makefile.in: Regenerate.
3645
3646         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
3647         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
3648         extend without an if statement.
3649
3650 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
3651
3652         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
3653         signed quantites.
3654         * elf32-mips.c (gprel16_with_gp): Likewise.
3655         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
3656         here using -0x40000, not (int)0xfffc0000.
3657         (elf32_hppa_size_of_stub): Likewise.
3658
3659 2000-04-11  Timothy Wall  <twall@cygnus.com>
3660
3661         * coff-tic54x.c: Now builds with all targets.
3662         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
3663         * Makefile.in: Regenerate.
3664         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
3665         unitialized variable.
3666
3667 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
3668
3669         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
3670         --enable-build-warnings option.
3671         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
3672         * Makefile.in, configure: Re-generate.
3673
3674 2000-04-07  Nick Clifton  <nickc@cygnus.com>
3675
3676         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
3677         BFD_RELOC_THUMB_PCREL_BLX.
3678
3679         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3680         R_ARM_XPC25 and R_ARM_THM_PC22.
3681
3682         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
3683         R_ARM_XPC25 and R_ARM_THM_XPC22.
3684         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
3685         R_ARM_[XPC25|THM_XPC22].
3686
3687         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
3688         elf/arm-oabi.h to elf/arm.h
3689
3690         * Makefile.am: Fix dependency for elfarm-oabi.c
3691         * Makefile.in: Regenerate.
3692
3693         * bfd-in2.h: Regenerate.
3694         * libbfd.h: Regenerate.
3695
3696 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3697
3698         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
3699         and restore it on failure.  Release newly allocated tdata on
3700         failure.
3701
3702 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
3703
3704         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
3705         (decode_line_info): Set it.  Report error if unit->line_offset is
3706         equal to or larger than it.
3707
3708 2000-04-07  Timothy Wall  <twall@cygnus.com>
3709
3710         * targets.c: Added vecs for tic54x.
3711         * reloc.c: Added relocs for tic54x.
3712         * libbfd.h: Regenerated.
3713         * configure: Add TI COFF vecs for tic54x.
3714         * configure.in: Ditto.
3715         * config.bfd (targ_cpu): Recognize new tic54x target.
3716         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
3717         * bfd-in2.h: Add tic54x target and relocations.
3718         * Makefile.am, Makefile.in: Add tic54x target.
3719         * archures.c (bfd_archures_list): Add tic54x target.
3720         * coff-tic54x.c: New.
3721         * cpu-tic54x.c: New.
3722
3723 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3724
3725         * elfcore.h (elf_core_file_p): call backend_object_p which
3726         thereby gets an opportunity to update the arch/machine type.
3727
3728 2000-04-06  Timothy Wall  <twall@cygnus.com>
3729
3730         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
3731         class.  Handle SEC_CLINK and SEC_BLOCK flags.
3732         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
3733         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
3734
3735 2000-04-06  Nick Clifton  <nickc@cygnus.com>
3736
3737         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
3738         EF_INTERWORK if this is an unknown EABI.
3739         (elf32_arm_merge_private_bfd_data): Check EABI version
3740         numbers.  Only check EF_xxx flags if the EABI version number
3741         is unknown.
3742         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
3743         if the EABI version number is unknown.
3744         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
3745         if the EABI version number is unknown.
3746
3747 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
3748
3749         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
3750         BFD_RELOC_SH_LOOP_END.
3751         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
3752         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
3753         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
3754         (sh_elf_reloc_loop): New function.
3755         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
3756         any more.
3757         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
3758         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
3759         * bfd-in2.h, libbfd.h: Regenerate.
3760
3761 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
3762
3763         * po/bfd.pot: Regenerate.
3764
3765         * Makefile.am: Remove extraneous mkdep comment.
3766         (MKDEP): Use gcc -MM rather than mkdep.
3767         (DEP): Quote when passing vars to sub-make.  Add warning
3768         message to end.
3769         (DEP1): Rewrite for "gcc -MM".
3770         (CLEANFILES): Add DEP2.
3771         Update dependencies.
3772         * Makefile.in: Regenerate.
3773
3774 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
3775
3776         * configure.in: Added corefile support for AIX 4.3.  In particular,
3777         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
3778         compiling rs6000-core.c.
3779         * configure: Regenerated.
3780
3781 2000-04-03  H.J. Lu  <hjl@gnu.org>
3782
3783         * cache.c (bfd_open_file): Unlink the output file only if
3784         it has non-zero size.
3785
3786 2000-04-01  Ken Block USG  <block@zk3.dec.com>
3787
3788         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
3789         relative relocations for non-loaded sections in shared objects.
3790         (elf64_alpha_check_relocs): Similarly.
3791
3792 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
3793
3794         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
3795         BFD_RELOC_16 to switch for extended relocs.
3796         (MY_swap_ext_reloc_in): New.
3797         (MY_swap_ext_reloc_out): New.
3798         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
3799         than NAME(aout,swap_ext_reloc_in) for extended relocs.
3800         (NAME(aout,squirt_out_relocs)): Similarly use
3801         MY_swap_ext_reloc_out.
3802         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
3803
3804 2000-04-03  Kazu Hirata  <kazu@hxi.com>
3805
3806         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
3807         the R_PCRWORD_B case.
3808
3809 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
3810
3811         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
3812         on some targets.
3813         * ihex.c : Ditto.
3814
3815 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
3816
3817         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
3818         HOWTO references to bfd_elf_generic_reloc, that have
3819         partial_inplace == true, now use the new function.  The function
3820         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
3821         extends its fixes to the R_M32R_{16,24,32} relocs.
3822         The new logic in m32r_elf_lo16_reloc() has been removed, and
3823         it instead calls the new routine to obtain that functionality.
3824
3825 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
3826
3827         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
3828         elf32_avr_check_relocs, avr_final_link_relocate,
3829         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
3830         elf32_avr_object_p): Add prototypes.
3831         (elf32_avr_gc_mark_hook): Add default for h->root.type.
3832         (bfd_elf_avr_final_write_processing): Make static.
3833
3834 2000-03-27  Denis Chertykov  <denisc@overta.ru>
3835
3836         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
3837         * archures.c (bfd_architecture): Add AVR architecture.
3838         (bfd_archures_list): Add reference to AVR architecture info.
3839         * elf.c (prep_headers): Handle bfd_arch_avr.
3840         * reloc.c: Add various AVR relocation enums.
3841         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
3842         list.
3843         * Makefile.am: Add support for AVR elf.
3844         * configure.in: Likewise.
3845         * config.bfd: Likewise.
3846         * Makefile.in: Regenerate.
3847         * configure: This too.
3848         * bfd-in2.h: And this.
3849         * libbfd.h: And this.
3850
3851 2000-03-24  H.J. Lu  <hjl@gnu.org>
3852
3853         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
3854         (elf64_alpha_find_reloc_at_ofs): Likewise.
3855
3856 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
3857
3858         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
3859         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
3860         allowable range used to be -2**(n-1) to 2**n-1.
3861         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
3862         "boolean overflow" with "bfd_reloc_status_type flag".
3863
3864 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
3865
3866         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
3867
3868 2000-03-14  Kazu Hirata  <kazu@hxi.com>
3869
3870         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
3871         of shrinks properly, including the last reloc.
3872
3873 2000-03-13  Kazu Hirata  <kazu@hxi.com>
3874
3875         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
3876         check for R_MOVL2.
3877
3878 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
3879
3880         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
3881         a format mismatch rather than an "error" from bfd_read such as
3882         bfd_error_file_truncated.
3883
3884 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
3885
3886         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
3887         sign-extension and big-endian compensation for
3888         R_MIPS_64 even in ld -r.
3889
3890 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
3891
3892         * elf32-mips.c (mips_elf_next_relocation): Rename from
3893         mips_elf_next_lo16_relocation, and generalize to look
3894         for any relocation type.
3895         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
3896         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
3897         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
3898         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
3899         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
3900         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
3901         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
3902         (mips_rtype_to_howto): Likewise.
3903         (mips_elf_calculate_relocation): Handle new relocs.
3904         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
3905         are paired.  The addend for R_MIPS_GNU_REL16_S2
3906         is shifted right two bits.
3907
3908 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
3909
3910         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
3911         comment, and ensure it doesn't happen again.
3912         (bfd_install_relocation): Same here.
3913         (_bfd_relocate_contents): Don't bother assigning unused signmask
3914         shift result.  Fix typos in comments.
3915         Remove trailing whitespace throughout file.
3916
3917 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
3918
3919         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
3920         * bfd-in2.h: Rebuild.
3921
3922 2000-03-06  Nick Clifton  <nickc@cygnus.com>
3923
3924         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
3925         sym_ptr_ptr fields.
3926         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
3927         (SIZEOF_ILF_STRINGS): Redefine.
3928         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
3929         relative reloc, as opposed to a section relative reloc.
3930         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
3931         not C_LABEL.
3932         Add length of symbol's prefix to string pointer.
3933         Store a pointer to the symbol in the symbol pointer table.
3934         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
3935         Initialise the symbol pointer table.
3936         Store the hint in the Hint/Name table.
3937         Make the jump reloc be symbol realtive, not section relative.
3938         Create an import symbol for imported code.
3939
3940 2000-03-06  Catherine Moore  <clm@cygnus.com>
3941
3942         * elf.c (swap_out_syms):  Check for null type_ptr.
3943
3944 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
3945
3946         * aout-target.h (MY(write_object_contents)): Remove unused
3947         and unusable "#if CHOOSE_RELOC_SIZE".
3948         * pc532-mach.c (MY(write_object_contents)): Ditto.
3949         * netbsd.h (MY(write_object_contents)): Ditto.
3950         * hp300hpux.c (MY(write_object_contents)): Ditto.
3951         * freebsd.h (MY(write_object_contents)): Ditto.
3952         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
3953
3954 2000-02-29  H.J. Lu  <hjl@gnu.org>
3955
3956         * peicode.h (jtab): Make it static.
3957
3958         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
3959         defined and COFF_IMAGE_WITH_PE is not defined.
3960         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
3961         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
3962
3963 2000-03-01  Nick Clifton  <nickc@cygnus.com>
3964
3965         * coff-arm.c (bfd_arm_process_before_allocation): Make
3966         'symndx' signed to prevent compile time warning.
3967
3968         * coff-mcore.c: Remove unused prototype for pe_object_p.
3969
3970         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
3971         functions that are not used when COFF_IMAGE_WITH_PE is
3972         defined.
3973         (struct sh_opcode): Change type of 'flags' field to unsigned
3974         long so that it can hold the USESAS flag.
3975
3976         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
3977
3978         * elf-m10300.c (mn10300_elf_relax_section): Initialise
3979         'sym_sec'.
3980
3981         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
3982         parameters.
3983         Remove unusued variables and code.
3984         (elf_backend_add_symbol_hook): Fix prototype.
3985
3986         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
3987         'srelgot'.
3988
3989         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
3990         'oldinst'.
3991
3992         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
3993         parameters.
3994         Remove unusued variables and code.
3995         (elf_backend_add_symbol_hook): Fix prototype.
3996
3997         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
3998
3999         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
4000         to unused function parameter.
4001
4002         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
4003         parameters.
4004         Use EMPTY_HOWTO to initialise empty howto slots.
4005         Remove unused variables.
4006
4007         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
4008
4009 2000-03-01  H.J. Lu  <hjl@gnu.org>
4010
4011         * aoutx.h (aout_link_input_section_std): Pass "true" to
4012         the undefined_symbol callback.
4013         (aout_link_input_section_ext): Likewise.
4014         * bout.c (get_value): Likewise.
4015         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4016         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
4017         Likewise.
4018         (alpha_relocate_section): Likewise.
4019         * coff-arm.c (coff_arm_relocate_section): Likewise.
4020         * coff-i960.c (coff_i960_relocate_section): Likewise.
4021         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4022         * coff-mips.c (mips_relocate_section): Likewise.
4023         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4024         * coff-sh.c (sh_relocate_section): Likewise.
4025         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4026         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
4027         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4028         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4029         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4030         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4031         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4032         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4033         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4034         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4035         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4036         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4037         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4038         * elflink.h (elf_link_output_extsym): Likewise.
4039         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
4040         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
4041         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
4042
4043         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
4044         undefined_symbol callback when building shared library with
4045         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
4046         "true".
4047         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4048         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4049         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4050         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4051         (elf32_mips_get_relocated_section_content): Likewise.
4052         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4053         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4054         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4055         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4056
4057 2000-02-28  Nick Clifton  <nickc@cygnus.com>
4058
4059         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
4060         * Makefile.in: Regenerate.
4061
4062         * configure.in: Add support for mips and sh pe vectors.
4063         * configure: regenerate.
4064
4065         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
4066         targets.
4067
4068         * targets.c: Add mips and sh pe vectors.
4069
4070         * libpei.h (coff_final_link_postscript): Only define if not
4071         already defined.
4072
4073         * coffcode.h: Add support for WinCE magic numbers.
4074
4075         * peigen.c (pe_print_reloc): Update comment and rearrange
4076         appending of newline character.
4077
4078         * peicode.h: Add support for Image Library Format.
4079         (pe_ILF_vars): Structure containing data used by ILF code.
4080         (pe_ILF_make_a_section): New function.  Create a section based
4081         on ILF data.
4082         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
4083         ILF data.
4084         (pe_ILF_make_a_symbol): New function.  Create a symbol based
4085         on ILF data.
4086         (pe_ILF_save_relocs): New function.  Store the relocs created
4087         by pe_ILF_make_a_reloc in a section.
4088         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
4089         an ILF object.
4090         (pe_ILF_object_p): New function.  Return a bfd_target pointer
4091         for an ILF object.
4092         (pe_bfd_object_p): If an ILF object is detected call
4093         pe_ILF_object_p on it.
4094
4095         * coff-arm.c: Add support for WinCE relocs which are different
4096         from normal ARM COFF relocs.
4097         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
4098
4099         * coff-sh.c: Add support for sh-pe target.
4100         * pe-sh.c: New file.  Support code for sh-pe target.
4101         * pei-sh.c: New file.  Support code for sh-pe target.
4102
4103         * pe-mips.c: New file.  Support code for mips-pe target.
4104         * pei-mips.c: New file.  Support code for mips-pe target.
4105
4106 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
4107
4108         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
4109         architecture if the object causing the bump is dynamic.
4110         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
4111         and also don't it for memory ordering.
4112         (sparc64_elf_write_relocs): Take src_rela out of the loop.
4113
4114 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
4115
4116         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
4117         calling bfd_get_section_size_before_reloc.
4118         (decode_line_info): Likewise.
4119         (_bfd_dwarf2_find_nearest_line): Likewise.
4120
4121 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
4122
4123         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
4124         name of the libtool directory.
4125         * Makefile.in: Rebuild.
4126
4127 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
4128
4129         * som.c (SOM_HOWTO): Define.
4130         (som_hppa_howto_table): Use it.
4131
4132 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4133
4134         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
4135
4136         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
4137
4138 2000-02-24  Catherine Moore  <clm@cygnus.com>
4139
4140         * som.c (som_misc_symbol_info):  Add field
4141         secondary_def.
4142         (som_bfd_derive_misc_symbol_info):  Initialize
4143         secondary_def.
4144         (som_build_and_write_symbol_table): Keep track
4145         of secondary_def field.
4146         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
4147         if secondary_def field is set.
4148         (som_bfd_ar_write_symbol_stuff): Initialize
4149         secondary_def.
4150
4151 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
4152
4153         * dwarf2.c (read_address): Read 16-bits addresses.
4154         (parse_comp_unit): Accept addr_size == 2.
4155
4156 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
4157
4158         * bfd-in.h: Update copyright date.
4159
4160 2000-02-23  Linas Vepstas <linas@linas.org>
4161
4162         * cpu-i370.c: New file.
4163         * elf32-i370.c:  New file.
4164         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
4165         (bfd_i370_arch): New.
4166         (bfd_archures_list): Add bfd_i370_arch.
4167         * elf.c (prep_headers): Add bfd_arch_i370.
4168         * Makefile.am: Add support for IBM 370 elf.
4169         * config.bfd: Likewise.
4170         * configure.in: Likewise.
4171         * libbfd.h (bfd_reloc_code_real_names): Likewise.
4172         * reloc.c (bfd_reloc_code_type): Likewise.
4173         * targets.c: Likewise.
4174
4175         * Makefile.in: Regenerate.
4176         * configure: Regenerate.
4177         * bfd-in2.h: Regenerate.
4178
4179 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
4180
4181         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
4182         invalid relocation types, and change them to R_386_NONE.
4183
4184 2000-02-22  H.J. Lu  <hjl@gnu.org>
4185
4186         * elflink.h (elf_link_add_object_symbols): If a version symbol is
4187         not defined, don't add a second ELF_VER_CHR.
4188
4189         * elflink.h (elf_bfd_final_link): Call output_extsym for global
4190         symbols converted to local symbols even when stripping all
4191         symbols.
4192         (elf_link_output_extsym): Process global symbols converted to
4193         local symbols even if they are being stripped.
4194
4195 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
4196
4197         * archures.c (bfd_octets_per_byte): Return unsigned int.
4198         (bfd_arch_mach_octets_per_byte): Ditto.
4199         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
4200         comparison warning.
4201         * section.c (bfd_get_section_size_before_reloc): Quell signed
4202         vs. unsigned comparison warning.
4203         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
4204         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
4205         change.  What was I thinking?
4206         * bfd-in2.h: Regenerate.
4207
4208         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
4209         (elf_gc_sections): Same here.
4210         (elf_gc_common_finalize_got_offsets): And here.
4211
4212 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
4213
4214         ELF HPPA doesn't work at present; remove it until it does.
4215         * config.bfd: Comment out setting targ_defvec to
4216         bfd_elf32_hppa_vec.
4217         * Makefile.am: Rebuild dependencies.
4218         (BFD32_BACKENDS): Remove elf32-hppa.lo.
4219         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
4220         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
4221         * Makefile.in: Rebuild.
4222         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
4223
4224 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
4225
4226         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
4227         is no bfd_free().  Revert bfd_free part of previous change.
4228
4229 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
4230
4231         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
4232         arrays.
4233         (coff_compute_section_file_positions): Use bfd_free to pair
4234         bfd_malloc.
4235         (coff_write_object_contents): Likewise.
4236
4237         * coff-rs6000.c (xcoff_howto_table_16): New variable.
4238         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
4239
4240 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
4241
4242         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
4243         (xcoff_ar_file_hdr_big): New structure.
4244         (SIZEOF_AR_FILE_HDR_BIG): New macro.
4245         (xcoff_ar_hdr_big): New structure.
4246         (SIZEOF_AR_HDR_BIG): New macro.
4247         (xcoff_big_format_p): New macro.
4248         (xcoff_ardata_big): New macro.
4249         (arch_xhdr_big): New macro.
4250         (xcoff_slurp_armap): Handle large archives.
4251         (xcoff_archive_p): Detect large archives.
4252         (xcoff_read_ar_hdr): Handle large archives.
4253         (xcoff_openr_next_archived_file): Handle large archives.
4254         (xcoff_generic_stat_arch_elt): Handle large archives.
4255         (xcoff_write_armap_old): Rename from xcoff_write_armap.
4256         (xcoff_write_armap_big): New function.
4257         (xcoff_write_armap): New function, dispatch to _old or _big.
4258         (xcoff_write_archive_contents_old): Rename from
4259         xcoff_write_archive_contents.
4260         (xcoff_write_archive_contents_big): New function.
4261         (xcoff_write_archive_contents): New function, dispatch to _old or
4262         _big.
4263
4264 2000-02-18  Richard Henderson  <rth@cygnus.com>
4265
4266         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
4267         and hide_symbol members.
4268         (elf_link_hash_copy_indirect): Remove.
4269         (elf_link_hash_hide_symbol): Remove.
4270         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
4271         and elf_backend_hide_symbol.
4272         (_bfd_elf_link_hash_copy_indirect): Declare.
4273         (_bfd_elf_link_hash_hide_symbol): Declare.
4274         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
4275         (_bfd_elf_link_hash_hide_symbol): Likewise.
4276         (_bfd_elf_link_hash_table_init): Don't init killed members.
4277         * elflink.h (elf_link_add_object_symbols): Use the bed function
4278         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
4279         (elf_link_assign_sym_version): Likewise.
4280         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
4281         (elf_backend_hide_symbol): Likewise.
4282         (elfNN_bed): Update for new members.
4283
4284 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
4285
4286         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
4287         STACK_END_ADDR): Define for new core file format.
4288         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
4289         for handling the vagaries of the various core file structures used
4290         by AIX over the years.
4291         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
4292         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
4293         core_dumpx structure.
4294
4295 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
4296
4297         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
4298         (bfd_mach_sh3_dsp): Likewise.
4299         (bfd_mach_sh4): Reinstate.
4300         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
4301         * bfd-in2.h: Regenerate.
4302         * coff-sh.c (struct sh_opcode): flags is no longer short.
4303         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
4304         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
4305         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
4306         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
4307         (sh_opcodes): No longer const.
4308         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
4309         (sh_insn_uses_reg): Check for USESAS and USESR8.
4310         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
4311         (_bfd_sh_align_load_span): Return early for SH4.
4312         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
4313         Take into account that field b of a parallel processing insn
4314         could be mistaken for a separate insn.
4315         * cpu-sh.c (arch_info_struct): New array elements for
4316         sh2, sh-dsp and sh3-dsp.
4317         Reinstate element for sh4.
4318         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
4319         (SH4_NEXT): Reinstate.
4320         (SH3_NEXT, SH3E_NEXT): Adjust.
4321         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
4322         * elf32-sh.c (sh_elf_set_private_flags): New function.
4323         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
4324         (sh_elf_merge_private_data): New function.
4325         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
4326         (bfd_elf32_bfd_copy_private_bfd_data): Define.
4327         (bfd_elf32_bfd_merge_private_bfd_data): Change to
4328         sh_elf_merge_private_data.
4329
4330 2000-02-13  Richard Henderson  <rth@cygnus.com>
4331
4332         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
4333         hide_symbol members.
4334         (elf_link_hash_copy_indirect): New.
4335         (elf_link_hash_hide_symbol): New.
4336         * elflink.h (elf_link_add_object_symbols): Break out copy from
4337         indirect new new symbol to elf.c.
4338         (elf_link_assign_sym_version): Break out privatization of
4339         non-exported symbol to elf.c.
4340         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
4341         (_bfd_elf_link_hash_hide_symbol): New.
4342         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
4343
4344 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
4345
4346         * section.c (_bfd_strip_section_from_output): Add info parameter.
4347         If it passed as non-NULL, use it to check whether any input BFD
4348         has an input section which uses this output section.  Change all
4349         callers.
4350         * bfd-in2.h: Rebuild.
4351
4352         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
4353         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
4354         1999-11-29.
4355         * bfd-in2.h: Rebuild.
4356
4357 2000-02-10  Timothy Wall  <twall@cygnus.com>
4358
4359         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
4360         allow final modifications of swapped-in symbol.
4361         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
4362         * coffcode.h (coff_write_relocs): Use macro
4363         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
4364         symbol index should be set to -1.
4365
4366 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
4367
4368         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
4369         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
4370         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
4371         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
4372         sh_insns_uses_or_sets_freg): New functions.
4373         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
4374         * (sh_insns_conflict): Use new functions and new macros to
4375         detect conflicts when two instructions both set same integer registers,
4376         both set same fp register, and both set special register.
4377
4378 2000-02-09  Timothy Wall  <twall@cygnus.com>
4379
4380         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
4381         swapping in sections, so that the swapping routines have access to
4382         the arch/mach info.
4383
4384 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
4385
4386         * coff-go32.c: Update comment. Update copyright.
4387
4388 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
4389
4390         * syms.c (bfd_decode_symclass)
4391         Two new class characters were added - 'V' and 'v'.  The
4392         meaning of 'W' is now restricted to just weak non-object
4393         symbols.  This allows differentiation between, for example,
4394         weak functions vs weak objects.  nm for example now dumps:
4395         'W' = weak global
4396         'w' = weak unresolved
4397         'V' = weak global object
4398         'v' = weak unresolved object
4399
4400         (bfd_is_undefined_symclass): New function.  Return true if the
4401         given symbol class represents and undefined/unresolved symbol.
4402
4403         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
4404         unresolved symbols.
4405
4406         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
4407
4408         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
4409         STT_ARM_16BIT flag set, but it is not attached to a data object
4410         return STT_ARM_16BIT so that it will be treated as code by the
4411         disassembler.
4412
4413 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
4414
4415         * coff-i386.c (i3coff_object_p): Remove prototype.
4416         Update copyright.
4417
4418         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
4419         to name.  Update copyright.
4420
4421         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
4422         assignment to avoid warning.  Update copyright.
4423
4424 2000-01-24  Robert Lipe  (robertl@sco.com)
4425
4426         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
4427         instead of using GNU C extension.
4428
4429 2000-01-21  Nick Clifton  <nickc@cygnus.com>
4430
4431         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
4432         amount from a bfd_in_memory structure.
4433         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
4434         structure.
4435
4436 2000-01-14  Nick Clifton  <nickc@cygnus.com>
4437
4438         * linker.c (default_indirect_link_order): oops - fix incorrectly
4439         applied patch from Tim Wall.
4440
4441 2000-01-13  Timothy Wall (twall@tiac.net>
4442
4443         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
4444         = scnhsz, filhsz, relsz, aoutsz, etc)
4445
4446         * coffswap.h: Ditto.
4447
4448 2000-01-13  Nick Clifton  <nickc@cygnus.com>
4449
4450         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
4451         interwork thumb to arm stub.
4452
4453 2000-01-13  Timothy Wall (twall@tiac.net>
4454
4455         * archures.c (bfd_octets_per_byte): New function: Return
4456         target byte size.
4457         (bfd_arch_mach_octets_per_byte): New function: Return target
4458         byte size.
4459
4460         * section.c: Distinguish between octets and bytes for usage of
4461         _cooked_size,  _raw_size, and output_offset.  Clarify
4462         description of bfd_set_section_contents.
4463
4464         * bfd-in2.h: Regenerate.
4465
4466         * coffgen.c: Indicate that the offset parameter is in bytes, not
4467         octets.
4468
4469         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
4470         where appropriate to get the octet offset when calling
4471         bfd_set_section_contents.
4472         (bfd_coff_reloc_link_order): Ditto.
4473
4474         * linker.c (bfd_generic_reloc_link_order): Ditto.
4475         (_bfd_default_link_order): Ditto.
4476
4477         * reloc.c (bfd_perform_relocation):  Distinguish between octets
4478         and bytes.  Use octets when indexing into octet data; use bytes
4479         when calculating target addresses.
4480         (bfd_install_relocation): Ditto.
4481
4482         * srec.c (srec_write_section): Ditto.
4483
4484 2000-01-13  Nick Clifton  <nickc@cygnus.com>
4485
4486         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
4487         3 to 2.  This allows 4 byte sized sections, which is necessary for
4488         dlltool to build functioning DLLs.
4489
4490 2000-01-10  Philip Blundell  <pb@futuretv.com>
4491
4492         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
4493         (arm*-*-conix*): New target.
4494
4495 2000-01-10  Egor Duda  <deo@logos-m.ru>
4496
4497         * config.bfd: Include elf32_i386 vector to target list for cygwin
4498         and mingw.
4499
4500         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
4501         * configure.in: Test for structure win32_pstatus_t in
4502         <sys/procfs.h>
4503         * configure: Regenerate.
4504
4505         * elf.c (elfcore_grok_win32pstatus): New function: process
4506         win32_pstatus_t notes in elf core file.
4507         (elfcore_grok_note): Detect win32_pstatus notes.
4508
4509 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
4510
4511         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
4512         visibility.
4513         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
4514         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
4515
4516 For older changes see ChangeLog-9899
4517 \f
4518 Local Variables:
4519 mode: change-log
4520 left-margin: 8
4521 fill-column: 74
4522 version-control: never
4523 End: