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