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