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