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