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