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