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