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