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