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