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