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