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