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