* bfd.c (bfd_alt_mach_code): New function.
[external/binutils.git] / bfd / ChangeLog
1 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
2
3         * bfd.c (bfd_alt_mach_code): New function.
4         * bfd-in2.h: Rebuilt.
5
6 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
7
8         * elf-m10300.c (mn10300_elf_relocate_section): Test the right
9         `type' field in the hash entry when deciding whether to follow a
10         link.
11
12 2001-08-24  Jakub Jelinek  <jakub@redhat.com>
13
14         * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
15         last.
16         (elf_link_sort_relocs): Adjust accordingly.
17
18         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
19         (elf64_alpha_check_relocs): Set it if section this reloc is against
20         is read-only.  Set DF_TEXTREL if a RELATIVE reloc is needed against
21         read-only section.
22         (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
23         is is against read-only section.
24         (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
25         check section names.
26         (elf64_alpha_reloc_type_class): New.
27         (elf_backend_reloc_type_class): Define.
28
29 2001-08-24  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
30
31         * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
32         by bfd_malloc().
33
34 2001-08-23  Andreas Jaeger  <aj@suse.de>
35
36         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
37         the reloc is against read-only section.
38         (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
39         of looking up section names for DT_TEXTREL.
40         (elf64_x86_64_reloc_type_class): New.
41         (elf_backend_reloc_type_class): Define.
42
43 2001-08-23  H.J. Lu  <hjl@gnu.org>
44
45         * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
46         * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
47
48         * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
49         bfd_print_symbol_vandf.
50         * coffgen.c (coff_print_symbol): Likewise.
51         * elf.c (bfd_elf_print_symbol): Likewise.
52         * ieee.c (ieee_print_symbol): Likewise.
53         * nlmcode.h (nlm_print_symbol): Likewise.
54         * oasys.c (oasys_print_symbol): Likewise.
55         * pdp11.c (NAME(aout,print_symbol)): Likewise.
56         * som.c (som_print_symbol): Likewise.
57         * srec.c (srec_print_symbol): Likewise.
58         * tekhex.c (tekhex_print_symbol): Likewise.
59         * versados.c (versados_print_symbol): Likewise.
60         * vms.c (vms_print_symbol): Likewise.
61
62         * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
63         with bfd_fprintf_vma.
64         (bfd_elf_print_symbol): Likewise.
65         * syms.c (bfd_print_symbol_vandf): Likewise.
66
67 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
68
69         * aoutf1.h (sunos_write_object_contents): Silence compile time
70         warning.
71         * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
72
73         * bout.c: Add missing function prototypes.  Fix formatting.
74         * coff-z8k.c: Add missing function prototypes.  Fix formatting.
75         * coff-w65.c: Add missing function prototypes.  Fix formatting.
76         * coff-h8500.c: Add missing function prototypes.  Fix formatting.
77         * coff-h8300.c: Add missing function prototypes.  Fix formatting.
78         * coff-tic54x.c: Add missing function prototypes.  Fix formatting.
79         * coff-tic30.c: Add missing function prototypes.  Fix formatting.
80         * coff-m68k.c: Add missing function prototypes.  Fix formatting.
81         * coff-rs6000.c: Add missing function prototypes.  Fix formatting.
82         * coff-sh.c: Add missing function prototypes.  Fix formatting.
83
84 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
85
86         * elf-bfd.h (enum elf_reloc_type_class): New.
87         (struct elf_backend_data): Add elf_backend_reloc_type_class.
88         (_bfd_elf_reloc_type_class): New.
89         * elfxx-target.h (elf_backend_reloc_type_class): Define.
90         (elfNN_bed): Add elf_backend_reloc_type_class.
91         * elf.c (_bfd_elf_reloc_type_class): New.
92         * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
93         is against read-only section.
94         (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
95         looking up section names for DT_TEXTREL.
96         (elf_i386_reloc_type_class): New.
97         (elf_backend_reloc_type_class): Define.
98         * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
99         reloc is against read-only section.
100         (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
101         looking up section names for DT_TEXTREL.
102         (elf32_sparc_reloc_type_class): New.
103         (elf_backend_reloc_type_class): Define.
104         * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
105         reloc is against read-only section.
106         (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
107         looking up section names for DT_TEXTREL.
108         (sparc64_elf_reloc_type_class): New.
109         (elf_backend_reloc_type_class): Define.
110         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
111         (elfNN_ia64_hash_table_create): Clear ia64_info.
112         (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
113         section.
114         (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
115         instead of looking up section names for DT_TEXTREL.
116         (elfNN_ia64_reloc_type_class): New.
117         (elf_backend_reloc_type_class): Define.
118         * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
119         (struct elf_link_sort_rela): New.
120         (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
121         (elf_bfd_final_link): Call elf_link_sort_relocs.
122         Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
123         necessary.
124
125 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
126
127         * configure.in (x86-bsdi): No corefile support.
128         * configure: Regenerate.
129
130 2001-08-22  Nick Clifton  <nickc@cambridge.redhat.com>
131
132         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
133         comma.
134
135 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
136
137         * coff-go32.c: Make DWARF2 sections use an alignment of 0.  Set
138         the alignment of dwarf2 linkonce sections to 0.
139         * coff-sto32.c: Likewise.
140
141 2001-08-20  Andreas Jaeger  <aj@suse.de>
142
143         * coff-sparc.c: Add missing prototypes.
144         * elf32-s390.c: Likewise.
145         * elf32-i960.c: Likewise.
146         * aout-target.h: Likewise.
147
148 2001-08-20  H.J. Lu  <hjl@gnu.org>
149
150         * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
151         (elf_num_section_syms): New for num_section_syms.
152
153         * elf.c (elf_map_symbols): Set num_section_syms.
154         (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
155         the section symbol index.
156
157 2001-08-20  Nick Clifton  <nickc@cambridge.redhat.com>
158
159         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
160         select the generic has table creator.  All elf backends need elf
161         specific fields in the hash table.
162
163 2001-08-20  Alan Modra  <amodra@bigpond.net.au>
164
165         * archive.c (offsetof): Remove define.
166         * elf.c: Likewise.
167         * oasys.c: Likewise
168         * sysdep.h (offsetof): Define.
169
170 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
171
172         * bfd.c (bfd_get_gp_size): Return an unsigned int.
173         (bfd_set_gp_size): Make param unsigned.
174         * bfd-in2.h: Regenerate.
175         * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
176         than calling bfd_get_gp_size.
177         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
178         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
179
180 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
181
182         * linker.c (default_fill_link_order): Handle four byte fill value.
183
184 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
185
186         * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
187         prototype.
188         * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
189
190         * elf64-mips.c (UNUSED_RELOC): Define.
191         (mips_elf64_howto_table_rel): Use it.
192         (mips_elf64_howto_table_rela): Here too.
193         (mips_elf64_write_relocs): Fix signed/unsigned warning.
194
195         * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
196         silence warning.
197         * coffgen.c (coff_print_symbol): Fix warnings.
198         (coff_find_nearest_line): Likewise.
199         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
200         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
201         * format.c (bfd_check_format_matches): Likewise.
202         (bfd_set_format): Likewise.
203         * coff-ia64.c: Add missing prototypes.
204         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
205         signed to silence warnings.
206         (elf64_alpha_relocate_section): Likewise.
207         (elf64_alpha_find_reloc_at_ofs): Fix warnings.
208         (elf64_alpha_add_symbol_hook): Likewise.
209         (elf64_alpha_final_link): Likewise.
210         (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
211         (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
212         (elf64_alpha_size_got_sections): Likewise.
213         * elfxx-ia64.c: Add missing prototypes.
214         (elfNN_ia64_relocate_section): Fix warning.
215         (elfNN_ia64_unwind_entry_compare): Make params const.
216
217 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
218
219         * config.bfd (targ64_selvecs): New.
220         <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
221
222         * bfd-in.h (BFD_VERSION): Remove wrong comment.
223         (BFD_DEFAULT_TARGET_SIZE): New.
224         (BFD_ARCH_SIZE): Comment.
225         * configure.in (target_size): New.  Set instead of target64 in
226         selvecs case statement.  Set target64 from it.
227         (bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
228         * bfd-in2.h: Regenerate.
229         * configure: Regenerate.
230
231 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
232
233         * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
234         (bfd_errmsgs): Add corresponding message.
235         * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
236         finding an archive that contains different format object files.
237         Return bfd_error_wrong_object_format for this case.
238         * format.c: Formatting fixes.  s/CONST/const/.
239         (bfd_check_format_matches): Accept archives that give
240         bfd_error_wrong_object_format if no full match is found.  Tidy
241         code handling matching_vector.  Don't return a pointer to freed
242         memory in `matching'.  Handle ambiguous matches as for partial
243         archive matches.
244         * bfd-in2.h: Regenerate.
245
246 2001-08-15  Alan Modra  <amodra@bigpond.net.au>
247
248         * libieee.h (common_header_type): Add last_byte field.
249
250         * ieee.c: Add missing prototypes.  Some format fixes.
251         (struct output_buffer_struct): Move for availability to prototypes.
252         (ieee_part_after): New function.
253         (ieee_slurp_debug): Use it here.
254         (ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
255         ieee_part_after to set last_byte to one past end of current part.
256         Update callers.
257         (ieee_pos): Pass in ieee_data_struct rather than bfd.
258         Update callers.
259         (parse_expression): Don't go beyond the end of the current part.
260         (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
261         (ieee_get_symtab_upper_bound, ieee_get_symtab,
262         ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
263         ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
264         ieee_set_section_contents, ieee_write_object_contents,
265         ieee_make_empty_symbol): Make static.
266         (ieee_archive_p): Correct comments regarding bfd_read.
267         (ieee_object_p): Similarly.
268         (ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
269         output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
270         input_bfd, output_bfd, output_buffer.
271         (do_as_repeat): Write out ieee_set_current_pc_enum value as for
272         do_with_relocs, ie. as a symbol for relocatable files.
273         (ieee_vec): Add comments showing functions referenced by macros.
274
275 2001-08-14  Nick Clifton  <nickc@cambridge.redhat.com>
276
277         * aout-tic30.c: Add missing prototypes.  Fix formatting.
278         * aout-ns32k.c: Add missing prototypes.  Fix formatting.
279         * peXXigen.c: Add missining prototypes.  Fix formatting.
280         * aout-adobe.c: Add missining prototypes.  Fix formatting.
281
282 2001-08-13  Nick Clifton  <nickc@cambridge.redhat.com>
283
284         * elf32-v850.c: Add missing function prototypes.
285         Fix some formatting.
286
287         * cpu-v850.c: Add missing function prototype.
288         Fix some formatting.
289
290 2001-08-11  Nick Clifton  <nickc@cambridge.redhat.com>
291
292         * elf-bfd.h (struct elf_backend_data): Add new fields
293         'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
294         (bfd_elf_sprintf_vma): Rename function prototype to
295         '_bfd_elf_sprintf_vma'.
296         (bfd_elf_fprintf_vma): Rename function prototype to
297         '_bfd_elf_fprintf_vma'.
298         * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
299         directly, instead indirect via the elf_backend_data structure.
300         (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
301         instead indirect via the elf_backend_data structure.
302         * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
303         (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
304         * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
305         already defined.
306         (elf_backend_fprintf_vma): Initialise if not already defined.
307         (struct elf_backend_data): Initialise the
308         elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
309
310 2001-08-10  Andreas Jaeger  <aj@suse.de>
311
312         * elf64-sparc.c: Add missing prototypes.
313         * elf32-cris.c: Likewise.
314         * elf32-i370.c: Likewise.
315         * elf64-hppa.c: Likewise.
316         * elf64-s390.c: Likewise.
317
318 2001-08-10  Andreas Jaeger  <aj@suse.de>
319
320         * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
321         Add prototypes where needed.
322
323 2001-08-10  H.J. Lu  <hjl@gnu.org>
324
325         * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
326         (bfd_fprintf_vma): Likewise.
327
328 2001-08-10  H.J. Lu  <hjl@gnu.org>
329
330         * bfd.c (bfd_sprintf_vma): Don't return void.
331         (bfd_fprintf_vma): Likewise.
332
333 2001-08-10  Andreas Jaeger  <aj@suse.de>
334
335         * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
336         to build warnings.
337         * configure: Regenerate.
338
339 2001-08-10  Alan Modra  <amodra@bigpond.net.au>
340
341         * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
342         warning if not BFD64.  Add braces so emacs auto format works.
343         (bfd_elf_fprintf_vma): Likewise.
344
345         * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
346         of _xcoff_swap_ld*.
347         * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
348         param to agree with libxcoff.h.
349         (xcoff_swap_ldhdr_out): Likewise.
350         (xcoff_swap_ldsym_in): Likewise.
351         (xcoff_swap_ldsym_out): Likewise.
352         (xcoff_swap_ldrel_in): Likewise.
353         (xcoff_swap_ldrel_out): Likewise.
354         (xcoff_create_csect_from_smclas): Likewise.
355         * coff64-rs6000.c: Add missing prototypes.
356         (xcoff64_swap_ldhdr_in): Modify type of external param to agree
357         with libxcoff.h.
358         (xcoff64_swap_ldhdr_out): Likewise.
359         (xcoff64_swap_ldsym_in): Likewise.
360         (xcoff64_swap_ldsym_out): Likewise.
361         (xcoff64_swap_ldrel_in): Likewise.
362         (xcoff64_swap_ldrel_out): Likewise.
363         (xcoff64_ppc_relocate_section): Make static.
364         (xcoff64_slurp_armap): Likewise.
365         (xcoff64_archive_p): Likewise.
366         (xcoff64_openr_next_archived_file): Likewise.
367         (xcoff64_sizeof_headers): Likewise.
368         (xcoff64_is_lineno_count_overflow): Likewise.
369         (xcoff64_is_reloc_count_overflow): Likewise.
370         (xcoff64_loader_symbol_offset): Likewise.
371         (xcoff64_loader_reloc_offset): Likewise.
372         * elf64-gen.c: Add missing prototypes.
373
374 2001-08-09  H.J. Lu  <hjl@gnu.org>
375
376         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
377         (bfd_elf_fprintf_vma): Likewise.
378
379 2001-08-09  H.J. Lu  <hjl@gnu.org>
380
381         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
382         to ...
383         * elf-bfd.h: Here.
384         * bfd-in2.h: Regenerated.
385
386 2001-08-09  H.J. Lu  <hjl@gnu.org>
387
388         * bfd-in.h (bfd_sprintf_vma): New prototype.
389         (bfd_fprintf_vma): Likewise.
390         (bfd_elf_sprintf_vma): Likewise.
391         (bfd_elf_fprintf_vma): Likewise.
392         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
393         * bfd-in2.h: Regenerated.
394
395         * bfd.c (bfd_sprintf_vma): New. Defined.
396         (bfd_fprintf_vma): Likewise.
397
398         * elf.c (bfd_elf_sprintf_vma): New. Defined.
399         (bfd_elf_fprintf_vma): Likewise.
400
401 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
402
403         * coff-rs6000.c: Add missing prototypes.
404         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
405         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
406         xcoff_loader_reloc_offset): Make static.
407         * dwarf1.c: Add missing prototypes.
408         * dwarf2.c: Add missing prototypes.
409         (struct abbrev_info): Move definition.
410         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
411         * elf.c: Add missing prototypes.
412         * elf32-gen.c: Likewise.
413         * elf32-i386.c: Likewise.
414         * elf32-ppc.c: Likewise.
415         (ppc_elf_sort_rela): Use PTR instead of "void *".
416         * elflink.h: Add missing prototypes.  Formatting fixes.
417         * merge.c: Add missing prototypes.
418         (last4_eq): Use PTR instead of "void *".
419         (last_eq): Likewise.
420         * syms.c: Add missing prototypes.
421
422 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
423
424         * bfd.c: Fix formatting.
425         * bfd-in2.h: Regenerate.
426
427 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
428
429         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
430         true (this target uses REL relocations) and 'pcrel_offset' to
431         false (the PC is implied, not stored in the offset).
432
433 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
434
435         1999-10-19  Linus Nordberg  <linus@swox.se>
436         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
437         * elfxx-target.h (elf_backend_want_got_sym): Define.
438         (elfNN_bed): Add elf_backend_want_got_sym.
439         * elflink.c (_bfd_elf_create_got_section): Define
440         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
441
442 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
443
444         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
445         (find_rela_addend): New function.
446         (parse_comp_unit): Call it to find the abbrev offset addend.
447         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
448         members of dwarf2_debug as debugging information is read.
449
450 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
451
452         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
453         targets as well as sh-pe.
454
455 2001-08-03  Ben Harris <bjh21@netbsd.org>
456
457         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
458         reloc from start of section when computing value for R_ARM_REL32
459         reloc.
460
461 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
462
463         From  H.J. Lu  <hjl@gnu.org>
464         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
465         keep relocs for undefined syms if there are no dynamic sections in
466         executable.
467         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
468
469 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
470
471         * cofflink.c (coff_link_check_ar_symbols): also search for
472         __imp__symbol as well as _symbol.
473         * linker.c (_bfd_generic_link_add_archive_symbols): also
474         search for __imp__symbol as well as _symbol.
475
476 2001-08-01  Adam Nemet  <anemet@lnxw.com>
477
478         * elf.c (elf_sort_sections): Return zero only as the last step.
479
480 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
481
482         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
483         ARM_COFF_BUGFIX.
484         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
485         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
486         ARM_COFF_BUGFIX.
487
488 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
489
490         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
491         to match corresponding bfd_coff_backend data member.
492
493 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
494
495         * Makefile.am: Update dependencies with "make dep-am".
496         * Makefile.in: Regenerate
497
498 2001-07-15  H.J. Lu  <hjl@gnu.org>
499
500         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
501         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
502         * Makefile.in: Regenerate.
503
504 2001-07-11  H.J. Lu  <hjl@gnu.org>
505
506         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
507         flags when creating the reloc section if the ALLOC flag in the
508         source section is set.
509
510 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
511
512         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
513         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
514         * bfd-in2.h: Regenerate.
515         * libbfd.h: Regenerate.
516         * elfxx-ia64.c (ia64_howto_table): Define how to handle
517         new relocations.
518         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
519         (elfNN_ia64_check_relocs): Likewise.
520         (elfNN_ia64_install_value): Likewise.
521         (elfNN_ia64_relocate_section): Likewise.
522
523 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
524
525         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
526         R_SPARC_UA64.
527         (elf32_sparc_check_relocs): Likewise.
528         Only create .rela section for alloced sections in shared libraries.
529         (elf32_sparc_relocate_section): Likewise.
530         Remove redundant check.
531         Optimize unaligned reloc usage.
532         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
533         check.
534
535 2001-07-11  H.J. Lu  <hjl@gnu.org>
536
537         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
538         ALLOC|LOAD flags as the source section for debugging sections
539         when creating the reloc section.
540
541 2001-07-05  Jim Wilson  <wilson@redhat.com>
542
543         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
544         the section of the bigger symbol.
545
546         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
547
548 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
549
550         * peicode.h (coff_swap_scnhdr_in): For sections containing
551         uninitialised data, only set their size to s_paddr if this does
552         not reset their size to zero.  MS's latest compilers will set
553         s_paddr to zero.
554
555 2001-07-04  H.J. Lu  <hjl@gnu.org>
556
557         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
558         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
559         bfd_mach_mips5000.
560
561 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
562
563         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
564
565         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
566         sections being discarded.
567
568 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
569
570         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
571         instead of _bfd_elfcore_section_from_phdr.
572         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
573         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
574         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
575         (elfcore_grok_prstatus): Likewise.
576         (elfcore_grok_lwpstatus): Likewise.
577         (bfd_get_elf_phdr_upper_bound): Likewise.
578         (elfcore_make_note_pseudosection): Formatting.
579         (_bfd_elfcore_strndup): Formatting.
580         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
581         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
582
583 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
584
585         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
586         and _bfd_elfcore_strndup.
587         (struct elf_backend_data): Add elf_backend_grok_prstatus
588         and elf_backend_grok_psinfo.
589         * elf.c (_bfd_elfcore_make_pseudosection): New function.
590         (elfcore_grok_prstatus): Use it.
591         (elfcore_make_note_pseudosection): Likewise.
592         (elfcore_strndup):  Rename to...
593         (_bfd_elfcore_strndup): Here, and make global.
594         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
595         (elfcore_grok_note): Call elf_backend_grok_prstatus
596         and elf_backend_grok_psinfo if available.
597         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
598         (_bfd_elf32_mips_grok_psinfo): New function.
599         (elf_backend_grok_prstatus): Define.
600         (elf_backend_grok_psinfo): Define.
601         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
602         (elf_backend_grok_psinfo): Likewise.
603         (elfNN_bed): Include elf_backend_grok_prstatus and
604         elf_backend_grok_psinfo.
605
606 2001-06-29  H.J. Lu  <hjl@gnu.org>
607
608         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
609         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
610         is NULL before filling PLT.
611
612 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
613
614         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
615
616 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
617
618         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
619         here..
620         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
621         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
622         after gc has run.
623
624         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
625         (IS_ABSOLUTE_RELOC): Define.
626         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
627         (hppa_link_hash_newfunc): Always init it.
628         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
629         create COPY relocs only when the reloc is in a read-only section.
630         Instead, allocate space for a dynamic reloc to reference the
631         library symbol directly.  Keep track of space we allocate using
632         relocs_entries.
633         (hppa_discard_copies): Delete, and move code to..
634         (allocate_plt_and_got): ..here.  Rename to
635         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
636         relocs for non-shared link.
637         (elf32_hppa_size_dynamic_sections): Update calls to above.
638         (elf32_hppa_relocate_section): Write out the dynamic relocs used
639         in lieu of COPY relocs.
640
641         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
642         here..
643         (elf_i386_adjust_dynamic_symbol): ..nor here..
644         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
645         after gc has run.
646         (elf_i386_size_dynamic_sections): Fix a comment.
647         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
648         involved in writing reloc out.
649
650 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
651
652         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
653         Ensure syms are dynamic if we might be emitting a reloc.
654         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
655         for undefweak or undefined syms..
656         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
657
658         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
659         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
660         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
661         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
662
663 2001-06-24  H.J. Lu  <hjl@gnu.org>
664
665         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
666         strncasecmp/strcasecmp instead of strncmp/strcmp.
667
668 2001-06-23  H.J. Lu  <hjl@gnu.org>
669
670         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
671         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
672         in the regular object file and treat the weak definition as
673         the normal one.
674
675 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
676
677         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
678         unresolved_reloc test to exclude cases where we use "relocation"
679         before setting it to point into the .got.  Reinstate fudge for
680         unresolved relocs in debugging sections.
681
682         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
683         complicated tests for unresolvable relocs with a simple direct
684         scheme using "unresolved_reloc" var.
685
686         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
687         elf_i386_dyn_relocs.  Update comment.
688         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
689         dyn_relocs.
690         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
691         others to aborts.
692         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
693         abort.
694         (elf_i386_size_dynamic_sections): Likewise.
695         (elf_i386_finish_dynamic_symbol): Likewise.
696         (elf_i386_finish_dynamic_sections): Likewise.
697         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
698         handling code.
699
700         Avoid creating COPY relocs if possible.
701         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
702         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
703         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
704         reloc is in a read-only section.  Instead, allocate space for a
705         dynamic reloc to reference the library symbol directly.  Keep
706         track of space we allocate using pcrel_relocs_copied.
707         (discard_copies): Delete, and move code to ..
708         (allocate_plt_and_got): ..here.  Rename to
709         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
710         relocs for non-shared link.
711         (elf_i386_size_dynamic_sections): Update calls to above functions.
712         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
713         more ugly logic to avoid "unresolvable relocation" error.  Use
714         htab shortcut in place of elf_hash_table macro.
715         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
716         not always be created now.
717
718 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
719
720         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
721         shared libraries.
722
723 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
724
725         * configure.host (mips64-*-linux): Reformat.
726
727 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
728
729         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
730         allocate local .got space.  Use shortcuts from hash table for .got
731         and .plt rather than comparing section names.
732         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
733         adjusting index into local_got_refcounts to document what we are
734         really doing.
735         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
736         Tidy .got and .plt error checking.
737
738 2001-06-20  Catherine Moore  <clm@redhat.com>
739
740         * elf-bfd.h (struct elf_backend_data):
741         elf_backend_emit_relocs: New field: Function for emitting
742         relocs.
743         elf_backend_count_relocs: New field: Function for determining
744         the number of relocs to be emitted.
745         * elfxx-target.h: Provide default (NULL) values for
746         elf_backend_emit_relocs and elf_backend_count_relocs.
747         * elflink.h (elf_link_size_reloc_section): Make the hash table
748         big enough to hold the relocs counted by either reloc_count or
749         o->reloc_count.
750         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
751         should be emitted, either because of a command line option
752         stored in the info structure or because the target provides a
753         special reloc emitting function.
754         If the target provides a reloc counting function use it,
755         unless performing a relocatable link or emitting all relocs.
756         Also set the SEC_RELOC flag on any output section which will
757         contain relocs.
758         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
759         should be emitted, either because of a command line option
760         stored in the info structure or because the target provides a
761         special reloc emitting function.
762         If the target provides a reloc emitting function, use it,
763         unless performing a relocatable link or emitting all relocs.
764
765 2001-06-20  H.J. Lu  <hjl@gnu.org>
766
767         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
768         allocate local .got space.
769
770 2001-06-19  Andreas Jaeger  <aj@suse.de>
771
772         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
773         dynamic symbols.
774
775 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
776
777         * elflink.h (struct elf_assign_sym_version_info): Remove member
778         export_dynamic.  All users changed to use info member.
779         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
780         export_dynamic, instead use member in parameter info.
781         * bfd-in.h (bfd_elf32_size_dynamic_sections,
782         bfd_elf64_size_dynamic_sections): Update prototype.
783         * bfd-in2.h: Regenerate.
784
785 2001-06-18  H.J. Lu  <hjl@gnu.org>
786
787         * elflink.h (elf_info_failed): Add a new field, verdefs.
788         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
789         elf_export_symbol.
790         (elf_export_symbol): Check eif->verdefs to decide if a symbol
791         should be exported.
792
793 2001-06-17  H.J. Lu  <hjl@gnu.org>
794
795         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
796         readonly_reloc, to record if a relocation in the .rel.dyn
797         section is against a read-only section.
798         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
799         field to false.
800         (_bfd_mips_elf_check_relocs): Record if there is a relocation
801         in the .rel.dyn section against a read-only section by setting
802         DF_TEXTREL or readonly_reloc.
803         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
804         it is true.
805         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
806         there is a relocation in the .rel.dyn section against a
807         read-only section.
808         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
809         DF_TEXTREL is set.
810
811 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
812
813         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
814         function.  Move flagword result into parameter list.  Remove
815         comment about setting bfd_error_handler to intercept failure
816         results.
817         * coffgen.c (make_a_section_from_file): Examine result of
818         calling bfd_coff_styp_to_sec_flags and pass a failure back to
819         caller.
820         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
821         function.  Move flagword result into parameter list.
822         * libcoff.h: Regenerate.
823         * libecoff.h: Regenerate.
824
825 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
826
827         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
828         section is going to follow it.
829
830 2001-06-12  Catherine Moore  <clm@redhat.com>
831
832         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
833         with the file_align entry from elf_backend_data.
834         (elf_gc_smash_unused_vtentry_relocs): Likewise.
835         (elf_gc_record_vtentry): Likewise.
836
837 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
838
839         * elflink.h: Whitespace changes.
840         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
841         rather than "unsigned char".
842         (elf_link_output_relocs): Likewise.
843         (elf_link_input_bfd): Likewise.
844         (elf_reloc_link_order): LIkewise.
845         * elf.c: s/CONST/const/.  Whitespace changes.
846         * elf32-mips.c: Formatting fix.
847
848         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
849         * Makefile.in: Regenerate.
850         * po/Make-in: Remove trailing tab.
851
852 2001-06-09  Philip Blundell  <philb@gnu.org>
853
854         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
855         change.
856         (elf32_arm_plt_entry): Likewise.
857
858 2001-06-08  H.J. Lu  <hjl@gnu.org>
859
860         * elf.c (swap_out_syms): Keep names for global section symbols.
861
862 2001-06-07  H.J. Lu  <hjl@gnu.org>
863
864         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
865         MIPS-based machines need it.
866
867 2001-06-07  H.J. Lu  <hjl@gnu.org>
868
869         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
870         for SGI only.
871
872         * config.bfd: Remove ecoff from Linux/mips.
873
874 2001-06-07  Andreas Jaeger  <aj@suse.de>
875
876         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
877         assertion.
878         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
879         alignment of 8 for .rela sections; handle further relocations.
880
881 2001-06-06  Christian Groessler <cpg@aladdin.de>
882
883         * coff-z8k.c: Fix formatting.
884         Fix howtos: howto->size was always 1.
885
886 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
887
888         * configure.host (mips64*-*-linux*): Define.
889
890 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
891
892         * elf32-i386.c (elf_i386_discard_copies): Rename to
893         discard_copies, and use elf_link_hash_entry arg rather than
894         elf_i386_link_hash_entry.
895         (elf_i386_link_hash_traverse): Delete.
896         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
897         Tidy sizing of dynamic sections.
898         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
899         possible .plt entries.
900         (elf_i386_gc_sweep_hook): Likewise.
901         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
902         everything with plt.refcount <= 0.
903
904         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
905         .relgot space here.
906         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
907         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
908         .rel.plt here..
909         (allocate_plt_and_got): ..instead do it all here.  New function.
910         (elf_i386_size_dynamic_sections): Allocate local .got space and
911         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
912         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
913         rather than gc variety).
914         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
915         (elf_i386_relocate_section): Use it here and correct handling of
916         R_386_GOT32.  Provide section and offset for "unresolvable
917         relocation" error message.
918         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
919
920         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
921         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
922         (elf_i386_link_hash_table_create): Init them.
923         (create_got_section): New function.
924         (elf_i386_create_dynamic_sections): New function.
925         (elf_backend_create_dynamic_sections): Set to above.
926         (elf_i386_check_relocs): Use shortcuts from hash table rather than
927         calling bfd_get_section_by_name.
928         (elf_i386_gc_sweep_hook): Likewise.
929         (elf_i386_adjust_dynamic_symbol): Likewise.
930         (elf_i386_size_dynamic_sections): Likewise.
931         (elf_i386_relocate_section): Likewise.
932         (elf_i386_finish_dynamic_sections): Likewise.
933
934         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
935
936 2001-06-02  H.J. Lu  <hjl@gnu.org>
937
938         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
939         and ELFOSABI_HPUX.
940         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
941
942 2001-06-02  H.J. Lu  <hjl@gnu.org>
943
944         * aout-cris.c (MACHTYPE_OK): New. Defined.
945
946 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
947
948         * section.c (_bfd_strip_section_from_output): Handle NULL
949         output_section.
950
951 2001-06-02  H.J. Lu  <hjl@gnu.org>
952
953         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
954         rs6000coff64_vec only if BFD64 is defined.
955         (powerpc64-*-aix*): Enable only if BFD64 is defined.
956
957 2001-06-02  H.J. Lu  <hjl@gnu.org>
958
959         * coff-ia64.c (ia64coff_object_p): Rewrite with
960         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
961
962 2001-06-01  Andreas Jaeger  <aj@suse.de>
963
964         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
965         relocation, small reformatting.
966
967 2001-05-29  Andreas Jaeger  <aj@suse.de>
968
969         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
970         (elf64_x86_64_relocate_section): Likewise.
971
972 2001-05-30  Alan Modra  <amodra@one.net.au>
973
974         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
975         millicode.  Don't allocate .got and .rela.got space here..
976         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
977         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
978         .rela.plt here..
979         (hppa_handle_PIC_calls): ..nor here..
980         (allocate_plt_and_got): ..instead do it all here.  New function.
981         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
982         call allocate_plt_and_got.  No need to zap .got if not dynamic.
983         (elf32_hppa_final_link): Call regular bfd_final_link instead of
984         gc_common_final_link.
985         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
986         (elf32_hppa_relocate_section): Use it here.
987         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
988         dynamic_sections_created.
989         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
990
991 2001-05-28  Andreas Jaeger  <aj@suse.de>
992
993         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
994         generic version since we want a hashsize of 4.
995         (elf_backend_size_info): Likewise.
996
997 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
998
999         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
1000         a zeroing loop.
1001         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
1002         (elf_link_input_bfd): Likewise.
1003         (elf_reloc_link_order): Likewise.
1004         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
1005         relocations correctly.
1006
1007 2001-05-28  Nicolas Pitre <nico@cam.org>
1008
1009         * elf32-arm.h: fix PLT generation for big endian ARM
1010
1011 2001-05-28  Alan Modra  <amodra@one.net.au>
1012
1013         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
1014         for symbols forced local that need plabels.
1015         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
1016         .plt.rela for local syms if non-shared.
1017         (hppa_build_one_stub): Mask lsb of plt.offset.
1018         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
1019         (clobber_millicode_symbols): Correct comment.
1020         (elf32_hppa_relocate_section): Likewise.
1021         (elf32_hppa_finish_dynamic_symbol): Likewise.
1022
1023 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
1024
1025         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
1026         * bfd-in2.h: Regenerate.
1027         * libbfd.h: Regenerate.
1028         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
1029         and BFD_RELOC_SPARC_UA64 mapping
1030         * elf64-sparc.c: Likewise.
1031
1032 2001-05-25  H.J. Lu  <hjl@gnu.org>
1033
1034         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
1035         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
1036         (coff-rs6000.lo): Remove the old dependency.
1037         * Makefile.in: Rebuild.
1038
1039         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
1040         coff-rs6000.lo.
1041
1042 2001-05-25  H.J. Lu  <hjl@gnu.org>
1043
1044         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
1045         rs6000coff_core_file_matches_executable_p,
1046         rs6000coff_core_file_failing_command and
1047         rs6000coff_core_file_failing_signal only if AIX_CORE is
1048         defined.
1049         (pmac_xcoff_vec): Likewise.
1050         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1051
1052 2001-05-25  Timothy Wall  <twall@redhat.com>
1053
1054         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
1055         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
1056
1057 2001-05-25  H.J. Lu  <hjl@gnu.org>
1058
1059         * bfd-in2.h: Regenerated.
1060         * libcoff.h: Likewise.
1061
1062 2001-05-25  Alan Modra  <amodra@one.net.au>
1063
1064         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
1065         undefined millicode syms in shared libs.
1066         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
1067         (elf32_hppa_check_relocs): Likewise.
1068         (elf32_hppa_adjust_dynamic_symbol): Likewise.
1069         (elf32_hppa_size_dynamic_sections): Likewise.
1070         (elf32_hppa_relocate_section): Likewise.
1071         (elf32_hppa_finish_dynamic_symbol): Likewise.
1072         (elf32_hppa_finish_dynamic_sections): Likewise.
1073
1074 2001-05-24  Tom Rix <trix@redhat.com>
1075
1076         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
1077         xcoff-target.h not used to define rs6000 or ppc bfd.
1078         * Makefile.in same
1079
1080         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
1081         to 64 bit.
1082
1083         * coff-rs6000.c : Many changes for 64 bit support.  Move common
1084         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
1085         and pmac_xcoff_vec
1086
1087         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
1088         linker now supported.  Explictly define the rs6000coff64_vec.
1089
1090         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
1091         (coff_print_aux) same
1092         (coff_write_object_contents) same
1093         (coff_slurp_line_table) same
1094
1095         * coffgen.c : (coff_fix_symbol_name) formatting
1096         (coff_mangle_symbols) xcoff 64 bit support
1097         (coff_write_symbol) same
1098         (coff_write_alien_symbol) same
1099         (coff_write_native_symbol) same
1100         (coff_write_symbols) same
1101         (coff_get_symbol_info) same
1102         (bfd_coff_get_syment) same
1103         (coff_print_symbol) same
1104
1105         * config.bfd : add powerpc64-*-aix* target
1106
1107         * libcoff-in.h : formatting
1108
1109         * libcoff.h : move xcoff extern declarations to libxcoff.h
1110
1111         * libxcoff.h : New file
1112
1113         * xcofflink.c : Many changes for xcoff64 support.  Move common
1114         structures to include/coff/xcoff.h.  Move specific structure to
1115         backends coff-rs6000.c and coff64-rs6000.c.   Use new backend
1116         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
1117
1118         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
1119         aix4.2+ -binitfini.
1120
1121         (xcoff_build_ldsyms) : handle special __rtinit symbol.
1122
1123 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
1124
1125         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
1126         s/ENTIRES/ENTRIES/.
1127
1128 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1129
1130         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
1131         * libbfd.h: Regenerate.
1132         * bfd-in2.h: Regenerate.
1133
1134         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
1135         * archures.c (bfd_mach_mips12000): Define.
1136         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
1137         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
1138         support.
1139         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
1140         * bfd-in2.h: Regenerate.
1141         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
1142
1143 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1144
1145         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
1146         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
1147         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
1148         that is used by GCC.
1149
1150 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
1151
1152         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
1153         of entries in a structured section.
1154         * elf.c: Use new macro.
1155         * elf32-i386.c: Use new macro.
1156         * elf32-mips.c: Use new macro.
1157         * elf64-alpha.c: Use new macro.
1158         * elf64-sparc.c: Use new macro.
1159         * elfcode.h: Use new macro.
1160         * elflink.h: Use new macro.
1161
1162 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
1163
1164         * bfdint.texi: Replace -oformat with --oformat.
1165
1166 2001-05-21  Andreas Jaeger  <aj@suse.de>
1167
1168         * dwarf2.c (decode_line_info): Fix error message.
1169         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
1170         adjust error message.
1171
1172 2001-05-18  H.J. Lu  <hjl@gnu.org>
1173
1174         * elflink.h (elf_link_add_object_symbols): Revert the last
1175         change.
1176
1177 2001-05-17  Alan Modra  <amodra@one.net.au>
1178
1179         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
1180         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
1181         (hppa_build_one_stub): Add an assert to check plt.offset.
1182
1183 2001-05-17  H.J. Lu  <hjl@gnu.org>
1184
1185         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
1186         version definition to basename of the output filename.
1187
1188 2001-05-17  H.J. Lu  <hjl@gnu.org>
1189
1190         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
1191         basename of the bfd filename.
1192
1193 2001-05-16  Alan Modra  <amodra@one.net.au>
1194
1195         * section.c (asection): Add linker_has_input field.
1196         (STD_SECTION): Adjust initialization to suit.
1197         * ecoff.c (bfd_debug_section): Likewise.
1198         * bfd-in2.h: Regenerate.
1199
1200 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
1201
1202         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
1203         negative 32-bit operands to 16 operands when the operand is
1204         going to be zero-extended by the modified opcode.
1205
1206 2001-05-12  Peter Targett  <peter.targett@arccores.com>
1207
1208         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
1209         name for 'arc5' core versions.
1210         (bfd_arc_arch): Make bfd_mach_arc_6 default.
1211
1212         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
1213         architecture.
1214         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
1215
1216 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
1217
1218         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
1219         sections as well.
1220         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
1221         to .gnu.linkonce.t.FOO text section.
1222
1223 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
1224
1225         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
1226         fields, change sec into secinfo.
1227         (struct sec_merge_info): Add chain, remove last fields.
1228         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
1229         (sec_merge_hash_lookup): If lookup could not use a string only
1230         because it has bad alignment, mark the old string for deletion.
1231         (sec_merge_add): Add secinfo argument. Don't compute entry's
1232         position, instead record the section.
1233         (sec_merge_emit): Update for the sec into secinfo change in
1234         struct sec_merge_hash_entry.
1235         (_bfd_merge_section): Only record the section for merging, defer
1236         putting strings into the hash table.
1237         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
1238         _bfd_merge_sections): New functions.
1239         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
1240         changes.
1241         * libbfd-in.h (_bfd_merge_sections): Add prototype.
1242         (_bfd_nolink_bfd_merge_sections): Define.
1243         * libbfd.h: Likewise.
1244         (bfd_generic_merge_sections): Add prototype.
1245         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
1246         (struct bfd_target): Likewise.
1247         * bfd.c (bfd_merge_sections): Define.
1248         * bfd-in2.h: Rebuilt.
1249         * elf.c (_bfd_elf_merge_sections): New function.
1250         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
1251         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
1252         * reloc.c (bfd_generic_merge_sections): New function.
1253         * vms.c (vms_bfd_merge_sections): New function.
1254         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
1255         * aout-target.h (MY_bfd_merge_sections): Define.
1256         * aout-tic30.c (MY_bfd_merge_sections): Define.
1257         * binary.c (binary_bfd_merge_sections): Define.
1258         * bout.c (b_out_bfd_merge_sections): Define.
1259         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
1260         * coffcode.c (coff_bfd_merge_sections): Define.
1261         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
1262         * i386msdos.c (msdos_bfd_merge_sections): Define.
1263         * i386os9k.c (os9k_bfd_merge_sections): Define.
1264         * ieee.c (ieee_bfd_merge_sections): Define.
1265         * ihex.c (ihex_bfd_merge_sections): Define.
1266         * nlm-target.h (nlm_bfd_merge_sections): Define.
1267         * oasys.c (oasys_bfd_merge_sections): Define.
1268         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
1269         * som.c (som_bfd_merge_sections): Define.
1270         * srec.c (srec_bfd_merge_sections): Define.
1271         * tekhex.c (tekhex_bfd_merge_sections): Define.
1272         * versados.c (versados_bfd_merge_sections): Define.
1273         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
1274
1275 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
1276
1277         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
1278         to be unsigned long, in order to match its use.
1279
1280 2001-05-10  H.J. Lu  <hjl@gnu.org>
1281
1282         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
1283         indirect symbols.
1284
1285 2001-05-09  H.J. Lu  <hjl@gnu.org>
1286
1287         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
1288         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
1289         Remove the unused veriable `dynver'.
1290
1291 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
1292
1293         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
1294         NULL or is not COFF.
1295         (coff_i386_rtype_to_howto): Don't dump core if output section
1296         owner is not COFF.
1297
1298 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1299
1300         * ecoff.c (bfd_debug_section): Fix initialization.
1301         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
1302         is always a positive integer. Cast away sign mismatch.
1303         * elf32-mips.c: Fix misleading comment and typo.
1304         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
1305         correct data type.
1306         * elflink.c: Fix typo.
1307         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
1308         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
1309
1310 2001-05-04  Richard Henderson  <rth@redhat.com>
1311
1312         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
1313
1314 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
1315
1316         * elf32-arm.h (elf32_arm_final_link_relocate): Set
1317         EF_ARM_HASENTRY if the start address is set.
1318
1319 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
1320
1321         * targets.c (_bfd_target_vector_entries): Compute value based on
1322         the size of the _bfd_target_vector and not bfd_target_vector.
1323
1324 2001-05-03  H.J. Lu  <hjl@gnu.org>
1325
1326         * elfcode.h: Include "libiberty.h".
1327
1328         * elflink.h (elf_link_add_object_symbols): Set
1329         elf_dt_name (abfd) to basename of the bfd filename.
1330         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
1331         of the bfd filename.
1332
1333 2001-05-03  Andreas Jaeger  <aj@suse.de>
1334
1335         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
1336         (elf_generic_info_to_howto_rel): Likewise.
1337         * coff-alpha.c (reloc_nil): Likewise.
1338         (alpha_ecoff_bad_format_hook): Likewise.
1339         (alpha_adjust_reloc_out): Likewise.
1340         (alpha_bfd_reloc_type_lookup): Likewise.
1341         (alpha_convert_external_reloc): Likewise.
1342         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
1343         (elf64_alpha_reloc_bad): Likewise.
1344         (elf64_alpha_reloc_gpdisp): Likewise.
1345         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
1346         (elf64_alpha_info_to_howto): Likewise.
1347         (elf64_alpha_add_symbol_hook): Likewise.
1348         (elf64_alpha_create_got_section): Likewise.
1349         (elf64_alpha_is_local_label_name): Likewise.
1350         (elf64_alpha_merge_ind_symbols): Likewise.
1351         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
1352         (mips_elf64_get_reloc_upper_bound): Likewise.
1353         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
1354         (nlm_alpha_get_public_offset): Likewise.
1355
1356 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
1357
1358         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
1359         about overflow in R_OPENRISC_LO_16_IN_INSN and
1360         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
1361
1362 2001-04-30  H.J. Lu  <hjl@gnu.org>
1363
1364         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
1365         only for ELF_LINK_FORCED_LOCAL.
1366         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1367         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
1368         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1369
1370         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
1371         if the symbol has hidden or internal visibility.
1372
1373 2001-04-30  Alan Modra  <amodra@one.net.au>
1374
1375         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
1376         calls to undefined weak symbols.
1377
1378 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
1379
1380         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
1381         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
1382
1383 2001-04-27  Andreas Jaeger  <aj@suse.de>
1384
1385         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
1386         out handled entries.
1387         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
1388         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
1389         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
1390         GOT32.
1391
1392 2001-04-27  Sean McNeil <sean@mcneil.com>
1393
1394         * config.bfd: Add arm-vxworks target.
1395         * coff-arm (coff_arm_relocate_section): Add in symbol value to
1396         addend (fro VXworks targets).
1397
1398 2001-04-26  H.J. Lu  <hjl@gnu.org>
1399
1400         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
1401         valid.
1402
1403 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
1404
1405         * bfd-in.h (bfd_cache_close): Declare newly exported function.
1406         * bfd-in2.h: Regenerated.
1407
1408 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
1409
1410         * merge.c (struct sec_merge_hash_entry): Add alignment field.
1411         (struct sec_merge_hash): Remove alignment_power.
1412         (sec_merge_hash_newfunc): Clear alignment.
1413         (sec_merge_hash_lookup): Pass alignment as argument.
1414         Use hashp->root.next, not hashp->next to walk the hash chain.
1415         If a string already in the hashtable does not have required
1416         alignment, create a new hashtable entry.
1417         (sec_merge_init): Remove alignment_power argument.
1418         (sec_merge_add): Add alignment argument.
1419         (sec_merge_emit): Alignment is now a per-entity thing, not per
1420         section.
1421         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
1422         for proper alignment.
1423         Pass alignment information to sec_merge_add.
1424
1425 2001-04-24  Christian Groessler  <cpg@aladdin.de>
1426
1427         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
1428         and R_REL16 reloc types; accept odd values for R_REL16 type
1429
1430 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
1431
1432         * cpu-openrisc.c: New file.
1433         * elf32-openrisc.c: Likewise.
1434
1435         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
1436         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
1437         (BFD32_BACKENDS): Add elf32-openrisc.lo.
1438         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
1439         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
1440         * Makefile.in: Regenerated.
1441         * config.bfd: (openrisc-*-elf): New target.
1442         * configure.in (bfd_elf32_openrisc_vec): New vector.
1443         * configure: Regenerated.
1444         * libbfd.h: Regenerated.
1445         * bfd-in2.h: Regenerated.
1446         * reloc.c: Add OpenRISC relocations.
1447         * targets.c (bfd_elf32_openrisc_vec): Declare.
1448         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
1449         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
1450         (bfd_openrisc_arch): Declare.
1451         (bfd_archures_list): Add bfd_openrisc_arch.
1452         * elf.c (prep_headers): Add bfd_arch_openrisc.
1453
1454 2001-04-23  Bo Thorsen  <bo@suse.de>
1455
1456         * elf64-x86-64.c: Add c++ vtable hack.
1457         Small whitespace and comment changes.
1458
1459 2001-04-19  Andreas Jaeger  <aj@suse.de>
1460
1461         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
1462         (elf64_x86_64_plt_entry): Likewise.
1463         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
1464         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
1465
1466 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
1467
1468         * elf32-cris.c: Tweak comments related to dynamic linking.
1469         (cris_elf_relocate_section): When not creating shared object, fill
1470         in the .got table for any symbol not in the dynamic symbol table.
1471         (elf_cris_finish_dynamic_symbol): When not creating shared object,
1472         only emit a .got.rela reloc if the symbol is in the dynamic symbol
1473         table.
1474         (cris_elf_check_relocs): Use variable r_type in all places rather
1475         than the original expression.  Add default case in switch for
1476         reloc types.
1477         (elf_cris_size_dynamic_sections): Iterate over
1478         elf_cris_discard_excess_program_dynamics when not creating shared
1479         library.
1480         (elf_cris_discard_excess_dso_dynamics): Renamed from
1481         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
1482         (elf_cris_discard_excess_program_dynamics): New.
1483
1484 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
1485
1486         * coffcode.h (coff_write_object_contents): Use
1487         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
1488
1489 2001-04-14  H.J. Lu  <hjl@gnu.org>
1490
1491         * bfd-in2.h: Regenerate.
1492
1493 2001-04-14  Jakub Jelinek <jakub@redhat.com>
1494
1495         * section.c (STD_SECTION): Add entsize.
1496
1497 2001-04-13  H.J. Lu  <hjl@gnu.org>
1498
1499         * section.c (SEC_MERGE): Define new flag for merging.
1500         (SEC_STRINGS): Likewise.
1501         (entsize): New field.
1502
1503 2001-04-13  Roger Sayle  <roger@metaphorics.com>
1504
1505         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
1506         flag on pe-i386 targets.
1507
1508 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
1509
1510         * libbfd-in.h (_bfd_merge_section): New.
1511         (_bfd_write_merged_section): New.
1512         (_bfd_merged_section_offset): New.
1513         * libbfd.h: Rebuilt.
1514         * linker.c (_bfd_generic_link_output_symbols): Handle
1515         discard_sec_merge.
1516         * aoutx.h (aout_link_write_symbols): Likewise.
1517         * pdp11.c (aout_link_write_symbols): Likewise.
1518         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
1519         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
1520         sections.
1521         (elf_link_sec_merge_syms): New.
1522         (elf_link_input_bfd): Call _bfd_merged_section_offset
1523         and _bfd_write_merged_section.
1524         Handle discard_sec_merge.
1525         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
1526         field.
1527         (struct bfd_elf_section_data): Likewise.
1528         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
1529         SEC_STRINGS section flags and entsize from their ELF counterparts.
1530         (_bfd_elf_link_hash_table_init): Initialize merge_info.
1531         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
1532         from their BFD counterparts.
1533         * merge.c: New file.
1534         * Makefile.am: Add strtab.lo.
1535         * Makefile.in: Rebuilt.
1536
1537 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
1538
1539         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
1540         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
1541
1542 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
1543
1544         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
1545         endian MIPS ELF target.
1546         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1547         MIPS ELF target.
1548
1549         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1550         64bit big endian MIPS ELF target.
1551         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1552         endian MIPS ELF target.
1553         * configure: Regenerated.
1554
1555         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1556         little endian targets.
1557         (mips_elf_sym_is_global): Handle traditional targets.
1558
1559         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1560         64bit big endian MIPS ELF target.
1561         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1562         endian MIPS ELF target.
1563
1564         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1565         and bfd_elf64_tradlittlemips_vec.
1566
1567 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
1568
1569         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1570         ordinary "progbits" section.
1571
1572 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
1573
1574         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1575         when -Bsymbolic causes a symbol to no longer need a .plt entry.
1576
1577 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
1578
1579         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1580
1581 2001-03-30  H.J. Lu  <hjl@gnu.org>
1582
1583         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1584         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1585
1586 2001-03-26  H.J. Lu  <hjl@gnu.org>
1587
1588         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
1589         if there are any relocations for generic ELF.
1590         (bfd_elf32_bfd_link_add_symbols): Defined to
1591         elf32_generic_link_add_symbols.
1592         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
1593         if there are any relocations for generic ELF.
1594         (bfd_elf64_bfd_link_add_symbols): Defined to
1595         elf64_generic_link_add_symbols.
1596
1597 2001-03-23  Nick Clifton  <nickc@redhat.com>
1598
1599         * Makefile.am (BUILD_CFILES): New variable: List of C source
1600         files created in build directory.
1601         (BUILD_HFILES): New variable: List of header files created in
1602         build directory.
1603         (POTFILES): Delete.
1604         (po/POTFILES.in): Replace rule with empty entry.
1605         (po/SRC-POTFILES.in): New rule: Create a list of source files
1606         in the source directory.
1607         (po/BLD-POTFILES.in): New rule: Create a list of source files
1608         in the build directory.
1609         (MOSTLYCLEAN): Do not delete source files created in build
1610         directory.
1611         * Makefile.in: Regenerate.
1612         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
1613         into po/Makefile.
1614         * configure: Regenerate.
1615
1616         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
1617         and BLD_POTFILES.
1618         Add .. to the search path when building bfd.pot.
1619         Delete POTFILES when performing distclean.
1620         Add comment describing why distclean is broken in maintainer mode.
1621         * po/POTFILES.in: Delete.
1622         * po/SRC-POTFILES.in: New file.
1623         * po/BLD-POTFILES.in: New file.
1624         * po/bfd.pot: Regenerate.
1625
1626 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
1627
1628         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
1629         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
1630         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
1631         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
1632         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
1633         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
1634         functions.
1635         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
1636         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
1637         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
1638         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
1639         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
1640         New HOWTO members for new relocs.
1641         (cris_reloc_map): Map new relocs.
1642         (ELF_DYNAMIC_INTERPRETER): Define.
1643         (PLT_ENTRY_SIZE): Define.
1644         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
1645         elf_cris_pic_plt_entry): New, PLT templates.
1646         (struct elf_cris_pcrel_relocs_copied, struct
1647         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
1648         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
1649         (cris_final_link_relocate): Check that 16-bit GOT relocs have
1650         positive values.  Adjust PCREL relocs to be relative to location
1651         after relocation.
1652         (cris_elf_relocate_section): Handle relocations to dynamic
1653         objects.  Handle new relocations.  Call error handler when seeing
1654         non-PIC relocation for read-only sections while generating shared
1655         object.
1656         (cris_elf_check_relocs): Set reference counts for GOT and PLT
1657         entries.
1658         (bfd_elf32_bfd_link_hash_table_create,
1659         elf_backend_adjust_dynamic_symbol,
1660         elf_backend_size_dynamic_sections,
1661         elf_backend_finish_dynamic_symbol,
1662         elf_backend_finish_dynamic_sections,
1663         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
1664         elf_backend_hide_symbol, elf_backend_want_got_plt,
1665         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1666         elf_backend_got_header_size, elf_backend_plt_header_size):
1667         Define.
1668
1669         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
1670         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
1671         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
1672         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
1673         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
1674         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
1675         * bfd-in2.h, libbfd.h: Regenerate.
1676
1677 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
1678
1679         (_bfd_mips_elf_relocate_section): Give a better error message when
1680         a relocation is not recognized.
1681
1682 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
1683
1684         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
1685         non-NULL before attempting to dereference.
1686
1687 2001-03-20  H.J. Lu  <hjl@gnu.org>
1688
1689         * configure.in: Remove the redundent AC_ARG_PROGRAM.
1690         * configure: Rebuild.
1691
1692 2001-03-20  Andreas Schwab  <schwab@suse.de>
1693
1694         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
1695         relocation value when resolving a reference from a debugging
1696         section.
1697
1698 2001-03-16  Scott Thomason  <SThomaso@hii.com>
1699
1700         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
1701         (xcoff64_swap_sym_out): Fix syntax errors.
1702
1703 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
1704
1705         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
1706
1707 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
1708
1709         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
1710         (hppa_link_hash_newfunc): Init it.
1711         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
1712         section appears to be non-PIC.
1713         (final_link_relocate): Likewise.
1714         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
1715         possible candidate function, and set pic_call for those that will
1716         only have a .plt entry for the PIC call stub.
1717         (hppa_handle_PIC_calls): Set maybe_pic_call.
1718
1719 2001-03-12  DJ Delorie  <dj@redhat.com>
1720
1721         * elf32-sh.c (sh_elf_relocate_section): Only relocation
1722         R_SH_DIR8WP* relocs if they're against external symbols, else
1723         they're just for relaxing.  Validate the reloc values.
1724
1725 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
1726
1727         * binary.c (bfd_external_binary_architecture): Declare.
1728         (binary_object_p): If bfd_external_binary_architecture is defined,
1729         set the architecture to this string.
1730
1731 2001-03-11  Philip Blundell  <philb@gnu.org>
1732
1733         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
1734         entries that could serve as a definition for a weak symbol.
1735
1736 2001-03-08  Nick Clifton  <nickc@redhat.com>
1737
1738         * Most files: Update copyright notices using Perl script created
1739         by Kevin Buettner <kevinb@redhat.com>.
1740
1741 2001-03-07  Nick Clifton  <nickc@redhat.com>
1742
1743         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
1744         prior patch on ! defined OLD_ARM_ABI.
1745
1746 2001-03-07  Andreas Jaeger  <aj@suse.de>
1747
1748         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
1749         some relocation values.
1750
1751 2001-03-06  Nick Clifton  <nickc@redhat.com>
1752
1753         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
1754         of offset in BLX(1) instruction.
1755         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
1756         offset in BLX(1) instruction.
1757         Fix formatting.
1758
1759 2001-03-06  Nick Clifton  <nickc@redhat.com>
1760
1761         * coff-arm.c (coff_arm_reloc_type_lookup): Add
1762         BFD_RELOC_THUMB_PCREL_BLX.
1763
1764 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
1765
1766         * archures.c (bfd_default_scan): Add Coldfire CPUs.
1767         * bfd-in2.h: Regenerate.
1768         * cpu-m68k.c: Add Coldfire CPUs for arch table.
1769         * ieee.c (ieee_write_processor): Set proper id for
1770         Coldfire CPUs.
1771
1772 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
1773
1774         * configure.in: Add s390 target.
1775         * configure: Regenerate.
1776
1777 2001-02-28  Andreas Jaeger  <aj@suse.de>
1778
1779         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
1780         to addend.
1781
1782 2001-02-28  Philip Blundell  <pb@futuretv.com>
1783
1784         * elf32-arm.h: Update mentions of renamed EF_xx constants.
1785         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
1786
1787 2001-02-27  H.J. Lu  <hjl@gnu.org>
1788
1789         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
1790         abfd->tdata.aout_data == NULL.
1791
1792 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
1793
1794         * elf32-hppa.c: Correct field selector in stub comments.
1795         (clobber_millicode_symbols): Formatting fix.
1796
1797         * configure.in: Bump version to 2.11.90.
1798         * configure: Regenerate.
1799         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
1800         (CFILES): $SOURCE_CFILES + generated C files.
1801         (POTFILES): Include $HFILES not $SOURCE_HFILES.
1802         Run "make dep-am"
1803         * Makefile.in: Regenerate.
1804         * doc/Makefile.in: This too.
1805
1806 2001-02-26  Timothy Wall  <twall@cygnus.com>
1807
1808         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
1809         comments.
1810
1811 2001-02-26  Nick Clifton <nickc@redhat.com>
1812
1813         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
1814         up, replacing multiple if statements with a switch.
1815         (handle_COMDAT): New function.
1816
1817 2001-02-26  H.J. Lu  <hjl@gnu.org>
1818
1819         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
1820         a warning for section flags we do not handle instead of
1821         aborting.
1822
1823 2001-02-26  Andreas Jaeger  <aj@suse.de>
1824
1825         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
1826
1827 2001-02-22  Timothy Wall  <twall@cygnus.com>
1828
1829         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
1830         * configure.in: Add objects for elf64_ia64_aix vectors.
1831         * configure: Regenerated.
1832         * configure.host: Recognize ia64-*-aix*.
1833         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
1834         for AIX.  AIX5 requires most relocations to be dynamic (*all*
1835         binaries are somewhat similar to shared libraries).
1836         * targets.c: Add elf64_ia64_aix vectors.
1837
1838 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
1839
1840         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
1841         C8 said "1" instead of "8".  Clarify error string for IMM22:
1842         "signed integer" instead of just "integer".
1843
1844 2001-02-20  Andreas Jaeger  <aj@suse.de>
1845
1846         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
1847         PLT entries that could serve as a definition for a weak symbol.
1848
1849 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
1850
1851         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
1852         entries that could serve as a definition for a weak symbol.
1853         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
1854
1855 2001-02-18  David O'Brien  <obrien@FreeBSD>
1856
1857         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
1858         FreeBSD/i386-CURRENT differently until I can figure out the needed
1859         corefile changes.
1860         * configure: Regenerate.
1861         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
1862         FreeBSD/PowerPC, and FreeBSD/sparc64.
1863
1864 2001-02-18  lars brinkhoff  <lars@nocrew.org>
1865
1866         * Makefile.am: Add PDP-11 a.out target.
1867         * config.bfd: Likewise.
1868         * configure.in: Likewise.
1869         * targets.c: Likewise.
1870         * archures.c: Likewise.
1871         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
1872         * libbfd.h: Add PDP-11 relocations.
1873         * reloc.c: Likewise.
1874         * cpu-pdp11.c: New file.
1875         * pdp11.c: New file.
1876
1877         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
1878         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1879         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
1880         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
1881         (GET_MAGIC): New macro.
1882         (PUT_MAGIC): Likewise.
1883         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
1884
1885 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
1886
1887         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
1888         multiarch needs it).
1889
1890 2001-02-18  H.J. Lu  <hjl@gnu.org>
1891
1892         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
1893         index.
1894
1895 2001-02-18  Kazu Hirata  <kazu@hxi.com>
1896
1897         * vms-misc.c: Fix formatting.
1898
1899 2001-02-16  Kazu Hirata  <kazu@hxi.com>
1900
1901         * vms.c: Fix formatting.
1902
1903 2001-02-14  H.J. Lu  <hjl@gnu.org>
1904
1905         * elf.c (elf_find_function): New function.
1906         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
1907         the file name and function name.
1908
1909 2001-02-14  Nick Clifton  <nickc@redhat.com>
1910
1911         * ecoff.c (bfd_debug_section): Update to initialise new fields in
1912         asection structure.
1913
1914         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
1915         (BFD64_BACKENDS): Add pepigen.c
1916         Add rules to create peigen.c and pepigen.c from peXXigen.c.
1917
1918         * Makefile.in: Regenerate.
1919         * configure:  Regenerate.
1920         * po/POTFILES.in: Regenerate.
1921         * po/bfd.pot: Regenerate.
1922
1923 2001-02-14  H.J. Lu  <hjl@gnu.org>
1924
1925         * libcoff-in.h (pe_tdata): Add members target_subsystem and
1926         force_minimum_alignment.
1927
1928 2001-02-14  Bo Thorsen  <bo@suse.de>
1929
1930         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
1931         (elf64_86_64_size_info): Struct added to fix a problem
1932         with the hashtable string entries.
1933         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
1934         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
1935         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
1936         remove the FIXME for this.
1937         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
1938         section. Also removed the FIXME for it.
1939         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
1940         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
1941         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
1942
1943 2001-02-13  Richard Henderson  <rth@redhat.com>
1944
1945         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
1946         and not user provided.
1947
1948 2001-02-13  Kazu Hirata  <kazu@hxi.com>
1949
1950         * vms.c (vms_print_symbol): Remove unreachable code.
1951
1952         * rs6000-core.c: Fix formatting.
1953
1954 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
1955
1956         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
1957         as _bfd_XXi_only_swap_filehdr_out.
1958         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
1959         pe->force_minimum_alignment to TRUE.
1960         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
1961         PEI_TARGET_SUBSYSTEM.
1962         (pe_print_private_bfd_data): Call
1963         _bfd_XX_print_private_bfd_data_common() instead of
1964         _bfd_pe_print_private_bfd_data_common().
1965         (pe_bfd_copy_private_bfd_data): Call
1966         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
1967         _bfd_pe_bfd_copy_private_bfd_data_common().
1968         (coff_bfd_copy_private_section_data): Define as
1969         _bfd_XX_bfd_copy_private_section_data instead of
1970         _bfd_pe_bfd_copy_private_section_data.
1971         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
1972         of a _bfd_pe_get_symbol_info.
1973
1974         * peigen.c: Delete.
1975
1976         * peXXigen.c: Renamed from peigen.c.
1977         (COFF_WITH_XX): Define this macro (will get expanded into
1978         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
1979         compiled as peigen.c or pepigen.c.
1980         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
1981         define the canonical PEP structures and definitions.
1982         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
1983         effect, enforce minimum file and section alignments.  If
1984         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
1985         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
1986         so, by default, this is a no-op).
1987
1988         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
1989         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
1990         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
1991         _bfd_pefoo if it's not defined.  Use these macros to define
1992         coff swap macros.
1993
1994         * libcoff.h (pe_tdata): Add members target_subsystem and
1995         force_minimum_alignment.
1996
1997         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
1998         COFF_WITH_pep.
1999         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
2000
2001         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
2002         peigen.lo.
2003
2004         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
2005         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
2006         PEPAOUTHDR.
2007
2008         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
2009         (BFD64_BACKENDS_CFILES): Mention pepigen.c
2010         (peigen.c): Add rule to generate from peXXigen.c.
2011         (pepigen.c): Ditto.
2012         (pepigen.lo): List dependencies for pepigen.lo.
2013
2014 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
2015
2016         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
2017         $global$ referenced but not defined, set its value here.
2018
2019 2001-02-09  Bo Thorsen  <bo@suse.de>
2020
2021         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
2022         alignment to 3.
2023         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
2024         and relocation.
2025         (elf64_x86_64_relocate_section): Fix formatting.
2026         (elf64_x86_64_relocate_section): Fix addend for relocation of
2027         R_X86_64_(8|16|32|PC8|PC16|PC32).
2028
2029 2001-02-12  Jan Hubicka  <jh@suse.cz>
2030
2031         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
2032
2033 2001-02-11  H.J. Lu  <hjl@gnu.org>
2034
2035         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
2036         alignment.
2037
2038 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2039
2040         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
2041         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
2042         relocations against dynsym symbols.
2043
2044         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
2045         the R_MIPS_26 relocation.
2046         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
2047         the R_MIPS_26 relocation.
2048         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
2049         relocation.
2050         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
2051         the R_MIPS_26 relocation.
2052         (mips_elf64_howto_table_rela): Likewise.
2053
2054         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
2055         member to mark symbols that have non-CALL relocations against
2056         them.
2057         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
2058         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
2059         R_MIPS_GOT16.
2060         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
2061         non-CALL relocation against it is encountered.
2062         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
2063         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
2064         no_fn_stub is not set.
2065
2066         * elf32-mips.c (mips_elf_output_extsym): Get the output section
2067         information from the real symbol for indirect ones.
2068         Check no_fn_stub to find out if a symbol has a function stub
2069         indeed.
2070
2071 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2072
2073         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
2074         * Makefile.in: Regenerate.
2075
2076 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
2077
2078         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
2079         true if section name is an unwind table section name.
2080         (elfNN_ia64_additional_program_headers): Count each unwind section
2081         separately.
2082         (elfNN_ia64_modify_segment_map): Install one unwind program header
2083         for each unwind separate section.  Note: normally the linker
2084         script merges the unwind sections that go into a single segment,
2085         so this still generates at most one unwind program header per
2086         segment.
2087
2088         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
2089         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
2090         (elfNN_ia64_fake_sections): Mark sections with names that start
2091         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
2092         unwind section.
2093
2094         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
2095         Use it to make sh_info in unwind section point to the text section
2096         it applies to.
2097
2098 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2099
2100         * Makefile.am: Add linux target for S/390.
2101         * archures.c: Likewise.
2102         * bfd-in2.h: Likewise.
2103         * config.bfd: Likewise.
2104         * configure.in: Likewise.
2105         * elf.c: Likewise.
2106         * libbfd.h: Likewise.
2107         * targets.c: Likewise.
2108         * cpu-s390.c: New file.
2109         * elf32-s390.c: New file.
2110         * elf64-s390.c: New file.
2111
2112 2001-02-09  Nick Clifton  <nickc@redhat.com>
2113
2114         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
2115         ImageBase.  This has already been done by coff_swap_hdr_in.
2116
2117 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2118
2119         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
2120
2121 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2122
2123         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
2124         (sparc64_elf_relocate_section): Likewise.
2125
2126 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
2127
2128         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
2129         similar to R_SPARC_32.
2130         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
2131
2132 2001-02-08  H.J. Lu  <hjl@gnu.org>
2133
2134         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
2135         relocation entries for weak definitions when building DSO with
2136         -Bsymbolic.
2137
2138 2001-02-08  Richard Henderson  <rth@redhat.com>
2139
2140         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
2141         before visibility.  Locally defined protected symbols are not
2142         dynamic.
2143
2144 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
2145
2146         * config.bfd: Enable coff64 for rs6000-*.  Patch from
2147         <hzoli@austin.ibm.com>.
2148
2149 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
2150
2151         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
2152         found, do not attempt to find dwarf2 info before returning.
2153
2154 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
2155
2156         * elflink.h (is_global_symbol_definition): Rename to
2157         is_global_data_symbol_definition and have it reject function
2158         symbols.
2159         (elf_link_is_defined_archive_symbol): Use renamed function.
2160
2161 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
2162
2163         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
2164         * libbfd.h (bfd_target_vector): Likewise.
2165         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
2166         make static; create pointer reference named bfd_target_vector.
2167         (_bfd_target_vector_entries): Calculate this based on the array
2168         typed _bfd_target_vector.
2169
2170 2001-02-06  H.J. Lu  <hjl@gnu.org>
2171
2172         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
2173         internal symbols are not dynamic.
2174         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2175
2176 2001-02-06  Nick Clifton  <nickc@redhat.com>
2177
2178         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
2179         that it will not be pulled into the list of files that make up
2180         po/POTFILES.in.
2181         * Makefile.in: Regenerate.
2182         * po/bfd.pot:  Regenerate.
2183
2184 2001-02-06  H.J. Lu  <hjl@gnu.org>
2185
2186         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
2187         checking.
2188         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
2189         external_PEI_IMAGE_hdr.
2190
2191 2001-02-06  Kazu Hirata  <kazu@hxi.com>
2192
2193         * elf-m10200.c: Fix formatting.
2194
2195 2001-02-04  Nick Clifton  <nickc@redhat.com>
2196
2197         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
2198         rel, it will be handled later on.
2199
2200 2001-02-02  Fred Fish  <fnf@ninemoons.com>
2201
2202         * Makefile.in: Fix typo.
2203
2204 2001-02-01  Kazu Hirata  <kazu@hxi.com>
2205
2206         * elf-m10300.c: Fix formatting.
2207
2208 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
2209
2210         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
2211         (elf_backend_get_symbol_type): Define.
2212         (elf64_hppa_object_p): Set architecture and machine from elf
2213         header flags.
2214
2215 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
2216
2217         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
2218         before mdebug.
2219
2220 2001-01-26  Richard Henderson  <rth@redhat.com>
2221
2222         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
2223         for non-default visibility.
2224         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
2225         delete ugly macro and replace with pretty function.
2226
2227 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
2228
2229         * coff-go32.c: Update copyright.
2230         * coff-stgo32.c: Likewise.
2231         * coff-go32.c (COFF_LONG_FILENAMES): Define.
2232         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
2233         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
2234         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2235
2236 2001-01-25  Kazu Hirata  <kazu@hxi.com>
2237
2238         * bfd-in2.h: Rebuild.
2239         * libbfd.h: Likewise.
2240
2241 2001-01-23  H.J. Lu  <hjl@gnu.org>
2242
2243         * bfd-in2.h: Rebuild.
2244
2245 2001-01-23  H.J. Lu  <hjl@gnu.org>
2246
2247         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
2248         is NULL or PRIV(vms_rec) is outside of the buffer.
2249
2250 2001-01-23  Kazu Hirata  <kazu@hxi.com>
2251
2252         * coff64-rs6000.c: Fix formatting.
2253         * coff-arm.c: Likewise.
2254         * coffgen.c: Likewise.
2255         * cofflink.c: Likewise.
2256         * coff-mcore.c: Likewise.
2257         * coff-mips.c: Likewise.
2258         * coff-pmac.c: Likewise.
2259         * coff-ppc.c: Likewise.
2260         * coff-rs6000.c: Likewise.
2261         * elf32.c: Likewise.
2262         * elf32-fr30.c: Likewise.
2263         * elf32-i370.c: Likewise.
2264         * elf32-i860.c: Likewise.
2265         * elf32-m32r.c: Likewise.
2266         * elf32-m68k.c: Likewise.
2267         * elf32-mcore.c: Likewise.
2268         * elf32-ppc.c: Likewise.
2269         * elf32-sh.c: Likewise.
2270         * elf32-v850.c: Likewise.
2271         * elf64-alpha.c: Likewise.
2272         * elf64-sparc.c: Likewise.
2273         * elflink.c: Likewise.
2274         * elflink.h: Likewise.
2275         * elf-m10200.c: Likewise.
2276         * elf-m10300.c: Likewise.
2277         * elfxx-ia64.c: Likewise.
2278
2279         * aoutx.h: Fix formatting.
2280         * bfd.c: Likewise.
2281         * bfd-in2.h: Likewise.
2282         * bfd-in.h: Likewise.
2283         * cpu-i386.c: Likewise.
2284         * cpu-m68hc11.c: Likewise.
2285         * dwarf2.c: Likewise.
2286         * elf64-x86-64.c: Likewise.
2287         * format.c: Likewise.
2288         * freebsd.h: Likewise.
2289         * hash.c: Likewise.
2290         * hp300hpux.c: Likewise.
2291         * hppabsd-core.c: Likewise.
2292         * hpux-core.c: Likewise.
2293
2294 2001-01-22  Bo Thorsen  <bo@suse.de>
2295
2296         * elf64-x86-64.c: Added PIC support for X86-64.
2297         (elf64_x86_64_link_hash_newfunc): Function added.
2298         (elf64_x86_64_link_hash_table_create): Likewise.
2299         (elf64_x86_64_check_relocs): Likewise.
2300         (elf64_x86_64_gc_mark_hook): Likewise.
2301         (elf64_x86_64_gc_sweep_hook): Likewise.
2302         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2303         (elf64_x86_64_size_dynamic_sections): Likewise.
2304         (elf64_x86_64_discard_copies): Likewise.
2305         (elf64_x86_64_finish_dynamic_symbol): Likewise.
2306         (elf64_x86_64_finish_dynamic_sections): Likewise.
2307         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
2308
2309 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2310
2311         * Makefile.am (install-data-local): Make use of $(DESTDIR).
2312         * Makefile.in: Regenerate.
2313
2314 2001-01-21  Kazu Hirata  <kazu@hxi.com>
2315
2316         * coff-a29k.c: Fix formatting.
2317
2318 2001-01-19  H.J. Lu  <hjl@gnu.org>
2319
2320         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
2321         relocation section names.
2322         (elf_i386_relocate_section): Report files with bad relocation
2323         section names and return false.
2324
2325 2001-01-17  Bo Thorsen  <bo@suse.de>
2326
2327         * targets.c: Alphabetize list of xvecs.
2328
2329 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
2330
2331         * config.bfd: Add linux target variant for elfxx-hppa.
2332         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
2333         bfd_elf64_hppa_linux_vec.
2334         * configure: Regenerate.
2335         * elf64-hppa.c: Include elf64-target.h again to support linux
2336         target variant.
2337         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
2338         * elf32-hppa.c: Include elf32-target.h again to support linux
2339         target variant.
2340         (elf32_hppa_post_process_headers): New function.
2341         (elf_backend_post_process_headers): Define.
2342         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
2343         bfd_elf32_hppa_linux_vec.
2344
2345         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
2346         and data_segment_base fields.
2347         (elf32_hppa_link_hash_table_create ): Init them.
2348         (elf32_hppa_check_relocs): Update comments.
2349         (hppa_record_segment_addr): New function.
2350         (elf32_hppa_relocate_section): Call it.
2351         (final_link_relocate): Handle R_PARISC_SEGREL32.
2352         (elf32_hppa_final_link): New function.
2353         (bfd_elf32_bfd_final_link): Define to call it.
2354         (hppa_unwind_entry_compare): New function.
2355         * cache.c (bfd_open_file): Create files in write+read mode.
2356
2357         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
2358         SEGREL32 and numerous other relocs.  Change duplicate
2359         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
2360
2361         * opncls.c (bfd_fdopenr): Add parens like the comment says around
2362         O_ACCMODE.
2363
2364         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
2365         .plt entries for DT_INIT and DT_FINI.
2366         (elf32_hppa_finish_dynamic_sections): Remove special handling of
2367         DT_INIT and DT_FINI.
2368
2369         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
2370         offsets for stub .plt access if wide mode.  Check offset in range.
2371
2372 2001-01-13  Nick Clifton  <nickc@redhat.com>
2373
2374         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
2375         line.
2376
2377         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
2378         line.
2379
2380 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
2381
2382         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
2383         * configure: Regenerate.
2384
2385 2001-01-11  Peter Targett  <peter.targett@arccores.com>
2386
2387         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
2388         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
2389         * cpu-arc.c (arch_info_struct): Add entries for variants.
2390         (bfd_arc_arch) Set default to bfd_mach_arc_5.
2391         (arc_get_mach) Don't assume machine names prefixed arc- before
2392         testing.
2393         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
2394         selections.
2395         (arc_elf_final_write_processing) Likewise.
2396         (ELF_MACHINE_CODE) Use EM_ARC.
2397
2398 2001-01-10  Nick Clifton  <nickc@redhat.com>
2399
2400         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
2401
2402 2001-01-07  Philip Blundell  <philb@gnu.org>
2403
2404         * README: Replace `bug-gnu-utils@gnu.org' with
2405         `bug-binutils@gnu.org'.
2406
2407 2001-01-04  Kazu Hirata  <kazu@hxi.com>
2408
2409         * som.c: Fix formatting.
2410
2411 2001-01-03  Kazu Hirata  <kazu@hxi.com>
2412
2413         * ecoffswap.h: Fix formatting.
2414         * elf-bfd.h: Likewise.
2415         * elfarm-nabi.c: Likewise.
2416         * elfarm-oabi.c: Likewise.
2417         * elfcode.h: Likewise.
2418         * elfcore.h: Likewise.
2419         * elflink.c: Likewise.
2420         * elflink.h: Likewise.
2421         * elfxx-ia64.c: Likewise.
2422         * elfxx-target.h: Likewise.
2423         * libbfd.c: Likewise
2424         * linker.c: Likewise.
2425         * lynx-core.c: Likewise.
2426
2427 2001-01-02  Kazu Hirata  <kazu@hxi.com>
2428
2429         * pc532-mach.c: Fix formatting.
2430         * pe-arm.c: Likewise.
2431         * pe-i386.c: Likewise.
2432         * pe-mips.c: Likewise.
2433         * pe-ppc.c: Likewise.
2434         * pe-sh.c: Likewise.
2435         * pei-mips.c: Likewise.
2436         * pei-sh.c: Likewise.
2437         * peicode.h: Likewise.
2438         * ppcboot.c: Likewise.
2439         * ptrace-core.c: Likewise.
2440
2441 2001-01-01  Kazu Hirata  <kazu@hxi.com>
2442
2443         * reloc.c: Fix formatting.
2444         * riscix.c: Likewise.
2445         * rs6000-core.c: Likewise.
2446         * xcoff-target.h: Likewise.
2447
2448 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
2449
2450         * elfcode.h (elf_object_p): Also restore the bfd mach field on
2451         error, by calling bfd_default_set_arch_mach with incoming
2452         values.
2453
2454 2000-12-26  Kazu Hirata  <kazu@hxi.com>
2455
2456         * vaxnetbsd.c: Fix formatting.
2457         * versados.c: Likewise.
2458         * vms-gsd.c: Likewise.
2459         * vms-hdr.c: Likewise.
2460         * vms-misc.c: Likewise.
2461
2462 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
2463
2464         * archive.c (coff_write_armap): Don't write more than symbol_count
2465         `archive_member_file_ptr's.
2466
2467 2000-12-25  Kazu Hirata  <kazu@hxi.com>
2468
2469         * vms-tir.c: Fix formatting.
2470
2471 2000-12-23  Kazu Hirata  <kazu@hxi.com>
2472
2473         * vms.c: Fix formatting.
2474         * vms.h: Likewise.
2475
2476 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
2477
2478         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
2479
2480         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
2481
2482         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
2483         arithmetic.
2484
2485         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
2486
2487         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
2488
2489 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
2490
2491         * libbfd.c (bfd_get_bits): Added
2492         (bfd_put_bits): Likewise
2493         * bfd-in.h: Declared the above.
2494         * bfd-in2.h: Regenerated.
2495
2496 2000-12-20  Kazu Hirata  <kazu@hxi.com>
2497
2498         * targets.c: Fix formatting.
2499         * tekhex.c: Likewise.
2500         * trad-core.c: Likewise.
2501
2502 2000-12-19  Kazu Hirata  <kazu@hxi.com>
2503
2504         * sco5-core.c: Fix formatting.
2505         * section.c: Likewise.
2506         * sparclinux.c: Likewise.
2507         * sparclynx.c: Likewise.
2508         * sparcnetbsd.c: Likewise.
2509         * srec.c: Likewise.
2510         * stabs.c: Likewise.
2511         * stab-syms.c: Likewise.
2512         * sunos.c: Likewise.
2513         * syms.c: Likewise.
2514         * sysdep.h: Likewise.
2515
2516 2000-12-18  Nick Clifton  <nickc@redhat.com>
2517
2518         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
2519         defined.
2520         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
2521         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
2522
2523 2000-12-18  Nick Clifton  <nickc@redhat.com>
2524
2525         * vms-misc.c (_bfd_vms_get_record): Add default case to
2526         file_format switch.
2527
2528 2000-12-15  Miloslav Trmac <mitr@volny.cz>
2529
2530         * elfcore.h (elf_core_file_p): Move to the start of the program
2531         headers before attempting to read them.
2532
2533 2000-12-14  Kazu Hirata  <kazu@hxi.com>
2534
2535         * peigen.c: Fix formatting.
2536         * som.c: Likewise.
2537         * som.h: Likewise.
2538
2539 2000-12-13  Kazu Hirata  <kazu@hxi.com>
2540
2541         * peigen.c: Fix formatting.
2542
2543 2000-12-12  Jim Wilson  <wilson@redhat.com>
2544
2545         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
2546
2547 2000-12-08  Mark Salter  <msalter@redhat.com>
2548
2549         * binary.c (binary_set_section_contents): Ignore sections
2550         with zero size.
2551
2552 2000-12-12  Kazu Hirata  <kazu@hxi.com>
2553
2554         * m68klinux.c: Fix formatting.
2555         * m68knetbsd.c: Likewise.
2556         * mipsbsd.c: Likewise.
2557         * netbsd-core.c: Likewise.
2558         * netbsd.h: Likewise.
2559         * newsos3.c: Likewise.
2560         * nlm32-alpha.c: Likewise.
2561         * nlm32-i386.c: Likewise.
2562         * nlm32-ppc.c: Likewise.
2563         * nlm32-sparc.c: Likewise.
2564         * nlmcode.h: Likewise.
2565         * nlmswap.h: Likewise.
2566         * nlm-target.h: Likewise.
2567         * ns32knetbsd.c: Likewise.
2568
2569 2000-12-10  Fred Fish  <fnf@be.com>
2570
2571         * elflink.h (elf_link_output_extsym): Don't complain about undefined
2572         symbols in shared objects if allow_shlib_undefined is true.
2573
2574 2000-12-12  Nick Clifton  <nickc@redhat.com>
2575
2576         * cpu-sh.c: Fix formattng.
2577         * elf.c: Fix formattng.
2578         * elf32-mips.c: Fix formattng.
2579         * elf32-sh.c: Fix formattng.
2580         * elf64-alpha.c: Fix formattng.
2581
2582 2000-12-09  Nick Clifton  <nickc@redhat.com>
2583
2584         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2585         dwarf2_find_line_info as last parameter to invocation of
2586         _bfd_dwarf2_find_nearest_line.
2587         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
2588         dwarf2_find_line_info as last parameter to invocation of
2589         _bfd_dwarf2_find_nearest_line.
2590
2591 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
2592
2593         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
2594         (BFD_LIBS): ...to here.
2595         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
2596         (BFD_LIBS_CFILES): ...to here.
2597         * Makefile.in: Regenerate.
2598         * configure.in: Remove dwarf.lo from the elf shell variable.
2599         * configure: Regenerate.
2600         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
2601         * libcoff.h: Regenerate.
2602         * coffgen.c (coff_find_nearest_line): Call
2603         _bfd_dwarf2_find_nearest_line.
2604         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
2605         accordingly.
2606         (read_abbrevs): Likewise
2607         (decode_line_info): Likewise.
2608         (parse_comp_unit): Likewise.
2609         (comp_unit_find_nearest_line): Likewise.
2610         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
2611         * libbfd.h: Regenerate.
2612         * elf.c (_bfd_elf_find_nearest_line): Update call.
2613         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
2614         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
2615         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
2616         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
2617         (styp_to_sec_flags): Handle DWARF2 sections.
2618         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
2619         to _bfd_find_nearest_line.
2620         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
2621         call to _bfd_find_nearest_line.
2622
2623 2000-12-08  Kazu Hirata  <kazu@hxi.com>
2624
2625         * coffgen.c: Fix formatting.
2626         * elf-m10300.c: Likewise.
2627         * elf32-i386.c: Likewise.
2628         * elf32-i960.c: Likewise.
2629         * elf32-m68k.c: Likewise.
2630         * elf32-mcore.c: Likewise.
2631         * elf32-ppc.c: Likewise.
2632         * elf32-sh.c: Likewise.
2633         * elf32-sparc.c: Likewise.
2634         * elf32-v850.c: Likewise.
2635         * elf64-alpha.c: Likewise.
2636         * elf64-hppa.c: Likewise.
2637         * elf64-mips.c: Likewise.
2638         * elf64-sparc.c: Likewise.
2639
2640 2000-12-07  Kazu Hirata  <kazu@hxi.com>
2641
2642         * elf32-ppc.c: Fix formatting.
2643         * elf64-x86-64.c: Likewise.
2644
2645 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
2646
2647         From  Ralf Baechle  <ralf@gnu.org>
2648
2649         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
2650         BFDs containing no sections or empty .text, .data or .bss sections
2651         to be merged, regardless of their flags.
2652
2653 2000-12-06  Kazu Hirata  <kazu@hxi.com>
2654
2655         * elf32-m32r.c: Fix formatting.
2656         * elf32-m68hc11.c: Likewise.
2657         * elf32-m68hc12.c: Likewise.
2658         * elf32-m68k.c: Likewise.
2659         * elf32-mcore.c: Likewise.
2660         * elf32-pj.c: Likewise.
2661         * elf32-ppc.c: Likewise.
2662
2663 2000-12-05  Kazu Hirata  <kazu@hxi.com>
2664
2665         * elf32-fr30.c: Fix formatting.
2666         * elf32-hppa.c: Likewise.
2667         * elf32-i370.c: Likewise.
2668         * elf32-i386.c: Likewise.
2669         * elf32-i860.c: Likewise.
2670         * elf32-i960.c: Likewise.
2671
2672 2000-12-03  Kazu Hirata  <kazu@hxi.com>
2673
2674         * elf32-arm.h: Fix formatting.
2675         * elf32-avr.c: Likewise.
2676         * elf32-cris.c: Likewise.
2677         * elf32-d10v.c: Likewise.
2678         * elf32-d30v.c: Likewise.
2679         * elf-hppa.h: Likewise.
2680         * elf-m10200.c: Likewise.
2681         * elf-m10300.c: Likewise.
2682
2683 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
2684
2685         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
2686         bfd_mach_mips32_4k.  Update FIXME comment.
2687         * archures.c (bfd_mach_mips32): New constant.
2688         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2689         the latter, renumber it.
2690         * bfd-in2.h (bfd_mach_mips32): New constant.
2691         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
2692         the latter, renumber it.
2693         * cpu-mips.c (I_mips32): New constant.
2694         (I_mips4K, I_mips32_4k): Rename the former to the latter.
2695         (arch_info_struct): Add bfd_mach_mips32 entry, replace
2696         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
2697         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
2698         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
2699         with E_MIPS_MACH_MIPS32_4K.
2700         (_bfd_mips_elf_final_write_processing): Replace
2701         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
2702         bfd_mach_mips32 case.
2703         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
2704         comparison with support for MIPS32.
2705         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
2706         MIPS32.
2707
2708         * aoutx.h (NAME(aout,machine_type)): Add cases for
2709         bfd_mach_mips5 and bfd_mach_mips64.
2710         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
2711         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
2712         * cpu_mips.c (I_mips5, I_mips64): New definitions.
2713         (arch_info_struct): Add entries for bfd_mach_mips5 and
2714         bfd_mach_mips64.
2715         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
2716         _bfd_mips_elf_print_private_bfd_data): Add cases for
2717         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
2718         (_bfd_mips_elf_final_write_processing): Add cases for
2719         bfd_mach_mips5 and bfd_mach_mips64.
2720
2721         * aoutx.h (NAME(aout,machine_type)): Add a
2722         bfd_mach_mips_sb1 case.
2723         * archures.c (bfd_mach_mips_sb1): New constant.
2724         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
2725         * cpu-mips.c (I_sb1): New constant.
2726         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
2727         * elf32-mips.c (elf_mips_mach): Add case for
2728         E_MIPS_MACH_SB1.
2729         (_bfd_mips_elf_final_write_processing): Add case for
2730         bfd_mach_mips_sb1.
2731
2732 2000-12-01  Joel Sherrill <joel@OARcorp.com>
2733
2734         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
2735         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
2736         (sparc*-*-rtems*): Switched from a.out to ELF.
2737
2738 2000-11-30  Jan Hubicka  <jh@suse.cz>
2739
2740         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
2741         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
2742         (elf64-x86-64.lo): Add dependencies.
2743         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
2744         bfd_mach_x86_64_intel_syntax.
2745         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
2746         * config.bfd (x86_64): Add.
2747         * configure.in: Add support for bfd_elf64_x86_64_vec.
2748         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
2749         (bfd_i386_arch, i8086_ar): Link in.
2750         * elf64-x86-64.c: New file.
2751         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
2752         * targets.c (bfd_elf64_x86_64_vec): Add.
2753         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
2754
2755 2000-11-30  Kazu Hirata  <kazu@hxi.com>
2756
2757         * xcofflink.c: Fix formatting.
2758
2759 2000-11-28  Kazu Hirata  <kazu@hxi.com>
2760
2761         * aoutx.h: Fix formatting.
2762         * bfd-in.h: Likewise.
2763         * bfd-in2.h: Likewise.
2764         * cache.c: Likewise.
2765         * cisco-core.c: Likewise.
2766         * coff64-rs6000.c: Likewise.
2767         * coffcode.h: Likewise.
2768         * coffswap.h: Likewise.
2769         * corefile.c: Likewise.
2770         * elf32-mips.c: Likewise.
2771
2772 2000-11-27  Kazu Hirata  <kazu@hxi.com>
2773
2774         * aout-adobe.c: Fix formatting.
2775         * coff64-rs6000.c: Likewise.
2776         * coffgen.c: Likewise.
2777         * cofflink.c: Likewise.
2778
2779 2000-11-27  Philip Blundell  <pb@futuretv.com>
2780
2781         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
2782         (obj_coff_strings_written): New accessor macro for above.
2783         * libcoff.h: Regenerate.
2784         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
2785         strings.
2786         * coffcode.h (coff_write_object_contents): No need to write out
2787         the string table if it's already been done.
2788
2789 2000-11-22  Philip Blundell  <pb@futuretv.com>
2790
2791         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
2792         weak undefined symbols.
2793
2794 2000-11-24  Nick Clifton  <nickc@redhat.com>
2795
2796         * archures.c (bfd_mach_arm_5TE): Define.
2797         (bfd_mach_arm+XScale): Define.
2798         * bfd-in2.h: Regenerate.
2799
2800         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
2801         BFD_RELOC_ARM_PCREL_BLX.
2802
2803         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
2804         XScale machine numbers.
2805
2806         * config.bfd (xscale-elf): Add target.
2807         (xscale-coff): Add target.
2808
2809         * cpu-arm.c: Add xscale machine name.
2810         Add v5t, v5te and XScale machine numbers.
2811
2812 2000-11-23  Kazu Hirata  <kazu@hxi.com>
2813
2814         * aix386-core.c: Fix formatting.
2815
2816 2000-11-22  Jim Wilson  <wilson@redhat.com>
2817
2818         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
2819         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
2820         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
2821         (ins_imms_scaled): Initialize sign_bit at function entry.
2822         (elf64_ia64_operands): Add missing initializers.
2823         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
2824         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
2825         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
2826         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
2827         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
2828         parameters.
2829         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
2830         and free_extsyms at function entry.
2831         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
2832         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
2833         (get_got): Delete unused local srel.
2834         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
2835         (elfNN_ia64_relocate_section): Delete unused local dynindx.
2836
2837 2000-11-21  Kazu Hirata  <kazu@hxi.com>
2838
2839         * coff-a29k.c: Fix formatting.
2840         * coff-h8500.c: Likewise.
2841         * coff-i960.c: Likewise.
2842         * coff-ppc.c: Likewise.
2843         * coff-rs6000.c: Likewise.
2844         * coff-stgo32.c: Likewise.
2845         * coff-tic54x.c: Likewise.
2846         * coff-w65.c: Likewise.
2847         * cpu-h8500.c: Likewise.
2848         * cpu-hppa.c: Likewise.
2849         * cpu-ns32k.c: Likewise.
2850         * ecoff.c: Likewise.
2851         * ecofflink.c: Likewise.
2852
2853 2000-11-21  Nick Clifton  <nickc@redhat.com>
2854
2855         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
2856         remove possibility of infinite loop.
2857
2858 2000-11-20  Kazu Hirata  <kazu@hxi.com>
2859
2860         * aix386-core.c: Fix formatting.
2861         * aout-adobe.c: Likewise.
2862         * aout-arm.c: Likewise.
2863         * aout-encap.c: Likewise.
2864         * aout-ns32k.c: Likewise.
2865         * aout-target.h: Likewise.
2866         * aout-tic30.c: Likewise.
2867         * aoutf1.h: Likewise.
2868         * aoutx.h: Likewise.
2869         * archive.c: Likewise.
2870         * bfd-in.h: Likewise.
2871         * bfd-in2.h: Likewise.
2872         * bfd.c: Likewise.
2873         * bout.c: Likewise.
2874
2875 2000-11-17  H.J. Lu  <hjl@gnu.org>
2876
2877         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
2878         pltoff entries for DT_INIT and DT_FINI.
2879         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
2880         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
2881         entries.
2882
2883 2000-11-16  Richard Henderson  <rth@redhat.com>
2884
2885         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
2886         (allocate_dynrel_entries): Likewise.
2887         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
2888         (set_pltoff_entry): Likewise.
2889         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
2890         (elfNN_ia64_reloc_type_lookup): Likewise.
2891         (elfNN_ia64_install_value): Likewise.
2892         (elfNN_ia64_relocate_section): Likewise.
2893         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
2894         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
2895
2896 2000-11-16  Kazu Hirata  <kazu@hxi.com>
2897
2898         * cpu-a29k.c: Fix formatting.
2899         * cpu-alpha.c: Likewise.
2900         * cpu-arm.c: Likewise.
2901         * cpu-avr.c: Likewise.
2902         * cpu-d10v.c: Likewise.
2903         * cpu-h8500.c: Likewise.
2904         * cpu-hppa.c: Likewise.
2905         * cpu-i370.c: Likewise.
2906         * cpu-i386.c: Likewise.
2907         * cpu-i960.c: Likewise.
2908         * cpu-ia64-opc.c: Likewise.
2909         * cpu-ia64.c: Likewise.
2910         * cpu-m32r.c: Likewise.
2911         * cpu-m68hc11.c: Likewise.
2912         * cpu-m68hc12.c: Likewise.
2913         * cpu-m68k.c: Likewise.
2914         * cpu-m88k.c: Likewise.
2915         * cpu-mips.c: Likewise.
2916         * cpu-ns32k.c: Likewise.
2917         * cpu-pj.c: Likewise.
2918         * cpu-powerpc.c: Likewise.
2919         * cpu-sh.c: Likewise.
2920         * cpu-sparc.c: Likewise.
2921         * cpu-tic54x.c: Likewise.
2922         * cpu-v850.c: Likewise.
2923         * cpu-vax.c: Likewise.
2924         * cpu-w65.c: Likewise.
2925         * cpu-we32k.c: Likewise.
2926         * cpu-z8k.c: Likewise.
2927         * dwarf1.c: Likewise.
2928         * dwarf2.c: Likewise.
2929
2930 2000-11-15  Kazu Hirata  <kazu@hxi.com>
2931
2932         * coff-arm.c: Fix formatting.
2933         * coff-ppc.c: Likewise.
2934         * coff-rs6000.c: Likewise.
2935         * coff-sh.c: Likewise.
2936         * coff-sparc.c: Likewise.
2937         * coff-tic30.c: Likewise.
2938         * coff-tic54x.c: Likewise.
2939         * coff-tic80.c: Likewise.
2940         * coff-w65.c: Likewise.
2941         * coff-we32k.c: Likewise.
2942         * coff-z8k.c: Likewise.
2943
2944 2000-11-15  Richard Henderson  <rth@redhat.com>
2945
2946         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
2947         section with the same ALLOC|LOAD flags as the source section.
2948
2949 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
2950
2951         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
2952         by STO_ALPHA constants.
2953
2954 2000-11-14  Kazu Hirata  <kazu@hxi.com>
2955
2956         * coff-pmac.c: Fix formatting.
2957         * coff-ppc.c: Likewise.
2958
2959 2000-11-13  H.J. Lu  <hjl@gnu.org>
2960
2961         * elflink.h (elf_link_add_object_symbols): Also add indirect
2962         symbols for common symbols with the default version.
2963
2964 2000-11-09  Philip Blundell  <pb@futuretv.com>
2965
2966         * section.c (STD_SECTION): Set gc_mark flag.
2967
2968 2000-11-11  Kazu Hirata  <kazu@hxi.com>
2969
2970         * coff-i960.c: Likewise.
2971         * coff-m68k.c: Likewise.
2972         * coff-m88k.c: Likewise.
2973         * coff-mcore.c: Likewise.
2974         * coff-mips.c: Likewise.
2975
2976 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
2977
2978         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
2979
2980 2000-11-10  Kazu Hirata  <kazu@hxi.com>
2981
2982         * coff-h8300.c: Fix formatting.
2983         * coff-h8500.c: Likewise.
2984         * coff-i386.c: Likewise.
2985         * coff-i860.c: Likewise.
2986         * coff-i960.c: Likewise.
2987         * coff-ia64.c: Likewise.
2988
2989 2000-11-09  Kazu Hirata  <kazu@hxi.com>
2990
2991         * archive.c: Fix formatting.
2992         * archures.c: Likewise.
2993
2994 2000-11-07  Richard Henderson  <rth@redhat.com>
2995
2996         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
2997         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
2998         * section.c (bfd_set_section_contents): Call memcpy if
2999         section->contents set and location not equal to contents plus offset.
3000
3001 2000-11-08  Kazu Hirata  <kazu@hxi.com>
3002
3003         * bfd-in.h: Fix formatting.
3004         * bfd-in2.h: Likewise.
3005         * bfd.c: Likewise.
3006         * binary.c: Likewise.
3007         * bout.c: Likewise.
3008         * coff-a29k.c: Likewise.
3009         * coff-alpha.c: Likewise.
3010         * coff-apollo.c: Likewise.
3011         * coff-aux.c: Likewise.
3012
3013 2000-11-07  Kazu Hirata  <kazu@hxi.com>
3014
3015         * aix386-core.c: Fix formatting.
3016         * aoutf1.h: Likewise.
3017         * aoutx.h: Likewise.
3018         * archures.c: Likewise.
3019         * armnetbsd.c: Likewise.
3020
3021 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
3022
3023         * coff-h8300.c (special): Adjust reloc address.
3024
3025 2000-11-06  Steve Ellcey <sje@cup.hp.com>
3026
3027         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
3028         to differentiate elf32 and elf64 on ia64.
3029         * bfd-in2.h: Regenerate.
3030         * config.bfd: Add target for "ia64*-*-hpux*".
3031         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
3032         * configure: Regenerate.
3033         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
3034         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
3035
3036         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
3037         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
3038         * Makefile.in: Regnerate.
3039         * elf64-ia64.c: Deleted.
3040         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
3041
3042 2000-11-06  Kazu Hirata  <kazu@hxi.com>
3043
3044         * aout-adobe.c: Fix formatting.
3045         * aout-arm.c: Likewise.
3046         * aout-cris.c: Likewise.
3047         * aout-encap.c: Likewise.
3048         * aout-ns32k.c: Likewise.
3049         * aout-target.h: Likewise.
3050         * aout-tic30.c: Likewise.
3051
3052 2000-11-05  Philip Blundell  <philb@gnu.org>
3053
3054         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
3055         BFDs containing no sections to be merged, regardless of their flags.
3056
3057 2000-11-04  Philip Blundell  <philb@gnu.org>
3058
3059         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
3060         if a relocation for an undefined symbol also results in an
3061         overflow.
3062
3063 2000-11-06  Christopher Faylor <cgf@cygnus.com>
3064
3065         * config.bfd: Add support for Sun Chorus.
3066
3067 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
3068
3069         * configure.in: Recognize alpha-*-freebsd*.
3070         * configure: Regenerate.
3071
3072 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
3073
3074         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
3075         (Chunk): New global variable set by a parameter in objcopy.c.
3076         (S3Forced): New global variable set by a parameter in
3077         objcopy.c.
3078         (srec_set_section_contents): If S3Forced is true, always generate
3079         S3 records.
3080         (srec_write_section): Use 'Chunk' to limit maximum length of S
3081         records.
3082
3083 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
3084
3085         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
3086         * Makefile.in: Regenerate.
3087         * bfd-in2.h: Regenerate.
3088         * po/bfd.pot: Regenerate.
3089
3090 2000-10-31  Philip Blundell  <philb@gnu.org>
3091
3092         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
3093         EF_SOFT_FLOAT if it is defined.
3094
3095 2000-10-27  Philip Blundell  <philb@gnu.org>
3096
3097         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
3098         attempts to mix PIC code with non-PIC, just mark the output as
3099         being position dependent.
3100         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
3101         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
3102         all mismatches, not just the first one.
3103
3104 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
3105
3106         * ieee.c (ieee_archive_p): Plug one of many possible
3107         memory leaks in error handling.
3108
3109 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
3110
3111         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
3112         elf32_sparc_object_p, elf32_sparc_final_write_processing):
3113         Support v8plusb.
3114         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
3115         sparc64_elf_object_p): Support v9b.
3116         * archures.c: Declare v8plusb and v9b machines.
3117         * bfd-in2.h: Ditto.
3118         * cpu-sparc.c: Ditto.
3119
3120 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
3121
3122         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
3123         of a GOT reloc.
3124
3125         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
3126         (SYMBOL_CALLS_LOCAL): New macro.
3127         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
3128         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
3129         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
3130         (ppc_elf_relocate_section): Use flag variable to determine
3131         whether the relocation refers to a local symbol.
3132         Test whether a PLTREL24 reloc will produce a reloc by looking
3133         to see whether a PLT entry was made.
3134
3135 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
3136
3137         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
3138         entries that could serve as a definition for a weak symbol.
3139
3140 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
3141
3142         From  Ralf Baechle  <ralf@gnu.org>
3143
3144         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
3145         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
3146         against local symbols.
3147         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
3148
3149 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
3150
3151         * section.c (struct sec): Add kept_section.
3152         (struct bfd_comdat_info): Remove sec, we can use above.
3153         (STD_SECTION): Add initializer.
3154         (bfd_make_section_anyway): Init here too.
3155
3156         * bfd-in2.h: Regenerate.
3157
3158         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
3159         zeroing of `flags'.
3160         (elf_link_input_bfd): Set all asection->symbol->value's here, and
3161         fudge values for discarded link-once section symbols.
3162
3163         * elf64-hppa.c: Include alloca-conf.h
3164
3165 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
3166
3167         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
3168
3169         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
3170
3171 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
3172
3173         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
3174
3175 2000-10-10  Tom Rix <trix@redhat.com>
3176
3177         * section.c (bfd_make_section_anyway): Release newsect ptr when
3178         newsect->symbol fails to alloc.  Use bfd_release instead of free.
3179
3180 2000-10-09  Richard Henderson  <rth@cygnus.com
3181
3182         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
3183         (elf64_ia64_unwind_entry_compare): New.
3184         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
3185
3186 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
3187
3188         * elflink.h (size_dynamic_sections): Don't create various tags if
3189         .dynstr is excluded from the link.  Don't set first dynsym entry
3190         if dynsymcount is zero.
3191         (elf_bfd_final_link): Don't try to swap out dynamic syms if
3192         .dynsym excluded from the link.  Don't try to write any dynamic
3193         sections excluded from the link.
3194
3195         * elf.c (swap_out_syms): Handle global section symbols.
3196
3197 2000-10-05  DJ Delorie  <dj@redhat.com>
3198
3199         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
3200         * coffcode.h (coff_set_alignment_hook): read extended reloc count
3201         (coff_write_relocs): write extended reloc count
3202         (coff_write_object_contents): account for extended relocs
3203
3204 2000-10-05  Jim Wilson  <wilson@cygnus.com>
3205
3206         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
3207         field.
3208         * elf.c (_bfd_elf_make_section_from_shdr): Call the
3209         elf_backend_section_flags function.
3210         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
3211         code.
3212         (elf64_ia64_section_flags): New function containing flag conversion
3213         code.
3214         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
3215         * elfxx-target.h (elf_backend_section_flags): Define.
3216         (elfNN_bed): Initialize elf_backend_section_flags field.
3217
3218 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
3219
3220         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
3221         _bfd_elf32_gc_record_vtable.  Correct a comment.
3222
3223 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
3224
3225         From  Ralf Baechle  <ralf@gnu.org>
3226
3227         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
3228         produces binaries with got[1] = 0x80000001 to differenciate them
3229         for the dynamic linker from the broken binaries produced by old
3230         versions.
3231
3232 2000-09-30  Petr Sorfa <petrs@sco.com>
3233
3234         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
3235         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
3236         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
3237         * configure: Regenerate.
3238
3239 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
3240
3241         Define two bfd_targets for absence and presence of leading
3242         underscore on symbols.  Make sure to only link same kind.
3243         * elf32-cris.c (cris_elf_object_p,
3244         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
3245         cris_elf_merge_private_bfd_data): New.
3246         (elf_backend_object_p, elf_backend_final_write_processing,
3247         bfd_elf32_bfd_print_private_bfd_data,
3248         bfd_elf32_bfd_merge_private_bfd_data): Define.
3249         <Target vector definition>: Include elf32-target.h twice with
3250         different macro settings:
3251         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
3252         bfd_elf32_us_cris_vec.
3253         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
3254         (elf_symbol_leading_char): First as 0, then '_'.
3255         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
3256         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
3257         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
3258         * configure: Regenerate.
3259         * targets.c: Declare bfd_elf32_us_cris_vec.
3260         * po/bfd.pot: Regenerate.
3261
3262 2000-09-29  Momchil Velikov  <velco@fadata.bg>
3263
3264         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
3265         R_ARM_THM_PC22 relocations.
3266
3267 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
3268
3269         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
3270
3271 2000-09-29  Momchil Velikov <velco@fadata.bg>
3272
3273         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
3274         is has the SEC_HAS_CONTENTS flag set.
3275
3276 2000-09-28  \81Örjan Friberg  <orjanf@axis.com>
3277             Hans-Peter Nilsson  <hp@axis.com>
3278
3279         * aout-cris.c (N_TXTADDR): Define.
3280
3281 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
3282
3283         * som.c: Include alloca-conf.h.
3284         * Makefile.am: "make dep-am"
3285         * Makefile.in: Regenerate.
3286
3287 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
3288
3289         * elf32-hppa.c (plt_stub): New.
3290         (PLT_STUB_ENTRY): Define.
3291         (elf32_hppa_link_hash_table): Change multi_subspace to packed
3292         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
3293         (elf32_hppa_link_hash_table_create): Init to suit.
3294         (elf32_hppa_check_relocs): Set has_12bit_branch and
3295         has_17bit_branch as appropriate.
3296         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
3297         non-local functions.
3298         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
3299         Add space for plt_stub as needed.
3300         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
3301         functions at plt_stub.
3302         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
3303         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
3304
3305         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
3306         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
3307         of fixed size, and if negative, disable handling of input sections
3308         before stub section.  Set up default stub group size depending
3309         on detected branch relocs.
3310         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
3311         ensure different offsets from sym_value aren't rounded to
3312         different 2k blocks.  Use lrsel and rrsel for other stubs too for
3313         consistency rather than necessity.
3314         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
3315         (final_link_relocate): Likewise.
3316         (elf32_hppa_relocate_section): Likewise.
3317
3318         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
3319         (_bfd_elf_hppa_gen_reloc_type): Generate them.
3320         (elf_hppa_final_link_relocate): Handle them.
3321         (elf_hppa_relocate_insn): Likewise.
3322         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
3323
3324 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
3325
3326         * elfcode.h (elf_object_p): Preserve and clear abfd section
3327         information.  Restore at error.
3328
3329 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
3330
3331         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
3332         is empty, make sure that its rva also 0. NT loader dislikes
3333         having otherwise.
3334
3335 2000-09-26  Steve Ellcey <sje@cup.hp.com>
3336
3337         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
3338         global by default.
3339
3340 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
3341
3342         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
3343         currently unused RELATIVE_DYNAMIC_RELOCS code.
3344         (hppa_discard_copies): Likewise.
3345         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
3346         comments.  Don't check non-code output sections for stub grouping.
3347
3348 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
3349
3350         * section.c (bfd_get_unique_section_name): Return NULL if
3351         bfd_malloc fails.
3352
3353 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3354
3355         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
3356         instruction sequence to actually work.
3357         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
3358         accordingly.
3359
3360 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
3361
3362         * elf32-sh.c (sh_elf_relocate_section): Use
3363         _bfd_final_link_relocate to apply the relocation against a section
3364         symbol, when doing relocatable links.
3365
3366 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
3367
3368         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
3369         to id_sec.
3370         (stub_hash_newfunc): Here too.
3371         (hppa_add_stub): And here.
3372         (elf32_hppa_link_hash_table): Remove stub_section_created,
3373         reloc_section_created, first_init_sec and first_fini_sec.  Add
3374         stub_group.
3375         (elf32_hppa_link_hash_table_create): Init to suit.
3376         (hppa_get_stub_entry): Add support for grouping stub sections.
3377         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
3378         section code.  Index stub vars by section->id.
3379         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
3380         exit paths.  Zap allocation of above removed vars.  Refine
3381         link-once test.
3382
3383         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
3384         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3385         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
3386         rather than pointer to bfd_link_info.
3387         (hppa_add_stub): Likewise.
3388         (final_link_relocate): Likewise.
3389
3390 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
3391
3392         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
3393         link-once sections.
3394
3395 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
3396
3397         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
3398         ld/emulparams/shelf.sh.
3399
3400 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3401
3402         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
3403         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
3404         * bfd-in2.h: Regenerate.
3405
3406 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
3407
3408         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
3409         LITUSE relocations incorrectly if -relax is specified on the ld
3410         command line and the displacement field of the load or store
3411         instruction is non-zero. (Patch by paul.winalski@compaq.com)
3412
3413 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
3414
3415         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
3416         first_fini_sec here.
3417         (elf32_hppa_size_stubs): Instead correctly find the first .init
3418         and .fini section here.
3419
3420 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
3421
3422         * elf32-hppa.c (clobber_millicode_symbols): New function.
3423         (elf32_hppa_size_dynamic_sections): Call it.
3424
3425 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
3426
3427         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
3428         packed.  Add plabel, plt_abs packed booleans.
3429         (hppa_link_hash_newfunc): Init new fields.
3430         (PLABEL_PLT_ENTRY_SIZE): Define.
3431         (hppa_stub_name): Use size_t len vars.
3432         (hppa_add_stub): Likewise.
3433         (elf32_hppa_build_stubs): Likewise.
3434         (hppa_build_one_stub): Kill some compiler warnings.
3435         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
3436         if dynamic linking.  Munge the local plt offsets into
3437         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
3438         size_t len vars.  Add assert for plabel addend.
3439         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
3440         (elf32_hppa_hide_symbol): New function.
3441         (elf_backend_hide_symbol): Define.
3442         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
3443         with h->plabel set.  Don't make plt entries to have dynamic syms
3444         when they have been forced local.  If plt entry is used by a
3445         plabel, make it PLABEL_PLT_ENTRY_SIZE.
3446         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
3447         Set up .plt offsets for local syms.
3448         (elf32_hppa_relocate_section): Initialise plt entries for local
3449         syms.  Leave weak undefined plabels zero.  Make global plabel
3450         relocs against function symbol, and leave the addend zero.
3451         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
3452         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
3453         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
3454         relocs instead of SEGREL32 for dynamic got relocs.
3455         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
3456         (elf_backend_got_header_size): Adjust.
3457         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
3458
3459         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
3460         (hppa_type_of_stub): Use it instead of #if 0
3461         (hppa_discard_copies): Use it here too.
3462         (elf32_hppa_size_dynamic_sections): And here.
3463
3464         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
3465         (elf32_hppa_link_hash_table_create): And here.
3466         (hppa_build_one_stub): And here.  Instead keep track of stub
3467         offset using _raw_size.
3468         (elf32_hppa_size_stubs): Likewise.
3469         (elf32_hppa_build_stubs): Likewise.
3470         (hppa_size_one_stub): Likewise.  Resize reloc section too.
3471
3472         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
3473         first_fini_sec handling.  Don't search for reloc section or set
3474         hplink->reloc_section_created here.
3475         (elf32_hppa_size_stubs): Instead search for reloc sections, and
3476         set reloc_section_created here.
3477         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
3478         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
3479         and DT_FINI.
3480         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
3481
3482         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
3483         with `hplink->root.'.
3484         (elf32_hppa_check_relocs): Likewise.
3485         (elf32_hppa_gc_sweep_hook): Likewise.
3486         (elf32_hppa_adjust_dynamic_symbol): Likewise.
3487         (hppa_handle_PIC_calls): Likewise.
3488         (elf32_hppa_size_dynamic_sections): Likewise.
3489         (elf32_hppa_set_gp): Likewise.
3490         (elf32_hppa_relocate_section): Likewise.
3491         (elf32_hppa_finish_dynamic_symbol): Likewise.
3492         (elf32_hppa_finish_dynamic_sections): Likewise.
3493
3494         From  David Huggins-Daines  <dhd@linuxcare.com>
3495         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
3496         defined weak symbols in shared links.
3497         (final_link_relocate): Calls to defined weak symbols in shared
3498         objects must go via import stubs, as the target might not be known
3499         at link time.
3500
3501 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
3502
3503         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
3504         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
3505         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
3506         the original entries with EMPTY_HOWTOs, and added new ones to fill
3507         in the gap.
3508         (sh_elf_info_to_howto): Make sure the new gap isn't used.
3509         (sh_elf_relocate_section): Likewise.
3510
3511 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
3512
3513         * cpu-mips.c (arch_info_struct): Add mips:4K
3514         * bfd-in2.h (bfd_mach_mips4K): New define.
3515         * archures.c: Add bfd_mach_mips4K to comment.
3516         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
3517         E_MIPS_ARCH_2 for bfd_mach_mips4K.
3518
3519 2000-09-13  Marco Franzen <marcof@thyron.com>
3520
3521         * som.c (som_write_symbol_strings): Do not used fixed buffers,
3522         use size_t as a counter.
3523         (som_write_space_strings): Similarly.
3524
3525 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
3526
3527         * elf32-i860.c (elf32_i860_relocate_pc26): New function
3528         and prototype.
3529         (elf32_i860_relocate_section): Invoke new function from here.
3530
3531 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3532
3533         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
3534         static.
3535
3536 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3537
3538         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
3539         target section name instead of dumping core when the target symbol is
3540         undefined.
3541
3542 2000-09-09  Kazu Hirata  <kazu@hxi.com>
3543
3544         * riscix.c: Remove DEFUN.
3545
3546 2000-09-08  Nick Clifton  <nickc@redhat.com>
3547
3548         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3549         initialise flags in output bfd if the input bfd is the default
3550         architecture with the default flags.
3551
3552 2000-09-08  Kazu Hirata  <kazu@hxi.com>
3553
3554         * archive.c: Fix formatting.
3555         * coff-arm.c: Likewise.
3556         * doc/chew.c: Likewise.
3557
3558 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
3559
3560         * section.c (bfd_get_unique_section_name): Put a dot before the
3561         numeric suffix.
3562
3563 2000-09-07  Kazu Hirata  <kazu@hxi.com>
3564
3565         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3566         * elf.c: Fix formatting.
3567
3568 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
3569
3570         * config.bfd (sh-*-linux*): Added.
3571         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3572         * targets.c: Declare them.
3573         * elf32-sh-lin.c: New file.
3574         * Makefile.am: Compile it.
3575         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3576         * configure, Makefile.in: Rebuilt.
3577
3578 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
3579
3580         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3581         pseduo-section when determining where the TOC ends.
3582
3583         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3584         output x_tvndx as it is only two bytes wide.
3585
3586         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
3587         reloc is 26 or 32 bits wide.
3588
3589         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
3590         for relocs that don't change anything.  Also look at the full
3591         6 bits of bitsize.
3592
3593 2000-09-06  Philip Blundell  <philb@gnu.org>
3594
3595         * config.bfd (arm*-*-uclinux*): New target.
3596
3597 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
3598
3599         * configure: Rebuilt with new libtool.m4.
3600
3601 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
3602
3603         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
3604         word for variable name.
3605         * bfd-in2.h: Regenerate.
3606
3607 2000-09-05  Nick Clifton  <nickc@redhat.com>
3608
3609         * config.in: Regenerate.
3610         * libbfd.h: Regenerate.
3611         * po/bfd.pot: Regenerate.
3612         * doc/bfdint.texi: Remove CVS date string - it foils compares with
3613         local versions.
3614
3615 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
3616
3617         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
3618
3619 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
3620
3621         Shared library and PIC support.
3622         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
3623         (GOT_ENTRY_SIZE): New.
3624         (ELF_DYNAMIC_INTERPRETER): New.
3625         (STUB_SUFFIX): Define.
3626         (LONG_BRANCH_PIC_IN_SHLIB): Define.
3627         (RELATIVE_DYNAMIC_RELOCS): Define.
3628         (enum elf32_hppa_stub_type): New.
3629         (struct elf32_hppa_stub_hash_entry): Rename offset to
3630         stub_offset.  Add a number of new fields.
3631         (struct elf32_hppa_link_hash_entry): New.
3632         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
3633         global_value.
3634         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
3635         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
3636         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
3637         new fields.
3638         (hppa_link_hash_newfunc): New function.
3639         (elf32_hppa_link_hash_table_create): Use above function. Init new
3640         fields.
3641         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
3642         instead of addend, and remove sym_name from args.  Don't use
3643         symbol name for local syms, instead use sym index.
3644         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
3645         stub type rather than size.  Pass in hash and handle import stub
3646         case.  Also pass in reloc instead of offset so we can calculate
3647         PCREL22F and PCREL12F branches properly.
3648         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
3649         import and export stubs too.
3650         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
3651         import and export stub sizing.
3652         (elf32_hppa_check_relocs): New function.
3653         (elf32_hppa_adjust_dynamic_symbol): New function.
3654         (hppa_discard_copies): New function.
3655         (elf32_hppa_size_dynamic_sections): New function.
3656         (elf_backend_size_dynamic_sections): Define.
3657         (elf32_hppa_finish_dynamic_symbol): New function.
3658         (elf_backend_finish_dynamic_symbol): Define.
3659         (elf32_hppa_size_stubs): Stash params in link hash table, and move
3660         some local vars into the link hash table too.  For shared links,
3661         trundle over function syms, generating export stubs.  Handle
3662         PCREL22F branches.  Break out stub creation code from here..
3663         (hppa_add_stub): .. to here.  New function.
3664         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
3665         call the bfd linker.  Use elf_gp to record global pointer.
3666         Calculate a value from sections if $global$ is missing.
3667         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
3668         (elf32_hppa_gc_mark_hook): New function.
3669         (elf_backend_gc_mark_hook): Define.
3670         (elf32_hppa_gc_sweep_hook): New function.
3671         (elf_backend_gc_sweep_hook): Define.
3672         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
3673         Add rel to args, and remove howto, input_bfd, offset, addend,
3674         sym_name as we can recalculate these locally.  Handle calls to
3675         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
3676         handling of undefined weak syms.  Check that stubs are in range.
3677         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
3678         message on hitting a DPREL21L reloc that needs fixing.  Subtract
3679         off PC for PCREL14F.  Break out code that does a stub lookup from
3680         here..
3681         (hppa_get_stub_entry): ..to here.  New function.
3682         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
3683         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
3684         relocs, etc. etc.
3685         (elf32_hppa_finish_dynamic_sections): New function.
3686         (elf_backend_finish_dynamic_sections): Define.
3687         (elf_backend_final_write_processing) Define.
3688         (hppa_handle_PIC_calls): New function.
3689         (elf32_hppa_build_stubs): Call it.  Pass link_info to
3690         hppa_build_one_stub.
3691         (elf32_hppa_create_dynamic_sections): New function
3692         to create .plt and .got then set .plt flags correctly.
3693         (elf_backend_create_dynamic_sections): Define.
3694         (elf32_hppa_object_p): New function.
3695         (elf_backend_object_p): Define.
3696         (elf32_hppa_elf_get_symbol_type): New function.
3697         (elf_backend_get_symbol_type): Define.
3698         (elf_backend_can_gc_sections): Define.
3699         (elf_backend_want_got_plt): Define.
3700         (elf_backend_plt_alignment): Set to 2.
3701         (elf_backend_plt_readonly): Define.
3702         (elf_backend_want_plt_sym): Define.
3703         (elf_backend_got_header_size): Reserve one entry.
3704
3705         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
3706         (elf32_hppa_size_stubs): Pass in multi_subspace.
3707         (elf32_hppa_set_gp): Declare.
3708
3709         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
3710         (bfd_get_unique_section_name): New function.
3711         * bfd-in2.h: Regenerate.
3712
3713         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
3714         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
3715         comment.
3716
3717         From  David Huggins-Daines  <dhd@linuxcare.com>
3718         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
3719         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
3720         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
3721         been updated in finish_dynamic_symbol before modifying function
3722         symbol.
3723
3724         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
3725         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
3726         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
3727         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
3728         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
3729         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
3730         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
3731         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
3732
3733         From David Huggins-Daines  <dhd@linuxcare.com>
3734         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
3735         style of local labels as well.
3736
3737 2000-09-03  Philip Blundell  <philb@gnu.org>
3738
3739         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
3740         references to undefined symbols in debugging sections.
3741
3742 2000-09-02  H.J. Lu  <hjl@gnu.org>
3743
3744         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3745         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
3746         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
3747         section.
3748
3749 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
3750
3751         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
3752         (elf32_i860_is_local_label_name): New function and prototype.
3753
3754 2000-09-02  Nick Clifton  <nickc@redhat.com>
3755
3756         * configure.in: Increase version number to 2.10.91.
3757         * configure: Regenerate.
3758         * aclocal.m4: Regenerate.
3759         * config.in: Regenerate.
3760         * po/bfd.pot: Regenerate.
3761
3762 2000-09-02  Daniel Berlin <dberlin@redhat.com>
3763
3764         * elf.c (_bfd_elf_make_section_from_shdr): Add
3765         .gnu.linkobce.wi. to the list of debug section names.
3766
3767 2000-09-02  Nick Clifton  <nickc@redhat.com>
3768
3769         * dwarf2.c (find_debug_info): New function: Locate a section
3770         containing dwarf2 debug information.
3771         (bfd_dwarf2_find_nearest_line): Find all sections containing
3772         debug information and include them in the stash.
3773
3774 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
3775
3776         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
3777         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
3778         (sh_reloc_map): Add new relocs.
3779         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
3780         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
3781         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
3782         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
3783         functions.
3784         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
3785         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3786         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
3787         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3788         New array constants.
3789         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
3790         New variables.
3791         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3792         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
3793         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
3794         elf_sh_plt_reloc_offset): Define.
3795         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
3796         elf_sh_link_hash_table): New structs.
3797         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
3798         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
3799         relocation types.
3800         (elf_backend_create_dynamic_sections,
3801         bfd_elf32_bfd_link_hash_table_create,
3802         elf_backend_adjust_dynamic_symbol,
3803         elf_backend_size_dynamic_sections,
3804         elf_backend_finish_dynamic_symbol,
3805         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3806         elf_backend_plt_readonly, elf_backend_want_plt_sym,
3807         elf_backend_got_header_size, elf_backend_plt_header_size):
3808         Define.
3809         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
3810         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
3811         New relocs.
3812         * bfd-in2.h, libbfd.h: Rebuilt.
3813
3814 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
3815
3816         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
3817         change.
3818
3819 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
3820
3821         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
3822         not initialized, set them to indicate the SH1 instruction set.
3823
3824 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
3825
3826         * acinclude.m4: Include libtool and gettext macros from the
3827         top level.
3828         * aclocal.m4, configure: Rebuilt.
3829
3830 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
3831
3832         * elf.c: Eliminate references to __sparcv9 macro; replace with
3833         autoconf variables HAVE_PSINFO32_T etc.
3834         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
3835         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
3836         * config.in: Ditto.
3837         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
3838         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
3839         * aclocal.m4: Ditto.
3840         * configure: Regenerate.
3841
3842 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
3843
3844         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
3845         for any shared link, not just shared -Bsymbolic.
3846         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
3847         any shared link, and pass link info to it.
3848         (elf_i386_size_dynamic_sections): Update comment.
3849         (elf_i386_discard_copies): Modify to discard relocs for symbols
3850         that have been forced local.
3851         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
3852         that have been forced local.
3853
3854 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
3855
3856         * elflink.h (elf_link_add_object_symbols): Allow common
3857         symbols to have an alignment of 1 if explicitly requested, and
3858         not overridden by other definitions.
3859
3860 2000-08-22  Doug Kwan <dkwan@transmeta.com>
3861
3862         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
3863         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
3864
3865 2000-08-22  H.J. Lu  <hjl@gnu.org>
3866
3867         * elf-bfd.h (elf_link_hash_table): Add runpath.
3868
3869         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
3870         * bfd-in2.h: Rebuilt.
3871
3872         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
3873         "runpath" field to NULL.
3874         (bfd_elf_get_runpath_list): New function.
3875
3876         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
3877         DT_RUNPATH entries.
3878
3879 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
3880
3881         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
3882         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
3883         explicitly.  Improve validation of r_type.
3884
3885 2000-08-21  H.J. Lu  <hjl@gnu.org>
3886
3887         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
3888         dynamic allocated content space.  Add a comment to remind us that
3889         one day this ought to be fixed.
3890         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
3891         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
3892         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
3893
3894 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
3895
3896         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
3897         field with the newly relocated value instead of adding it to the
3898         existing immediate field.
3899         (elf32_i860_relocate_splitn): Likewise.
3900         (elf32_i860_relocate_highadj): Likewise.
3901
3902 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
3903
3904         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
3905         was previously just a stub).
3906
3907 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
3908
3909         * elflink.c (_bfd_elf_create_got_section): Don't abort().
3910         Formatting fixes.
3911         (_bfd_elf_create_dynamic_sections): Likewise.
3912
3913 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
3914
3915         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
3916         for undefined symbols to be the beginning of the section.
3917
3918         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
3919         four extra entries at the beginning of the .rela.plt section.
3920         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
3921         section to account for the four reserved entries in the .plt section.
3922
3923 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
3924
3925         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
3926         to the list of NOPs we recognize after a branch-and-link.
3927         Use the ori NOP when one is needed.
3928
3929         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
3930         for large archives.
3931
3932 2000-08-14  Jim Wilson  <wilson@cygnus.com>
3933
3934         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
3935         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
3936         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
3937         EF_IA_64_ABSOLUTE.
3938
3939 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
3940
3941         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
3942
3943 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
3944
3945         * elf32-i860.c (elf32_i860_relocate_section): New function.
3946         (i860_final_link_relocate): New function.
3947         (elf32_i860_relocate_splitn): New function.
3948         (elf32_i860_relocate_pc16): New function.
3949         (elf32_i860_relocate_highadj): New function.
3950         (elf32_i860_howto): Minor adjustments to some relocations.
3951         (elf_info_to_howto_rel): Define.
3952         (elf_backend_relocate_section): Define.
3953
3954 2000-08-10  Nick Clifton  <nickc@cygnus.com>
3955
3956         * elf32-arm.h: Fix formatting.
3957
3958 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
3959
3960         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
3961
3962 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
3963
3964         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
3965
3966 2000-08-07  Kazu Hirata  <kazu@hxi.com>
3967
3968         * ieee.c (ieee_write_debug_part): Rewrite a comment.
3969         * elf64-ia64.c: Fix a typo.
3970
3971 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
3972
3973         * elf32-i860.c (elf32_i860_howto_table): New structure.
3974         (lookup_howto): New function.
3975         (elf32_i860_reloc_type_lookup): New function.
3976         (elf32_i860_info_to_howto_rela): New function.
3977         (elf_code_to_howto_index): New structure.
3978         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
3979         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
3980         elf32_i860_reloc_type_lookup.
3981
3982 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
3983
3984         * som.c (struct fixup_format): Constify `format'.
3985         (som_hppa_howto_table): Use SOM_HOWTO macro.
3986         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
3987         (som_bfd_reloc_type_lookup): Likewise.
3988         (compare_subspaces): Remove unused `count1', `count2'.
3989         (som_begin_writing): Remove unused `total_reloc_size'.
3990         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
3991         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
3992         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
3993         (som_find_nearest_line): Decorate unused parameter(s).
3994         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
3995         (som_bfd_link_split_section): Likewise.
3996
3997 2000-08-03  Nick Clifton  <nickc@cygnus.com>
3998
3999         * section.c: Restore backed out code.
4000         * elf.c: Restore backed out code.
4001         (copy_private_bfd_data): Fix bug preventing stipped dynamic
4002         binaries from working.
4003         * bfd-in2.h: Regenerate.
4004
4005 2000-08-03  H.J. Lu  <hjl@gnu.org>
4006
4007         * section.c: Back out the change made by Nick Clifton
4008         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
4009         binaries.
4010         * bfd-in2.h: Likewise.
4011         * elf.c: Likewise.
4012
4013 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
4014
4015         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
4016
4017 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
4018
4019         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
4020         * bfd-in2.h, libbfd.h: Regenerate.
4021
4022 2000-07-31  Nick Clifton  <nickc@cygnus.com>
4023
4024         * section.c (struct sec): Add new boolean field 'segment_mark'.
4025         (STD_SECTION): Initialise new field to zero.
4026
4027         * bfd-in2.h: Regenerate.
4028
4029         * elf.c (copy_private_bfd_data): Reorganise section to segment
4030         mapping to cope with moved sections requiring new segments,
4031         and overlapping segments.
4032         (SEGMENT_END): New macro: Return the end address of a segment.
4033         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
4034         contains a section by comparing their VMA addresses.
4035         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
4036         contains a section by comparing their LMA addresses.
4037         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
4038         section should be included in a segment.
4039         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
4040         follows another in memory.
4041         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
4042         segments overlap.
4043
4044 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
4045
4046         * cpu-i860.c: Added comments.
4047
4048         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
4049         bfd_elf32_i860_little_vec.
4050         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
4051         (ELF_MAXPAGESIZE): Changed to 4096.
4052
4053         * targets.c (bfd_elf32_i860_little_vec): Declaration of
4054         new target.
4055         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
4056
4057         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
4058         config for little endian elf32 i860.
4059         (targ_defvec): Define for the new config above
4060         as "bfd_elf32_i860_little_vec".
4061         (targ_selvecs): Define for the new config above
4062         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
4063
4064         * configure.in (bfd_elf32_i860_little_vec): Added recognition
4065         of new target vec.
4066
4067         * configure: Regenerated.
4068
4069 2000-07-27  H.J. Lu  <hjl@gnu.org>
4070
4071         * elflink.h (elf_merge_symbol): Take one more argument,
4072         dt_needed, to indicate if the symbol comes from a DT_NEEDED
4073         entry. Don't overide the existing weak definition if dt_needed
4074         is true.
4075         (elf_link_add_object_symbols): Pass dt_needed to
4076         elf_merge_symbol ().
4077
4078 2000-07-27  Nick Clifton  <nickc@cygnus.com>
4079
4080         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
4081         allocated contents.
4082
4083 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
4084
4085         * configure.host (*-*-aix*): AIX has 'long long' always.
4086
4087         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
4088         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
4089         (xcoff_write_archive_contents_big): Don't update the offset
4090         of the symbol table, xcoff_write_armap will do it.
4091
4092 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
4093
4094         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
4095         of dynobj for SGI_COMPAT checks.
4096
4097 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
4098
4099         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
4100         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
4101         * bfd-in2.h: Regenerate.
4102
4103 2000-07-21  Nick Clifton  <nickc@cygnus.com>
4104
4105         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
4106         range symbol indices in relocs and issue an error message.
4107
4108 2000-07-20  H.J. Lu  <hjl@gnu.org>
4109
4110         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
4111         info->new_dtags when setting DT_FLAGS_1. It will only be set
4112         by the new linker options. It shouldn't break anything.
4113
4114 2000-07-20  H.J. Lu  <hjl@gnu.org>
4115
4116         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
4117         only if info->new_dtags is true.
4118
4119 2000-07-20  H.J. Lu  <hjl@gnu.org>
4120
4121         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
4122         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
4123
4124 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
4125
4126         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
4127         (ALL_MACHINES_CFILES): Add cpu-cris.c.
4128         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
4129         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
4130         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
4131         * Makefile.in: Rebuild.
4132         * aclocal.m4: Rebuild.
4133         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
4134         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
4135         (bfd_cris_arch): Declare.
4136         (bfd_archures_list): Add bfd_cris_arch.
4137         * bfd-in2.h: Rebuild.
4138         * config.bfd: (cris-*-*): New target.
4139         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
4140         * configure: Rebuild.
4141         * elf.c (prep_headers): Add bfd_arch_cris.
4142         * libbfd.h: Rebuild.
4143         * libaout.h (enum machine_type): Add M_CRIS.
4144         * reloc.c: Add CRIS relocations.
4145         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
4146         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
4147         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
4148         * po/POTFILES.in, po/bfd.pot: Regenerate.
4149
4150 2000-07-19  H.J. Lu  <hjl@gnu.org>
4151
4152         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
4153         DF_TEXTREL if DT_TEXTREL is set.
4154         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4155         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
4156         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
4157         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
4158         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
4159         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4160         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
4161         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
4162         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
4163         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
4164
4165         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
4166         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
4167         DT_RPATH is set.
4168         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
4169
4170 2000-07-19  H.J. Lu  <hjl@gnu.org>
4171
4172         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
4173         * bfd-in2.h: Rebuild.
4174
4175         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
4176         (elf_dt_soname): New.
4177
4178         * elf.c (bfd_elf_set_dt_needed_soname): New.
4179
4180         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
4181         entry if the shared object loaded by DT_NEEDED is used to
4182         resolve the reference in a regular object.
4183
4184 2000-07-19  H.J. Lu  <hjl@gnu.org>
4185
4186         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
4187         DT_DEPAUDIT and DT_AUDIT as strings.
4188
4189 2000-07-19  Nick Clifton  <nickc@cygnus.com>
4190
4191         * format.c: Fix formatting.
4192
4193 2000-07-19  H.J. Lu  <hjl@gnu.org>
4194
4195         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
4196
4197 2000-07-19  H.J. Lu  <hjl@gnu.org>
4198
4199         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
4200         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
4201         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
4202         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
4203         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
4204         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
4205         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
4206
4207 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
4208
4209         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
4210         renamed functions from here...
4211         (assign_section_numbers): Use renamed functions.
4212         (prep_headers): Use renamed functions.
4213
4214         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
4215         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
4216         * bfd-in2.h: Regenerate.
4217
4218 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
4219
4220         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
4221         parenthesis in if statement.
4222
4223 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
4224
4225         Enable the support for Traditional MIPS.
4226         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
4227         return ict_none appropriately for traditional mips targets.
4228         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
4229         (STUB_MOVE): Conditionalize for traditonal mips.
4230         (STUB_LI16): Likewise.
4231         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
4232         room for RTPROC header.
4233         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
4234         the permission for the PT_DYNAMIC as read, write and execute.
4235         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
4236         for traditonal mips.
4237         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
4238         _DYNAMIC_LINKING for traditonal mips.
4239         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
4240         in case of traditonal mips.
4241         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
4242         entry is required. For a function if PLT is not required then set the
4243         corresponding hash table entry to 0.
4244         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
4245         traditonal mips.
4246         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
4247         shared object set the value to 0.
4248         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
4249         _DYNAMIC_LINKING for traditonal mips.
4250         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
4251         for traditonal mips.
4252
4253 2000-07-15  H.J. Lu  <hjl@gnu.org>
4254
4255         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
4256
4257 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
4258
4259         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
4260         out a structure that is BFD_IN_MEMORY.
4261
4262 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
4263
4264         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
4265         bfd pointer.  Print section id instead of bfd pointer for local
4266         syms.  Prefix addend with `+' for global syms as well as local.
4267         Correct calculation of name component lengths.
4268         (elf64_hppa_check_relocs): Update call to get_dyn_name.
4269
4270         From David Huggins-Daines  <dhd@linuxcare.com>
4271         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
4272         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
4273         (elf64_hppa_modify_segment_map): Likewise.
4274
4275 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
4276
4277         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
4278         addresses to be "naturally" sign extended.  Return -1 if unknown.
4279         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
4280         * bfd-in2.h: Regenerate.
4281
4282 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
4283
4284         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
4285         and ECOF_SIGNED_64 to list ways to extract an offset.
4286         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
4287         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
4288         Update.
4289         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
4290         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
4291
4292 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
4293
4294         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
4295         bfd_get_start_address.
4296         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
4297         (elf_swap_ehdr_out): Ditto.
4298
4299 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
4300
4301         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
4302         compatibility with older binutils.
4303
4304 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
4305
4306         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
4307         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
4308
4309         From Ryan Bradetich  <rbradetich@uswest.net>
4310         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
4311         (parse_line_table): Ditto.
4312         (_bfd_dwarf1_find_nearest_line): Ditto.
4313         * syms.c (cmpindexentry): Remove extra `*' from params.
4314
4315 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
4316
4317         * elf32-mips.c (sort_dynamic_relocs): New Function.
4318         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
4319         via qsort to sort the dynamic relocations in increasing r_symndx
4320         value.
4321
4322 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
4323
4324         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
4325         ATTRIBUTE_UNUSED to unused args.
4326         (get_opd): Likewise.
4327         (get_plt): Likewise.
4328         (get_dlt): Likewise.
4329         (get_stub): Likewise.
4330         (elf64_hppa_adjust_dynamic_symbol): Likewise.
4331         (elf64_hppa_link_output_symbol_hook): Likewise.
4332         (elf64_hppa_check_relocs): Delete unused var.
4333         (elf64_hppa_size_dynamic_sections): Likewise.
4334         (elf64_hppa_finalize_opd): Likewise.
4335         (elf64_hppa_finalize_dynreloc): Likewise.
4336         (elf64_hppa_modify_segment_map): Likewise.
4337         (elf64_hppa_finish_dynamic_sections): Likewise.
4338
4339         * elf-hppa.h (elf_hppa_final_write_processing): Add
4340         ATTRIBUTE_UNUSED to unused args.
4341         (elf_hppa_final_link_relocate): Likewise.
4342         (elf_hppa_record_segment_addrs): Add paretheses.
4343         (elf_hppa_relocate_section): Constify dyn_name.
4344
4345         From  David Huggins-Daines  <dhd@linuxcare.com>
4346         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
4347         rearrange case statement so that it gets preferred to 32-bit ones.
4348
4349         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
4350         asection->id instead of address of asection structure.
4351         (elf32_hppa_size_stubs): Likewise.
4352
4353         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
4354         for .init* and .fini*.
4355
4356         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
4357         and addends used in stub names to 32 bits.
4358         (elf32_hppa_size_stubs): Likewise.
4359
4360         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
4361         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
4362         not bfd_put_64.  Fix minor comment typo and formatting.
4363
4364         Changes to create multiple linker stubs, positioned immediately
4365         before the section where they are required.
4366         * elf32-hppa.c: Don't include hppa_stubs.h.
4367         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
4368         (elf32_hppa_stub_hash_table): Delete.
4369         (elf32_hppa_link_hash_entry): Delete.
4370         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
4371         stub_hash_table, and store the struct here rather than a pointer.
4372         Delete output_symbol_count.  Add offset array.  Change
4373         global_value to a bfd_vma.
4374         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
4375         (elf32_hppa_stub_hash_traverse): Delete.
4376         (elf32_hppa_name_of_stub): Delete.
4377         (elf32_hppa_link_hash_lookup): Delete.
4378         (elf32_hppa_link_hash_traverse): Delete.
4379         (elf32_hppa_stub_hash_table_init): Delete.
4380         (elf32_hppa_size_of_stub): Pass input section and offset rather
4381         than location and calculate location here.  Don't pass name as all
4382         stubs are now the same size.
4383         (elf32_hppa_stub_hash_newfunc): Init new fields.
4384         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
4385         too.
4386         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
4387         comparing against ints.  Rewrite stub handling code.
4388         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
4389         Case enums to int before comparing against ints.  Remove
4390         bfd_reloc_dangerous case.
4391         (elf32_hppa_build_one_stub): Rewrite.
4392         (elf32_hppa_size_one_stub): New function.
4393         (elf32_hppa_build_stubs): Rewrite.
4394         (elf32_hppa_size_stubs): Pass in linker call-back functions.
4395         Rewrite stub-handling specific code.
4396
4397         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
4398
4399         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
4400
4401         * hppa_stubs.h: Delete.
4402         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
4403         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
4404         * Makefile.in: Regenerate.
4405
4406         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
4407         e_nlrsel.
4408
4409         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
4410
4411         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
4412         and section name for bfd_reloc_notsupported error message.
4413         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
4414         bfd_reloc_notsupported.
4415         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
4416
4417         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
4418         undefined weak symbols for all relocs.
4419         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
4420         offsets are relative to one past the delay slot.
4421         (elf32_hppa_size_stubs): Account for reloc addend when calculating
4422         branch destination.  Put addend into stub name too.
4423         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
4424         adjust by 8 when deciding whether a linker stub is needed.  Put
4425         addend into stub name as for above.
4426
4427         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
4428         various args and vars.
4429         (elf32_hppa_bfd_final_link_relocate): Here too.
4430         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
4431         inner block var to avoid shadowing.
4432
4433         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
4434         unsigned.
4435         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
4436         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
4437         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
4438
4439         * libhppa.h: Change practically all unsigned ints to plain ints.
4440         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
4441         prototypes.
4442
4443         From Ryan Bradetich  <rbradetich@uswest.net>
4444         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
4445         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
4446         suit above.
4447         From  David Huggins-Daines  <dhd@linuxcare.com>
4448         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
4449         to the new OP_* ones.
4450
4451         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
4452         error exit.  Bail out earlier on plabel relocs that we aren't
4453         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
4454         string, and then don't free our copy.
4455         (elf32_hppa_build_one_stub): Make insn unsigned int.
4456
4457         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
4458         available with BL, not BE and BLE.
4459
4460         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
4461         code for elf arg relocs.
4462         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
4463         argument with elf_link_hash_entry h.  Handle undefined weak
4464         symbols.  Move $global$ lookup from here...
4465         (elf32_hppa_relocate_section): ...to here.  Return correct error
4466         message for non-handled relocs.
4467         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
4468         wrong test was -0x3ffff to +0x40000.
4469
4470         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
4471         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
4472         Handle them as such.
4473         (elf_hppa_relocate_insn): Fix a typo.
4474
4475         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
4476         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4477         assemble_17, assemble_21): Delete.
4478         Supply defines for all 64 possible opcodes.
4479         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
4480         formats.  Handle COMICLR.
4481         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
4482         -10, -16, 16, 22.
4483
4484         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
4485         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
4486         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
4487         to suit.
4488         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
4489         the local syms - did this code get deleted accidentally?  Ignore
4490         undefined and undefweak syms.
4491
4492         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
4493         block.  Use it instead of elf64_hppa_hash_table (info).
4494         (elf_hppa_final_link_relocate): Use hppa_info instead of
4495         elf64_hppa_hash_table (info).
4496
4497         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4498         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4499         (hppa_rebuild_insn): Mask immediate bits here instead.
4500         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4501
4502 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
4503
4504         * section.c (struct sec): Add id field.  Tidy comment formatting.
4505         (bfd_make_section_anyway): Set id.
4506         (STD_SECTION): Init id too.
4507         Change CONST to const throughout.
4508         * archures.c (bfd_arch_info): Tidy comment.
4509         (bfd_arch_list): Change a CONST to const.
4510         * libbfd-in.h: Tidy comments and replace CONST with const.
4511         * elf-bfd.h: Likewise.
4512         * libbfd.h: Regenerate.
4513         * bfd-in2.h: Regenerate.
4514         * libcoff.h: Regenerate.
4515
4516 2000-07-07  DJ Delorie  <dj@redhat.com>
4517
4518         * archive.c (_bfd_write_archive_contents): Add an informative
4519         comment.
4520
4521 2000-07-06  Kazu Hirata  <kazu@hxi.com>
4522
4523         * srec.c: Fix formatting.
4524
4525 2000-06-05  DJ Delorie  <dj@redhat.com>
4526
4527         * MAINTAINERS: new
4528
4529 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
4530
4531         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
4532         value of PC-relative offsets.
4533
4534 2000-07-03  Jim Wilson  <wilson@cygnus.com>
4535
4536         * elf64-alpha.c (alpha_elf_size_info): New.
4537         (elf_backend_size_info): Define to alpha_elf_size_info.
4538         * elfcode.h (elf_size_info): Change hash bucket size to 4.
4539
4540 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
4541
4542         * elf32-mips.c: Include elf32-target.h again for the traditional
4543         MIPS targets.
4544
4545 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
4546
4547         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4548         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4549         (avr_info_to_howto_rela): Likewise.
4550         (elf32_avr_gc_mark_hook): Likewise.
4551         (elf32_avr_gc_sweep_hook): Likewise.
4552         (elf32_avr_relocate_section): Likewise.
4553
4554 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
4555
4556         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4557         an external symbol for a non-shared, non-relocatable link.
4558
4559 2000-07-03  Nick Clifton  <nickc@redhat.com>
4560
4561         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4562         is an external symbol.
4563         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4564         external symbol.
4565
4566 2000-07-03  Kazu Hirata  <kazu@hxi.com>
4567
4568         * reloc16.c: Fix formatting.
4569
4570 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
4571
4572         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4573         to add a new target for traditional mips i.e
4574         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4575         * configure.in: Likewise.
4576         * configure: Rebuild.
4577         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4578         bfd_target_vector.
4579         (bfd_elf32_tradlittlemips_vec): Likewise.
4580         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4581         to see that elfNN_bed does not get redefined even if the target file
4582         is included twice for a chip. See elf32-mips.c.
4583
4584 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
4585
4586         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
4587         (CLEANFILES): Add DEPA.
4588         * Makefile.in: Regenerate.
4589
4590 2000-06-30  DJ Delorie  <dj@cygnus.com>
4591
4592         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
4593         can't assume the PE header is at 0x80.
4594
4595 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
4596
4597         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
4598
4599 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
4600
4601         * go32stub.h: Update stub.
4602
4603 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
4604
4605         * archures.c (bfd_mach_avr5): Define.
4606         * bfd-in2.h (bfd_mach_avr5): Define.
4607         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
4608         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
4609         (compatible): Update comment.  Add missing test.
4610         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
4611         for avr2 and avr4.  Simplify 8K wrap code.
4612         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
4613         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
4614
4615 2000-06-26  Kazu Hirata  <kazu@hxi.com>
4616
4617         * coff-h8300.c: Fix formatting.
4618         * cpu-h8300.c: Likewise.
4619
4620 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
4621
4622         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
4623         for local symbols whose names are unknown.
4624
4625 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
4626
4627         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
4628         find one.
4629         * Makefile.in: Regenerate.
4630         * doc/Makefile.in: Regenerate.
4631
4632 2000-06-20  H.J. Lu  <hjl@gnu.org>
4633
4634         * Makefile.am: Rebuild dependency.
4635         * Makefile.in: Rebuild.
4636
4637 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4638
4639         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
4640         (elf_backend_copy_indirect_symbol): Map to the new function.
4641
4642 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
4643
4644         * archive.c (normalize): Correct pointer comparison when checking
4645         for backslashes.
4646         (bfd_bsd_truncate_arname): Likewise.
4647         (bfd_gnu_truncate_arname): Likewise.
4648
4649 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
4650
4651         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
4652         sections elf_{text,data}_{section,symbol}.
4653         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
4654         (_bfd_mips_elf_hide_symbol): New function.
4655         (elf_backend_hide_symbol): Map to the new function.
4656         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
4657         definitions of mips_elf_{text,data}_{section,symbol}.
4658         (mips_elf_local_relocation_p): Try to find the direct symbol
4659         based on new check_forced argument.
4660         (mips_elf_calculate_relocation): Use new version of
4661         mips_elf_local_relocation_p.
4662         (mips_elf_relocate_section): Likewise.
4663         (_bfd_mips_elf_relocate_section): Likewise.
4664         (mips_elf_sort_hash_table): Only assert that have enough GOT
4665         space.
4666         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
4667         entry if the relocation based on the new external argument.
4668         (mips_elf_create_dynamic_relocation): Assert that we have a
4669         section contents allocated where we can swap out the dynamic
4670         relocations.
4671         (mips_elf_calculate_relocation): Find the real hash-table entry
4672         correctly by using h->root.root.type.  Only create a dynamic
4673         relocation entry if the symbol is defined in a shared library.
4674         Create an external GOT entry for the GOT16 relocation if the
4675         symbol was forced local.
4676         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
4677         dynamic index if the symbol was forced local.
4678
4679 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4680
4681         * elf32-mips.c: Fix typos in comments.
4682
4683 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
4684
4685         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
4686         CORE_VERSION_1.
4687
4688 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
4689
4690         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
4691         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
4692         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
4693         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
4694         (bfd_elf32_m68hc11_vec): Likewise.
4695         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
4696         Supports 68hc11 & 68hc12  at the same time.
4697         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
4698         bfd_target_vector.
4699         (bfd_elf32_m68hc11_vec): Likewise.
4700         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
4701         * archures.c (bfd_m68hc12_arch): Define and register in global list
4702         (bfd_m68hc11_arch): Likewise.
4703         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
4704         BFD_RELOC_M68HC11_3B): Define.
4705         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
4706         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
4707
4708 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
4709
4710         * elf_bfd.h (struct elf_backend_data): Add info argument to
4711         elf_backend_hide_symbol.
4712         (_bfd_elf_link_hash_hide_symbol): Likewise.
4713         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
4714         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
4715         * elflink.h (elf_link_add_object_symbols): Likewise.
4716         (elf_link_assign_sym_version): Likewise.
4717
4718 2000-06-18  H.J. Lu  <hjl@gnu.org>
4719
4720         * coff-i386.c (coff_i386_reloc): Don't return in case of
4721         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
4722         Compensate PE relocations when linking with non-PE object
4723         files to generate a non-PE executable.
4724
4725 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
4726
4727         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
4728         GOT entries if we're doing a static link or -Bsymbolic link.
4729
4730 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
4731
4732         * elflink.h (elf_link_adjust_relocs): Check for and call backend
4733         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
4734         available.
4735         (elf_link_output_relocs): Likewise.
4736         (elf_reloc_link_order): Likewise.
4737
4738 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
4739
4740         * archures.c (enum bfd_architecture): #define constants for
4741         PowerPc and RS6000 machine numbers.
4742         * bfd-in2.h: Regenerate.
4743         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
4744         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
4745         and RS6000 machine numbers using #defined constants from
4746         archures.c.
4747         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
4748         machine numbers using #defined constants from archures.c.  Add
4749         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
4750         64-bit words in 620 entry.
4751         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
4752         RSC, and RS2.
4753         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
4754
4755 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
4756
4757         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
4758         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
4759         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
4760
4761 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
4762
4763         * bfd-in.h (bfd_family_coff): Define.
4764         * bfd-in2.h: Regenerate.
4765         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
4766         coff_find_nearest_line): Check COFFness using bfd_family_coff()
4767         instead of bfd_target_coff_flavour.
4768         * cofflink.c (_bfd_coff_final_link): Likewise.
4769         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
4770         exclude XCOFF files.
4771         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
4772         Likewise.
4773         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
4774         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
4775         * xcofflink.c (XCOFF_XVECP): Delete.
4776         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
4777         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
4778         bfd_xcoff_record_link_assignment,
4779         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
4780         check for bfd_target_xcoff_flavour.
4781
4782 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
4783
4784         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
4785         files on AIX 4.3.
4786         (read_hdr): New function.
4787         (rs6000coff_core_p): Store mstsave or __context64 struct instead
4788         of trying to extract individual registers.  Set abfd->arch_info
4789         to match the architecture that created the core file.
4790         (rs6000coff_get_section_contents): Delete.
4791         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
4792
4793 2000-06-14  H.J. Lu  <hjl@gnu.org>
4794
4795         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
4796         is NULL.
4797
4798 2000-06-13  H.J. Lu  <hjl@gnu.org>
4799
4800         * configure: Regenerate.
4801
4802 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
4803
4804         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
4805         armpei_little_vec.
4806
4807 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
4808
4809         * configure.in (VERSION): Update to show this is the CVS mainline.
4810
4811 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
4812
4813         * elf32-d10v.c: Include elf/d10v.h
4814         (enum reloc_type): Delete.
4815         * elf32-d30v.c: Include elf/d30v.h
4816         (enum reloc_type): Delete.
4817
4818         * Makefile.am: Run "make dep-am" to regenerate dependencies.
4819         * Makefile.in: Regenerate.
4820
4821         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
4822         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
4823         move HOWTOs into elf_howto_table.
4824         (R_386_standard, R_386_ext_offset): Define.
4825         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
4826         (elf_i386_reloc_type_lookup): Modify calculation of index into
4827         elf_howto_table since we've removed the padding.
4828         (elf_i386_info_to_howto_rel): Likewise.
4829         (elf_i386_relocate_section): Likewise.
4830
4831 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
4832
4833         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
4834
4835 2000-06-05  H.J. Lu  <hjl@gnu.org>
4836
4837         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
4838         an error when seeing an undefined symbol with hidden/internal
4839         attribute. It is handled in *_relocate_section ().
4840
4841 2000-06-05  H.J. Lu  <hjl@gnu.org>
4842
4843         * elflink.h (elf_fix_symbol_flags): Follow the link for the
4844         indirect symbol for the ELF_LINK_NON_ELF bit.
4845         (elf_link_output_extsym): Don't output the indirect symbol even
4846         if the ELF_LINK_NON_ELF bit is set.
4847
4848 2000-06-01  J.T. Conklin  <jtc@redback.com>
4849
4850         * config.bfd (i[3456]86-*-netbsdelf*): New target.
4851         (i[3456]86-*-netbsdaout*): New target.
4852         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
4853         (i[3456]86-*-openbsd*): Likewise.
4854
4855 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
4856
4857         * trad-core.c: From hpux-core.c, include <dirent.h> or
4858         <sys/ndir.h> when possible.
4859
4860 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
4861
4862         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
4863         definitions.  We must not assume they are sorted in the file
4864         according to their index numbers.
4865
4866 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
4867
4868         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
4869         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
4870         R_PARISC_DIR17F are for absolute branches; Handle them as such.
4871
4872 2000-05-30  Nick Clifton  <nickc@cygnus.com>
4873
4874         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
4875         80960CA, 80960MC as valid machine names.
4876
4877 2000-05-30  H.J. Lu  <hjl@gnu.org>
4878
4879         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
4880         visibility bits if the symbol is undefined. Correctly handle
4881         weak undefined symbols with hidden and internal attributes.
4882
4883         * elflink.h (elf_link_add_object_symbols): Always turn the
4884         symbol into local if it has the hidden or internal attribute.
4885
4886 2000-05-29  Philip Blundell  <philb@gnu.org>
4887
4888         * ppcboot.c:  Add packed attribute if compiling with GCC.
4889
4890 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
4891
4892         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
4893
4894 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
4895
4896         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
4897         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
4898         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
4899         a few old comments.
4900
4901 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
4902
4903         * Makefile.am: Update dependencies with "make dep-am"
4904         * Makefile.in: Regenerate.
4905
4906         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
4907         bindtextdomain): Replace defines with those from intl/libgettext.h
4908         to quieten gcc warnings.
4909
4910 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
4911
4912         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
4913
4914         * archive.c (normalize, bfd_bsd_truncate_arname,
4915         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
4916         file names with backslashes.
4917
4918         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
4919         before opening it.
4920
4921         * sysdep.h: Include filenames.h.
4922
4923 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
4924
4925         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
4926
4927 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
4928
4929         * elf64-sparc.c (sparc64_elf_relax_section): New.
4930         (sparc64_elf_relocate_section): Optimize tail call into branch always
4931         if possible.
4932         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4933         (elf32_sparc_relax_section): New.
4934
4935 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
4936
4937         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
4938         Remove unusued variables.
4939         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
4940         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
4941         previous fix, so that shared libs really don't influence targets
4942         extension mask and memory model.
4943
4944 2000-05-23  H.J. Lu  <hjl@gnu.org>
4945
4946         * elf64-alpha.c (elf64_alpha_relocate_section): Check
4947         h->root.other not h->other.
4948         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4949
4950         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
4951
4952 2000-05-23  H.J. Lu  <hjl@gnu.org>
4953
4954         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
4955         undefined symbol with the non-default visibility attributes.
4956         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4957         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4958         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4959         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4960         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4961         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4962         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4963         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4964         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4965         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
4966         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4967
4968 2000-05-22  Richard Henderson  <rth@cygnus.com>
4969
4970         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
4971         PCREL22, PCREL64I.  Zero size of special relocs.
4972         (elf64_ia64_reloc_type_lookup): Likewise.
4973         (USE_BRL, oor_brl, oor_ip): New.
4974         (elf64_ia64_relax_section): New.
4975         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
4976         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
4977         (elf64_ia64_relocate_section): Likewise.
4978         (bfd_elf64_bfd_relax_section): New.
4979         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
4980         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
4981         * bfd-in2.h, libbfd.h: Regenerate.
4982
4983 2000-05-22  Nick Clifton  <nickc@cygnus.com>
4984
4985         * configure.in : Add peigen.lo to MIPS PE targets.
4986         * configure: Regenerate.
4987
4988 2000-05-22  Momchil Velikov  <velco@fadata.bg>
4989
4990         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
4991         only if it is known for both input and output bfds. Separate
4992         error message strings as in some languages, it may be necessary
4993         to change more than one place in the string to change between
4994         'big' and 'little'.
4995
4996         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
4997         endianess checks, call _bfd_generic_verify_endian_match() instead.
4998
4999         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
5000
5001         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
5002
5003         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
5004         endianess before checking bfd flavours.
5005
5006 2000-05-22  H.J. Lu  <hjl@gnu.org>
5007
5008         * elflink.h (elf_link_output_extsym): Clear the visibility
5009         field for symbols not defined locally.
5010
5011 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
5012
5013         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
5014         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
5015         (hppa_rebuild_insn): Mask immediate bits here instead.
5016         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
5017
5018 2000-05-18  Momchil Velikov <velco@fadata.bg>
5019
5020         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
5021         relocs for an executable, ensure that they are virtual addresses.
5022
5023 2000-05-18  Jeffrey A Law  (law@cygnus.com)
5024
5025         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
5026
5027 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
5028             Rick Gorton             <gorton@scrugs.lkg.dec.com>
5029
5030         * elflink.h: Add emitrelocations support: when enabled, relocation
5031         information and relocation sections are put into final output
5032         executables.  If the emitrelocations flag is set, do the following:
5033         (elf_bfd_final_link): Emit relocation sections.
5034         (elf_link_input_bfd): Compute relocation section contents.
5035         (elf_gc_sections): Don't clean relocation sections.
5036
5037 2000-05-16  Catherine Moore  <clm@cygnus.com>
5038
5039         * som.c (som_decode_symclass):  Recognize weak symbols.
5040
5041 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
5042
5043         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
5044         read idata section only from dataoff.
5045         (pe_print_edata): Correctly check for valid eat_member.
5046
5047 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
5048
5049         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
5050
5051 2000-05-14  Philip Blundell  <philb@gnu.org>
5052
5053         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
5054
5055 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
5056
5057         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
5058
5059         * peigen.c (pe_print_idata): Look for .idata section and print
5060         info even if data directory has zero entries.  Read idata section
5061         starting from dataoff, and adjust all data offsets to suit.  Cast
5062         all bfd_vma vars to unsigned long before passing to fprintf.
5063         * peigen.c (pe_print_edata): Similarly, look for .edata section
5064         and print info even if data directory has zero entries.  Cast
5065         all bfd_vma vars to unsigned long before passing to fprintf.
5066
5067         From Szabolcs Szakacsits <szaka@F-Secure.com>
5068         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
5069         directory size which may be bogus.
5070         * peigen.c (pe_print_edata): Similarly.
5071
5072 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
5073
5074         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
5075         section is empty.
5076         (copy_private_bfd_data): Allow for space possibly taken up by elf
5077         headers when calculating segment physical address from lma.
5078
5079 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
5080
5081         * versados.c (versados_scan): Init stringlen and pass_2_done.
5082
5083         * trad-core.c (trad_unix_core_file_p): Return
5084         bfd_error_wrong_format rather than bfd_error_file_truncated.
5085
5086         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
5087         add_data_entry.  DataDirectory virtual address is relative.
5088         (pe_print_idata): Account for relative DataDirectory virtual
5089         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
5090         (pe_print_edata): Similarly.
5091
5092         From Szabolcs Szakacsits <szaka@F-Secure.com>
5093         * peigen.c (dir_names): Add Delay Import Directory.
5094         (pe_print_idata):  Always search for bfd section containing
5095         idata address rather than looking up section name.  Print this
5096         section name rather than .idata.
5097         (pe_print_edata): Similarly.  Also print some fields as %08lx.
5098         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
5099         Win32Version.
5100
5101 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
5102
5103         * xcoff.h: Rename to xcoff-target.h
5104         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
5105         * coff-rs6000.c: Ditto.
5106         * coff64-rs6000.c: Ditto.
5107         * coff-pmac.c: Ditto.
5108         * Makefile.in: Regenerate.
5109
5110 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
5111
5112         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
5113         Change U802TOC64MAGIC to U803XTOCMAGIC.
5114
5115 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
5116
5117         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
5118         * bfd-in.h: Prototype bfd_elf_get_arch_size.
5119         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
5120
5121 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
5122
5123         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
5124
5125 2000-05-03  Martin v. L\81öwis  <loewis@informatik.hu-berlin.de>
5126
5127         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
5128         hidden and internal symbols.
5129         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
5130         visibility.
5131         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
5132         assign a PLT or GOT entry to symbols with hidden and
5133         internal visibility.
5134
5135 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
5136
5137         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
5138         the .bss section.
5139         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5140
5141 2000-05-02  H.J. Lu  <hjl@gnu.org>
5142
5143         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
5144         ELFOSABI_SYSV.
5145
5146 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
5147
5148         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
5149         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
5150         dependencies.
5151         * Makefile.in: Regenerate.
5152
5153 2000-05-01  Jim Wilson  <wilson@cygnus.com>
5154
5155         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
5156         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
5157         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
5158         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
5159         * Makefile.in: Rebuild.
5160
5161 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
5162
5163         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
5164         doesn't work very well.
5165
5166         * elf-hppa.h (elf_hppa_internal_shdr): Define.
5167         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
5168         Set hdr->s_type to 1 if ARCH_SIZE == 32.
5169         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
5170         (elf_hppa_info_to_howto): Likewise.
5171         (elf_hppa_info_to_howto_rel): Likewise.
5172         (elf_hppa_reloc_type_lookup): Likewise.
5173         (elf_hppa_is_local_label_name): Likewise.
5174         (elf_hppa_fake_sections): Likewise.
5175         (elf_hppa_final_write_processing): Likewise.
5176         (elf_hppa_howto_table): Fully initialise all entries.
5177         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
5178         (elf_hppa_info_to_howto): Likewise.
5179         (elf_hppa_info_to_howto_rel): Likewise.
5180         (elf_hppa_reloc_type_lookup): Likewise.
5181         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
5182         elf_hppa_unmark_useless_dynamic_symbols,
5183         elf_hppa_remark_useless_dynamic_symbols,
5184         elf_hppa_record_segment_addrs, elf_hppa_final_link,
5185         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
5186         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
5187         elf32-hppa.c mess is cleaned up.
5188         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
5189         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
5190         r_field then call hppa_field_adjust inline func with variable
5191         r_field arg, instead call hppa_field_adjust with fixed arg.
5192         In case R_PARISC_PCREL22F, don't set r_field.
5193         (elf_hppa_relocate_insn): Change args and return type to unsigned
5194         int.  Call re_assemble_* funcs to do the work.
5195
5196         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
5197         sign extending.
5198
5199         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
5200         extending.
5201         (sign_extend): Mask first before sign extending.
5202         (low_sign_extend): Rewrite without condition expression.
5203         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
5204         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
5205         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
5206         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
5207         result as function return value rather than through pointer arg.
5208         Accept unsigned int args, and return unsigned int.
5209         (re_assemble_3): New.  Combines function of dis_assemble_3 with
5210         re-assembly of opcode and immediate.
5211         (re_assemble_12): Likewise.
5212         (re_assemble_16): Likewise.
5213         (re_assemble_17): Likewise.
5214         (re_assemble_21): Likewise.
5215         (re_assemble_22): Likewise.
5216         (hppa_field_adjust): Rewrite and document, paying attention to
5217         size of types and signed/unsigned issues.
5218         (get_opcode): Shift before masking.
5219         (FDLW): Rename to FLDW.
5220         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
5221         (hppa_rebuild_insn): Change args and return value to unsigned
5222         int.  Make use of re_assemble_*.  Correct case 11.
5223
5224         * dep-in.sed: Handle ../opcodes/.
5225         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
5226         elf64-hppa.h, hppa_stubs.h, xcoff.h.
5227         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
5228         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
5229         elfarm-nabi.lo dependencies outside of auto-dependency area.
5230         Regenerate dependencies.
5231         * Makefile.in: Regenerate.
5232
5233         * configure.in (TRAD_HEADER): Test non-null before
5234         AC_DEFINE_UNQUOTED.
5235         * configure: Regenerate.
5236
5237         * reloc.c: Fix mis-spelling in comment.
5238
5239 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
5240
5241         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
5242         * vms.c (vms_openr_next_archived_file): Return NULL.
5243
5244 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5245
5246         * coffcode.h Copy changes mistakenly done to libcoff.h in
5247         4/24/2000 patch.
5248
5249 2000-04-29  Andreas Jaeger  <aj@suse.de>
5250
5251         * libbfd-in.h: Correctly check GCC version.
5252         * bfd-in.h: Likewise.
5253         * libhppa.h: Likewise.
5254         * libbfd.h: Regenerate.
5255         * bfd-in2.h: Regenerate.
5256
5257 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5258
5259         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
5260         coffdu-rs6000.{lo,c}.
5261         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
5262         on xcoff.h
5263         * Makefile.in: Regenerate.
5264         * xcoff.h: New file.
5265         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
5266         * coff-rs6000.c: Move all declarations and defines that are
5267         common to the xcoff backends into xcoff.h
5268         * coff64-rs6000.c: Ditto,
5269
5270 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5271
5272         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
5273         _bfd_coff_force_symnames in strings and
5274         _bfd_coff_debug_string_prefix_length to their default values.
5275         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
5276
5277 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5278
5279         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
5280         _bfd_coff_force_symnames in strings and
5281         _bfd_coff_debug_string_prefix_length to their default values.
5282
5283 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
5284
5285         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
5286         Check local_got_refcounts before dereferencing.
5287
5288         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
5289         before deciding we don't need R_PPC_PLT32 relocation.
5290         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
5291         dereferencing.
5292
5293         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
5294
5295         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
5296         .plt entries.
5297         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
5298         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
5299         (elf_i386_relocate_section): Allow for .plt to go missing.
5300         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
5301         can use a relative reloc for got as elf_i386_relocate_section.
5302         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
5303
5304 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
5305
5306         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
5307
5308 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
5309
5310         * Makefile.am (coff64-rs6000.lo): New rule.
5311         * Makefile.in: Regenerate.
5312         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
5313         xcoff_is_local_label_name, xcoff_rtype2howto,
5314         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
5315         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
5316         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
5317         (NO_COFF_SYMBOLS): Define.
5318         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
5319         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
5320         internally.
5321         (MINUS_ONE): New macro.
5322         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
5323         relocation.
5324         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
5325         coff_SWAP_aux_out): Map to the new functions.
5326         * coff64-rs6000.c: New file.
5327         * libcoff.h (bfd_coff_backend_data): Add new fields
5328         _bfd_coff_force_symnames_in_strings and
5329         _bfd_coff_debug_string_prefix_length.
5330         (bfd_coff_force_symnames_in_strings,
5331         bfd_coff_debug_string_prefix_length): New macros for above fields.
5332         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
5333         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
5334         of using coff_swap_sym_in directly.
5335         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
5336         (coff_set_flags) Set magic for XCOFF64.
5337         (coff_compute_section_file_positions): Add symbol name length to
5338         string section length if bfd_coff_debug_string_prefix_length is
5339         true.
5340         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
5341         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
5342         using coff_swap_lineno_in directly.
5343         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
5344         and _bfd_coff_debug_string_prefix_length fields.
5345         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
5346         symbol names into strings table when
5347         bfd_coff_force_symnames_in_strings is true.
5348         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
5349         SET_RELOC_VADDR): New macros.
5350         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
5351         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
5352         code.
5353         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
5354         changes within RS6000COFF_C specific code.
5355         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
5356         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
5357         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
5358         Extend existing hack on target name.
5359         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
5360         target name.
5361         * coff-tic54x.c (ticof): Keep up to date with new fields
5362         in bfd_coff_backend_data.
5363         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
5364         targ_selvecs to include rs6000coff64_vec for rs6000.
5365         * configure.in: Add rs6000coff64_vec case.
5366         * cpu-powerpc.c: New bfd_arch_info_type.
5367
5368 2000-04-24  Jeffrey A Law  (law@cygnus.com)
5369
5370         * config.bfd: Only disable elf32-hppa vectors, not all of the
5371         BSD and OSF configuration support.  Provide (disabled) clauses
5372         for PA64 support.
5373         * configure.in: Add clause for PA64 support.
5374         * configure: Rebuilt.
5375
5376         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
5377         (bfd_elf64_hppa_vec): Declare.
5378
5379         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
5380         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
5381         (elf64-hppa.lo): Add dependencies.
5382         * Makefile.in: Rebuilt.
5383
5384         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
5385
5386 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
5387
5388         * libhppa.h (dis_assemble_16): New function.
5389         (pa_arch): Added pa20w element.
5390
5391 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
5392
5393         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
5394         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
5395         bfd_elf64_slurp_reloc_table.
5396
5397         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
5398         definitions to get external names.
5399         (elf_write_relocs): Renamed from write_relocs and make global.
5400         (elf_slurp_reloc_table): Make global.
5401         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
5402
5403         * archive.c (hpux_uid_gid_encode): New function.
5404         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
5405         defined and the ID is greater than 99999.
5406         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
5407         special uid/gid fields into 32 bit values.
5408
5409 2000-04-21  Matthew Green  <mrg@cygnus.com>
5410
5411         * config.bfd: Add NetBSD/sparc64 support.
5412
5413 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
5414                           David Mosberger  <davidm@hpl.hp.com>
5415                           Timothy Wall <twall@cygnus.com>
5416                           Jim Wilson  <wilson@cygnus.com>
5417
5418         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
5419         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
5420         (BFD64_BACKENDS): Add elf64-ia64.lo.
5421         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
5422         (cpu-ia64.lo, elf64-ia64.lo): New rules.
5423         * Makefile.in: Rebuild.
5424         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
5425         (bfd_ia64_arch): Declare.
5426         (bfd_archures_list): Add bfd_ia64_arch.
5427         * bfd-in2.h: Rebuild.
5428         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
5429         * configure: Rebuild.
5430         * configure.host: (ia64-*-linux*): New host.
5431         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
5432         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
5433         * elf.c (prep_headers): Add bfd_arch_ia64.
5434         * libbfd.h: Rebuild.
5435         * reloc.c: Add IA-64 relocations.
5436         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
5437         Declare.
5438         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
5439         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
5440
5441 2000-04-21  Richard Henderson  <rth@cygnus.com>
5442
5443         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
5444         contents when performing a partial link.
5445         (bfd_elf_d30v_reloc_21): Likewise.
5446
5447 2000-04-20  H.J. Lu  <hjl@gnu.org>
5448
5449         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
5450         patch to symbols defined by a shared object.
5451         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
5452
5453 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5454
5455         K&R compiler fixes.
5456         * dwarf2.c (concat_filename): Avoid string literal concatenation.
5457         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
5458
5459 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
5460
5461         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
5462         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
5463         (coff-ia64.lo): Add dependency.
5464         * Makefile.in: Regenerate.
5465         * coff-ia64.c: New file.
5466         * efi-app-ia32.c: Ditto.
5467         * efi-app-ia64.c: Ditto.
5468         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
5469         (coff_set_flags): Ditto.
5470         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
5471         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
5472         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
5473         * configure: Regenerate.
5474         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
5475         (PUT_OPTHDR_IMAGE_BASE): Ditto.
5476         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5477         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5478         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5479         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5480         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5481         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5482         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5483         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5484         (GET_PDATA_ENTRY): Ditto.
5485         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
5486         data_start.  Use above macros to read fields that are 64 bit wide for
5487         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
5488         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
5489         FileAlignment and SectionAlignment to minimum alignment if they
5490         are zero.
5491         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
5492         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
5493         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
5494         Use above macros to write fields that are 64 bit wide for
5495         COFF_WITH_PEP64.
5496         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
5497         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
5498         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
5499         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
5500         begin address, end address, and unwind info address only.  Use
5501         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
5502         print addresses.
5503         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
5504         HIGH3ADJ relocation names.
5505         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
5506         * targets.c: Declare bfd_efi_app_ia32_vec and
5507         bfd_efi_app_ia64_vec.
5508         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
5509         bfd_efi_app_ia64_vec.
5510
5511 2000-04-17  Timothy Wall  <twall@cygnus.com>
5512
5513         * bfd-in2.h: Add prototypes for tic54x load page access.
5514         * bfd-in.h: Regenerate.
5515         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
5516         in customized _set_arch_mach function.
5517         * coffcode.h (coff_set_alignment_hook): Set section load page if
5518         the appropriate macro is defined.
5519         (write_object_contents): Read section load page.
5520
5521 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
5522
5523         * elf32-hppa.h: Update copyright date.
5524
5525         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
5526         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
5527
5528         * elf32-d30v.c (MAX32): Don't use LL suffix.
5529         (MIN32): Define in terms of MAX32.
5530         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
5531
5532         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
5533         expression.
5534
5535         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
5536
5537 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
5538
5539         * dep-in.sed: Match space before file name, not after.
5540         * Makefile.am: Regenerate dependencies.
5541         * Makefile.in: Regenerate.
5542
5543         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
5544         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
5545         extend without an if statement.
5546
5547 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
5548
5549         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5550         signed quantites.
5551         * elf32-mips.c (gprel16_with_gp): Likewise.
5552         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5553         here using -0x40000, not (int)0xfffc0000.
5554         (elf32_hppa_size_of_stub): Likewise.
5555
5556 2000-04-11  Timothy Wall  <twall@cygnus.com>
5557
5558         * coff-tic54x.c: Now builds with all targets.
5559         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5560         * Makefile.in: Regenerate.
5561         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5562         unitialized variable.
5563
5564 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5565
5566         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
5567         --enable-build-warnings option.
5568         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5569         * Makefile.in, configure: Re-generate.
5570
5571 2000-04-07  Nick Clifton  <nickc@cygnus.com>
5572
5573         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5574         BFD_RELOC_THUMB_PCREL_BLX.
5575
5576         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5577         R_ARM_XPC25 and R_ARM_THM_PC22.
5578
5579         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5580         R_ARM_XPC25 and R_ARM_THM_XPC22.
5581         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5582         R_ARM_[XPC25|THM_XPC22].
5583
5584         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5585         elf/arm-oabi.h to elf/arm.h
5586
5587         * Makefile.am: Fix dependency for elfarm-oabi.c
5588         * Makefile.in: Regenerate.
5589
5590         * bfd-in2.h: Regenerate.
5591         * libbfd.h: Regenerate.
5592
5593 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
5594
5595         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
5596         and restore it on failure.  Release newly allocated tdata on
5597         failure.
5598
5599 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
5600
5601         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
5602         (decode_line_info): Set it.  Report error if unit->line_offset is
5603         equal to or larger than it.
5604
5605 2000-04-07  Timothy Wall  <twall@cygnus.com>
5606
5607         * targets.c: Added vecs for tic54x.
5608         * reloc.c: Added relocs for tic54x.
5609         * libbfd.h: Regenerated.
5610         * configure: Add TI COFF vecs for tic54x.
5611         * configure.in: Ditto.
5612         * config.bfd (targ_cpu): Recognize new tic54x target.
5613         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
5614         * bfd-in2.h: Add tic54x target and relocations.
5615         * Makefile.am, Makefile.in: Add tic54x target.
5616         * archures.c (bfd_archures_list): Add tic54x target.
5617         * coff-tic54x.c: New.
5618         * cpu-tic54x.c: New.
5619
5620 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
5621
5622         * elfcore.h (elf_core_file_p): call backend_object_p which
5623         thereby gets an opportunity to update the arch/machine type.
5624
5625 2000-04-06  Timothy Wall  <twall@cygnus.com>
5626
5627         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
5628         class.  Handle SEC_CLINK and SEC_BLOCK flags.
5629         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
5630         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
5631
5632 2000-04-06  Nick Clifton  <nickc@cygnus.com>
5633
5634         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
5635         EF_INTERWORK if this is an unknown EABI.
5636         (elf32_arm_merge_private_bfd_data): Check EABI version
5637         numbers.  Only check EF_xxx flags if the EABI version number
5638         is unknown.
5639         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
5640         if the EABI version number is unknown.
5641         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
5642         if the EABI version number is unknown.
5643
5644 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
5645
5646         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
5647         BFD_RELOC_SH_LOOP_END.
5648         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
5649         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
5650         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
5651         (sh_elf_reloc_loop): New function.
5652         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
5653         any more.
5654         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
5655         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
5656         * bfd-in2.h, libbfd.h: Regenerate.
5657
5658 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
5659
5660         * po/bfd.pot: Regenerate.
5661
5662         * Makefile.am: Remove extraneous mkdep comment.
5663         (MKDEP): Use gcc -MM rather than mkdep.
5664         (DEP): Quote when passing vars to sub-make.  Add warning
5665         message to end.
5666         (DEP1): Rewrite for "gcc -MM".
5667         (CLEANFILES): Add DEP2.
5668         Update dependencies.
5669         * Makefile.in: Regenerate.
5670
5671 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
5672
5673         * configure.in: Added corefile support for AIX 4.3.  In particular,
5674         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
5675         compiling rs6000-core.c.
5676         * configure: Regenerated.
5677
5678 2000-04-03  H.J. Lu  <hjl@gnu.org>
5679
5680         * cache.c (bfd_open_file): Unlink the output file only if
5681         it has non-zero size.
5682
5683 2000-04-01  Ken Block USG  <block@zk3.dec.com>
5684
5685         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
5686         relative relocations for non-loaded sections in shared objects.
5687         (elf64_alpha_check_relocs): Similarly.
5688
5689 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
5690
5691         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
5692         BFD_RELOC_16 to switch for extended relocs.
5693         (MY_swap_ext_reloc_in): New.
5694         (MY_swap_ext_reloc_out): New.
5695         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
5696         than NAME(aout,swap_ext_reloc_in) for extended relocs.
5697         (NAME(aout,squirt_out_relocs)): Similarly use
5698         MY_swap_ext_reloc_out.
5699         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
5700
5701 2000-04-03  Kazu Hirata  <kazu@hxi.com>
5702
5703         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
5704         the R_PCRWORD_B case.
5705
5706 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
5707
5708         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
5709         on some targets.
5710         * ihex.c : Ditto.
5711
5712 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
5713
5714         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
5715         HOWTO references to bfd_elf_generic_reloc, that have
5716         partial_inplace == true, now use the new function.  The function
5717         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
5718         extends its fixes to the R_M32R_{16,24,32} relocs.
5719         The new logic in m32r_elf_lo16_reloc() has been removed, and
5720         it instead calls the new routine to obtain that functionality.
5721
5722 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
5723
5724         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
5725         elf32_avr_check_relocs, avr_final_link_relocate,
5726         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
5727         elf32_avr_object_p): Add prototypes.
5728         (elf32_avr_gc_mark_hook): Add default for h->root.type.
5729         (bfd_elf_avr_final_write_processing): Make static.
5730
5731 2000-03-27  Denis Chertykov  <denisc@overta.ru>
5732
5733         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
5734         * archures.c (bfd_architecture): Add AVR architecture.
5735         (bfd_archures_list): Add reference to AVR architecture info.
5736         * elf.c (prep_headers): Handle bfd_arch_avr.
5737         * reloc.c: Add various AVR relocation enums.
5738         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
5739         list.
5740         * Makefile.am: Add support for AVR elf.
5741         * configure.in: Likewise.
5742         * config.bfd: Likewise.
5743         * Makefile.in: Regenerate.
5744         * configure: This too.
5745         * bfd-in2.h: And this.
5746         * libbfd.h: And this.
5747
5748 2000-03-24  H.J. Lu  <hjl@gnu.org>
5749
5750         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
5751         (elf64_alpha_find_reloc_at_ofs): Likewise.
5752
5753 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
5754
5755         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
5756         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
5757         allowable range used to be -2**(n-1) to 2**n-1.
5758         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
5759         "boolean overflow" with "bfd_reloc_status_type flag".
5760
5761 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
5762
5763         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
5764
5765 2000-03-14  Kazu Hirata  <kazu@hxi.com>
5766
5767         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
5768         of shrinks properly, including the last reloc.
5769
5770 2000-03-13  Kazu Hirata  <kazu@hxi.com>
5771
5772         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
5773         check for R_MOVL2.
5774
5775 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
5776
5777         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
5778         a format mismatch rather than an "error" from bfd_read such as
5779         bfd_error_file_truncated.
5780
5781 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
5782
5783         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
5784         sign-extension and big-endian compensation for
5785         R_MIPS_64 even in ld -r.
5786
5787 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
5788
5789         * elf32-mips.c (mips_elf_next_relocation): Rename from
5790         mips_elf_next_lo16_relocation, and generalize to look
5791         for any relocation type.
5792         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
5793         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
5794         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
5795         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
5796         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
5797         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
5798         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
5799         (mips_rtype_to_howto): Likewise.
5800         (mips_elf_calculate_relocation): Handle new relocs.
5801         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
5802         are paired.  The addend for R_MIPS_GNU_REL16_S2
5803         is shifted right two bits.
5804
5805 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
5806
5807         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
5808         comment, and ensure it doesn't happen again.
5809         (bfd_install_relocation): Same here.
5810         (_bfd_relocate_contents): Don't bother assigning unused signmask
5811         shift result.  Fix typos in comments.
5812         Remove trailing whitespace throughout file.
5813
5814 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
5815
5816         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
5817         * bfd-in2.h: Rebuild.
5818
5819 2000-03-06  Nick Clifton  <nickc@cygnus.com>
5820
5821         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
5822         sym_ptr_ptr fields.
5823         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
5824         (SIZEOF_ILF_STRINGS): Redefine.
5825         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
5826         relative reloc, as opposed to a section relative reloc.
5827         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
5828         not C_LABEL.
5829         Add length of symbol's prefix to string pointer.
5830         Store a pointer to the symbol in the symbol pointer table.
5831         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
5832         Initialise the symbol pointer table.
5833         Store the hint in the Hint/Name table.
5834         Make the jump reloc be symbol realtive, not section relative.
5835         Create an import symbol for imported code.
5836
5837 2000-03-06  Catherine Moore  <clm@cygnus.com>
5838
5839         * elf.c (swap_out_syms):  Check for null type_ptr.
5840
5841 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
5842
5843         * aout-target.h (MY(write_object_contents)): Remove unused
5844         and unusable "#if CHOOSE_RELOC_SIZE".
5845         * pc532-mach.c (MY(write_object_contents)): Ditto.
5846         * netbsd.h (MY(write_object_contents)): Ditto.
5847         * hp300hpux.c (MY(write_object_contents)): Ditto.
5848         * freebsd.h (MY(write_object_contents)): Ditto.
5849         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
5850
5851 2000-02-29  H.J. Lu  <hjl@gnu.org>
5852
5853         * peicode.h (jtab): Make it static.
5854
5855         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
5856         defined and COFF_IMAGE_WITH_PE is not defined.
5857         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
5858         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
5859
5860 2000-03-01  Nick Clifton  <nickc@cygnus.com>
5861
5862         * coff-arm.c (bfd_arm_process_before_allocation): Make
5863         'symndx' signed to prevent compile time warning.
5864
5865         * coff-mcore.c: Remove unused prototype for pe_object_p.
5866
5867         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
5868         functions that are not used when COFF_IMAGE_WITH_PE is
5869         defined.
5870         (struct sh_opcode): Change type of 'flags' field to unsigned
5871         long so that it can hold the USESAS flag.
5872
5873         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
5874
5875         * elf-m10300.c (mn10300_elf_relax_section): Initialise
5876         'sym_sec'.
5877
5878         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
5879         parameters.
5880         Remove unusued variables and code.
5881         (elf_backend_add_symbol_hook): Fix prototype.
5882
5883         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
5884         'srelgot'.
5885
5886         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
5887         'oldinst'.
5888
5889         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
5890         parameters.
5891         Remove unusued variables and code.
5892         (elf_backend_add_symbol_hook): Fix prototype.
5893
5894         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
5895
5896         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
5897         to unused function parameter.
5898
5899         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
5900         parameters.
5901         Use EMPTY_HOWTO to initialise empty howto slots.
5902         Remove unused variables.
5903
5904         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
5905
5906 2000-03-01  H.J. Lu  <hjl@gnu.org>
5907
5908         * aoutx.h (aout_link_input_section_std): Pass "true" to
5909         the undefined_symbol callback.
5910         (aout_link_input_section_ext): Likewise.
5911         * bout.c (get_value): Likewise.
5912         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
5913         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
5914         Likewise.
5915         (alpha_relocate_section): Likewise.
5916         * coff-arm.c (coff_arm_relocate_section): Likewise.
5917         * coff-i960.c (coff_i960_relocate_section): Likewise.
5918         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
5919         * coff-mips.c (mips_relocate_section): Likewise.
5920         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
5921         * coff-sh.c (sh_relocate_section): Likewise.
5922         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
5923         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
5924         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
5925         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5926         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
5927         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5928         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5929         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5930         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5931         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5932         * elf32-sh.c (sh_elf_relocate_section): Likewise.
5933         * elf32-v850.c (v850_elf_relocate_section): Likewise.
5934         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5935         * elflink.h (elf_link_output_extsym): Likewise.
5936         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
5937         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
5938         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
5939
5940         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
5941         undefined_symbol callback when building shared library with
5942         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
5943         "true".
5944         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5945         * elf32-i386.c (elf_i386_relocate_section): Likewise.
5946         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5947         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5948         (elf32_mips_get_relocated_section_content): Likewise.
5949         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5950         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5951         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5952         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5953
5954 2000-02-28  Nick Clifton  <nickc@cygnus.com>
5955
5956         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
5957         * Makefile.in: Regenerate.
5958
5959         * configure.in: Add support for mips and sh pe vectors.
5960         * configure: regenerate.
5961
5962         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
5963         targets.
5964
5965         * targets.c: Add mips and sh pe vectors.
5966
5967         * libpei.h (coff_final_link_postscript): Only define if not
5968         already defined.
5969
5970         * coffcode.h: Add support for WinCE magic numbers.
5971
5972         * peigen.c (pe_print_reloc): Update comment and rearrange
5973         appending of newline character.
5974
5975         * peicode.h: Add support for Image Library Format.
5976         (pe_ILF_vars): Structure containing data used by ILF code.
5977         (pe_ILF_make_a_section): New function.  Create a section based
5978         on ILF data.
5979         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
5980         ILF data.
5981         (pe_ILF_make_a_symbol): New function.  Create a symbol based
5982         on ILF data.
5983         (pe_ILF_save_relocs): New function.  Store the relocs created
5984         by pe_ILF_make_a_reloc in a section.
5985         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
5986         an ILF object.
5987         (pe_ILF_object_p): New function.  Return a bfd_target pointer
5988         for an ILF object.
5989         (pe_bfd_object_p): If an ILF object is detected call
5990         pe_ILF_object_p on it.
5991
5992         * coff-arm.c: Add support for WinCE relocs which are different
5993         from normal ARM COFF relocs.
5994         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
5995
5996         * coff-sh.c: Add support for sh-pe target.
5997         * pe-sh.c: New file.  Support code for sh-pe target.
5998         * pei-sh.c: New file.  Support code for sh-pe target.
5999
6000         * pe-mips.c: New file.  Support code for mips-pe target.
6001         * pei-mips.c: New file.  Support code for mips-pe target.
6002
6003 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
6004
6005         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
6006         architecture if the object causing the bump is dynamic.
6007         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
6008         and also don't it for memory ordering.
6009         (sparc64_elf_write_relocs): Take src_rela out of the loop.
6010
6011 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
6012
6013         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
6014         calling bfd_get_section_size_before_reloc.
6015         (decode_line_info): Likewise.
6016         (_bfd_dwarf2_find_nearest_line): Likewise.
6017
6018 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
6019
6020         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
6021         name of the libtool directory.
6022         * Makefile.in: Rebuild.
6023
6024 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
6025
6026         * som.c (SOM_HOWTO): Define.
6027         (som_hppa_howto_table): Use it.
6028
6029 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6030
6031         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
6032
6033         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
6034
6035 2000-02-24  Catherine Moore  <clm@cygnus.com>
6036
6037         * som.c (som_misc_symbol_info):  Add field
6038         secondary_def.
6039         (som_bfd_derive_misc_symbol_info):  Initialize
6040         secondary_def.
6041         (som_build_and_write_symbol_table): Keep track
6042         of secondary_def field.
6043         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
6044         if secondary_def field is set.
6045         (som_bfd_ar_write_symbol_stuff): Initialize
6046         secondary_def.
6047
6048 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
6049
6050         * dwarf2.c (read_address): Read 16-bits addresses.
6051         (parse_comp_unit): Accept addr_size == 2.
6052
6053 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
6054
6055         * bfd-in.h: Update copyright date.
6056
6057 2000-02-23  Linas Vepstas <linas@linas.org>
6058
6059         * cpu-i370.c: New file.
6060         * elf32-i370.c:  New file.
6061         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
6062         (bfd_i370_arch): New.
6063         (bfd_archures_list): Add bfd_i370_arch.
6064         * elf.c (prep_headers): Add bfd_arch_i370.
6065         * Makefile.am: Add support for IBM 370 elf.
6066         * config.bfd: Likewise.
6067         * configure.in: Likewise.
6068         * libbfd.h (bfd_reloc_code_real_names): Likewise.
6069         * reloc.c (bfd_reloc_code_type): Likewise.
6070         * targets.c: Likewise.
6071
6072         * Makefile.in: Regenerate.
6073         * configure: Regenerate.
6074         * bfd-in2.h: Regenerate.
6075
6076 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
6077
6078         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
6079         invalid relocation types, and change them to R_386_NONE.
6080
6081 2000-02-22  H.J. Lu  <hjl@gnu.org>
6082
6083         * elflink.h (elf_link_add_object_symbols): If a version symbol is
6084         not defined, don't add a second ELF_VER_CHR.
6085
6086         * elflink.h (elf_bfd_final_link): Call output_extsym for global
6087         symbols converted to local symbols even when stripping all
6088         symbols.
6089         (elf_link_output_extsym): Process global symbols converted to
6090         local symbols even if they are being stripped.
6091
6092 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
6093
6094         * archures.c (bfd_octets_per_byte): Return unsigned int.
6095         (bfd_arch_mach_octets_per_byte): Ditto.
6096         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
6097         comparison warning.
6098         * section.c (bfd_get_section_size_before_reloc): Quell signed
6099         vs. unsigned comparison warning.
6100         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
6101         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
6102         change.  What was I thinking?
6103         * bfd-in2.h: Regenerate.
6104
6105         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
6106         (elf_gc_sections): Same here.
6107         (elf_gc_common_finalize_got_offsets): And here.
6108
6109 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
6110
6111         ELF HPPA doesn't work at present; remove it until it does.
6112         * config.bfd: Comment out setting targ_defvec to
6113         bfd_elf32_hppa_vec.
6114         * Makefile.am: Rebuild dependencies.
6115         (BFD32_BACKENDS): Remove elf32-hppa.lo.
6116         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
6117         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
6118         * Makefile.in: Rebuild.
6119         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
6120
6121 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
6122
6123         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
6124         is no bfd_free().  Revert bfd_free part of previous change.
6125
6126 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
6127
6128         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
6129         arrays.
6130         (coff_compute_section_file_positions): Use bfd_free to pair
6131         bfd_malloc.
6132         (coff_write_object_contents): Likewise.
6133
6134         * coff-rs6000.c (xcoff_howto_table_16): New variable.
6135         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
6136
6137 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
6138
6139         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
6140         (xcoff_ar_file_hdr_big): New structure.
6141         (SIZEOF_AR_FILE_HDR_BIG): New macro.
6142         (xcoff_ar_hdr_big): New structure.
6143         (SIZEOF_AR_HDR_BIG): New macro.
6144         (xcoff_big_format_p): New macro.
6145         (xcoff_ardata_big): New macro.
6146         (arch_xhdr_big): New macro.
6147         (xcoff_slurp_armap): Handle large archives.
6148         (xcoff_archive_p): Detect large archives.
6149         (xcoff_read_ar_hdr): Handle large archives.
6150         (xcoff_openr_next_archived_file): Handle large archives.
6151         (xcoff_generic_stat_arch_elt): Handle large archives.
6152         (xcoff_write_armap_old): Rename from xcoff_write_armap.
6153         (xcoff_write_armap_big): New function.
6154         (xcoff_write_armap): New function, dispatch to _old or _big.
6155         (xcoff_write_archive_contents_old): Rename from
6156         xcoff_write_archive_contents.
6157         (xcoff_write_archive_contents_big): New function.
6158         (xcoff_write_archive_contents): New function, dispatch to _old or
6159         _big.
6160
6161 2000-02-18  Richard Henderson  <rth@cygnus.com>
6162
6163         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
6164         and hide_symbol members.
6165         (elf_link_hash_copy_indirect): Remove.
6166         (elf_link_hash_hide_symbol): Remove.
6167         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
6168         and elf_backend_hide_symbol.
6169         (_bfd_elf_link_hash_copy_indirect): Declare.
6170         (_bfd_elf_link_hash_hide_symbol): Declare.
6171         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
6172         (_bfd_elf_link_hash_hide_symbol): Likewise.
6173         (_bfd_elf_link_hash_table_init): Don't init killed members.
6174         * elflink.h (elf_link_add_object_symbols): Use the bed function
6175         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
6176         (elf_link_assign_sym_version): Likewise.
6177         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
6178         (elf_backend_hide_symbol): Likewise.
6179         (elfNN_bed): Update for new members.
6180
6181 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
6182
6183         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
6184         STACK_END_ADDR): Define for new core file format.
6185         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
6186         for handling the vagaries of the various core file structures used
6187         by AIX over the years.
6188         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
6189         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
6190         core_dumpx structure.
6191
6192 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
6193
6194         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
6195         (bfd_mach_sh3_dsp): Likewise.
6196         (bfd_mach_sh4): Reinstate.
6197         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
6198         * bfd-in2.h: Regenerate.
6199         * coff-sh.c (struct sh_opcode): flags is no longer short.
6200         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
6201         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
6202         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
6203         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
6204         (sh_opcodes): No longer const.
6205         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
6206         (sh_insn_uses_reg): Check for USESAS and USESR8.
6207         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
6208         (_bfd_sh_align_load_span): Return early for SH4.
6209         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
6210         Take into account that field b of a parallel processing insn
6211         could be mistaken for a separate insn.
6212         * cpu-sh.c (arch_info_struct): New array elements for
6213         sh2, sh-dsp and sh3-dsp.
6214         Reinstate element for sh4.
6215         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
6216         (SH4_NEXT): Reinstate.
6217         (SH3_NEXT, SH3E_NEXT): Adjust.
6218         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
6219         * elf32-sh.c (sh_elf_set_private_flags): New function.
6220         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
6221         (sh_elf_merge_private_data): New function.
6222         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
6223         (bfd_elf32_bfd_copy_private_bfd_data): Define.
6224         (bfd_elf32_bfd_merge_private_bfd_data): Change to
6225         sh_elf_merge_private_data.
6226
6227 2000-02-13  Richard Henderson  <rth@cygnus.com>
6228
6229         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
6230         hide_symbol members.
6231         (elf_link_hash_copy_indirect): New.
6232         (elf_link_hash_hide_symbol): New.
6233         * elflink.h (elf_link_add_object_symbols): Break out copy from
6234         indirect new new symbol to elf.c.
6235         (elf_link_assign_sym_version): Break out privatization of
6236         non-exported symbol to elf.c.
6237         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
6238         (_bfd_elf_link_hash_hide_symbol): New.
6239         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
6240
6241 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
6242
6243         * section.c (_bfd_strip_section_from_output): Add info parameter.
6244         If it passed as non-NULL, use it to check whether any input BFD
6245         has an input section which uses this output section.  Change all
6246         callers.
6247         * bfd-in2.h: Rebuild.
6248
6249         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
6250         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
6251         1999-11-29.
6252         * bfd-in2.h: Rebuild.
6253
6254 2000-02-10  Timothy Wall  <twall@cygnus.com>
6255
6256         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
6257         allow final modifications of swapped-in symbol.
6258         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
6259         * coffcode.h (coff_write_relocs): Use macro
6260         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
6261         symbol index should be set to -1.
6262
6263 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
6264
6265         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
6266         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
6267         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
6268         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
6269         sh_insns_uses_or_sets_freg): New functions.
6270         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
6271         * (sh_insns_conflict): Use new functions and new macros to
6272         detect conflicts when two instructions both set same integer registers,
6273         both set same fp register, and both set special register.
6274
6275 2000-02-09  Timothy Wall  <twall@cygnus.com>
6276
6277         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
6278         swapping in sections, so that the swapping routines have access to
6279         the arch/mach info.
6280
6281 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
6282
6283         * coff-go32.c: Update comment. Update copyright.
6284
6285 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
6286
6287         * syms.c (bfd_decode_symclass)
6288         Two new class characters were added - 'V' and 'v'.  The
6289         meaning of 'W' is now restricted to just weak non-object
6290         symbols.  This allows differentiation between, for example,
6291         weak functions vs weak objects.  nm for example now dumps:
6292         'W' = weak global
6293         'w' = weak unresolved
6294         'V' = weak global object
6295         'v' = weak unresolved object
6296
6297         (bfd_is_undefined_symclass): New function.  Return true if the
6298         given symbol class represents and undefined/unresolved symbol.
6299
6300         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
6301         unresolved symbols.
6302
6303         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
6304
6305         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
6306         STT_ARM_16BIT flag set, but it is not attached to a data object
6307         return STT_ARM_16BIT so that it will be treated as code by the
6308         disassembler.
6309
6310 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
6311
6312         * coff-i386.c (i3coff_object_p): Remove prototype.
6313         Update copyright.
6314
6315         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
6316         to name.  Update copyright.
6317
6318         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
6319         assignment to avoid warning.  Update copyright.
6320
6321 2000-01-24  Robert Lipe  (robertl@sco.com)
6322
6323         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
6324         instead of using GNU C extension.
6325
6326 2000-01-21  Nick Clifton  <nickc@cygnus.com>
6327
6328         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
6329         amount from a bfd_in_memory structure.
6330         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
6331         structure.
6332
6333 2000-01-14  Nick Clifton  <nickc@cygnus.com>
6334
6335         * linker.c (default_indirect_link_order): oops - fix incorrectly
6336         applied patch from Tim Wall.
6337
6338 2000-01-13  Timothy Wall (twall@tiac.net>
6339
6340         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
6341         = scnhsz, filhsz, relsz, aoutsz, etc)
6342
6343         * coffswap.h: Ditto.
6344
6345 2000-01-13  Nick Clifton  <nickc@cygnus.com>
6346
6347         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
6348         interwork thumb to arm stub.
6349
6350 2000-01-13  Timothy Wall (twall@tiac.net>
6351
6352         * archures.c (bfd_octets_per_byte): New function: Return
6353         target byte size.
6354         (bfd_arch_mach_octets_per_byte): New function: Return target
6355         byte size.
6356
6357         * section.c: Distinguish between octets and bytes for usage of
6358         _cooked_size,  _raw_size, and output_offset.  Clarify
6359         description of bfd_set_section_contents.
6360
6361         * bfd-in2.h: Regenerate.
6362
6363         * coffgen.c: Indicate that the offset parameter is in bytes, not
6364         octets.
6365
6366         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
6367         where appropriate to get the octet offset when calling
6368         bfd_set_section_contents.
6369         (bfd_coff_reloc_link_order): Ditto.
6370
6371         * linker.c (bfd_generic_reloc_link_order): Ditto.
6372         (_bfd_default_link_order): Ditto.
6373
6374         * reloc.c (bfd_perform_relocation):  Distinguish between octets
6375         and bytes.  Use octets when indexing into octet data; use bytes
6376         when calculating target addresses.
6377         (bfd_install_relocation): Ditto.
6378
6379         * srec.c (srec_write_section): Ditto.
6380
6381 2000-01-13  Nick Clifton  <nickc@cygnus.com>
6382
6383         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
6384         3 to 2.  This allows 4 byte sized sections, which is necessary for
6385         dlltool to build functioning DLLs.
6386
6387 2000-01-10  Philip Blundell  <pb@futuretv.com>
6388
6389         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
6390         (arm*-*-conix*): New target.
6391
6392 2000-01-10  Egor Duda  <deo@logos-m.ru>
6393
6394         * config.bfd: Include elf32_i386 vector to target list for cygwin
6395         and mingw.
6396
6397         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
6398         * configure.in: Test for structure win32_pstatus_t in
6399         <sys/procfs.h>
6400         * configure: Regenerate.
6401
6402         * elf.c (elfcore_grok_win32pstatus): New function: process
6403         win32_pstatus_t notes in elf core file.
6404         (elfcore_grok_note): Detect win32_pstatus notes.
6405
6406 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
6407
6408         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
6409         visibility.
6410         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
6411         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
6412
6413 For older changes see ChangeLog-9899
6414 \f
6415 Local Variables:
6416 mode: change-log
6417 left-margin: 8
6418 fill-column: 74
6419 version-control: never
6420 End: