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