2002-12-12 Alexandre Oliva <aoliva@redhat.com>
[binutils.git] / bfd / ChangeLog
blob1d42a4493b7fb507122dae9299908227075d3c65
1 2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
3         2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
4         * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
5         pcrel_relocs_copied.
6         2001-12-13  Alexandre Oliva  <aoliva@redhat.com>
7         * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
8         ld-linux.so.2 to ld.so.1.
9         2001-10-10  Alexandre Oliva  <aoliva@redhat.com>
10         * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
11         (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
12         (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
13         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
14         .rela.* section contents with bfd_zalloc.
15         2001-09-25  Alexandre Oliva  <aoliva@redhat.com>
16         * elf-m10300.c: Added declarations for functions missing them.
17         Merge some shared-library changes from the i386 back-end.  Use
18         R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
19         R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
20         (struct elf32_mn10300_link_hash_entry): Remove duplicates of
21         members of elf_link_hash_entry.  Adjusted references.
22         (mn10300_elf_final_link_relocate): dynobj was already loaded
23         into a local variable, use it.
24         2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
25         * elf-m10300.c: Add missing function prototypes.
26         2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
27         * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
28         relocation for dynamic relocations.
29         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
30         * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
31         * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
32         PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
33         (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
34         (_bfd_mn10300_elf_create_got_section): ... here, so that its
35         adress is already known at the time we compute relaxations.
36         (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
37         and PLT32 to narrower relocations.
38         * libbfd.h, bfd-in2.h: Rebuilt.
39         2001-04-12  Alexandre Oliva  <aoliva@redhat.com>
40         * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
41         BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
42         BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
43         BFD_RELOC_MN10300_RELATIVE): New relocs.
44         * libbfd.h, bfd-in2.h: Rebuilt.
45         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
46         (struct elf32_mn10300_link_hash_entry): Added DSO-related
47         fields.
48         (elf_mn10300_howto): Defined new relocation types.
49         (mn10300_reloc_map): Map them.
50         (_bfd_mn10300_elf_create_got_section): New fn.
51         (mn10300_elf_check_relocs): Handle PIC relocs.
52         (mn10300_elf_final_link_relocate): Likewise.
53         (mn10300_elf_relocate_section): Handle DSOs.
54         (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
55         (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
56         elf_mn10300_pic_plt_entry): New.
57         (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
58         elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
59         elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
60         elf_mn10300_plt_reloc_offset: New macros.
61         (ELF_DYNAMIC_INTERPRETER): Likewise.
62         (_bfd_mn10300_elf_create_dynamic_sections): New function.
63         (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
64         (_bfd_mn10300_elf_discard_copies): Likewise.
65         (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
66         (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
67         (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
68         (elf_backend_can_gc_sections,
69         elf_backend_create_dynamic_sections,
70         elf_backend_adjust_dynamic_sections,
71         elf_backend_size_dynamic_sections,
72         elf_backend_finish_dynamic_symbol,
73         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
74         elf_backend_plt_readonly, elf_backend_want_plt_sym,
75         elf_backend_got_header_size, elf_backend_plt_header_size): New
76         macros.
78 2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
80         2001-05-06  Alexandre Oliva  <aoliva@redhat.com>
81         * elf-m10300.c (compute_function_info): Account for AM33
82         registers in `movm' when computing stack space for `call' when
83         linking for AM33/2.0 link.
84         2000-04-01  Alexandre Oliva  <aoliva@cygnus.com>
85         * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
86         * bfd-in2.h: Rebuilt.
87         * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
88         * elf-m10300.c: Updated.
89         2000-03-31  Alexandre Oliva  <aoliva@cygnus.com>
90         * archures.c (bfd_mach_am332): Defined.
91         * bfd-in2.h: Rebuilt.
92         * cpu-m10300.c (bfd_am332_arch): Defined.
93         (bfd_am33_arch): Chained with am33-2.
94         * elf-m10300.c (elf_mn10300_mach): Handle am332.
95         (_bfd_mn10300_elf_final_write_processing): Likewise.
97 2003-07-09  H.J. Lu <hongjiu.lu@intel.com>
99         * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
101 2003-07-10  Alan Modra  <amodra@bigpond.net.au>
103         * elf64-ppc.c (bfd_elf64_mkobject): Define.
104         (struct ppc64_elf_obj_tdata): New.
105         (ppc64_elf_tdata, ppc64_tlsld_got): Define.
106         (ppc64_elf_mkobject): New function.
107         (struct got_entry): Add "owner".  Move "tls_type".
108         (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
109         (ppc64_elf_init_stub_bfd): New function.
110         (create_got_section): Create header .got in dynobj.  Create .got
111         and .rela.got in each bfd.  Stash pointers in ppc64_elf_obj_tdata.
112         (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
113         Look for dynobj .got, and test it.
114         (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
115         (update_local_sym_info): Likewise.
116         (ppc64_elf_check_relocs): Likewise.
117         (ppc64_elf_gc_sweep_hook): Likewise.
118         (ppc64_elf_tls_optimize): Likewise.
119         (allocate_dynrelocs): Likewise.
120         (ppc64_elf_size_dynamic_sections): Likewise.
121         (ppc64_elf_relocate_section): Likewise.
122         (ppc64_elf_next_toc_section): Update comment.
123         (toc_adjusting_stub_needed): Remove unneeded cast.
124         (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
125         testing section flags.
126         (ppc64_elf_build_stubs): Likewise.
127         (ppc64_elf_size_stubs): Likewise.  Remove stub_bfd param.
128         (ppc64_elf_finish_dynamic_sections): Write out got sections.
129         (func_desc_adjust): Copy over dynamic info for undef weaks.
130         * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
131         (ppc64_elf_size_stubs): Update prototype.
132         * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
133         input sections rather than scanning dynobj.
135 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
137         * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
138         (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
139         (mips_elf_create_msym_section): Delete.
140         (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
141         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
142         (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
143         (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
144         (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
145         (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
146         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
148 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
150         * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
151         symbols protected.
153 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
155         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
156         of relocations whose offset is -2.
158 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
160         * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
161         forced-local symbols like other locals.  Don't create relocations
162         against STN_UNDEF in irix objects.
164 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
166         * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
167         compatible objects, add the values of defined external symbols
168         to the addend.
170 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
172         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
173         initialize a GOT entry to the symbol's st_value.
175 2003-07-08  Alan Modra  <amodra@bigpond.net.au>
177         * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
178         * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here.  New.
179         (ppc_elf_tdata): Define.
180         (elf_local_ptr_offsets): Adjust.
181         (ppc_elf_mkobject): New function.
182         (bfd_elf32_mkobject): Define.
184         * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
185         * elfcore.h (elf_core_file_p): Likewise.
186         * section.c (bfd_section_init): Remove prototype.
188 2003-07-08  Alan Modra  <amodra@bigpond.net.au>
190         * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
191         field.
192         (enum elf_linker_section_enum): Delete.
193         (struct elf_linker_section): Delete.
194         (struct elf_linker_section_pointers): Delete.
195         (struct elf_obj_tdata): Remove #if 0 chunk.  Remove linker_section.
196         Make linker_section_pointers a void**.
197         (elf_local_ptr_offsets, elf_linker_section): Don't define.
198         * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
199         of old item in elf-bfd.h.
200         (struct elf_linker_section): Likewise.
201         (struct elf_linker_section_pointers): Likewise.
202         (elf_local_ptr_offsets): Define.
203         (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
204         (ppc_elf_link_hash_newfunc): Init it.
205         (struct ppc_elf_link_hash_table): Add sbss.
206         (ppc_elf_link_hash_table_create): zmalloc rather than clearing
207         individual fields.
208         (elf_create_linker_section): Fold into..
209         (ppc_elf_create_linker_section): ..here.  Remove hole_size code.
210         Make rela section here if shared.
211         (elf_find_pointer_linker_section): Pass lsect rather than enum.
212         (elf_create_pointer_linker_section): Adjust.  zalloc rather than
213         clearing in a loop.
214         (elf_finish_pointer_linker_section): Adjust.  Don't make rela
215         section here.
216         (ppc_elf_check_relocs): Adjust.
217         (ppc_elf_add_symbol_hook): Tighten hash creator test.  Remove code
218         creating .sbss by hand.
219         * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
221 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
223         * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
224         complain_overflow_bitfield.
225         * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
226         complain_overflow_bitfield.
228 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
230         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
231         true even if -pie.
233 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
235         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
236         (elfNN_ia64_dynamic_symbol_p): Change info->shared into
237         !info->executable.
238         (get_fptr): For -pie create .opd as writable section and create
239         .rela.opd as well.
240         (elfNN_ia64_check_relocs): Change info->shared into
241         !info->executable.
242         (allocate_fptr): Likewise.
243         (allocate_dynrel_entries): Account for a relative reloc for -pie
244         @fptr().  Don't account for a relative reloc if -pie want_ltoff_fptr
245         for undefweak symbol.  Account for an IPLT reloc in .rela.opd
246         section if -pie.
247         (set_got_entry): Don't create a relative reloc if -pie
248         want_ltoff_fptr for undefweak symbol.
249         (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
250         (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
251         @fptr().
253         * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
254         even if -pie.
255         * elf32-i386.c (elf_i386_relocate_section): Likewise.
256         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
257         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
258         * elf64-s390.c (elf_s390_relocate_section): Likewise.
259         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
260         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
261         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
262         * elf32-s390.c (elf_s390_relocate_section): Likewise.
263         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
265 2003-07-04  Paul Clarke <paulc@senet.com.au>
267         * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
268         (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
269         <R_H8_DIR32A16>: Fix type of relocation.
271 2003-07-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
273         * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
274         sections were created already.  Remove unnecessary tests of
275         the previous change.
277 2003-07-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
279         * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
280         bfd_make_section for existing sections.
282 2003-07-04  Alan Modra  <amodra@bigpond.net.au>
284         * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
285         create_got_section if we already have done so.
286         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
287         (sh_elf_check_relocs): Likewise.
288         (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var.  Use
289         htab->root.dynobj instead.
290         (sh_elf_check_relocs): Likewise.
291         (sh_elf_finish_dynamic_sections): Likewise.
293         * section.c (bfd_make_section): Return NULL for existing section.
295 2003-07-04  Alan Modra  <amodra@bigpond.net.au>
297         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
298         ppc_elf_create_got if we've already done so.
300         * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
301         (_bfd_elf_find_pointer_linker_section): Likewise.
302         (bfd_elf32_create_pointer_linker_section): Likewise.
303         (bfd_elf32_finish_pointer_linker_section): Likewise.
304         (bfd_elf64_create_pointer_linker_section): Likewise.
305         (bfd_elf64_finish_pointer_linker_section): Likewise.
306         (_bfd_elf_make_linker_section_rela): Likewise.
307         * elfcode.h (elf_create_pointer_linker_section): Don't define.
308         (elf_finish_pointer_linker_section): Likewise.
309         * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
310         (_bfd_elf_create_linker_section): Move this function..
311         (_bfd_elf_find_pointer_linker_section): ..and this..
312         * elflink.h (elf_create_pointer_linker_section): ..and this..
313         (elf_finish_pointer_linker_section): ..and this..
314         * elf32-ppc.c: ..to here, renaming to the following, and adjusting
315         calls.
316         (elf_create_linker_section): Convert to C90, tidy.
317         (elf_find_pointer_linker_section): Likewise.
318         (elf_create_pointer_linker_section): Likewise.
319         (elf_finish_pointer_linker_section): Likewise.
320         * elf32-i370.c: Delete #if 0 code.
322 2003-07-02  Alan Modra  <amodra@bigpond.net.au>
324         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
325         _restf* to be satisfied by shared libs, and always force them local.
326         (toc_adjusting_stub_needed): Avoid scanning linker created sections.
327         Correct test for "bl".
328         (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
329         primary opcode 31.
331 2003-07-01  Martin Schwidefsky  <schwidefsky@de.ibm.com>
333         * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
334         (s390_tls_reloc): New function.
335         (elf_howto_table): Add long displacement relocations R_390_20,
336         R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
337         (elf_s390_reloc_type_lookup): Likewise.
338         (elf_s390_check_relocs): Likewise.
339         (elf_s390_gc_sweep_hook): Likewise.
340         (elf_s390_relocate_section): Likewise.
341         * elf64-s390.c: Same changes as for elf32-s390.c.
342         * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
343         BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
344         BFD_RELOC_390_TLS_GOTIE20.
345         * bfd-in2.h: Regenerate.
346         * libbfd.h: Likewise.
348 2003-06-30  Alan Modra  <amodra@bigpond.net.au>
350         * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
351         (ins_imms, ins_immsm1u4): Likewise.  Warning fix.
353 2003-06-29  Alan Modra  <amodra@bigpond.net.au>
355         * archive.c: Convert to C90, remove unnecessary prototypes and casts.
356         Replace PTR with void *.  Formatting.
357         * archive64.c: Likewise.
358         * archures.c: Likewise.
359         * bfd-in.h: Likewise.
360         * bfd.c: Likewise.
361         * bfdio.c: Likewise.
362         * bfdwin.c: Likewise.
363         * cache.c: Likewise.
364         * corefile.c: Likewise.
365         * format.c: Likewise.
366         * init.c: Likewise.
367         * libbfd-in.h: Likewise.
368         * libbfd.c: Likewise.
369         * linker.c: Likewise.
370         * opncls.c: Likewise.
371         * reloc.c: Likewise.
372         * section.c: Likewise.
373         * simple.c: Likewise.
374         * syms.c: Likewise.
375         * targets.c: Likewise.
376         * bfd-in2.h: Regenerate.
377         * libbfd.h: Regenerate.
379         * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
380         * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
381         * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
382         (bfd_getb64): Rewrite without parens.
383         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
384         * cache.c (insert, snip): Remove INLINE.
385         * linker.c (bfd_link_add_undef): Likewise.
387 2003-06-29  Andreas Jaeger  <aj@suse.de>
389         * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
390         unnecessary prototypes.  Replace PTR with void *.
391         (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
392         trim plt entries.  Move undefweak non-default visibility test ...
393         (allocate_dynrelocs): ... from here.
394         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
395         Change all callers.
396         (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.  Use
397         SYMBOL_REFERENCES_LOCAL for dynreloc check.
398         (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
399         dynreloc and .got relocs.
400         (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
401         for .got relocs.
403 2003-06-29  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
405         * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
407 2003-06-27  Nick Clifton  <nickc@redhat.com>
409         * opncls.c (bfd_add_gnu_debuglink_section): Rename to
410         bfd_add_gnu_debuglink_section and only create the section, do not
411         fill in its contents.
412         (bfd_fill_in_gnu_debuglink_section): New function.  Fill in the
413         contents of a .gnu-debuglink section.
414         * bfd-in2.h: Regenerate.
416 2003-06-27  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
418         * elfxx-mips.c: Revert .got alignment to 2**4.
420 2003-06-27  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
422         * elf32-mips.c: Fix addend for _gp_disp special symbol.
424 2003-06-27  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
426         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
427         relocation header setup.
429 2003-06-25  Alan Modra  <amodra@bigpond.net.au>
431         * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
432         (ppc_elf_reloc_type_lookup): Modify comment.
433         (ppc_elf_info_to_howto): Ditto.
434         (ppc_elf_relocate_section): Ditto.
435         (ppc_elf_check_relocs): Call ppc_elf_howto_init.
437 2003-06-25  Alan Modra  <amodra@bigpond.net.au>
439         * aout-ns32k.c: Correct spelling of "relocatable".
440         * aoutx.h: Likewise.
441         * bfd-in.h: Likewise.
442         * bfd.c: Likewise.
443         * bout.c: Likewise.
444         * coff-a29k.c: Likewise.
445         * coff-alpha.c: Likewise.
446         * coff-arm.c: Likewise.
447         * coff-i386.c: Likewise.
448         * coff-i860.c: Likewise.
449         * coff-i960.c: Likewise.
450         * coff-m68k.c: Likewise.
451         * coff-m88k.c: Likewise.
452         * coff-mcore.c: Likewise.
453         * coff-mips.c: Likewise.
454         * coff-or32.c: Likewise.
455         * coff-ppc.c: Likewise.
456         * coff-rs6000.c: Likewise.
457         * coff-sh.c: Likewise.
458         * coff-tic80.c: Likewise.
459         * coff64-rs6000.c: Likewise.
460         * cofflink.c: Likewise.
461         * cpu-ns32k.c: Likewise.
462         * ecoff.c: Likewise.
463         * ecofflink.c: Likewise.
464         * elf-bfd.h: Likewise.
465         * elf-eh-frame.c: Likewise.
466         * elf-hppa.h: Likewise.
467         * elf-m10200.c: Likewise.
468         * elf-m10300.c: Likewise.
469         * elf.c: Likewise.
470         * elf32-arm.h: Likewise.
471         * elf32-avr.c: Likewise.
472         * elf32-cris.c: Likewise.
473         * elf32-d10v.c: Likewise.
474         * elf32-dlx.c: Likewise.
475         * elf32-fr30.c: Likewise.
476         * elf32-frv.c: Likewise.
477         * elf32-h8300.c: Likewise.
478         * elf32-hppa.c: Likewise.
479         * elf32-i370.c: Likewise.
480         * elf32-i386.c: Likewise.
481         * elf32-i860.c: Likewise.
482         * elf32-i960.c: Likewise.
483         * elf32-ip2k.c: Likewise.
484         * elf32-iq2000.c: Likewise.
485         * elf32-m32r.c: Likewise.
486         * elf32-m68hc11.c: Likewise.
487         * elf32-m68hc1x.c: Likewise.
488         * elf32-m68k.c: Likewise.
489         * elf32-mcore.c: Likewise.
490         * elf32-mips.c: Likewise.
491         * elf32-msp430.c: Likewise.
492         * elf32-openrisc.c: Likewise.
493         * elf32-ppc.c: Likewise.
494         * elf32-s390.c: Likewise.
495         * elf32-sh.c: Likewise.
496         * elf32-sh64.c: Likewise.
497         * elf32-sparc.c: Likewise.
498         * elf32-v850.c: Likewise.
499         * elf32-vax.c: Likewise.
500         * elf32-xstormy16.c: Likewise.
501         * elf32-xtensa.c: Likewise.
502         * elf64-alpha.c: Likewise.
503         * elf64-hppa.c: Likewise.
504         * elf64-mips.c: Likewise.
505         * elf64-mmix.c: Likewise.
506         * elf64-ppc.c: Likewise.
507         * elf64-s390.c: Likewise.
508         * elf64-sh64.c: Likewise.
509         * elf64-sparc.c: Likewise.
510         * elf64-x86-64.c: Likewise.
511         * elfcode.h: Likewise.
512         * elflink.h: Likewise.
513         * elfn32-mips.c: Likewise.
514         * elfxx-ia64.c: Likewise.
515         * elfxx-mips.c: Likewise.
516         * i386linux.c: Likewise.
517         * ieee.c: Likewise.
518         * libcoff-in.h: Likewise.
519         * linker.c: Likewise.
520         * m68klinux.c: Likewise.
521         * pdp11.c: Likewise.
522         * pe-mips.c: Likewise.
523         * peXXigen.c: Likewise.
524         * reloc.c: Likewise.
525         * reloc16.c: Likewise.
526         * sparclinux.c: Likewise.
527         * sunos.c: Likewise.
528         * syms.c: Likewise.
529         * versados.c: Likewise.
530         * vms.c: Likewise.
531         * xcofflink.c: Likewise.
532         * bfd-in2.h: Regenerate.
533         * libcoff.h: Regenerate.
534         * libbfd.h: Regenerate.
536 2003-06-24  Alan Modra  <amodra@bigpond.net.au>
538         * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
539         local sym errors.
541         * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
542         prototypes and casts.  Replace PTR with void *.  Formatting.
543         * elf32-ppc.c: Likewise.  Break long strings too.
544         (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
545         (ppc_elf_unhandled_reloc): Internationalize error message.
546         * elf32-ppc.h: Remove PARAMS.
548 2003-06-23  Mark Mitchell  <mark@codesourcery.com>
550         * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
551         APUinfo slots.
552         (ppc_elf_final_write_processing): Likewise.
554 2003-06-23  H.J. Lu <hongjiu.lu@intel.com>
556         * elflink.h (elf_link_input_bfd): Check raw size when using
557         kept_section to preserve debug information discarded by
558         linkonce.
560 2003-06-20  Alan Modra  <amodra@bigpond.net.au>
562         * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
563         (ppc64_elf_setup_section_lists): Set it.
564         (ppc64_elf_relocate_section): Check sym section id against top_id.
565         (ppc_build_one_stub): Comment on top_id.
567 2003-06-20  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
569         * config.bfd: Add tic4x-*-rtems*.
571 2003-06-20  Alan Modra  <amodra@bigpond.net.au>
573         * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
574         prototypes and casts.  Replace PTR with void *.  Format copyright.
575         Mention ABI links.
576         (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
577         sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
578         (ppc_type_of_stub): Make r_type an enum.
579         (ppc64_elf_size_stubs): Likewise.
580         * elf64-ppc.h: Remove PARAMS macro.
582 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
584         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
585         elf hash tab fields.
587         * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
588         (ppc64_elf_info_to_howto): Likewise.
589         (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
590         * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
592 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
594         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
595         reloc overflow on discarded eh_frame entries.
597 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
599         * elf64-ppc.c (toc_adjusting_stub_needed): New function.
600         (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
601         Return error condition.
602         (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
603         that have has_gp_reloc set.
604         (struct ppc_link_hash_table): Add stub_count.
605         (ppc_build_one_stub): Increment it.
606         (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
607         individual fields.
608         * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
610 2003-06-18  Alan Modra  <amodra@bigpond.net.au>
612         * elflink.h (elf_gc_record_vtentry): Revert last change.  Correct
613         size calculation from addend.  Round size up.
615 2003-06-18  Hans-Peter Nilsson  <hp@axis.com>
617         * elf32-cris.c (cris_elf_relocate_section) <case
618         R_CRIS_32_GOTREL>: When linking a program, don't complain about a
619         symbol from a normal object or an undefined weak symbol.
621 2003-06-18  Alan Modra  <amodra@bigpond.net.au>
623         * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
624         R_PPC64_TOC relocs.
626 2003-06-17  H.J. Lu <hongjiu.lu@intel.com>
628         * section.c (struct sec): Put back kept_section.
629         (STD_SECTION): Put back kept_section initialization.
630         * bfd-in2.h: Regenerate.
632         * elflink.h (elf_link_input_bfd): Also check discarded linkonce
633         sections for relocateable output. Use kept_section to preserve
634         debug information discarded by linkonce.
636 2003-06-17  Roland McGrath  <roland@redhat.com>
638         * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
639         segment-relative relocation between different segments.
641 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
643         * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
644         optimizations earlier.
646         * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
647         Restore previous input_list type.
648         (ppc64_elf_link_hash_table_create): Undo last change.
649         (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
650         per output section, but don't bother with bfd_abs_section marker.
651         (ppc64_elf_next_input_section): Adjust for multiple input section
652         lists.
653         (group_sections): Likewise.
655 2003-06-17  Jakub Jelinek  <jakub@redhat.com>
657         * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
658         *r_offset == r_addend for RELATIVE relocs against .got.
660 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
662         * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
664 2003-06-17  Nick Clifton  <nickc@redhat.com>
666         * elflink.h (elf_gc_record_vtentry): Allocate an extra element
667         in the vtable_entries_used array to allow for the accessing
668         the largest element.
670 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
672         * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index.  Modify
673         input_list.
674         (ppc64_elf_link_hash_table_create): Init input_list here.
675         (ppc64_elf_setup_section_lists): Remove code setting up input lists
676         per output section.  Set toc_off for abs and other standard sections.
677         (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
678         (ppc64_elf_next_input_section): Adjust for single input section list.
679         Don't set toc_curr from input bfds that haven't set elf_gp.
680         (group_sections): Adjust for single input section list.
682         * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
684 2003-06-16  Alan Modra  <amodra@bigpond.net.au>
686         * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
687         tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
688         dtprel entry.  Ensure TLS_LD DTPMOD reloc has a zero addend.  Write
689         got section for RELATIVE relocs.  Fix wrong comment.  Change condition
690         under which dynamic relocs update the section contents.
692 2003-06-13  Robert Millan  <zeratul2@wanadoo.es>
694         * config.bfd: Add i386-netbsd-gnu target.
696 2003-06-12  Nick Clifton  <nickc@redhat.com>
698         * opncls.c (calc_crc32): Rename to
699         bfd_calc_gnu_debuglink_crc32 and export.
700         (GNU_DEBUGLINK): Define and use to replace occurrences of
701         hard-coded ".gnu_debuglink" in the code.
702         (get_debug_link_info): Prevent aborts by replacing call to
703         xmalloc with a call to malloc.
704         (find_separate_debug_file): Prevent aborts by replacing calls
705         to xmalloc and xstrdup with calls to malloc and strdup.
706         (bfd_add_gnu_debuglink): New function.  Add a .gnu_debuglink
707         section to a bfd.
708         * bfd-in2.h: Regenerate.
710 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
712         * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
713         New target (was i[3-7]86-*-openbsd* before).
714         (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
715         (vax-*-openbsd*): New target.
717 2003-06-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
719         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
720         for n32, too.
721         (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
722         (mips_elf_rel_dyn_section): Use appropriate section alignment.
723         (mips_elf_create_got_section): Likewise.
724         (_bfd_mips_elf_create_dynamic_sections): Likewise.
726 2003-06-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
728         * elf32-mips.c (mips_elf_generic_reloc): New Function.
729         (elf_mips_howto_table_rel): Use it.
730         (gprel32_with_gp): Move prototype.
731         (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
732         Use mips_elf_generic_reloc.
733         (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
734         Code cleanup.
735         (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
736         zero addend.
737         (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
738         as in the other *_gprel*_reloc functions.
739         (gprel32_with_gp): Handle partial_inplace properly.
740         (mips32_64bit_reloc): Use mips_elf_generic_reloc.
741         (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
742         Do addend handling directly instead of calling
743         _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
744         * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
745         of zero addend. Handle partial_inplace properly.
746         (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
747         addend.
748         (mips_elf64_gprel16_reloc): Likewise.
749         (mips_elf64_literal_reloc): Likewise.
750         (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
751         logic as in the other *_gprel*_reloc functions. Handle
752         partial_inplace properly.
753         (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
754         addend. Handle partial_inplace properly.
755         (mips16_gprel_reloc): Likewise. Do addend handling directly instead
756         of calling _bfd_mips_elf_gprel16_with_gp.
757         * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
758         (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
759         of zero addend.
760         (mips_elf_shift6_reloc): Handle partial_inplace properly.
761         (mips16_gprel_reloc): Likewise. Do addend handling directly instead
762         of calling _bfd_mips_elf_gprel16_with_gp.
763         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
764         partial_inplace properly. Fix wrong addend handling. Fix overflow
765         check.
766         (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
767         exported.
768         (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
769         (_bfd_mips_elf_relocate_section): Likewise.
770         (mips_elf_create_dynamic_relocation): Update sec_info_type access.
771         * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
772         (_bfd_mips_elf_sign_extend): New prototype.
774 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
776         * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
777         New target (was sparc-*-openbsd* before).
778         (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
780         * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
781         * configure: Regenerate.
783 2003-06-11  H.J. Lu <hongjiu.lu@intel.com>
785         * po/Make-in (DESTDIR): New.
786         (install-data-yes): Support $(DESTDIR).
787         (uninstall): Likewise.
789 2003-06-11  Alan Modra  <amodra@bigpond.net.au>
791         * Makefile.am (config.status): Depend on version.h.
792         Run "make dep-am".
793         * Makefile.in: Regenerate.
794         * po/SRC-POTFILES.in: Regenerate.
796 2003-06-10  Alan Modra  <amodra@bigpond.net.au>
797             Gary Hade <garyhade@us.ibm.com>
799         * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
801 2003-06-10  Richard Sandiford  <rsandifo@redhat.com>
803         * archures.c (bfd_mach_h8300sxn): New architecture.
804         * bfd-in2.h: Regenerate.
805         * cpu-h8300.c (h8300_scan): Check for 'sxn'.
806         (h8300sxn_info_struct): New.
807         (h8300sx_info_struct): Link to it.
808         * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
809         (elf32_h8_final_write_processing): Likewise.
811 2003-06-08  Alan Modra  <amodra@bigpond.net.au>
813         * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
814         elfxx-target.h so that we can use elf_backend_got_header_size.
815         (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
816         (GLINK_CALL_STUB_SIZE): Modify.  Define new glink call stub and
817         associated macros.
818         (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
819         dst_mask.
820         (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
821         ppc_stub_plt_branch_r2off.
822         (struct ppc_stub_hash_entry): Reorganize.
823         (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
824         toc_curr, toc_off and emit_stub_syms.
825         (ppc64_elf_link_hash_table_create): Init them.
826         (ppc_stub_name): Correct string size.
827         (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
828         (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
829         used.
830         (ppc_type_of_stub): Tweak root.type test.
831         (build_plt_stub): Remove glink code.  Adjust for insn macro changes.
832         (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
833         ppc_stub_plt_branch_r2off.
834         (ppc_build_one_stub): Likewise.  Fix var shadowing.  Correct addis,addi
835         range test.  Use toc_off to calculte r2 values.  Handle emit_stub_syms.
836         (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
837         Initialize elf_gp and toc_curr.
838         (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
839         (ppc64_elf_next_input_section): Set toc_off.
840         (group_sections): Ensure groups have the same TOC.
841         (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
842         (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
843         Build new glink stub.
844         (ppc64_elf_relocate_section): Handle multiple TOCs.  Fix comments.
845         (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
846         * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
847         (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
848         * section.c (struct sec): Rename flag12 to has_gp_reloc.
849         (STD_SECTION): Update.
850         * ecoff.c (bfd_debug_section): Update comment.
851         * bfd-in2.h: Regenerate.
853 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
855         * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
856         NULL function pointers.
858 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
860         * simple.c (bfd_simple_get_relocated_section_contents): Call
861         _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
863 2003-06-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
865         * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
866         ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
867         swaptables.
868         * coff-tic4x.c: Ditto
869         * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
870         and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
871         CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
872         ticoff1_bad_format_hook() functions. Created the coff0 and coff1
873         swap tables.
874         * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
875         * coff-a29k.c: Append COFF_SWAP_TABLE argument
876         * coff-apollo.c: Ditto
877         * coff-arm.c: Ditto
878         * coff-h8300.c: Ditto
879         * coff-h8500.c: Ditto
880         * coff-i960.c: Ditto
881         * coff-m68k.c: Ditto
882         * coff-m88k.c: Ditto
883         * coff-mcore.c: Ditto
884         * coff-sh.c: Ditto
885         * coff-sparc.c: Ditto
886         * coff-tic80.c: Ditto
887         * coff-we32k.c: Ditto
888         * coff-z8k.c: Ditto
889         * coff-w65.c: Ditto
891 2003-06-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
893         * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
894         initialization bug
896 2003-06-03  Jakub Jelinek  <jakub@redhat.com>
898         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
899         (bfd_section_from_phdr): Likewise.
900         (map_sections_to_segments): Create PT_GNU_STACK segment header.
901         (get_program_header_size): Count with PT_GNU_STACK.
902         * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
903         * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
905 2003-06-03  H.J. Lu <hongjiu.lu@intel.com>
907         * elflink.h (elf_link_input_bfd): Call linker error_handler
908         for discarded definitions.
910 2003-06-03  Elias Athanasopoulos  <elathan@phys.uoa.gr>
912         * syms.c (decode_section_type): Return 'n' if section flags are
913         SEC_HAS_CONTENTS && SEC_READONLY.
915 2003-06-03  Nick Clifton  <nickc@redhat.com>
917         * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
918         R_V850_ABS32.  Add entry for R_V850_REL32.
919         (v850_elf_reloc_map): Likewise.
920         (v850_elf_check_relocs): Likewise.
921         (v850_elf_perform_relocation): Likewise.
922         (v850_elf_final_link_relocate): Likewise.  Include computation
923         to make R_V850_REl32 pc-relative.
925 2003-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
927         * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
928         and DT_DEBUG dynamic tag even for position independent executables.
929         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
931 2003-06-02  Daniel Jacobowitz  <drow@mvista.com>
933         * config.bfd: Move obsolete entries out of the range of the
934         targmatch sed script.
936 2003-06-02  Daniel Jacobowitz  <drow@mvista.com>
938         * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
940 2003-05-31  Jakub Jelinek  <jakub@redhat.com>
942         * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
943         plt entries, not just 8191.
945 2003-05-30  Daniel Jacobowitz  <drow@mvista.com>
947         * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
948         Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
950 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
951             Jakub Jelinek  <jakub@redhat.com>
953         * elflink.h (elf_link_add_object_symbols): Use !info->executable
954         instead of info->shared where appropriate.
955         (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
956         * elflink.c (_bfd_elf_create_got_section): Likewise.
957         (_bfd_elf_link_create_dynamic_sections): Likewise.
958         (_bfd_elf_link_assign_sym_version): Likewise.
959         * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
960         and DT_DEBUG dynamic tag even for position independent executables.
961         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
962         * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
963         * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
964         * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
965         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
966         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
967         * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
968         * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
969         * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
971 2003-05-30  Kris Warkentin <kewarken@qnx.com>
973         * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
974         signalled thread.
975         (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
977 2003-05-29  Nick Clifton  <nickc@redhat.com>
979         * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
980         Tidy up formatting.
981         * Makefile.am: Add dependency on safe-ctype.h.
982         * Makefile.in: Regenerate.
984 2003-05-29  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
986         * elfxx-mips.c: Don't force symbols local unconditionally.
988 2003-05-28  Alan Modra  <amodra@bigpond.net.au>
990         * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
991         undefined_symbol call.
993 2003-05-27  Richard Sandiford  <rsandifo@redhat.com>
995         * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
996         (mips_elf_link_hash_table): Likewise.
998 2003-05-22  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1000         * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1001         R_MIPS_GNU_REL16_S2 support.
1002         (bfd_elf64_bfd_reloc_type_lookup): Use it.
1003         (mips_elf64_rtype_to_howto): Use it.
1004         * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1005         R_MIPS_GNU_REL16_S2 support.
1006         (bfd_elf32_bfd_reloc_type_lookup): Use it.
1007         (mips_elf_n32_rtype_to_howto): Use it.
1009 2003-05-21  Stuart F. Downing  <sdowning@fame.com>
1011         * som.h: Define PA_2_0 before including a.out.h
1013 2003-05-07  Eric Christopher  <echristo@redhat.com>
1014             Alexandre Oliva   <aoliva@redhat.com>
1016         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1017         pic tests, change to warning.
1018         (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1020 2003-05-21  Marcus Comstedt  <marcus@mc.pp.se>
1022         * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1023         well as shle-...-netbsdelf.  Remove duplicate entry.
1025 2003-05-21  Nick Clifton  <nickc@redhat.com>
1027         * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1028         for X_STORMY16_REL_12 reloc.
1030         * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
1031         the type of the hash table in the bfd_link_info structure.
1032         (bfd_elf_get_runpath_list): Likewise.
1034 2003-05-19  Roland McGrath  <roland@redhat.com>
1036         * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1037         * bfd-in.h: Declare it.
1038         * bfd-in2.h: Regenerated.
1039         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1040         * elf-bfd.h (struct elf_backend_data): New function pointer member
1041         elf_backend_bfd_from_remote_memory.
1042         (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1043         Declare them.
1044         * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1045         (elfNN_bed): Add that to the initializer.
1047 2003-05-15  Roland McGrath  <roland@redhat.com>
1049         * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1051 2003-05-20  Jakub Jelinek  <jakub@redhat.com>
1053         * elflink.h (elf_link_output_extsym): Only issue error about !=
1054         STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1056 2003-05-20  H.J. Lu <hongjiu.lu@intel.com>
1058         * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1059         when removing the old definition for symbols with non-default
1060         visibility.
1062 2003-05-18  Jason Eckhardt  <jle@rice.edu>
1064         * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1066 2003-05-17  Andreas Schwab  <schwab@suse.de>
1068         * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1069         elf_section_data during processing of pc-relative and absolute
1070         relocations.
1071         (elf_m68k_relocate_section): Use the cached reloc section instead
1072         of computing it again.  Fix handling of visibility.  Don't modify
1073         addend when copying over a relocation into the output.
1075 2003-05-17  Alan Modra  <amodra@bigpond.net.au>
1077         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1078         to trim plt entries.  Move undefweak non-default visibility test..
1079         (allocate_dynrelocs): ..from here.
1080         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1081         dynamic_sections_created here.  Update comment.  Move undefweak
1082         non-default visibility test..
1083         (allocate_dynrelocs): ..from here.  Fix comment.
1084         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1085         to trim plt entries.  Move undefweak non-default visibility test..
1086         (allocate_dynrelocs): ..from here.  Fix comment.
1087         * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1088         STV_DEFAULT rather than comparing with zero.
1089         * elflink.c (_bfd_elf_merge_symbol): Likewise.
1090         (_bfd_elf_fix_symbol_flags): Likewise.  Format comment.
1092 2003-05-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1094         * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1095         pointers.
1096         (_bfd_set_gp_value): Likewise.
1098 2003-05-16  Michael Snyder  <msnyder@redhat.com>
1099         From Bernd Schmidt  <bernds@redhat.com>
1100         * archures.c (bfd_mach_h8300sx): New.
1101         * bfd-in2.h: Regenerate.
1102         * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1103         (h8300sx_info_struct): New.
1104         (h8300s_info_struct): Link to it.
1105         * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1106         (elf32_h8_final_write_processing): Likewise.
1107         (elf32_h8_relax_section): Likewise.
1109 2003-05-16  Kelley Cook  <kelleycook@wideopenwest.com>
1111         * config.bfd: Accept i[3-7]86 variants.
1112         * configure.host: Likewise.
1113         * configure.in: Likewise.
1114         * configure: Regenerate.
1116 2003-05-15  H.J. Lu <hongjiu.lu@intel.com>
1118         * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1119         symbol.
1121 2003-05-15  H.J. Lu <hongjiu.lu@intel.com>
1123         * elflink.h (elf_link_check_versioned_symbol): Also allow
1124         the base version.
1126 2003-05-15  Alan Modra  <amodra@bigpond.net.au>
1127             H.J. Lu <hongjiu.lu@intel.com>
1129         * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1130         (elf_i386_relocate_section): Likewise.
1131         * elf32-ppc.c (allocate_dynrelocs): Likewise.
1132         (ppc_elf_relocate_section): Likewise.
1133         * elf64-ppc.c (allocate_dynrelocs): Likewise.
1134         (ppc64_elf_relocate_section): Likewise.
1136 2003-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1138         * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1140 2003-05-13  Stephane Carrez  <stcarrez@nerim.fr>
1142         * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1143         processor capability, allow merge of HC12 and HCS12 in some cases.
1144         (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1145         * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1146         (bfd_m68hc12_arch): Link it.
1147         (scan_mach): New function.
1149 2003-05-13  Andrew Haley  <aph@redhat.com>
1151         * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1153 2003-05-13  Alan Modra  <amodra@bigpond.net.au>
1154             H.J. Lu  <hongjiu.lu@intel.com>
1156         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1157         elf32-ppc.c.  Add ELF_LINK_FORCED_LOCAL check.
1158         * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1159         (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1160         (ppc_elf_relocate_section): Likewise.
1161         * elf64-ppc.c (allocate_dynrelocs): Likewise.
1162         (ppc64_elf_relocate_section): Likewise.  Use for .got relocs too.
1163         (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1164         relocs need no other types.
1165         * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1166         dynreloc check.
1167         (elf_i386_relocate_section): Likewise.  Use for .got relocs too.
1168         (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1169         .got relocs.
1171 2003-05-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1173         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1174         copy ELF_LINK_NON_GOT_REF from weakdef.
1175         (allocate_dynrelocs): For undef weak syms with non-default
1176         visibility, a) don't allocate plt entries, b) don't allocate
1177         .got relocs, c) discard dyn rel space
1178         (sh_elf_relocate_section): d) don't generate .got relocs, e)
1179         don't generate dynamic relocs.
1180         (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1181         for weakdefs when symbol already adjusted.
1183 2003-05-12  Nick Clifton  <nickc@redhat.com>
1185         * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1186         overflow detection for R_XSTORMY16_16 reloc.
1188 2003-05-12  Paul Clarke  <paulc@senet.com.au>
1190         * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1192 2003-05-11  Jason Eckhardt  <jle@rice.edu>
1194         * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1195         adjust upper bits.
1196         (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1197         proper place.
1198         (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1199         proper place.
1201 2003-05-11  Andreas Schwab  <schwab@suse.de>
1203         * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1204         complicated tests for unresolvable relocs with a simple direct
1205         scheme using "unresolved_reloc" var.  Report some detail on
1206         bfd_reloc_outofrange and similar errors.
1208 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1210         * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1211         Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1212         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1213         * elf64-s390.c: Likewise.
1215 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1217         * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1218         (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1219         ELF_LINK_NON_GOT_REF from weakdef.
1220         (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1221         already been adjusted before treating it specially.
1222         * el64-s390.c: Likwise.
1224 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1226         * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1227         non-default visibility, a) don't make them dynamic, b) discard
1228         space for dynamic relocs.
1229         (elf_s390_relocate_section): Initialize the GOT entries and skip
1230         R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1231         symbols with non-default visibility.
1232         * elf64-s390.c: Likewise.
1234 2003-05-09  Alan Modra  <amodra@bigpond.net.au>
1236         * cpu-arm.c (arm_check_note): Warning fix.
1237         * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes.  Arrange
1238         to keep relocs if edited.
1239         (iq2000_elf_print_private_bfd_data): Return TRUE.
1240         * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1241         ELF64_R_SYM.
1242         (elfNN_ia64_relax_ldxmov): Warning fix.
1243         * xtensa-isa.c (xtensa_add_isa): Warning fix.
1244         * xtensa-modules.c (get_num_opcodes): Warning fix.
1246 2003-05-09  Andrey Petrov <petrov@netbsd.org>
1248         * elf.c (elf_fake_sections): Use correct cast for sh_name.
1250 2003-05-09  Alan Modra  <amodra@bigpond.net.au>
1252         * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1253         elflink.h.  Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1254         (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1255         (bfd_elf_record_link_assignment): Move from elflink.h.
1256         (_bfd_elf_merge_symbol): Likewise.
1257         (_bfd_elf_add_default_symbol): Likewise.
1258         (_bfd_elf_export_symbol): Likewise.
1259         (_bfd_elf_link_find_version_dependencies): Likewise.
1260         (_bfd_elf_link_assign_sym_version): Likewise.
1261         (_bfd_elf_link_read_relocs): Likewise.
1262         (_bfd_elf_link_size_reloc_section): Likewise.
1263         (_bfd_elf_fix_symbol_flags): Likewise.
1264         (_bfd_elf_adjust_dynamic_symbol): Likewise.
1265         (_bfd_elf_link_sec_merge_syms): Likewise.
1266         (elf_link_read_relocs_from_section): Likewise.  Use bed->s->sizeof_rel
1267         and bed->s->sizeof_rela.
1268         (_bfd_elf_link_output_relocs): Likewise.
1269         * elf-bfd.h (struct elf_size_info): Rename file_align to
1270         log_file_align.
1271         (struct elf_info_failed): Move from elflink.h.
1272         (struct elf_assign_sym_version_info): Likewise.
1273         (struct elf_find_verdep_info): Likewise.
1274         (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1275         (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1276         _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1277         _bfd_elf_link_assign_sym_version,
1278         _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1279         _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1280         _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1281         _bfd_elf_link_sec_merge_syms): Declare.
1282         (bfd_elf32_link_create_dynamic_sections): Don't declare.
1283         (_bfd_elf32_link_read_relocs): Likewise.
1284         (bfd_elf64_link_create_dynamic_sections): Likewise.
1285         (_bfd_elf64_link_read_relocs): Likewise.
1286         * elflink.h: Move lots o' stuff elsewhere.
1287         * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1288         (bfd_elf64_record_link_assignment): Likewise.
1289         (bfd_elf_record_link_assignment): Declare.
1290         * bfd-in2.h: Regenerate.
1291         * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1292         (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1293         * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1294         (assign_file_positions_for_segments): Likewise.
1295         (assign_file_positions_except_relocs): Likewise.
1296         (swap_out_syms, elfcore_write_note): Likewise.
1297         * elf-m10200.c: Adjust for changed function names.
1298         * elf-m10300.c: Likewise.
1299         * elf32-arm.h: Likewise.
1300         * elf32-h8300.c: Likewise.
1301         * elf32-hppa.c: Likewise.
1302         * elf32-ip2k.c: Likewise.
1303         * elf32-m32r.c: Likewise.
1304         * elf32-m68hc11.c: Likewise.
1305         * elf32-m68hc1x.c: Likewise.
1306         * elf32-m68k.c: Likewise.
1307         * elf32-mips.c: Likewise.
1308         * elf32-ppc.c: Likewise.
1309         * elf32-sh.c: Likewise.
1310         * elf32-v850.c: Likewise.
1311         * elf32-xtensa.c: Likewise.
1312         * elf64-alpha.c: Likewise.
1313         * elf64-hppa.c: Likewise.
1314         * elf64-mmix.c: Likewise.
1315         * elf64-ppc.c: Likewise.
1316         * elf64-sh64.c: Likewise.
1317         * elfxx-ia64.c: Likewise.
1318         * elfxx-mips.c: Likewise.
1319         (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1320         * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1321         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1322         * elf64-mips.c (mips_elf64_size_info): Likewise.
1323         * elf64-s390.c (s390_elf64_size_info): Likewise.
1324         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1326 2003-05-08  H.J. Lu <hongjiu.lu@intel.com>
1328         * elflink.h (elf_add_default_symbol): After skipping the
1329         unversioned symbol, go to non-default one.
1331 2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
1333         * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1334         want_plt field.
1335         (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1336         for symbols with non-default visibility.
1338 2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
1340         * elflink.h (elf_link_check_versioned_symbol): Also handle the
1341         case that a DSO references a hidden symbol which may be
1342         satisfied by a versioned symbol in another DSO.
1343         (elf_link_output_extsym): Check versioned definition for hidden
1344         symbol referenced by a DSO.
1346 2003-05-07  Nick Clifton  <nickc@redhat.com>
1348         * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1349         R_XSTORMY16_16 reloc to ignore overflows.
1351 2003-05-06  Alexandre Oliva  <aoliva@redhat.com>
1353         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1354         error message for mixing different-endian files.  Check for ABI
1355         compatibility of input files with the selected emulation.
1357 2003-05-05  Alan Modra  <amodra@bigpond.net.au>
1359         * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1360         non-default visibility, a) don't make them dynamic, b) discard
1361         space for dynamic relocs.
1362         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1364         * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1365         non-default visibility, a) don't allocate plt entries, b) don't
1366         allocate .got relocs, c) discard dyn rel space,
1367         (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1368         don't generate dynamic relocs.
1369         * elf64-ppc.c (allocate_dynrelocs): As above.
1370         (ppc64_elf_relocate_section): As above.
1372 2003-05-05  Andreas Jaeger  <aj@suse.de>
1374         * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1375         relocation entries for weak undefined symbols with non-default
1376         visibility.
1377         (elf64_x86_64_relocate_section): Initialize the GOT entries and
1378         skip R_386_32/R_386_PC32 for weak undefined symbols with
1379         non-default visibility.
1381 2003-05-04  H.J. Lu <hjl@gnu.org>
1383         * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1384         relocation entries for weak undefined symbols with non-default
1385         visibility.
1386         (elf_i386_relocate_section): Initialize the GOT entries and
1387         skip R_386_32/R_386_PC32 for weak undefined symbols with
1388         non-default visibility.
1390         * elfxx-ia64.c (allocate_fptr): Don't allocate function
1391         descriptors for weak undefined symbols with non-default
1392         visibility.
1393         (allocate_dynrel_entries): Don't allocate relocation entries
1394         for symbols resolved to 0.
1395         (set_got_entry): Don't install dynamic relocation for weak
1396         undefined symbols with non-default visibility.
1397         (set_pltoff_entry): Likewise.
1399         * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1400         with non-default visibility.
1401         (elf_link_output_extsym): Don't make weak undefined symbols
1402         with non-default visibility dynamic.
1404 2003-05-04  H.J. Lu <hjl@gnu.org>
1406         * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1408 2003-05-04  H.J. Lu <hjl@gnu.org>
1410         * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1411         symbol dynamic. Check indirection when removing the old
1412         definition for symbols with non-default visibility.
1413         (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1415 2003-05-02  Nick Clifton  <nickc@redhat.com>
1417         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1418         R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1419         unsigned overflow.
1421 2003-05-02  Andreas Jaeger  <aj@suse.de>
1423         * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1424         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1425         (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
1426         (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1427         ELF_LINK_NON_GOT_REF from weakdef.
1429 2003-05-02  Charles Lepple <clepple@ghz.cc>
1430             Nick Clifton <nickc@redhat.com>
1432         * acinclude.m4: Fix name of --enable-install-libbfd switch.
1433         * aclocal.m4: Regenerate.
1434         * configure: Regenerate.
1435         * Makefile.in: Regenerate.
1437 2003-05-01  Alan Modra  <amodra@bigpond.net.au>
1439         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1440         weakdef sym has already been adjusted before treating it specially.
1441         * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1442         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1443         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1444         (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
1446 2003-04-28  H.J. Lu <hjl@gnu.org>
1448         * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1449         the relax finalize pass.
1451         * section.c (struct sec): Add need_finalize_relax and remove
1452         flag11.
1453         (STD_SECTION): Update struct sec initializer.
1454         * bfd-in2.h: Regenerated.
1456 2003-04-28  H.J. Lu <hjl@gnu.org>
1458         * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1459         to copy any information related to dynamic linking when we flip
1460         the indirection.
1462 2003-04-27  H.J. Lu <hjl@gnu.org>
1464         * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1465         (ELF_LINK_DYNAMIC_WEAK): New.
1467         * elflink.h (elf_merge_symbol): Add one argument to indicate if
1468         a symbol should be skipped. Ignore definitions in dynamic
1469         objects for symbols with non-default visibility.
1470         (elf_add_default_symbol): Adjusted.
1471         (elf_link_add_object_symbols): Check if a symbol should be
1472         skipped. Don't merge the visibility field with the one from
1473         a dynamic object.
1474         (elf_link_check_versioned_symbol): Use undef_bfd.
1475         (elf_link_output_extsym): Warn if a forced local symbol is
1476         referenced from dynamic objects. Make non-weak undefined symbol
1477         with non-default visibility a fatal error.
1479 2003-04-27  Daniel Jacobowitz  <drow@mvista.com>
1481         * configure.in: Bump version on HEAD to 2.14.90.
1482         * configure: Regenerated.
1484 2003-04-26  Stephane Carrez  <stcarrez@nerim.fr>
1486         PR savannah/3331:
1487         * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1488         when we couldn't relax something.
1490 2003-04-25  Alan Modra  <amodra@bigpond.net.au>
1492         * elflink.h (elf_merge_symbol): When we find a regular definition
1493         for an indirect symbol, flip the indirection so that the old
1494         direct symbol now points to the new definition.
1496 2003-04-24  Roland McGrath  <roland@redhat.com>
1498         * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1500 2003-04-24  Alan Modra  <amodra@bigpond.net.au>
1502         * elf32-ppc.c: Formatting and comment fixes.
1503         (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
1504         (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
1506 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
1508         * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
1509         * bfd-in2.h: Rebuilt.
1510         * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
1511         * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
1512         & H8300SNMAGIC.
1513         (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
1514         * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
1515         (h8300sn_info_struct, h8300hn_info_struct): New.
1516         * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
1517         (elf32_h8_final_write_processing): Likewise.
1519 2003-04-23  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1521         * elf32-sh.c (tpoff): New.
1522         (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
1523         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1524         (allocate_dynrelocs): Don't make unnecessary dynamic TLS
1525         relocations.  Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
1526         (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
1527         (dtpoff_base): Fix wrong indentation.
1528         (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
1529         relocations.  Don't set tls_tpoff32 flag.  Don't make unnecessary
1530         R_SH_TLS_TPOFF32 relocations.
1532 2003-04-23  J"orn Rennecke <joern.rennecke@superh.com>
1534         * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
1535         * cpu-sh.c: Likewise.
1536         * elf32-sh.c: Likewise.
1537         * reloc.c (bfd_reloc_code_real): Likewise.
1538         * elf32-sh64-com.c: Change comment to refer to SuperH.
1539         * elf32-sh64.c: Likewise.
1540         * elf64-sh64.c: Likewise.
1541         * bfd-in2.h (enum bfd_architecture): Regenerate.
1543 2003-04-23  Alan Modra  <amodra@bigpond.net.au>
1545         From Julien LEMOINE <speedblue@debian.org>
1546         * elf32-i386.c (elf_i386_info_to_howto): Delete.
1547         (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
1549 2003-04-22  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1551         * archures.c: Replace references to Mitsubishi M32R with references
1552         to Renesas M32R.
1553         * relocs.c: Likewise.
1554         * bfd-in2.h: Regenerate.
1556 2003-04-21  Richard Henderson  <rth@redhat.com>
1558         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
1559         executable when a symbol is defined both regular and dynamic.
1561 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
1563         * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
1564         (elf32-m68hc1x.lo): Update dependencies
1565         * configure.in: Add elf32-m68hc1x.lo.
1566         * configure: Rebuild.
1567         * Makefile.in: Rebuild.
1569 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
1571         * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1572         (m68hc11_elf_hash_table_create): New function.
1573         (elf32_m68hc11_link_hash_table_free): New function.
1574         (stub_hash_newfunc): New function.
1575         (m68hc11_add_stub): New function.
1576         (elf32_m68hc11_add_symbol_hook): New function.
1577         (elf32_m68hc11_setup_section_lists): New function.
1578         (elf32_m68hc11_next_input_section): New function.
1579         (elf32_m68hc11_size_stubs): New function.
1580         (elf32_m68hc11_build_stubs): New function.
1581         (m68hc11_get_relocation_value): New function.
1582         (elf32_m68hc11_relocate_section): Call the above to redirect
1583         some relocations to the trampoline code.
1584         (m68hc11_elf_export_one_stub): New function.
1585         (m68hc11_elf_set_symbol): New function.
1586         (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
1587         (m68hc11_elf_get_bank_parameters): Get parameters only when the info
1588         is not yet initialized.
1590         * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1591         (elf32_m68hc11_stub_hash_entry): New struct.
1592         (m68hc11_page_info): Add trampoline handler address.
1593         (m68hc11_elf_link_hash_table): Add stubs generation members.
1594         (elf32_m68hc11_add_symbol_hook): Declare.
1595         (elf32_m68hc11_setup_section_lists): Declare.
1596         (elf32_m68hc11_size_stubs): Declare.
1597         (elf32_m68hc11_build_stubs): Declare.
1599         * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1600         (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1601         (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1602         (_bfd_m68hc11_elf_set_private_flags): Ditto.
1603         (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
1604         (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
1605         (bfd_elf32_bfd_link_hash_table_create): Define.
1606         (elf_backend_add_symbol_hook): Define.
1607         (m68hc11_elf_bfd_link_hash_table_create): New function.
1608         (m68hc11_elf_build_one_stub): New function.
1609         (m68hc11_elf_size_one_stub): New function.
1610         (m68hc11_elf_bfd_link_hash_table_create): Install the above.
1611         (bfd_elf32_bfd_link_hash_table_create): Define.
1613         * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
1614         (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
1615         (m68hc12_phys_addr): Ditto.
1616         (m68hc12_phys_page): Ditto.
1617         (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
1618         (elf32_m68hc11_gc_mark_hook): Likewise.
1619         (elf32_m68hc11_gc_sweep_hook): Likewise.
1620         (elf32_m68hc11_check_relocs): Likewise.
1621         (elf32_m68hc11_relocate_section): Likewise.
1622         (_bfd_m68hc12_elf_set_private_flags): Likewise.
1623         (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
1624         (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
1625         (m68hc12_elf_build_one_stub): New function.
1626         (m68hc12_elf_size_one_stub): New function.
1627         (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
1628         (elf_backend_add_symbol_hook): Define.
1629         (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
1631 2003-04-18  Nick Clifton  <nickc@redhat.com>
1633         * format.c (bfd_check_format_matches): Only check associated
1634         vector if the matching_vector has been created.
1636 2003-04-15  Alexandre Oliva  <aoliva@redhat.com>
1638         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
1639         2003-04-09's change.
1641 2003-04-15  Brian Ford  <ford@vss.fsi.com>
1643         * peicode.h (coff_swap_scnhdr_in): If a section holds
1644         uninitialized data and is from an object file or from an
1645         executable image that has not initialized the s_size field, or if
1646         the physical size is padded, use the virtual size (stored in
1647         s_paddr) instead.
1649 2003-04-15  H.J. Lu <hjl@gnu.org>
1651         * elflink.h (elf_link_add_object_symbols): Properly report
1652         filename for alignment reduction.
1654 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
1656         * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
1657         * reloc.c: Likewise.
1658         * coff-h8300.c: Likewise.
1659         * coff-h8500.c: Likewise.
1660         * coff-sh.c: Likewise.
1661         * cpu-h8300.c: Likewise.
1662         * cpu-sh.c: Likewise.
1663         * elf32-h8300.c: Likewise.
1664         * elf32-sh.c: Likewise.
1665         * elf32-sh64-com.c: Likewise.
1666         * elf32-sh64.c: Likewise.
1667         * elf64-sh64.c: Likewise.
1668         * bfd-in2.h: Regenerate.
1670 2003-04-14  H.J. Lu <hjl@gnu.org>
1672         * elflink.h (elf_link_add_object_symbols): Maintain maximum
1673         alignment for common symbols. Warn reducing alignment for
1674         common symbols. Report old filename when symbol size changes.
1676 2003-04-12  Alexandre Oliva  <aoliva@redhat.com>
1678         * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
1679         occurrences of the same test changed in the previous patch.
1680         Optimize.
1682 2003-04-11  Alexandre Oliva  <aoliva@redhat.com>
1684         * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
1685         (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
1686         GOT_DISP/addend only if the symbol got a global GOT entry.
1688 2003-04-10  Alexandre Oliva  <aoliva@redhat.com>
1690         * elfxx-mips.c (mips_elf_calculate_relocation): Decay
1691         GOT_PAGE/GOT_OFST referencing overridable symbol to
1692         GOT_DISP/addend.
1693         (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
1694         global symbol as GOT_DISP.
1696 2003-04-10  Bob Wilson  <bob.wilson@acm.org>
1698         * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
1699         next relocation on an undefined symbol.
1701 2003-04-09  Richard Henderson  <rth@redhat.com>
1703         * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
1704         Ignore relocations against r_symndx == 0.
1706 2003-04-09  H.J. Lu <hjl@gnu.org>
1708         * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
1709         FALSE for undefined symbols.
1710         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1712 2003-04-09  Alexandre Oliva  <aoliva@redhat.com>
1714         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
1715         and IRIX-specific shift-to-64-bit 4-byte lengths before following
1716         addr_size.
1718 2003-04-08  Alexandre Oliva  <aoliva@redhat.com>
1720         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
1721         pointer size from ABI, not arch_bits_per_address.
1723 2003-04-07  Kevin Buettner  <kevinb@redhat.com>
1725         * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
1726         constants for n32 ABI.
1728 2003-04-06  Andrew Cagney  <cagney@redhat.com>
1730         * simple.c (bfd_simple_get_relocated_section_contents): Disable
1731         free that leads to GDB vs BFD memory corruption.
1733 2003-04-04  Stephane Carrez  <stcarrez@nerim.fr>
1735         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
1736         symbols that mark the end of the section.
1737         (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
1738         converting to a relative branch so that the offset is computed after
1739         the relaxation; also relocate a jsr into a bsr if possible but don't
1740         relax them if they are to a far symbol as we need to call the
1741         trampoline code.
1742         (elf_m68hc11_howto_table): Set pcrel_offset to true.
1744 2003-04-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
1746         * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
1747         bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
1748         * bfd-in2.h: Regenerate
1749         * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
1750         * cpu-tic4x.c: Ditto
1752 2003-04-03  Nick Clifton  <nickc@redhat.com>
1754         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
1755         differently for object files and executables.
1756         * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
1757         for object files or for executables who have not already
1758         initialised the field.
1759         * libpei.h (bfd_pe_executable_p): New macro.  Return true if
1760         the PE format bfd is an executable.
1762 2003-04-03  Alan Modra  <amodra@bigpond.net.au>
1764         * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
1765         here as it's too early to reliably determine locality.
1766         (ppc_elf_gc_sweep_hook): Likewise.
1767         (SYMBOL_REFERENCES_LOCAL): Expand comment.
1769 2003-04-02  Bob Wilson  <bob.wilson@acm.org>
1771         * xtensa-modules.c: Remove comment indicating that this is a
1772         generated file.
1774 2003-04-02  Alan Modra  <amodra@bigpond.net.au>
1776         * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
1778 2003-04-01  Bob Wilson  <bob.wilson@acm.org>
1780         * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
1781         (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
1782         (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
1783         xtensa-modules.lo.
1784         (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
1785         xtensa-modules.c.
1786         (cpu-xtensa.lo): New target.
1787         (elf32-xtensa.lo): Likewise.
1788         (xtensa-isa.lo): Likewise.
1789         (xtensa-modules.lo): Likewise.
1790         * Makefile.in: Regenerate.
1791         * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
1792         (bfd_archures_list): Add bfd_xtensa_arch.
1793         * config.bfd: Handle xtensa-*-*.
1794         * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
1795         * configure: Regenerate.
1796         * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
1797         PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
1798         * targets.c (bfd_elf32_xtensa_be_vec): Declare.
1799         (bfd_elf32_xtensa_le_vec): Likewise.
1800         (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
1801         * cpu-xtensa.c: New file.
1802         * elf32-xtensa.c: Likewise.
1803         * xtensa-isa.c: Likewise.
1804         * xtensa-modules.c: Likewise.
1805         * libbfd.h: Regenerate.
1806         * bfd-in2.h: Likewise.
1808 2003-04-01  Nick Clifton  <nickc@redhat.com>
1810         * archures.c (bfd_mach_arm_unknown): Define.
1811         * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
1812         bfd_arm_get_mach_from_notes): Prototype.
1813         * bfd-in2.h: Regenerate.
1814         * coff-arm.c (coff_arm_merge_private_bfd_data): Call
1815         bfd_arm_merge_machines.
1816         (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
1817         * coffcode.h (coff_set_arch_mach_hook): Call
1818         bfd_arm_get_mach_from_notes.
1819         * coffgen.c (coff_real_object_p): Revert previous delta.
1820         * cpu_arm.c (arm_check_note): New function.  Examine a note in a
1821         .note section.
1822         (bfd_arm_merge_machines): New function: Handle the merging of ARM
1823         binaries compiled for different architectures..
1824         (bfd_arm_update_notes): New function: Update an ARM note section.
1825         (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
1826         number from an ARM note section.
1827         * elf32-arm.h (elf32_arm_object_p): Use
1828         bfd_arm_get_mach_from_notes.
1829         (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
1830         (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
1832 2003-04-01  Ben Elliston  <bje@wasabisystems.com>
1834         * dwarf2.c (read_attribute_value): Correct typo in comment.
1836 2003-04-01  Nick Clifton  <nickc@redhat.com>
1838         * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
1839         instead of concat().
1840         (decode_line_info): Only free filename if it is not NULL.
1841         (add_line_info): Make a copy of the filename when storing it into
1842         the info structure.
1844 2003-03-31  Andreas Schwab  <schwab@suse.de>
1845             Daniel Jacobowitz  <drow@mvista.com>
1847         * simple.c (bfd_simple_get_relocated_section_contents): Add
1848         parameter symbol_table.  Optionally use it instead of the symbol
1849         table from the bfd.  Save and restore output offsets and output
1850         sections  around bfd_get_relocated_section_contents.  Fix a memory
1851         leak.
1852         (simple_save_output_info, simple_restore_output_info): New
1853         functions.
1854         * bfd-in2.h: Regenerate.
1855         * dwarf2.c (read_abbrevs): Use
1856         bfd_simple_get_relocated_section_contents instead of
1857         bfd_get_section_contents.
1858         (decode_line_info): Likewise.
1859         (_bfd_dwarf2_find_nearest_line): Likewise.  Don't call
1860         find_rela_addend.
1861         (find_rela_addend): Remove.
1862         * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
1863         debugging sections.
1864         (elfNN_ia64_hash_table_create): Create the hash table with malloc,
1865         not bfd_zalloc.
1867 2003-03-31  David Heine  <dlheine@suif.stanford.edu>
1869         * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
1870         bfd_alloc.
1871         * dwarf2.c (concat_filename): Always allocate space for the
1872         returned filename.
1873         (decode_line_info): Free the allocated filename returned by
1874         concat_filename.
1875         * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
1876         * elf.c (copy_private_bfd_data): Likewise.
1877         (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
1878         * elflink.h (elf_link_sort_relocs): Fix memory leak.
1879         * format.c (bfd_check_format_matches): Likewise.
1880         * linker.c (bfd_generic_final_link): Likewise.
1881         * opncls.c (find_separate_debug_info): Likewise.
1882         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
1884 2003-03-28  H.J. Lu <hjl@gnu.org>
1886         * elflink.h (elf_link_add_object_symbols): Correctly combine
1887         visibilities.
1889 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
1891         * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
1892         to -1 before recomputing got offsets.
1894 2003-03-26  Andreas Schwab  <schwab@suse.de>
1896         * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1897         (elf_m68k_relocate_section): Use it to correctly handle symbols
1898         forced to be local.
1899         (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
1900         entries for symbols that are forced to be local.
1902 2003-03-25  Alexandre Oliva  <aoliva@redhat.com>
1904         * elfxx-mips.c (_bfd_mips_relax_section): New function.
1905         * elfxx-mips.h (_bfd_mips_relax_section): Declare.
1906         * elfn32-mips.c, elf64-mips.c: Use it.
1908 2003-03-25  Stan Cox   <scox@redhat.com>
1909             Nick Clifton  <nickc@redhat.com>
1911         Contribute support for Intel's iWMMXt chip - an ARM variant:
1913         * archures.c: Add bfd_mach_arm_iWMMXt.
1914         * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
1915         * bfd-in2.h: Regenerate.
1916         * libbfd.h: Regenerate.
1917         * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
1918         object files to be linked with XScale ones.
1919         (coff_arm_final_link_postscript): Update note section.
1920         * coffcode.h (coff_set_arch_mach_hook): Handle note section.
1921         * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
1922         after identifying a coff binary.
1923         * cpu-arm.c (processors): Add iWMMXt.
1924         (arch_inf): Likewise.
1925         * elf32-arm.h (arm_object_p): Handle note section.
1926         (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
1927         be linked with XScale ones.
1928         (elf32_arm_section_flags): New function: Set flags on note section.
1929         (elf32_arm_final_write_processing): Handle note section.
1931 2003-03-21  DJ Delorie  <dj@redhat.com>
1933         * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
1934         _bfd_elf_rela_local_sym.
1936 2003-03-20  H.J. Lu <hjl@gnu.org>
1938         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
1939         non-ELF outputs.
1941 2003-03-20  Nick Clifton  <nickc@redhat.com>
1943         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
1944         $idata5 in case bfd_coff_final_link is not called.
1946 2003-03-19  Jakub Jelinek  <jakub@redhat.com>
1948         * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
1949         field.
1950         (canon_reloc_count): Define.
1951         (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
1952         sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
1953         reloc_count.
1954         (sparc64_elf_canonicalize_reloc): New routine.
1955         (bfd_elf64_canonicalize_reloc): Define.
1957 2003-03-18  Jakub Jelinek  <jakub@redhat.com>
1959         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
1960         againt mergeable sections.  Take r_addend into account when caching
1961         trampolines.
1963 2003-03-18  Richard Henderson  <rth@redhat.com>
1965         * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
1966         local symbols that have no dyninfo.
1968 2003-03-14  Gene Smith  <gene.smith@siemens.com>
1970         * ieee.c (ieee_write_expression): Handle the case where symbol is
1971         NULL.
1972         General formatting improvements.
1974 2003-03-13  Nick Clifton  <nickc@redhat.com>
1976         * configure.in (LINGUAS): Add zh_CN.
1977         * configure: Regenerate.
1978         * po/zh_CN.po: New file.
1980 2003-03-13  Elias Athanasopoulos  <elathan@phys.uoa.gr>
1982         * aout-cris.c (BYTES_IN_WORD): Don't define.
1983         aout-encap.c: Likewise.
1984         aout-ns32k.c: Likewise.
1985         aout-tic30.c: Likewise.
1986         hp300bsd.c: Likewise.
1987         i386aout.c: Likewise.
1988         i386dynix.c: Likewise.
1989         i386linux.c: Likewise.
1990         i386lynx.c: Likewise.
1991         i386mach3.c: Likewise.
1992         m68k4knetbsd.c: Likewise.
1993         m68klinux.c: Likewise.
1994         m68klynx.c: Likewise.
1995         m68knetbsd.c: Likewise.
1996         m88kmach3.c: Likewise.
1997         mipsbsd.c: Likewise.
1998         newsos3.c: Likewise.
1999         sparclinux.c: Likewise.
2000         sparclynx.c: Likewise.
2001         sparcnetbsd.c: Likewise.
2002         vaxbsd.c: Likewise. Fix comment formatting.
2004 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
2006         * Reverted 2003-03-02's patch.
2008         * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2009         overridable.
2010         * elf64-mips.c (mips_elf64_canonicalize_reloc,
2011         mips_elf64_get_dynamic_reloc_upper_bound,
2012         mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2013         (bfd_elf64_get_canonicalize_reloc,
2014         bfd_elf64_get_dynamic_reloc_upper_bound,
2015         bfd_elf64_canonicalize_dynamic_reloc): Define.
2016         (mips_elf64_slurp_reloc_table): Support dynamic.
2017         (mips_elf64_slurp_one_reloc_table): Adjust.
2019 2003-03-12  Nick Clifton  <nickc@redhat.com>
2021         * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2022         'index' to 'offset' in test for zero value.
2024 2003-03-11  Alexandre Oliva  <aoliva@redhat.com>
2026         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2027         dynamic relocations pointing to local or section symbols, use the
2028         NULL symbol instead.  Document the choice to not emit an
2029         additional R_MIPS_64 relocation.
2031 2003-03-11  Alan Modra  <amodra@bigpond.net.au>
2033         * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2034         zero index dynamic tls relocs generated for the GOT.  Tidy code.
2035         Set "relocation" to 1 on DTPMOD32 relocs.  Optimize HA adjustment.
2036         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2038 2003-03-07  Alan Modra  <amodra@bigpond.net.au>
2040         * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2041         a tls_get_addr call.
2043         * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2044         (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2045         ELF_LINK_NON_GOT_REF from weakdef.
2046         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2047         (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2048         ELF_LINK_NON_GOT_REF from weakdef.
2049         * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
2050         (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2051         ELF_LINK_NON_GOT_REF from weakdef.
2053 2003-03-06  Jakub Jelinek <jakub@redhat.com>
2054         Andrew Haley  <aph@redhat.com>
2056         * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2057         output is relocateable.
2059 2003-03-06  Steven Konopa <skonopa@kgo.csc.com>
2061         * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2062         R_COMMENT.
2064 2003-03-06  Alan Modra  <amodra@bigpond.net.au>
2066         * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2067         error messages.
2068         (ELIMINATE_COPY_RELOCS): Define to zero.
2069         (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2070         TLSLD relocs.  Report reloc types on a number of errors.  Optimize
2071         LOCAL24PC check for non-local syms.  Don't capitalize error messages.
2072         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2073         (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2074         calculating TLSLD relocs.  Report reloc types on a number of errors.
2075         Don't capitalize error messages.
2077 2003-03-03  H.J. Lu <hjl@gnu.org>
2079         * elfxx-ia64.c (USE_BRL): Removed.
2080         (oor_ip): Removed.
2082 2003-03-03  J"orn Rennecke <joern.rennecke@superh.com>
2084         * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2085         relocation (no special function), and make it non-partial_inplace.
2086         (sh_elf_relax_section): When creating a bsr, use a consistent value
2087         no matter if the symbol is extern or not;  set addend to -4.
2088         Don't swap load / non-load instructions for SH4.
2089         (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2090         rather than if the symbol is external to determine if adjusting the
2091         offset makes sense.  Adjust the addend too if appropriate.
2092         (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2093         relocation.
2095 2003-03-03  Nick Clifton  <nickc@redhat.com>
2097         * po/da.po: Installed latest translation.
2099 2003-03-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2101         * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2102         R_MIPS_PC16 to rightshift 2.
2103         (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2104         (bfd_elf32_bfd_reloc_type_lookup): Support
2105         BFD_RELOC_MIPSEMB_16_PCREL_S2.
2106         * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2107         R_MIPS_PC16 to rightshift 2.
2108         (mips_elf64_howto_table_rela): Likewise.
2109         (mips_reloc_map): Map to rightshifted BFD reloc.
2110         * elfn32-mips.c: The same as in elf64-mips.c.
2111         * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2112         (mips_elf_calculate_relocation): Handle rightshifted addends for
2113         R_MIPS_PC16.
2114         * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2115         MIPS Embedded PIC. Remove superfluous empty COMMENT.
2116         * libbfd.h: Regenerate.
2117         * bfd-in2.h: Regenerate.
2119 2003-02-28  Richard Henderson  <rth@redhat.com>
2121         * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2122         for ltoff22x relaxation.
2124 2003-03-01  Alan Modra  <amodra@bigpond.net.au>
2126         * bfd-in.h (_bfd): Don't define.
2127         * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2128         * syms.c: Likewise.
2129         * bfd-in2.h: Regenerate.
2131 2003-02-27  Richard Henderson  <rth@redhat.com>
2133         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2134         (elfNN_ia64_check_relocs): Set it.
2135         (allocate_global_data_got): Check it.
2136         (allocate_local_got): Likewise.
2137         (allocate_dynrel_entries): Likewise.
2138         (elfNN_ia64_relax_ldxmov): New.
2139         (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2140         (elfNN_ia64_choose_gp): Split out from ...
2141         (elfNN_ia64_final_link): ... here.
2143 2003-02-27  Andrew Cagney  <cagney@redhat.com>
2145         * bfd.c (struct bfd): Rename "struct _bfd".
2146         * bfd-in.h: Update copyright.
2147         (struct bfd): Rename "struct _bfd".
2148         (_bfd): Define for backward compatibility.
2149         * bfd-in2.h: Regenerate.
2151 2003-02-25  Alan Modra  <amodra@bigpond.net.au>
2153         * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2154         and rel_hdr2 when initially counting input relocs rather than after
2155         creating output reloc sections.
2156         (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2157         sizes.
2159         * Makefile.am: Run "make dep-am".
2160         * Makefile.in: Regenerate.
2162 2003-02-24  Kris Warkentin  <kewarken@qnx.com>
2164         * elf.c (elfcore_read_notes): Add check for QNX style core file.
2165         (elfcore_grog_nto_note): New function.
2166         (elfcore_grog_nto_gregs): New function.
2167         (elfcore_grog_nto_status): New function.
2169 2003-02-24  Alan Modra  <amodra@bigpond.net.au>
2171         * elflink.c (_bfd_elf_create_got_section): Check existing .got
2172         section flags before concluding that we've already been called.
2173         Don't use register keyword.
2174         (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2175         (_bfd_elf_create_linker_section): Formatting.
2177 2003-02-20  jmc  <jmc@prioris.mini.pw.edu.pl>
2179         * coff-h8300.c: Fix typo: intial -> initial.
2180         * coff-ppc.c: Likewise.
2182 2003-02-20  Alan Modra  <amodra@bigpond.net.au>
2184         * elf32-ppc.c: Formatting.
2185         (allocate_dynrelocs): LD and GD relocs against the same sym need
2186         separate GOT entries.
2187         (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2188         entries per symbol.
2190 2003-02-19  Alan Modra  <amodra@bigpond.net.au>
2192         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2193         removal.  Localize vars.  Remove unnecessary dynobj test.
2194         * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2195         of INFO.
2196         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2197         and optimize.
2198         (elf_i386_relocate_section): Likewise.
2199         (elf_i386_gc_sweep_hook): Simplify dyn reloc removal.  Localize vars.
2200         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2201         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2202         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2203         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2204         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.  Remove
2205         local_dynrel for section too.  Don't touch HIPLT22, LOPLT10, PCPLT32
2206         or PCPLT10 relocs.  Don't subtract twice on PLT32 relocs.
2207         Formatting.
2209         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2210         (ppc64_elf_check_relocs): Use it.  Correct comment.  Move SEC_ALLOC
2211         test.
2212         (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2213         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2214         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2215         and optimize.  Use ELIMINATE_COPY_RELOCS.
2216         (ppc64_elf_relocate_section): Likewise.
2218         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2219         (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2220         (ELIMINATE_COPY_RELOCS): Define.
2221         (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2222         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2223         (MUST_BE_DYN_RELOC): Define.
2224         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2225         and optimize.  Trim dyn_relocs.
2226         (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2227         not be used.  Do generate dyn_relocs for copy reloc avoidance.  Keep
2228         track of pc_rel dyn relocs.
2229         (ppc_elf_relocate_section): Remove "will_become_local".  Adjust
2230         WILL_CALL_FINISH_DYNAMIC_SYMBOL use.  Trim dyn relocs as per
2231         allocate_dynrelocs.  Don't recalculate "sec".
2233 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
2235         * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2236         * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2237         on invalid LD relocs.
2238         (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2239         (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2240         tlsld_got entry.  Use IS_PPC64_TLS_RELOC.
2242         * elf32-ppc.h: New file.
2243         * elf32-ppc.c: Include elf32-ppc.h.
2244         (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2245         (struct ppc_elf_link_hash_entry): Rename "root" to "elf".  Adjust uses.
2246         Add "tls_mask" field.
2247         (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2248         (struct ppc_elf_link_hash_table): Rename "root" to "elf".  Adjust uses.
2249         Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2250         sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2251         Make use of htab shortcuts throughout file.
2252         (ppc_elf_link_hash_newfunc): Init tls_mask field.
2253         (ppc_elf_link_hash_table_create): Init new fields.
2254         (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2255         (ppc_elf_howto_raw): Add tls relocs.
2256         (ppc_elf_reloc_type_lookup): Handle them.
2257         (ppc_elf_unhandled_reloc): New function.
2258         (ppc_elf_create_got): Stash got section pointer in hash table,
2259         return status.  Make .rela.got too.
2260         (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2261         (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2262         NON_GOT_REF set.  Don't allocate space in .plt here..
2263         (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2264         not allocating plt entries unnecessarily.  Allocate got entries here.
2265         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2266         (ppc_elf_size_dynamic_sections): Allocate local got entries.  Pass
2267         "info" during allocate_dynrelocs hash traversal.  Use htab section
2268         shortcuts rather than searching for named sections.  Get rid of
2269         "plt" and "strip" booleans.
2270         (update_local_sym_info, bad_shared_reloc): New functions.
2271         (ppc_elf_check_relocs): Handle TLS relocs.  Move .rela.got creation to
2272         ppc_elf_create_got.  Don't mark got or plt reloc syms dynamic, do so
2273         in allocate_dynreloc.  Use update_local_sym_info and bad_shared_reloc.
2274         Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2275         R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2276         in shared libs.  R_PPC_PLTREL32 is a plt reloc too.  Refcount all
2277         relocs that might use a plt entry.  Set NON_GOT_REF too.
2278         Enumerate all do-nothing relocs.
2279         (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs.  Handle
2280         tls relocs and all plt relocs.
2281         (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2282         (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2283         (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2284         shortcuts.
2285         (ppc_elf_relocate_section): Tidy.  Handle TLS relocs.  Use
2286         bfd_elf_local_sym_name.  Simplify unresolved reloc code.  Build got
2287         entries and got relocs here.  Warn on non-zero got reloc addend.
2288         Split out branch taken/not taken reloc code into a separate switch
2289         and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2290         Split out HA reloc adjustments to separate switch statement.  Don't
2291         warn on reloc overflow if we've already warned about undefined.
2292         Don't rebuild sym name when reporting errors.  Report all possible
2293         errors from _bfd_final_link_relocate.
2294         (bfd_elf32_bfd_final_link): Don't define.
2296 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
2298         * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r".  Don't
2299         rebuild sym name when reporting errors.
2301 2003-02-17  Nick Clifton  <nickc@redhat.com>
2303         * elflink.h (elf_link_output_extsym): Only check
2304         allow_shlib_undefined for shared libraries.
2305         * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2306         of allow_shlib_undefined.
2307         * elf32-cris.c (cris_elf_relocate_section): Likewise.
2308         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2309         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2310         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2311         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2312         * elf32-sh.c (sh_elf_relocate_section): Likewise.
2313         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2314         * elf32-vax.c (elf_vax_relocate_section): Likewise.
2315         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2316         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2317         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2318         * elf64-s390.c (elf_s390_relocate_section): Likewise.
2319         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2320         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2321         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2322         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2324 2003-02-17  Nick Clifton  <nickc@redhat.com>
2326         * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2327         address field to use in the comparison.
2328         (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
2330 2003-02-14  Bob Wilson  <bob.wilson@acm.org>
2332         * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2333         backends when checking if the generic ELF target should be used.
2335         * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2336         outside of functions, treat values as absolute addresses.
2338         * bfd.c: Change embedded documentation to use consistent indentation
2339         and to split up long lines.  Change informal style of description
2340         for functions lacking real documentation.
2341         * coffcode.h: Break up long lines in embedded documentation.
2342         * format.c: Likewise.
2343         * targets.c: Likewise.
2344         * libcoff.h: Regenerate.
2345         * bfd-in2.h: Regenerate.
2347 2003-02-14  Alan Modra  <amodra@bigpond.net.au>
2349         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2350         (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2351         (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2352         (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2353         (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2354         (group_sections): Don't share a stub section if stubs are for a large
2355         section.  Adjust comment.
2356         (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2357         !stubs_always_before_branch.
2358         (ppc64_elf_relocate_section): Initialize tlsld GOT entry once.  Don't
2359         treat undefined and undefweak specially when processing dyn relocs.
2361 2003-02-13  Jakub Jelinek  <jakub@redhat.com>
2363         * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2365 2003-02-13  Nick Clifton  <nickc@redhat.com>
2367         * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2368         in computation of offset to insert into BL instruction.
2370 2003-02-11  Uwe Stieber  <uwe@wwws.de>
2372         * config.bfd: Add support for kaOS as cross build target system.
2374 2003-02-11  Alan Modra  <amodra@bigpond.net.au>
2376         * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2377         .__tls_get_addr too.
2378         (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2380 2003-02-10  Kaz kojima  <kkojima@rr.iij4u.or.jp>
2382         * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2383         (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2384         (sh_elf_link_hash_newfunc): Remove the initialization of
2385         tls_tpoff32 field.
2386         (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2387         for which tls_tpoff32 flag is set.
2388         (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2389         of the symbol includes the entry matched with the input_section
2390         and having tls_tpoff32 flag on.  When linking statically, set
2391         symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2392         is defined in this executable.
2393         (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2395 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
2397         * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2398         even if there is just non-empty .rela.plt.
2400 2003-02-10  Nick Clifton  <nickc@redhat.com>
2402         * archures.c (bfd_mach_arm_ep9312): Define.
2403         * bfd-in2.h: Regenerate.
2404         * cpu-arm.c (processors[]): Add ep9312.
2405         (bfd_arm_arch): Add ep9312.
2406         * elf32-arm.h (elf32_arm_merge_private_data): Update error
2407         messages and add test for Maverick floating point support.
2408         (elf32_arm_print_private_bfd_data): Handle
2409         EF_ARM_MAVERICK_FLOAT flag.
2410         (elf32_arm_object_p): New function.
2411         (elf_backend_object_p): Define.
2413 2003-02-10  Alan Modra  <amodra@bigpond.net.au>
2415         * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2416         variables, structure fields or function params to tls_mask or
2417         similar to better reflect usage.
2418         (struct got_entry): Comment.
2419         (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
2420         (get_tls_mask): Rename from get_tls_type.
2422 2003-02-09  Alan Modra  <amodra@bigpond.net.au>
2424         * elf64-ppc.c (TLS_GD_LD): Don't define..
2425         (TLS_GD): ..define this instead and update all uses.
2426         (TLS_TPRELGD): Define.
2427         (ppc64_elf_link_hash_table_create): Tweak initialization of
2428         init_refcount and init_offset.
2429         (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2430         Mark second slot of GD or LD toc entries.
2431         (get_tls_type): Return an int.  Distinguish toc GD and LD entries
2432         from other tls types.
2433         (ppc64_elf_tls_setup): New function, split out from..
2434         (ppc64_elf_tls_optimize): ..here.  Don't optimize when symbols are
2435         defined in a dynamic object.  Fix LD optimization.  Don't set TLS_TPREL
2436         on GD->IE optimization, use TLS_TPRELGD instead.  Use get_tls_type
2437         return value to properly decide whether toc GD and LD entries can
2438         optimize away __tls_get_addr call.  Check next reloc after DTPMOD64
2439         to determine GD or LD rather than looking at TLS_LD flag.  Don't
2440         attempt to adjust got entry tls_type here..
2441         (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2442         look for possible merges.
2443         (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2444         optimization.
2445         (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2446         (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2447         Make use of return value from get_tls_type to properly detect GD and
2448         LD optimizations.  Split tlsld/gd hi/ha from lo/ds case.  Don't
2449         handle tls_get_addr removal when looking at REL24 relocs, do it when
2450         looking at the previous reloc.  Check reloc after DTPMOD64 to determine
2451         GD or LD.
2452         * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2454 2003-02-08  Alan Modra  <amodra@bigpond.net.au>
2456         * elf32-hppa.c (group_sections): Don't share a stub section if
2457         stubs are for a large section.
2459         * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2460         stubs if !stubs_always_before_branch.
2462 2003-02-07  Nick Clifton  <nickc@redhat.com>
2464         * elf.c (swap_out_syms): Generate an error message if an
2465         equivalent output section cannot be found for a symbol.
2467 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
2469         * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2470         local_got_entries is NULL.
2472 2003-02-06  Andreas Schwab  <schwab@suse.de>
2474         * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2475         (read_value): Add parameter is_signed, use signed extraction if
2476         the value is signed.
2477         (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2478         encoding to read_value.
2480 2003-02-06  Alan Modra  <amodra@bigpond.net.au>
2482         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2483         plt info when called to transfer weak sym info.
2485 2003-02-05  Alan Modra  <amodra@bigpond.net.au>
2487         * reloc.c: Add PPC and PPC64 TLS relocs.
2488         * libbfd.h: Regenerate.
2489         * bfd-in2.h: Regenerate.
2490         * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2491         (ppc64_elf_howto_raw): Add TLS howto's.  Adjust R_PPC64_NONE to be
2492         against a 32 bit field.
2493         (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2494         (_ppc64_elf_section_data): Add t_symndx and comments.
2495         (ppc64_elf_section_data): Use elf_section_data macro.
2496         (ppc64_elf_new_section_hook): American spelling.
2497         (struct got_entry, struct plt_entry): New.
2498         (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2499         (struct ppc_stub_hash_entry): Add "addend" field.
2500         (struct ppc_link_hash_entry): Add "tls_type".
2501         (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2502         TLS_EXPLICIT): Define.
2503         (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
2504         (link_hash_newfunc): Init new fields.
2505         (ppc64_elf_link_hash_table_create): Likewise.  Set init_refcount and
2506         init_offset to NULL.
2507         (ppc64_elf_copy_indirect_symbol): Copy got and plt info.  Don't call
2508         _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
2509         there.
2510         (update_local_sym_info, update_plt_info): New functions.
2511         (ppc64_elf_check_relocs): Use them.  Handle TLS relocs.  Adjust GOT
2512         handling to use got.glist rather than got.refcount.  Likewise for PLT.
2513         (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
2514         (func_desc_adjust): Adjust for new PLT list.
2515         (ppc64_elf_adjust_dynamic_symbol): Likewise.
2516         (get_sym_h, get_tls_type): New functions.
2517         (ppc64_elf_edit_opd): Remove unused variable.  Use get_sym_h.
2518         (ppc64_elf_tls_optimize): New function.
2519         (allocate_dynrelocs): Adjust for new PLT and GOT lists.  Allocate
2520         TLS relocs.
2521         (ppc64_elf_size_dynamic_sections): Likewise.
2522         (ppc_type_of_stub): Adjust for new PLT list.
2523         (ppc_build_one_stub): Likewise.
2524         (ppc64_elf_size_stubs): Likewise.  Use get_sym_h.  Treat __tls_get_addr
2525         calls specially.
2526         (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists.  Handle
2527         TLS relocs.  Report local syms using bfd_elf_local_sym_name.  Don't
2528         init GOT entries that have a reloc.  Generate GOT relocs here..
2529         (ppc64_elf_finish_dynamic_symbol): ..not here.  Adjust for PLT list.
2530         * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2532 2003-02-04  Andreas Schwab  <schwab@suse.de>
2534         * elf32-m68k.c (elf_m68k_hash_entry): Define.
2535         (elf_m68k_link_hash_traverse): Remove.
2536         (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
2537         elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
2538         reduce casting.
2539         (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
2540         casting.
2541         (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
2542         instead of elf_m68k_link_hash_traverse.
2543         (elf_m68k_discard_copies): Change first parameter to pointer to
2544         struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
2545         elf_m68k_link_hash_entry is needed.
2547 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
2549         * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
2550         (struct elf_link_hash_entry): Add "glist" and "plist" fields to
2551         "got" union, and declare as gotplt_union.  Use gotplt_uinion for
2552         "plt" field.
2553         (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
2554         Add "init_offset" field.
2555         (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
2556         (elf_local_got_ents): Declare.
2557         * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
2558         and "plt".
2559         (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
2560         (_bfd_elf_link_hash_table_init): Set "init_offset".
2561         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
2562         from init_offset.
2563         (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
2565         * elf.c (bfd_elf_local_sym_name): Split out from..
2566         (group_signature): ..here.
2567         * elf-bfd.h (bfd_elf_local_sym_name): Declare.
2569 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
2571         * elf-bfd.h (enum elf_link_info_type): Remove.
2572         (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
2573         to struct sec.  Remove linkonce_p field.
2574         (elf_linkonce_p): Delete.
2575         (elf_discarded_section): Update for sec_info_type change.
2576         * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
2577         flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
2578         (ELF_INFO_TYPE_NONE): Define.
2579         (ELF_INFO_TYPE_STABS): Define.
2580         (ELF_INFO_TYPE_MERGE): Define.
2581         (ELF_INFO_TYPE_EH_FRAME): Define.
2582         (ELF_INFO_TYPE_JUST_SYMS): Define.
2583         (STD_SECTION): Update struct sec initializer.
2584         * ecoff.c (bfd_debug_section): Likewise.
2585         * elf.c: Likewise.  Update occurrences of sec_info_type and use_rela_p.
2586         * elflink.h: Likewise.
2587         * elf-eh-frame.c: Likewise.
2588         * elf64-alpha.c: Likewise.
2589         * elfxx-ia64.c: Likewise.
2590         * elfxx-mips.c: Likewise.
2591         * bfd-in2.h: Regenerate.
2593         * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
2594         referring to used_by_bfd.
2595         * elf64-sparc.c (sec_do_relax): Likewise.
2596         * elf64-mmix.c (mmix_elf_section_data): Likewise.
2597         * elfxx-mips.c (mips_elf_section_data): Likewise.
2598         * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2599         (ieee_get_section_contents): Likewise.
2600         (ieee_new_section_hook): Formatting.
2601         (ieee_canonicalize_reloc): Remove commented out code.
2602         * mmo.c (mmo_section_data): Define.  Use throughout file.
2603         * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
2605 2003-01-31  Graydon Hoare <graydon@redhat.com>
2607         * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
2608         * Makefile.in: Regenerate.
2609         * opncls.c (calc_crc32, get_debug_link_info,
2610         seperate_debug_file_exists, find_seperate_debug_file): New
2611         internal functions.
2612         (bfd_follow_gnu_debuglink): New function.  Follow the pointer
2613         contained inside a .gnu_debuglink section.
2614         * bfd-in2.h: Regenerate.
2616 2003-01-29  Alexandre Oliva  <aoliva@redhat.com>
2618         * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
2619         entry->abfd when it's NULL.
2621 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
2623         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
2624         _bfd_elf_section_offset returning -2 the same way as -1.
2626         * elfxx-mips.c (mips_elf_multi_got): New function.
2627         (struct mips_got_entry): Make symndx and gotidx signed.  Moved
2628         addend into union along with address and link hash entry.
2629         (struct mips_got_info): Added bfd2got and next.
2630         (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
2631         (mips_elf_got_section, mips_elf_create_got_section): Use
2632         SEC_EXCLUDE bit to tell whether we really need the got
2633         section.  Take boolean arguments to disregard an excluded
2634         section, or to create it as excluded.  Adjust all callers.
2635         Use mips_elf_got_section all over.
2636         (mips_elf_local_got_index, mips_elf_got_page,
2637         mips_elf_got16_entry): Take input bfd as argument, and pass it
2638         on to mips_elf_create_local_got_entry.
2639         (mips_elf_global_got_index, mips_elf_create_local_got_entry):
2640         Take input bfd as argument, and manage entries in the
2641         appropriate GOT.
2642         (mips_elf_got_offset_from_index): Take input bfd as argument,
2643         and use it to adjust the GP offset of the bfd.
2644         (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
2645         unreferenced GOT entries of global symbols to the end.
2646         (mips_elf_record_global_got_symbol): Take input bfd as
2647         argument.  Add entries to the master GOT hash table.
2648         (struct mips_elf_bfd2got_hash): New.
2649         (struct mips_elf_got_per_bfd_arg): New.
2650         (struct mips_elf_set_global_got_offset_arg): New.
2651         (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
2652         mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
2653         mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
2654         mips_elf_merge_gots, mips_elf_set_global_got_offset,
2655         mips_elf_resolve_final_got_entry,
2656         mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
2657         mips_elf_got_for_ibfd): New functions.
2658         (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
2659         (MIPS_ELF_GOT_MAX_SIZE): New macro.
2660         (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
2661         (mips_elf_got_entry_hash): Take new fields into account.  Use
2662         mips_elf_hash_bfd_vma.
2663         (mips_elf_got_entry_eq): Take new fields into account.
2664         (mips_elf_create_got_section): Initialize new fields.
2665         (mips_elf_calculate_relocation): Pass input_bfd to functions
2666         that now take it.  Adjust gp for the input_bfd.
2667         (mips_elf_allocate_dynamic_relocation,
2668         mips_elf_create_dynamic_relocation,
2669         _bfd_mips_elf_create_dynamic_sections): Use...
2670         (mips_elf_rel_dyn_section): New function.  Borrow code from...
2671         (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
2672         now take it.  Create the got section if needed, even if
2673         excluded, before recording a global got symbol.  Move some
2674         code to...
2675         (mips_elf_record_local_got_symbol): New fn.
2676         (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
2677         Compute multi-got global entries offsets.  Move GOT code to...
2678         (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
2679         if the GOT is too big.
2680         (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
2681         undefweak symbol to zero.  Generate dynamic relocations for
2682         non-primary GOT entries for global symbols.
2683         (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
2684         case.  Generate dynamic relocations for local got entries.
2685         Sort dynamic relocations on N64 too, using...
2686         (sort_dynamic_relocs_64): New fns.
2687         (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
2688         (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
2690 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
2692         * bfd.c (struct _bfd): Added id field.
2693         * opncls.c (_bfd_id_counter): New static variable.
2694         (_bfd_new_bfd): Use it.
2695         * bfd-in2.h: Rebuilt.
2697 2003-01-25  Alan Modra  <amodra@bigpond.net.au>
2699         * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
2701 2003-01-25  Jakub Jelinek  <jakub@redhat.com>
2703         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
2704         (elf32_sparc_rev32_howto): New variable.
2705         (sparc_reloc_map): Add TLS relocs.
2706         (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
2707         Handle REV32.
2708         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
2709         New functions.
2710         (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
2711         struct elf32_sparc_link_hash_table):
2712         New structures.
2713         (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
2714         elf32_sparc_hash_table): Define.
2715         (link_hash_newfunc, elf32_sparc_link_hash_table_create,
2716         create_got_section, elf32_sparc_create_dynamic_sections,
2717         elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
2718         functions.
2719         (elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
2720         reference counting.
2721         (elf32_sparc_gc_sweep_hook): Likewise.
2722         (elf32_sparc_adjust_dynamic_symbol): Likewise.
2723         (elf32_sparc_size_dynamic_sections): Likewise.
2724         (elf32_sparc_relocate_section): Likewise.
2725         (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
2726         New functions.
2727         (elf32_sparc_object_p): Allocate backend private object data.
2728         (bfd_elf32_bfd_link_hash_table_create,
2729         elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
2730         elf_backend_can_refcount): Define.
2731         (elf_backend_create_dynamic_sections): Define to
2732         elf32_sparc_create_dynamic_sections.
2733         * reloc.c: Add SPARC TLS relocs.
2734         * bfd-in2.h, libbfd.h: Rebuilt.
2735         * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
2736         (sparc_reloc_map): Likewise.
2738 2003-01-24  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2740         * bfd-in2.h: Regenerate.
2741         * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
2742         s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
2743         (elf_howto_table): Add TLS relocs.
2744         (elf_s390_reloc_type_lookup): Likewise.
2745         (elf_s390_link_hash_entry): Add tls_type.
2746         (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
2747         New macros.
2748         (elf_s390_link_hash_table): Add tls_ldm_got.
2749         (link_hash_newfunc): Initialize tls_type.
2750         (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
2751         (elf_s390_copy_indirect_symbol): Copy tls_type information.
2752         (elf_s390_check_relocs): Support TLS relocs.
2753         (elf_s390_gc_sweep_hook): Likewise.
2754         (allocate_dynrelocs): Likewise.
2755         (elf_s390_size_dynamic_sections): Likewise.
2756         (elf_s390_relocate_section): Likewise.
2757         (elf_s390_finish_dynamic_symbol): Likewise.
2758         (bfd_elf32_mkobject): Define for TLS.
2759         * elf64-s390.c: Same changes as for elf32-s390.c.
2760         * libbfd.h: Regenerate.
2761         * reloc.c: Add s390 TLS relocations.
2763 2003-01-24  Charles Lepple  <clepple@ghz.cc>
2765         * aclocal.m4: Fix name of --enable-install-libbfd switch.
2767 2003-01-23  Nick Clifton  <nickc@redhat.com>
2769         * Add sh2e support:
2770         2002-04-02  Elena Zannoni  <ezannoni@redhat.com>
2771         * archures.c (bfd_mach_sh2e): Added.
2772         * bfd-in2.h: Rebuilt.
2773         * cpu-sh.c (arch_info_struct): Added SH2e.
2774         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
2776 2003-01-23  Alan Modra  <amodra@bigpond.net.au>
2778         * elf-bfd.h (struct bfd_elf_section_data): Remove tdata.  Change
2779         dynindx to an int.  Rearrange for better packing.
2780         * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
2781         * elf32-mips.c (bfd_elf32_new_section_hook): Define.
2782         * elf32-sh64.h: New.  Split out from include/elf/sh.h.
2783         (struct _sh64_elf_section_data): New struct.
2784         (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
2785         * elf32-sh64-com.c: Include elf32-sh64.h.
2786         * elf32-sh64.c: Likewise.
2787         (sh64_elf_new_section_hook): New function.
2788         (bfd_elf32_new_section_hook): Define.
2789         (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
2790         (sh64_bfd_elf_copy_private_section_data): Likewise.
2791         (sh64_elf_final_write_processing): Likewise.
2792         * elf32-sparc.c (struct elf32_sparc_section_data): New.
2793         (elf32_sparc_new_section_hook): New function.
2794         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2795         (sec_do_relax): Define.
2796         (elf32_sparc_relax_section): Adjust to use sec_do_relax.
2797         (elf32_sparc_relocate_section): Likewise.
2798         * elf64-mips.c (bfd_elf64_new_section_hook): Define.
2799         * elf64-mmix.c (struct _mmix_elf_section_data): New.
2800         (mmix_elf_section_data): Define.  Use throughout file.
2801         (mmix_elf_new_section_hook): New function.
2802         (bfd_elf64_new_section_hook): Define.
2803         * elf64-ppc.c (struct _ppc64_elf_section_data): New.
2804         (ppc64_elf_section_data): Define.  Use throughout.
2805         (ppc64_elf_new_section_hook): New function.
2806         (bfd_elf64_new_section_hook): Define.
2807         * elf64-sparc.c (struct sparc64_elf_section_data): New.
2808         (sparc64_elf_new_section_hook): New function.
2809         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2810         (sec_do_relax): Define.
2811         (sparc64_elf_relax_section): Adjust to use sec_do_relax.
2812         (sparc64_elf_relocate_section): Likewise.
2813         (bfd_elf64_new_section_hook): Define.
2814         * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
2815         * elfxx-mips.c (struct _mips_elf_section_data): New.
2816         (mips_elf_section_data): Define.  Use throughout.
2817         (_bfd_mips_elf_new_section_hook): New function.
2818         (mips_elf_create_got_section): Don't alloc used_by_bfd.
2819         * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
2820         * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
2821         * Makefile.am: Run "make dep-am".
2822         * Makefile.in: Regenerate.
2824 2003-01-21  Richard Henderson  <rth@redhat.com>
2826         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
2827         (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
2828         (elf64_alpha_adjust_dynamic_symbol): Set them.
2829         (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
2830         (elf64_alpha_relax_tls_get_addr): Handle LDM relocs.  Frob the
2831         symbol index when relaxing LDM to TPREL.
2832         (elf64_alpha_relax_section): Likewise.  Allow relaxation of GD
2833         relocs, even if the target isn't locally defined.
2834         (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
2835         (elf64_alpha_relocate_section): Likewise.  Force TP-relative
2836         relocs vs symndx 0 to the tp base.
2838 2003-01-21  Fabio Alemagna  <falemagn@aros.org>
2840         * config.bfd: Handle i[3456]86-*-aros*.
2842 2003-01-21  Andreas Schwab  <schwab@suse.de>
2844         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
2845         (struct ppc_elf_link_hash_entry): Define.
2846         (ppc_elf_hash_entry): New function.
2847         (struct ppc_elf_link_hash_table): Define.
2848         (ppc_elf_hash_table): New function.
2849         (ppc_elf_link_hash_newfunc): New function.
2850         (ppc_elf_link_hash_table_create): New function.
2851         (ppc_elf_copy_indirect_symbol): New function.
2852         (allocate_dynrelocs): New function.
2853         (readonly_dynrelocs): New function.
2854         (ppc_elf_size_dynamic_sections): Allocate space for dynamic
2855         relocs and determine DT_TEXTREL.
2856         (ppc_elf_check_relocs): Don't do that here, just count the
2857         dynamic relocs.
2858         (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
2859         removed section.
2860         (bfd_elf32_bfd_link_hash_table_create): Define.
2861         (elf_backend_copy_indirect_symbol): Define.
2863 2003-01-21  Richard Henderson  <rth@redhat.com>
2865         * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
2866         TPREL also get a reloc if shared.  Remove SREL support.
2867         (elf64_alpha_emit_dynrel): New.
2868         (elf64_alpha_relocate_section): Use it.  Resolve dynamic TPREL
2869         and GOTTPREL relocs to local symbols against the tp base.
2870         (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
2872         * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
2873         use count before clobbering r_type.
2874         (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
2875         ordering would mean dataflow inspection is necessary.
2877 2003-01-20  Svein E. Seldal  <Svein.Seldal@solidas.com>
2879         * coffcode.h (coff_set_flags): Added get/set arch hooks.
2881 2003-01-20  Fabio Alemagna  <falemagn@aros.org>
2883         * elf32-sh.c: Treat elfNN_bed like other macros defined in
2884           elfxx-target.h and #undef it before #define'ing it.
2885         * elf32-i386.c: Likewise.
2886         * elf32-sh64.c: Likewise.
2887         * elf64-alpha.c: Likewise.
2888         * elf64-sh64.c: Likewise.
2890 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2892         * bfd-in2.h: Regenerate.
2893         * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
2894         (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
2895         R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
2896         R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
2897         R_390_PLTOFF32 and R_390_PLTOFF64.
2898         (elf_s390_reloc_type_lookup): Likewise.
2899         (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
2900         of GOTPLT references to a function.
2901         (link_hash_newfunc): Initialize gotplt_refcount.
2902         (elf_s390_check_relocs): Move allocation of local_got_refcounts array
2903         and creation of the got section out of the main switch. Add support
2904         for the gotoff, gotplt and pltoff relocations.
2905         (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
2906         and pltoff.
2907         (elf_s390_adjust_gotplt): New function.
2908         (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
2909         plt entries.
2910         (allocate_dynrelocs): Add comment.
2911         (elf_s390_relocate_section): Change r_type to unsigned. Add support
2912         for gotoff, gotplt and pltoff relocations.
2913         * elf64-s390.c: Same changes as for elf32-s390.c.
2914         * libbfd.h: Regenerate.
2915         * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
2916         BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
2917         BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
2918         and BFD_RELOC_390_PLTOFF64.
2920 2003-01-18  Jakub Jelinek  <jakub@redhat.com>
2922         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
2923         R_IA64_TPREL64[LM]SB against non-global symbol properly.
2925 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
2927         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
2928         self_dtpmod_done and self_dtpmod_offset.
2929         (allocate_global_data_got): Only use one got entry for all
2930         dtpmod relocs against local symbols.
2931         (allocate_dynrel_entries): Only need .rela.got entry for
2932         dtpmod against global symbol.
2933         (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
2934         Reserve space in .rela.got for the local dtpmod entry.
2935         (set_got_entry): Initialize the common local dtpmod .got entry.
2936         (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
2937         and R_IA_64_DTPREL64MSB.
2939 2003-01-16  Alan Modra  <amodra@bigpond.net.au>
2941         * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
2942         (R_PPC_*): Rename all occurrences to R_PPC64_*.
2943         (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
2944         (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
2945         (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
2946         relative relocs, not with absolute ones.
2947         * Makefile.am: Run "make dep-am".
2948         * Makefile.in: Regenerate.
2949         * po/SRC-POTFILES.in: Regenerate.
2951 2003-01-15  Andreas Schwab  <schwab@suse.de>
2953         * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
2954         relocation against a non-allocated readonly section.
2956 2003-01-10  Alan Modra  <amodra@bigpond.net.au>
2958         * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
2959         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.  PLTGOT16_HA too.
2961 2002-01-08  Klee Dienes  <kdienes@apple.com>
2963         * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
2964         (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
2965         * Makefile.in: Regenerate.
2967 2003-01-08  Alexandre Oliva  <aoliva@redhat.com>
2969         * elfn32-mips.c (prev_reloc_section): New.
2970         (GET_RELOC_ADDEND): Use it.  Parenthesize macro arguments.
2971         (SET_RELOC_ADDEND): Parenthesize macro argument.
2973 2003-01-07  John David Anglin  <dave.anglin@nrc.gc.ca>
2975         * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
2976         adjust addil instructions if the symbol has no section.
2978 2003-01-07  DJ Delorie  <dj@redhat.com>
2980         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
2981         partial_inplace.
2983 2003-01-07  Andreas Schwab  <schwab@suse.de>
2985         * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
2986         PC relative relocations.
2987         (elf_m68k_discard_copies): Set it here instead.
2989 2002-01-02  Ben Elliston  <bje@redhat.com>
2990             Jeff Johnston  <jjohnstn@redhat.com>
2992         * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
2993         (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
2994         (BFD32_BACKENDS): Add elf32-iq2000.lo.
2995         (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
2996         (cpu-iq2000.lo): New target.
2997         * Makefile.in: Regenerate.
2998         * config.bfd: Handle iq2000-*-elf.
2999         * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3000         (bfd_archures_list): Add bfd_iq2000_arch.
3001         * configure.in: Handle bfd_elf32_iq2000_vec.
3002         * configure: Regenerate.
3003         * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
3004         and BFD_RELOC_IQ2000_UHI16.
3005         * targets.c (bfd_elf32_iq2000_vec): Declare.
3006         (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3007         * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3008         * cpu-iq2000.c: New file.
3009         * elf32-iq2000.c: Likewise.
3010         * libbfd.h: Regenerate.
3011         * bfd-in2.h: Likewise.
3013 2003-01-02  Richard Sandiford  <rsandifo@redhat.com>
3015         * elfxx-mips.c: Include libiberty.h.
3016         (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3017         (mips_set_isa_flags): New function, split out from...
3018         (_bfd_mips_elf_final_write_processing): ...here.  Only call
3019         mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3020         (mips_mach_extensions): New array.
3021         (mips_32bit_flags_p): New function.
3022         (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3023         Use mips_32bit_flags_p to check if one binary is 32-bit and the
3024         other is 64-bit.  When adopting IBFD's architecture, adopt the
3025         bfd_mach as well as the flags.
3027 2003-01-02  Nick Kelsey  <nickk@ubicom.com>
3029         * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3030         fix internal errors, fix bad code generation, fix incorrect stabs
3031         information, and improve ability to eliminate redundant page
3032         instructions. Added code to ip2k_final_link_relocate to self-verify
3033         the linker relaxation.  Fix formatting problems.
3035 2002-12-30  Chris Demetriou  <cgd@broadcom.com>
3037         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3038         * archures.c (bfd_mach_mipsisa32r2): New define.
3039         * bfd-in2.h: Regenerate.
3040         * cpu-mips.c (I_mipsisa32r2): New enum value.
3041         (arch_info_struct): Add entry for I_mipsisa32r2.
3042         * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3043         (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3044         (_bfd_mips_elf_final_write_processing): Add
3045         bfd_mach_mipsisa32r2 case.
3046         (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3047         binaries marked as using MIPS32 Release 2.
3049 2002-12-30    Dmitry Diky <diwil@mail.ru>
3051         * Makefile.am: Add msp430 target.
3052         * configure.in: Likewise.
3053         * Makefile.in: Regenerate.
3054         * configure: Regenerate.
3055         * archures.c: Add msp430 architecture vector.
3056         * config.bfd: Likewise.
3057         * reloc.c: Add msp430 relocs.
3058         * targets.c: Add msp320 target.
3059         * cpu-msp430.c: New file: msp430 cpu detection.
3060         * elf32-msp430.c: New file: msp430 reloc processing.
3061         * bfd-in2.h: Regenerate.
3062         * libbfd.h: Regenerate.
3064 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
3066         * elf.c (elf_sort_sections): Don't reorder .tbss.
3067         (assign_file_positions_for_segments): Only adjust off/voff
3068         for increased alignment in PT_LOAD or PT_NOTE segment,
3069         but adjust p_filesz for .tbss too.  in PT_LOAD consider
3070         .tbss to have zero memory size.
3071         (copy_private_bfd_data) [SECTION_SIZE]: Define.
3072         [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3073         [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3074         into PT_TLS segment.  Never put SHF_TLS sections in
3075         segments other than PT_TLS or PT_LOAD.
3077         * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3078         sh_entsize.
3080 2002-12-23  DJ Delorie  <dj@redhat.com>
3082         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3084 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
3086         * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3088 2002-12-23  Nick Clifton  <nickc@redhat.com>
3090         * archures.c (bfd_arch_get_compatible): Add third parameter
3091         'accept_unknowns'.  Only accept unknown format BFDs if
3092         accept_unknowns is true, or if the format is "binary".
3093         * bfd-in2.h: Regenerate.
3095 2002-12-21  Nick Clifton  <nickc@redhat.com>
3097         * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3098         that subtracted 8 from pc relative relocations.
3100 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
3102         * coff-h8300.c: Fix comment typos.
3103         * coffcode.h: Likewise.
3104         * cpu-cris.c: Likewise.
3105         * elf32-vax.c: Likewise.
3106         * genlink.h: Likewise.
3107         * linker.c: Likewise.
3108         * som.c: Likewise.
3109         * tekhex.c: Likewise.
3110         * vms-misc.c: Likewise.
3112 2002-12-20  DJ Delorie  <dj@redhat.com>
3114         * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3115         * libbfd.h: Regenerate.
3116         * bfd-in2.h: Regenerate.
3117         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3118         (xstormy16_reloc_map): Add R_XSTORMY16_12.
3120 2002-12-19  Kazu Hirata  <kazu@cs.umass.edu>
3122         * doc/bfdint.texi: Fix typos.
3124 2002-12-20  Paul Eggert  <eggert@twinsun.com>
3126         Port to POSIX 1003.1-2001.
3127         * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3128         * configure.in (build-warnings): Likewise.
3129         (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3130         * aclocal.m4: Regenerate.
3131         * config.in: Regenerate.
3132         * configure: Regenerate.
3134 2002-12-19  Alan Modra  <amodra@bigpond.net.au>
3136         * coff-h8300.c: Include libiberty.h.
3137         (h8300_reloc16_extra_cases): Check the hash table creator before
3138         referencing h8300 specific fields.  Stash the hash table pointer
3139         in a local var.  Comment typo fixes.
3140         (h8300_bfd_link_add_symbols): Likewise.
3142         * reloc.c (struct reloc_howto_struct): Revise src_mask and
3143         dst_mask comments.
3144         * bfd-in2.h: Regenerate.
3146 2002-12-18  Alan Modra  <amodra@bigpond.net.au>
3148         * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3149         code a little.  Comment on dynamic relocs against section symbols.
3151 2002-12-17  Roger Sayle  <roger@eyesopen.com>
3153         * configure.host (ia64-*-hpux*): Support 64 bit targets using
3154         the HP compiler's "long long".
3156 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
3158         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3159         and R_XSTORMY16_HI16) howto entries.
3160         (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
3161         (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
3162         determine the start of the second reloc table.
3164 2002-12-16  Nathan Tallent  <eraxxon@alumni.rice.edu>
3166         * ecofflink.c: Fix the reading of the debugging information
3167         of Tru64/Alpha binaries that are produced by recent Compaq
3168         compilers.
3169         (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3170         table.
3171         (lookup_line): Because of the strange information sometimes
3172         generated by Compaq's recent compilers, change how the FDR
3173         table is searched so that PDRs (procedure descriptors) are
3174         correctly found.  Note that this change is really more of a hack;
3175         however, I have included extensive documentation as to why
3176         this is the best solution short of an extensive rewrite or
3177         another hack.
3178         (fdrtab_lookup): Add comments to explain the algorithm.
3180 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
3182         * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3183         initializers to match struct declaration.
3185 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
3187         * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3188         * elf.c (get_program_header_size): Likewise.
3189         * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3190         (m32r_elf_generic_reloc): Likewise.
3191         * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3192         * elflink.h (elf_bfd_discard_info): Likewise.
3194 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
3196         * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3197         to DT_JMPREL.  Use srelplt input section size for DT_PLTRELSZ and
3198         DT_RELSZ adjustment, not output section.  Avoid writing tags when
3199         unchanged.  Don't assume linker script is sane, adjust DT_REL too.
3200         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3201         size of srelplt for DT_PLTRELSZ.  Use srelplt input section size for
3202         DT_RELASZ adjustment, not output section.  Avoid writing tags when
3203         unchanged.  Adjust DT_RELA.
3204         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3205         formatting.  Avoid writing tags when unchanged.  Adjust DT_RELA.
3207 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
3209         * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3210         addend by 4.
3212 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
3214         * elfxx-mips.c (struct mips_got_entry): New.
3215         (struct mips_got_info): Added got_entries field.
3216         (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3217         (mips_elf_local_got_index, mips_elf_got_page,
3218         mips_elf_got16_entry): Re-implement in terms of new...
3219         (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3220         Change return type.
3221         (mips_elf_highest): Warning clean-up.
3222         (mips_elf_create_got_section): Initialize got_entries.
3223         (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3224         local got size.
3225         (_bfd_mips_elf_size_dynamic_sections): Do not account for
3226         GOT_PAGE entries, since we now reuse GOT16 entries.
3228 2002-12-10  Jason Thorpe  <thorpej@wasabisystems.com>
3230         * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3231         read-only section that lies after .text and before .data to be
3232         written into the output file and included in a_text.
3233         (translate_to_native_sym_flags): If an otherwise unrepresentable
3234         section was merged with .text, convert its symbols to N_TEXT
3235         symbols.
3236         * libaout.h (aout_section_merge_with_text_p): New macro.
3238 2002-12-08  Alan Modra  <amodra@bigpond.net.au>
3240         * bfd-in.h: Comment typo fix.  Formatting.
3241         * bfd-in2.h: Regenerate.
3242         * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3243         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3244         * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3246 2002-12-05  Richard Henderson  <rth@redhat.com>
3248         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3249         Only send PCREL21B though the plt.  Fix installed reloc type.
3250         (elfNN_ia64_relocate_section): Give error for dynamic reloc
3251         against PCREL22 or PCREL64I; clean up error messages for
3252         branch relocs.
3254 2002-12-04  Kevin Buettner  <kevinb@redhat.com>
3256         * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3257         New functions.
3258         (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3260 2002-12-04  David Mosberger  <davidm@hpl.hp.com>
3262         * cpu-ia64-opc.c: Add operand constant "ar.csd".
3264 2002-12-04  H.J. Lu <hjl@gnu.org>
3266         * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3267         BFD address when constructing local name.
3269 2002-12-04  Andreas Schwab  <schwab@suse.de>
3271         * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3272         member.
3273         (elf_m68k_link_hash_table_create): Initialize it.
3274         (elf_m68k_check_relocs): Handle symbols that are forced to be
3275         local due to visibility changes.
3276         (elf_m68k_adjust_dynamic_symbol): Likewise.
3277         (elf_m68k_size_dynamic_sections): Likewise.
3278         (elf_m68k_discard_copies): Likewise.
3279         (elf_m68k_relocate_section): Likewise.
3281 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
3283         * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3285 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
3287         * srec.c (srec_write_symbols): Restore '$' prefix to address
3288         accidentally removed in 2002-04-04 change.
3289         (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3291 2002-12-03  Nick Clifton  <nickc@redhat.com>
3293         * elf32-ppc.c (apuinfo_list_init): New function.
3294         (apuinfo_list_add): New function: Add a value to the list.
3295         (apuinfo_list_length): New function: Return the number of
3296         values on the list.
3297         (apuinfo_list_element): New function: Return a value on the
3298         list.
3299         (apuinfo_list_finish): New function: Free the resources used
3300         by the list.
3301         (ppc_elf_begin_write_processing): New function.  Scan the
3302         input bfds for apuinfo sections.
3303         (ppc_elf_write_section): New function: Delay the creation of
3304         the contents of an apuinfo section in an output bfd.
3305         (ppc_elf_final_write_processing): New function.  Create the
3306         contents of an apuinfo section in an output bfd.
3307         (elf_backend_begin_write_processing): Define.
3308         (elf_backend_final_write_processing): Define.
3309         (elf_backend_write_section): Define.
3311 2002-12-03  Richard Henderson  <rth@redhat.com>
3313         * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3315 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
3317         Fix PR savannah/1417:
3318         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3319         branch if it goes to the start of the deleted region.
3321 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
3323         * bfd-in2.h (bfd_mach_m6812): Rebuild.
3324         * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3325         bfd_mach_m6812s): Declare.
3327         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3328         (_bfd_m68hc12_elf_set_private_flags): Call it.
3329         (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3330         (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3331         report microcontroller incompatibilities (HC12 vs HCS12).
3332         (elf_backend_object_p): Update.
3334 2002-11-30  Alan Modra  <amodra@bigpond.net.au>
3336         * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3337         (enum bfd_boolean, boolean): Delete.
3338         (bfd_boolean): Typedef to an int.
3339         (FALSE, TRUE): Define.
3340         * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3341         aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3342         aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3343         binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3344         coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3345         coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3346         coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3347         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3348         coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3349         coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3350         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3351         cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3352         cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3353         cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3354         cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3355         cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3356         cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3357         cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3358         cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3359         cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3360         dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3361         elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3362         elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3363         elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3364         elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3365         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3366         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3367         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3368         elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3369         elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3370         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3371         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3372         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3373         elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3374         elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3375         elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3376         hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3377         i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3378         libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3379         libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3380         m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3381         mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3382         nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3383         pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3384         pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3385         pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3386         reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3387         som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
3388         syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
3389         vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3390         xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3391         bfd_boolean, true with TRUE, false with FALSE.  Simplify comparisons
3392         of bfd_boolean vars with TRUE/FALSE.  Formatting.
3393         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3395 2002-11-28  Alan Modra  <amodra@bigpond.net.au>
3397         * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3398         Elf64_Internal_* with Elf_Internal_*.  Replace Elf_Internal_Rel
3399         with Elf_Internal_Rela.
3400         * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3401         elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3402         elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3403         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3404         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3405         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3406         elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3407         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3408         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3409         elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3410         elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3411         * elf-hppa.h (elf_hppa_internal_shdr): Delete.  Use Elf_Internal_Shdr
3412         throughout instead.
3413         * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3414         * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3415         Remove INLINE keyword.
3416         (elf_swap_reloc_in): Likewise.  Also clear r_addend.
3417         (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3418         as a bfd_byte *.
3419         (elf_write_relocs): Consolidate REL and RELA code.
3420         (elf_slurp_reloc_table_from_section): Simplify REL code.
3421         (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3422         * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3423         * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3424         RELA code.
3425         (elf_link_adjust_relocs): Likewise.  Don't malloc space for temp
3426         reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3427         (elf_link_output_relocs): Likewise.
3428         (elf_reloc_link_order): Likewise.
3429         (elf_finish_pointer_linker_section): Likewise.
3430         (struct elf_link_sort_rela): Remove union.
3431         (elf_link_sort_cmp1): Update to suit.
3432         (elf_link_sort_cmp2): Here too.
3433         (elf_link_sort_relocs): Consolidate REL and RELA code.  Fix memory
3434         over-allocation for int_rels_per_ext_rel != 1 case.
3435         * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3436         * elf32-i386.c: Likewise.
3437         * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3438         * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3439         elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3440         * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3441         * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3442         elf64-sparc.c, elf64-x86-64.c: Likewise.
3443         * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3444         * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3445         bfd_elf32_swap_reloc_in.
3447         * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3448         * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3449         (mips_elf64_swap_reloc_in): Zero r_addend.
3450         (mips_elf64_be_swap_reloc_in): Likewise.
3451         (mips_elf64_slurp_one_reloc_table): Simplify.
3453         * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3454         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3455         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3457 2002-11-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3459         * elf32-sh.c (sh_elf_relocate_section): Don't complain about
3460         unresolved debugging relocs in dynamic applications.
3461         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3463 2002-11-26  Alan Modra  <amodra@bigpond.net.au>
3465         * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3466         (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3467         on a relocatable link.  Comment typos.
3468         * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3469         in the order they are declared.  Clear elf_hash_value too.
3470         (_bfd_elf_link_hash_table_init): Likewise assign in order.  Clear
3471         eh_info and tls_segment.
3472         * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3473         sorted when discarding relocs by turning them into R_*_NONE.
3475         * libbfd.c (warn_deprecated): Comment spelling.
3476         * po/SRC-POTFILES.in: Regenerate.
3478 2002-11-21  Richard Henderson  <rth@redhat.com>
3480         * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3481         arch's st_other bits when merging visibilities.
3482         (elf_link_output_extsym): Tidy clearing of visibility field.
3484 2002-11-21  Alan Modra  <amodra@bigpond.net.au>
3486         * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3487         (SWAP_OUT_RELOC_OFFSET): Define.
3489 2002-11-20  Alexandre Oliva  <aoliva@redhat.com>
3491         * elf.c (_bfd_elf_link_hash_table_init): Make sure
3492         can_refcount is properly extended to the type of
3493         init_refcount.
3495 2002-11-19  Alexandre Oliva  <aoliva@redhat.com>
3497         * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3498         (_bfd_mips_elf_relocate_section): Use it.
3500         * elfxx-mips.c (MNAME): New macro.
3501         (_bfd_mips_elf_check_relocs): Use it.
3502         (_bfd_mips_elf_discard_info): Likewise.
3503         (_bfd_mips_elf_final_link): Likewise.
3505 2002-11-19  Alan Modra  <amodra@bigpond.net.au>
3507         * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
3508         rel_hdr.sh_size too.
3510 2002-11-18  Klee Dienes  <kdienes@apple.com>
3512         * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
3513         (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
3514         (BFD_H_FILES): Add bfdwin.c, bfdio.c.
3515         (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
3516         Add dependencies for bfdwin.c, bfdio.c.
3517         * bfd.c: Remove bfd_get_mtime, bfd_get_size.
3518         * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
3519         bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
3520         bfd_tell, bfd_flush, bfd_stat, bfd_seek.
3521         * bfdio.c: New file.  Contains real_read, bfd_bread, bfd_write,
3522         bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
3523         bfd_get_size (moved from libbfd.c and bfd.c).
3524         * bfdwin.c New file.  Contains _bfd_window_internal,
3525         bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
3526         libbfd.c and bfd.c).
3527         * po/SRC-POTFILES.in: Regenerate.
3528         * po/bfd.pot: Regenerate.
3529         * libbfd.h: Regenerate.
3530         * bfd-in2.h: Regenerate.
3531         * aclocal.m4: Regenerate.
3532         * Makefile.in: Regenerate.
3533         * configure: Regenerate.
3535 2002-11-18  Klee Dienes  <kdienes@apple.com>
3537         * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
3539 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
3541         * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
3542         jsr after a short jump.
3543         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3545 2002-11-15  Klee Dienes  <kdienes@apple.com>
3547         * pef.c (bfd_pef_convert_architecture): Move declaration of
3548         ARCH_POWERPC and ARCH_M68K to the start of the function.
3550 2002-11-14  Svein E. Seldal  <Svein.Seldal@solidas.com>
3552         * coff-tic4x.c (tic4x_howto_table): Formatting fixup
3554 2002-11-14  Hans-Peter Nilsson  <hp@bitrange.com>
3556         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
3557         For bpo_gregs_section->contents, allocate _raw_size, not
3558         _cooked_size.
3560 2002-11-13  Klee Dienes  <kdienes@apple.com>
3562         * config.bfd: Add entries for powerpc-*-darwin and cousins.
3564 2002-11-13  H.J. Lu <hjl@gnu.org>
3566         * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
3568 2002-11-13  Klee Dienes  <kdienes@apple.com>
3569             Alan Modra  <amodra@bigpond.net.au>
3571         * bfd.c (struct bfd_preserve): New.
3572         (bfd_preserve_save): New function.
3573         (bfd_preserve_restore): Ditto.
3574         (bfd_preserve_finish): Ditto.
3575         * bfd-in2.h: Regenerate.
3576         * mach-o.c: Formatting.
3577         (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
3578         (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
3579         (bfd_mach_o_core_p): Ditto.
3580         (bfd_mach_o_scan): Pass in mdata.
3581         * mach-o.h (bfd_mach_o_scan): Update prototype.
3582         * pef.c: Formatting.
3583         (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
3584         (bfd_pef_xlib_object_p): Ditto.
3585         (bfd_pef_scan): Pass in mdata.  Move version check to bfd_pef_object_p.
3586         * pef.h (bfd_pef_scan): Update prototype.
3587         * xsym.c: Formatting, K&R fixes.
3588         (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
3589         (bfd_sym_scan): New function split out from bfd_sym_object_p.
3590         * xsym.h (bfd_sym_scan): Declare.
3591         * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
3592         * elfcore.h (elf_core_file_p): Likewise.
3593         * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
3595 2002-11-12  Nick Clifton  <nickc@redhat.com>
3597         * po/da.po: Updated Danish translation.
3599 2002-11-12  Alan Modra  <amodra@bigpond.net.au>
3601         * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3602         relocatable link too.
3603         (elf_link_input_bfd): When emitting relocs, adjust offsets for
3604         eh_frame and stab sections.  Zap deleted relocs.
3605         (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
3606         (elf_bfd_discard_info): Run for relocatable link too.
3607         * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd.  Make global.
3608         Handle ld -r case.
3609         (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
3610         * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
3612         * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
3613         (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
3614         (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
3615         (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
3616         (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
3617         (struct elf_link_hash_table): Add eh_info.
3618         (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
3619         (_bfd_elf_discard_section_eh_frame): Update prototype.
3620         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
3621         (_bfd_elf_write_section_eh_frame): Likewise.
3622         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
3623         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
3624         param.  Get "hdr_info" from link hash table.
3625         (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param.  Get
3626         header section from link hash table.  Save header section to elf_tdata.
3627         (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec".  Use
3628         header section from link hash table.  Don't alloc hdr_info.  Clear
3629         hdr_sec instead of setting "strip".
3630         (_bfd_elf_eh_frame_section_offset): Formatting.
3631         (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
3632         Get header section from link hash table.
3633         (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
3634         Get header section from link hash table.
3635         * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
3636         (get_program_header_size): Likewise.
3637         (_bfd_elf_section_offset): Formatting.
3638         * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
3639         section pointer in link hash table.
3640         (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
3641         and _bfd_elf_write_section_eh_frame calls.  Update comment about
3642         eh_frame entries.
3643         (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
3644         _bfd_elf_discard_section_eh_frame_hdr calls.  Remove "ehdr".
3646         * po/SRC-POTFILES.in: Regenerate.
3648         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
3649         relocs for discarded FDEs.  Remove dead code.
3650         (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
3651         * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
3652         Tidy conditions under which stabs are edited.  Formatting.
3653         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3654         from discarded relocs.
3655         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
3656         section adjustments after testing magic values.
3658 2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
3660         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
3661         references to large plt symbols.
3663 2002-11-12  Klee Dienes  <kdienes@apple.com>
3665         * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
3666         looking for an unused section name.
3668 2002-11-11  Kazu Hirata  <kazu@cs.umass.edu>
3670         * coff-h8300.c: Fix formatting.
3671         * elf32-h8300.c: Likewise.
3672         * reloc16.c: Likewise.
3674 2002-11-09  Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
3676         * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
3677         section when dynamic section unused;  _bfd_strip_section_from_output
3678         instead.
3680 2002-11-08  Alan Modra  <amodra@bigpond.net.au>
3682         * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
3683         and sym_vec.
3685         * dwarf2.c: Revert last change.
3687 2002-11-07  Michal Ludvig  <mludvig@suse.cz>
3689         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
3690         _bfd_dwarf2_find_nearest_line): Use
3691         bfd_simple_get_relocated_section_contents() instead of
3692         bfd_get_section_contents().
3693         * reloc.c (bfd_perform_relocation): Add sanity check.
3694         * simple.c (simple_get_relocated_section_contents): If the section
3695         does not have any relocs associated with it, just return the
3696         unadjusted contents.
3698 2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
3700         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
3701         case R_CRIS_32_GOT>: Correct test for filling in constant .got
3702         contents, enabling for a non-DSO, for symbols defined in the
3703         program with --export-dynamic.
3705 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
3707         * elf64-ppc.c: Comment typo fixes.
3708         (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
3710 2002-11-07  Nick Clifton  <nickc@redhat.com>
3712         * po/da.po: Updated Danish translation.
3714 2002-11-06  Alexandre Oliva  <aoliva@redhat.com>
3716         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
3717         exactly three internal relocs per external reloc.  Set reloc_count
3718         to the external reloc count.
3720 2002-11-06  Klee Dienes  <kdienes@apple.com>
3722          * coff-stgo32.c (stub_bytes): Mark as const.
3723          Fix comment formatting.
3725 2002-11-06  Klee Dienes  <kdienes@apple.com>
3727         * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3728         xsym.lo.
3729         (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
3730         (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
3731         * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
3732         * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
3733         * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
3734         sym.
3735         (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3736         * Makefile.in: Regenerate.
3737         * doc/Makefile.in: Regenerate.
3738         * bfd-in2.h: Regenerate.
3739         * xsym.c: New file.  Contains support for the Apple/Metrowerks
3740         xSYM debugging format.
3741         * xsym.h: New file.
3742         * pef.c: New file.  Contains support for the Apple Code Fragment
3743         Manager Preferred Executable Format
3744         * pef.h: New file.
3745         * pef-traceback.h: New file.  Contains support for parsing PowerPC
3746         traceback tables as used by PEF executables (and perhaps other
3747         systems as well).
3748         * mach-o.c: New file.  Contains support for the Mach-O object file
3749         format.
3750         * mach-o.h: New file.
3751         * mach-o-target.c: New file.  Declares the mach-o targets
3752         themselves.  Included three times by mach-o.c; each time with a
3753         different set of macros set.
3755 2002-11-06  Graeme Peterson  <gp@qnx.com>
3757         * Makefile.am: Remove entries for elf32-qnx.[ch].
3758         * Makefile.in: Regenerate.
3759         * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
3760         ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
3761         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3762         * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
3763         bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
3764         and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
3765         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3766         * configure: Regenerate.
3767         * elf32-qnx.c: Remove.
3768         * elf32-qnx.h: Remove.
3769         * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
3770         is_contained_by_filepos, and copy_private_bfd_data_p.
3771         * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
3772         is_contained_by_filepos, and copy_private_bfd_data_p.
3773         * elf32-i386.c: Remove QNX extended bfd support.
3774         * elf32-ppc.c: Remove QNX extended bfd support.
3775         * elf32-sh.c: Remove QNX extended bfd support.
3776         * elfarm-nabi.c: Remove QNX extended bfd support.
3777         * targets.c: Remove qnx vectors.
3778         * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
3779         (elf_backend_is_contained_by_filepos): Remove.
3780         (elf_backend_copy_private_bfd_data_p): Remove.
3781         * po/SRC-POTFILES.in: Regenerate.
3783 2002-11-06  David O'Brien  <obrien@FreeBSD.org>
3784             Alan Modra  <amodra@bigpond.net.au>
3786         * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
3787         dynamic relocs against section symbols for the output section vma.
3789 2002-11-05  Alan Modra  <amodra@bigpond.net.au>
3791         * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
3792         t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
3794 2002-11-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3795             Alan Modra  <amodra@bigpond.net.au>
3797         * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
3798         vectors in target_selvecs.
3799         (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
3800         in target_selvecs.
3801         (sh-*-netbsdelf*): Likewise.
3802         * configure.in (assocvecs): New variable.  Handle assocvecs like
3803         selvecs.
3804         * configure: Regenerate.
3805         * format.c (bfd_check_format_matches): Store bfd_target pointers
3806         in matching_vector instead of target names.  Select first target
3807         from bfd_associated_vector that matches a list of ambiguous targets.
3808         * targets.c (_bfd_associated_vector): New array.
3809         (bfd_associated_vector): New variable.
3810         (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
3811         * libbfd-in.h (bfd_associated_vector): Declare.
3812         * libbfd.h: Regenerate.
3814 2002-11-05  Elias Athanasopoulos  <eathan@otenet.gr>
3816         * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
3817         non-NULL before dereferencing.
3819 2002-11-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3821         * vms.c (vms_object_p): Restore the start address when returning
3822         NULL.
3824 2002-11-04  Alan Modra  <amodra@bigpond.net.au>
3825             Hans-Peter Nilsson  <hp@axis.com>
3827         * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
3828         (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
3829         Set up a larger symshndxbuf, and write it out.  Free it on
3830         exit rather than freeing symbuf twice.  Correct section index
3831         on output section symbol loop.
3832         (elf_link_output_sym): Accumulate symbol extension section
3833         indices, reallocating symshndxbuf rather than writing it out.
3834         (elf_link_flush_output_syms): Don't flush symshndxbuf.
3835         * elf.c (assign_section_numbers): Init i_shdrp to all zero.
3836         Use bfd_zalloc to clear i_shdrp[0] too.
3838 2002-11-03  Stephen Clarke <stephen.clarke@earthling.net>
3840          * elf32-sh64-com.c (sh64_address_in_cranges): Use
3841         _raw_size of cranges section if _cooked_size not yet set.
3843 2002-11-03  Hans-Peter Nilsson  <hp@axis.com>
3845         * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
3846         for bfd_elf32_swap_symbol_out.
3848 2002-10-31  David O'Brien  <obrien@FreeBSD.org>
3850         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
3851         signed and unsigned in comparison.
3853 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
3855         * coffcode.h: Remove extraneous '\'.
3857 2002-10-28  H.J. Lu <hjl@gnu.org>
3859         * Makefile.am (targets.lo): Depend on Makefile instead of
3860         config.status.
3861         (archures.lo): Likewise.
3862         * Makefile.in: Regenerated.
3864 2002-10-25  Jason Thorpe  <thorpej@wasabisystems.com>
3866         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
3867         bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
3868         targ_selvecs.
3870 2002-10-25  Jim Wilson  <wilson@redhat.com>
3872         * elf64-sh64.c (sh_elf64_relocate_section): Call
3873         _bfd_elf_rela_local_sym.  Handle relocs against STT_SECTION symbol
3874         of SHF_MERGE section.
3876 2002-10-25  Hans-Peter Nilsson  <hp@axis.com>
3878         * simple.c: Correct placement of ATTRIBUTE_UNUSED.
3880 2002-10-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3882         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
3883         unsigned int.  Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
3884         unsigned int.
3885         (NAME(aout,final_link)): Cast enum used in assignment.
3886         (aout_link_write_symbols): Cast enums in comparisons, int values to
3887         boolean, enums in assignments to int.
3888         (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3889         (aout_link_input_section_ext): Likewise.  Cast enums used in
3890         comparisons with unsigned ints.
3891         (aout_link_reloc_link_order): Cast enum to int in assignment.
3892         * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
3893         calls to char *.
3894         * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
3895         assignment.
3896         * bfd-in2.h (bfd_set_section_vma): Likewise.
3897         * bfd.c (bfd_record_phdr): Cast enums in assignments.
3898         * binary.c (bfd_alloc): Cast enum to long.
3899         * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
3900         * dwarf2.c (read_abbrevs): Add casts to enum types.
3901         (read_attribute_value): Likewise.
3902         (arange_add): Cast result of bfd_zalloc call.
3903         (comp_unit_contains_address): Return true and false.
3904         (comp_unit_find_nearest_line): Cast return to boolean.
3905         * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
3906         * gen-aout.c: define macro '_' if not defined.
3907         * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
3908         (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
3909         (bfd_write_bigendian_4byte_int): Cast return to boolean.
3910         (bfd_seek): Cast bfd_realloc to bfd_byte *.
3911         (bfd_generic_is_local_label_name): Cast return to boolean.
3912         * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
3913         * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
3914         struct bfd_hash_entry *.
3915         (_bfd_generic_link_hash_newfunc): likewise.
3916         (_bfd_generic_final_link): Cast enum to unsigned int.
3917         * merge.c (sec_merge_emit): Cast return to boolean.
3918         (merge_strings): Add casts to const unsigned char *.
3919         * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
3920         (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3921         * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
3922         to struct bfd_hash_entry *.
3923         (bfd_set_section_content): Add cast to PTR in comparison.
3924         * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
3925         simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
3926         simple_dummy_unattached_reloc,
3927         bfd_simple_get_relocated_section_contents): Add K&R declarations and
3928         function definitions.
3929         * srec.c (S3Forced): Initialize to false.
3930         (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
3931         * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
3932         (_bfd_discard_section_stabs): Likewise.  Also cast return to boolean.
3933         * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
3934         (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
3935         comparisons.
3937 2002-10-23  Jakub Jelinek  <jakub@redhat.com>
3939         * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
3940         relocs into shared lib non-allocated reloc sections.
3942 2002-10-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
3944         * dwarf2.c (add_line_info): Ensure that the line_info_table is
3945         sorted even when given an out-of-order line sequence.
3946         (lookup_address_in_line_info_table): When an exact VMA match is
3947         not found, return line information with the closest VMA.
3949 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
3951         * elf64-hppa.c: Force DT_FLAGS to always be set.  Required by
3952         HPUX 11.00 patch PHSS_26559.
3954 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
3956         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
3957         the options section into a separate section unless IRIX 6
3958         compatibility is enabled.
3960 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
3962         * elflink.h (struct elf_link_sort_rela): Turn rel and rela
3963         into arrays.
3964         (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
3965         (elf_link_sort_relocs): Likewise.  Take int_rels_per_ext_rel
3966         into account.
3967         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
3968         R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
3970 2002-10-21  Graeme Peterson  <gp@qnx.com>
3972         * targets.c (_bfd_target_vector): Add missing qnx vectors.
3974 2002-10-21  Alan Modra  <amodra@bigpond.net.au>
3976         * targets.c (bfd_target_list): Don't return the default target twice.
3978 2002-10-21  Elias Athanasopoulos  <eathan@otenet.gr>
3980         * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
3981         perror with bfd_perror.
3983 2002-10-19  H.J. Lu <hjl@gnu.org>
3985         * elflink.h (elf_link_add_object_symbols): Correctly handle
3986         DT_RPATH and DT_RUNPATH.
3988 2002-10-19  Mark Kettenis  <kettenis@gnu.org>
3990         * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
3992 2002-10-17  Denis Chertykov  <denisc@overta.ru>
3994         * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
3995         for ip2k port.
3997 2002-10-17  Alan Modra  <amodra@bigpond.net.au>
3999         * elfxx-target.h (USE_REL): Don't define as 1.
4000         * elf32-arm.h (USE_REL): Provide a default define of 0.
4001         Use #if rather than #ifdef when testing USE_REL.
4002         * elf32-m32r.c: Likewise.
4004         * elf32-arc.c (USE_REL): Define as 1.
4005         * elf32-d10v.c (USE_REL): Likewise.
4006         * elf32-m32r.c (USE_REL): Likewise.
4007         * elf32-m68hc11.c (USE_REL): Likewise.
4008         * elf32-m68hc12.c (USE_REL): Likewise.
4009         * elf32-or32.c (USE_REL): Likewise.
4010         * elfarm-nabi.c (USE_REL): Likewise.
4012 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
4014         * config.bfd (s390-*-linux*): Add targ64_selvecs.
4015         (s390x-*-linux*): Add targ_selvecs.
4017 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
4019         * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
4020         elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
4021         elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4022         elf32-sh64-nbsd.lo, elf32-shqnx.lo.  Add elf32-qnx.lo.
4023         (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4024         (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4025         (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4026         (SOURCE_HFILES): Add elf32-qnx.h.
4027         (BUILD_HFILES): Add bfdver.h.
4028         Run "make dep-am".
4029         * Makefile.in: Regenerate.
4030         * configure.in Update bfd vector dependencies.
4031         * configure: Regenerate.
4032         * elf32-i386-fbsd.c: Delete.  Move code to elf32-i386.c.
4033         * elf32-i386qnx.c: Likewise.
4034         * elf32-ppcqnx.c: Delete.  Move code to elf32-ppc.c.
4035         * elf32-sh-nbsd.c: Delete.  Move code to elf32-sh.c.
4036         * elf32-sh-lin.c: Likewise.
4037         * elf32-shqnx.c: Likewise.
4038         * elf32-sh64-lin.c: Delete.  Move code to elf32-sh64.c.
4039         * elf32-sh64-nbsd.c: Likewise.
4040         * elf64-sh64-lin.c: Delete.  Move code to elf64-sh64.c.
4041         * elf64-sh64-nbsd.c: Likewise.
4042         * elfarmqnx-nabi.c: Delete.  Move code to elfarm-nabi.c.
4043         * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4044         * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4045         * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4046         * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4047         (elf_backend_is_contained_by_filepos): Likewise.
4048         (elf_backend_copy_private_bfd_data_p): Likewise.
4049         Globalize and move functions to..
4050         * elf32-qnx.c: ..here.  New file.
4051         * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests.  Don't
4052         emit target vectors when INCLUDE_SHMEDIA.
4053         * elf32-sh64.c: Remove ELF_ARCH test.  Move TARGET_* etc. defines to
4054         end of file.
4055         * elf64-sh64.c: Remove ELF_ARCH test.
4056         * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4057         * po/BLD-POTFILES.in: Regenerate.
4058         * po/SRC-POTFILES.in: Regenerate.
4060 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
4062         * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4063         loaded with --just-symbols.
4065         * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4066         * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4067         * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4068         * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4070 2002-10-15  Richard Henderson  <rth@redhat.com>
4072         * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4073         (BFD64_BACKENDS_CFILES): Likewise.
4074         * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4075         * elf64-alpha-fbsd.c: Remove file, move code ...
4076         * elf64-alpha.c: ... here.
4077         * Makefile.in, configure: Rebuild.
4079 2002-10-14  Richard Henderson  <rth@redhat.com>
4081         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4082         VALUE, not ADDEND.
4084 2002-10-14  Stephen Clarke <stephen.clarke@superh.com>
4086         * elf32-sh.c (elf_sh_link_hash_entry): Replace
4087         datalabel_got_offset with union of datalabel_got
4088         offset and refcount.
4089         (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4090         (allocate_dynrelocs): Delete unnecessary code for
4091         STT_DATALABEL type.  Create entry in got for
4092         datalabel version of symbol if datalabel_got.refcount > 0.
4093         (sh_elf_relocate_section): Use datalabel_got union.
4094         (sh_elf_gc_sweep_hook): Pull common code to initialize
4095         h and eh out of switch statement.  Declare seen_stt_datalabel.
4096         Initialize it.  Decrement datalabel_got.refcount for
4097         got relocs when seen_stt_datalabel is true.
4098         Decrement local_got_refcounts entry for datalabel got relocs
4099         of local symbols.
4100         (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4101         (sh_elf_check_relocs): Declare seen_stt_datalabel.
4102         Initialize it.  When seen_stt_datalabel is true, increment
4103         datalabel_got refcount rather than got.refcount.
4104         (sh_elf_finish_dynamic_symbol): Create relocs to
4105         initialize got entry for datalabel version of symbol.
4107 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
4109         * Makefile.am: Run "make dep-am".
4110         (BFD_H_FILES): Remove version.h.
4111         * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4112         * version.h: ..to here.
4113         * configure.in (bfd_version_date): Remove.
4114         (AC_OUTPUT): Make bfdver.h from version.h.
4115         * bfd.c: #include "bfdver.h".
4116         * vms-hdr.c: Likewise.
4117         * Makefile.in: Regenerate.
4118         * bfd-in2.h: Regenerate.
4119         * configure: Regenerate.
4120         * po/SRC-POTFILES.in: Regenerate.
4122 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
4124         * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4125         bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4126         bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4127         bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4128         bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4129         bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4130         bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4131         bfd_mach_ip2022, bfd_mach_ip2022ext,
4132         bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4133         * bfd-in2.h: Regenerate.
4135 2002-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4137         * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4138         endian vector to targ_selvecs.
4140 2002-10-13  Alexandre Oliva  <aoliva@redhat.com>
4142         * elfxx-mips.c (mips_elf_calculate_relocation): Take
4143         save_addend argument.  Don't apply the 32-bit mask to a
4144         GPREL32 value if it's to be used in another relocation.  Don't
4145         use forced-check computation of local_p to decide whether to
4146         add gp0 to GPREL16 value.  Don't use only the lowest 16 bits
4147         of the addend of a non-in-place GPREL16 relocation.
4148         (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4149         mips_elf_calculate_relocation().
4151 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
4153         * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4154         with symbols in other sections if we relaxed something;  the sections
4155         output offsets must be re-computed before.
4157 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
4159         * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4160         handling to use Elf_Internal_Sym.
4161         (m68hc11_elf_relax_delete_bytes): Likewise.
4163 2002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4165         * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4166         sh_elf_object_p, dtpoff_base): New functions.
4167         (sh_elf_howto_table): Add TLS relocs.
4168         (sh_reloc_map): Likewise.
4169         (sh_elf_info_to_howto): Support TLS relocs.
4170         (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4171         (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4172         New macros.
4173         (sh_elf_obj_tdata): New.
4174         (elf_sh_link_hash_table): Add tls_ldm_got.
4175         (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4176         (allocate_dynrelocs): Support TLS relocs.
4177         (sh_elf_size_dynamic_sections): Likewise.
4178         (sh_elf_relocate_section): Support TLS relocs.  Don't try to find
4179         .rela.got section when found already.  Return false after printing
4180         error about unresolvable relocation.
4181         (sh_elf_gc_sweep_hook): Support TLS relocs.
4182         (sh_elf_check_relocs): Likewise.
4183         (sh_elf_finish_dynamic_symbol): Likewise.
4184         (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4185         * reloc.c: Add SH TLS relocs.
4186         * bfd-in2.h, libbfd.h: Regenerate.
4188 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
4190         * Makefile.in: Regenerated.
4192 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
4194         * Makefile.am: Run dep-am.
4195         (BFD_H_DEP): Add simple.c and linker.c.
4196         (BFD32_LIBS): Add simple.lo.
4197         (BFD32_LIBS_CFILES): Add simple.c.
4198         * Makefile.in: Regenerated.
4199         * bfd-in2.h: Regenerated.
4200         * simple.c: New file.
4202 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
4204         * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4205         (record_thumb_to_arm_glue): Likewise.
4206         * ecoff.c (ecoff_link_add_externals): Likewise.
4207         * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4208         (record_thumb_to_arm_glue): Likewise.
4209         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4210         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4211         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4212         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4213         * elf64-ppc.c (func_desc_adjust): Likewise.
4214         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4215         (sh64_elf64_create_dynamic_sections): Likewise.
4216         * elflink.c (_bfd_elf_create_got_section): Likewise.
4217         (_bfd_elf_create_dynamic_sections): Likewise.
4218         (_bfd_elf_create_linker_section): Likewise.
4219         * elflink.h (elf_add_default_symbol): Likewise.
4220         (elf_link_create_dynamic_sections): Likewise.
4221         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4222         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4223         * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4224         (_bfd_mips_elf_add_symbol_hook): Likewise.
4225         (_bfd_mips_elf_create_dynamic_sections): Likewise.
4226         * linker.c (generic_link_add_symbol_list): Likewise.
4227         * xcofflink.c (xcoff_link_add_symbols): Likewise.
4229         * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4231         * elf64-ppc.c (edit_opd): Only zero opd syms when function is
4232         completely removed.  Correct local sym adjustment.
4234 2002-10-10  Stephen Clarke <stephen.clarke@superh.com>
4236         * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4237         Correct mistake in calculation of address of .got.
4238         * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4239         elf_sh64_pic_plt_entry_le): Likewise.
4241 2002-10-09  Richard Shann <richard.shann@superh.com>
4242             Stephen Clarke <stephen.clarke@superh.com>
4244         * Makefile.am: Add entries for elf32-sh64-lin.c and
4245         elf64-sh64-lin.c. Regenerate.
4246         * Makefile.in: Regenerate.
4247         * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
4248         to use sh64 vectors rather than sh vectors.
4249         * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4250         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4251         * configure: Regenerate.
4252         * elf32-sh64-lin.c: New file.
4253         * elf64-sh64-lin.c: New file.
4254         * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4255         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4257 2002-10-08  H.J. Lu <hjl@gnu.org>
4259         * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4260         IE->LE transition for R_386_TLS_IE.
4262 2002-10-08  Alan Modra  <amodra@bigpond.net.au>
4264         * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4266 2002-10-07  Mark Elbrecht  <snowball3@softhome.net>
4268         * cofflink.c (mark_relocs): Don't mark relocations in excluded
4269         sections.
4271 2002-10-07  Alan Modra  <amodra@bigpond.net.au>
4273         * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4274         code.
4276         * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4278 2002-10-06  Alan Modra  <amodra@bigpond.net.au>
4280         * opncls.c: Formatting.
4281         (_bfd_new_bfd): Use a smaller section hash table.
4283 2002-10-05  Alexandre Oliva  <aoliva@redhat.com>
4285         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4286         of the other two relocations packed with a REL32 to NONE.
4288 2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
4290         * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4291         (sh_elf_link_hash_newfunc): Initialize it.
4292         (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4293         to got.refcount for symbols that are forced local or when
4294         we have direct got refs.
4295         (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
4296         to correctly adjust got.refcount and plt.refcount.
4297         (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4298         (sh_elf_check_relocs): Increment gotplt_refcount.
4300 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
4302         * elf32-i386.c (elf_i386_relocate_section): Fix
4303         movl foo@indntpoff, %eax IE->LE transition.
4305 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
4307         * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4308         sequence and its transitions.
4310 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
4312         * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4313         to st_value + addend in non-code sections.
4314         * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4315         R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4317 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
4318             Ken Raeburn  <raeburn@cygnus.com>
4319             Aldy Hernandez  <aldyh@redhat.com>
4320             Eric Christopher  <echristo@redhat.com>
4321             Richard Sandiford  <rsandifo@redhat.com>
4323         * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4324         (bfd_mach_mips5500): New.
4325         * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4326         (arch_info_struct): Add corresponding entries here.
4327         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4328         E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4329         (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4330         bfd_mach_mips5400 and bfd_mach_mips5500.
4331         (_bfd_mips_elf_mach_extends_p): New function.
4332         (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4333         the EF_MIPS_MACH flags.
4334         * bfd-in2.h: Regenerate.
4336 2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
4338         * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4339         .got sections.
4341 2002-09-28  Alan Modra  <amodra@bigpond.net.au>
4343         * elf.c (map_sections_to_segments): Correct test for start of
4344         writable section in the same page as end of read-only section.
4346 2002-09-27  Matt Thomas  <matt@3am-software.com>
4348         * elf32-vax.c (elf_vax_check_relocs): Remove unused
4349         local_got_refcounts usage.  Remove allocation of got slot.
4350         (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4351         Remove de-allocation of got slot.
4352         (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
4353         traversal for elf_vax_instantiate_got_entries.  Allow empty .got
4354         sections to be GC'ed.
4355         (elf_vax_instantiate_got_entries): New function.
4356         (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
4357         tests that are now handled by elf_vax_instantiate_got_entries.
4358         Assert GOT entry falls within .got section size.  Remove redundant
4359         comparisions.  Fix comments.
4361 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
4363         * reloc.c: Add x86-64 TLS relocs.
4364         * bfd-in2.h, libbfd.h: Rebuilt.
4365         * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4366         relocs.  Add TLS relocs.
4367         (x86_64_reloc_map): Add TLS relocs.
4368         (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4369         (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4370         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4371         (elf64_x86_64_hash_entry): Define.
4372         (struct elf64_x86_64_obj_tdata): New.
4373         (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4374         (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4375         (link_hash_newfunc): Initialize tls_type.
4376         (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4377         (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4378         (elf64_x86_64_mkobject): New.
4379         (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4380         (elf64_x86_64_tls_transition): New.
4381         (elf64_x86_64_check_relocs): Add r_type variable and use it.
4382         Handle TLS relocs.
4383         (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4384         (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4385         (elf64_x86_64_size_dynamic_sections): Likewise.
4386         (dtpoff_base, tpoff): New.
4387         (elf64_x86_64_relocate_section): Handle TLS relocs.
4388         (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4389         entries.
4390         (bfd_elf64_mkobject): Define.
4392         * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4393         DF_STATIC_TLS if shared.
4395 2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4397         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4398         empty relocation sections.
4400 2002-09-26  Alan Modra  <amodra@bigpond.net.au>
4402         * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4403         (ppc64_elf_build_stubs): Build them here instead.
4405 2002-09-24  Jakub Jelinek  <jakub@redhat.com>
4407         * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4408         addend into r_addend, not *r_offset.
4409         (elf32_sparc_finish_dynamic_symbol): Likewise.
4410         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4411         R_SPARC_RELATIVE's r_offset.
4413 2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
4415         * dwarf2.c (decode_line_info): Update to correctly decode
4416         the (non-standard DWARF2) out-of-order address sequences
4417         generated by the Intel C++ 6.0 compiler for ia64-Linux.
4419 2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
4421         * config.bfd: For DJGPP targets, match with any cpu and any machine.
4423 2002-09-23  Alan Modra  <amodra@bigpond.net.au>
4425         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4426         for discarded FDEs.  Remove redundant assignment.
4427         * elflink.h (elf_bfd_discard_info): Save edited relocs.
4429 2002-09-22  H.J. Lu <hjl@gnu.org>
4431         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4432         the relocation count between different .reloc sections.
4434 2002-09-21  Alan Modra  <amodra@bigpond.net.au>
4436         * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4437         ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4438         R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
4439         R_PPC_EMB_RELSDA.
4441         * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4442         unsigned.  Move "symcount" assignment out of loop.
4443         * Makefile.am: Run "make dep-am".
4444         * Makefile.in: Regenerate.
4445         * configure: Regenerate.
4446         * po/SRC-POTFILES.in: Regnerate.
4448 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
4450         * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4451         zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4452         (e.g. IRIX64).
4454 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
4456         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4457         even if generating R_PPC_RELATIVE reloc.
4458         (ppc_elf_relocate_section): Make sure relocation is performed
4459         if skip == -2.  Clear memory at r_offset when creating dynamic
4460         relocation.
4462 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
4464         * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4465         BFD_RELOC_386_TLS_GOTIE): Add.
4466         * bfd-in2.h, libbfd.h: Rebuilt.
4467         * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4468         and R_386_TLS_GOTIE.
4469         (elf_i386_reloc_type_lookup): Handle it.
4470         (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4471         char instead of enum, change GOT_* into defines.
4472         (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4473         (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4474         (elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
4475         accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
4476         R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4477         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4478         (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4479         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4480         (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4481         tls_type is GOT_TLS_IE_BOTH.
4482         (elf_i386_size_dynamic_sections): Likewise.
4483         (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4484         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4485         (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4486         all 4 GOT_TLS_* TLS types.
4488 2002-09-19  Nick Clifton  <nickc@redhat.com>
4490         * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4491         follow indirect links.
4493 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
4495         * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4496         correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4497         on 64 bit machines.
4498         (ecoff_swap_sym_in) <iss>: Likewise.
4499         * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4500         ECOFF information: 'ioptMax' refers to the actual *size*
4501         of the optimization symtab, not the number of entries.
4503 2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
4505         * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4506         ELF_LINK_HASH_NEEDS_PLT logic.
4508 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
4510         * elfcode.h (elf_slurp_reloc_table_from_section): Check
4511         correct relocation count.
4513 2002-09-17  Daniel Jacobowitz  <drow@mvista.com>
4515         * bfd-in.h (bfd_get_dynamic_symcount): Define.
4516         * bfd.c (struct _bfd): Add dynsymcount.
4517         * bfd-in2.h: Regenerated.
4518         * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
4519         abfd->dynsymcount.
4520         * elfcode.h (elf_slurp_reloc_table_from_section): Check
4521         for overflow.
4523 2002-09-17  Stan Cox <scox@redhat.com>
4525         * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
4526         (mips_elf64_final_gp): Don't make up gp value.
4527         * elfn32-mips.c (mips_elf_final_gp): Likewise.
4528         * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
4529         .MIPS.options/.options section.
4531 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
4533         * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
4534         It is benign for FreeBSD < 4.1.  Minor reformatting.
4535         * elf64-alpha-fbsd.c: Likewise.
4537 2002-09-17  Jakub Jelinek  <jakub@redhat.com>
4539         * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
4540         addend.
4542 2002-09-17  Alan Modra  <amodra@bigpond.net.au>
4544         * elf64-alpha.c (alpha_elf_size_info): Make static.
4546 2002-09-17  Svein E. Seldal  <Svein.Seldal@solidas.com>
4548         * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
4549         * cpu-tic4x.c: Ditto.
4551 2002-09-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4553         * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
4554         duplicate define.
4556 2002-09-16  Bruno Haible  <bruno@clisp.org>
4558         * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
4559         by a target variant implementation.
4560         * elf64-alpha.c: Likewise.
4561         * elf32-i386-fbsd.c: New file.
4562         * elf64-alpha-fbsd.c: New file.
4563         * targets.c: Support bfd_elf32_i386_freebsd_vec and
4564         bfd_elf64_alpha_freebsd_vec.
4565         * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
4566         bfd_elf64_alpha_freebsd_vec.
4567         * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
4568         (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
4569         (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
4570         (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
4571         (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
4572         * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
4573         specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
4575 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
4577         * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
4578         NULL.
4579         (elf_i386_relocate_section): Return false after printing error about
4580         unresolvable relocation.
4582 2002-09-12  Nick Clifton  <nickc@redhat.com>
4584         * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
4585         R_ARM_THM_PC11.
4587 2002-09-11  Jeffrey Law  <law@redhat.com>
4589         * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
4591 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
4593         * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
4594         line_ptr before deciding we've found a symbol.
4596 2002-09-11  Nick Clifton  <nickc@redhat.com>
4598         * po/da.po: New Danish translation file.
4599         * configure.in (LINGUAS): Add 'da'.
4600         * configure: Regenerate.
4602 2002-09-10  Michael Snyder  <msnyder@redhat.com>
4604         * irix-core.c (do_sections, do_sections64): New functions.
4605         (irix_core_core_file_p): Call new functions do_sections,
4606         do_sections64, depending on corefile (32-bit or 64-bit).
4608 2002-09-09  Richard Henderson  <rth@redhat.com>
4610         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
4611         and PCREL21F like PCREL21B.
4613 2002-09-04  Kevin Buettner  <kevinb@redhat.com>
4615         * config.bfd (mips*-*-irix6*): Add new ABI vectors.  Make n32 default
4616         vector.
4618 2002-09-02  Nick Clifton  <nickc@redhat.com>
4620         * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
4621         names instead of cryptically overloaded bfd_reloc error
4622         codes.
4623         (v850_elf_relocate_section): Likewise.
4624         (v850_elf_relax_section): Replace caching of external symbols
4625         with caching of internal symbols obtained from calling
4626         bfd_elf_get_elf_syms().
4627         Fixup problems with freeing cached allocated memory blocks.
4629 2002-09-02  Alan Modra  <amodra@bigpond.net.au>
4631         * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
4632         (bfd_pj_arch): Use bfd_default_scan.
4633         * cpu-v850.c (scan): Remove.
4634         (N): Use bfd_default_scan.
4635         * cpu-z8k.c (scan_mach): Remove.
4636         (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
4637         first.  Use bfd_default_scan.
4639         * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
4640         bfd_mach constants.
4641         (ecoff_get_magic): Likewise.
4642         * elf32-v850.c (v850_elf_object_p): Likewise.
4643         (v850_elf_final_write_processing): Likewise.
4644         * mipsbsd.c (MY(set_arch_mach)): Likewise.
4645         (MY(write_object_contents)): Likewise.
4646         * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
4647         * coffcode.h (coff_write_object_contents): Likewise.
4648         (coff_set_arch_mach_hook): Add comment describing machine == 0.
4649         Remove unnecessary "machine" assignments.
4650         (coff_write_relocs): Test for the absolute section sym by testing
4651         section and flags.
4653         * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
4654         and bfd_mach_i386_i386_intel_syntax.
4655         * pdp11.c (NAME(aout,machine_type)): Likewise.
4657 2002-08-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4659         * bfd-in.h (align_power): Cast constants to bfd_vma type.
4660         * bfd-in2.h (align_power): Likewise.
4662 2002-08-30  Alan Modra  <amodra@bigpond.net.au>
4664         * Makefile.am: Run "make dep-am".
4665         * Makefile.in: Regenerate.
4667         * cpu-avr.c (compatible): Don't use hard-coded mach constants.
4668         * cpu-powerpc.c (powerpc_compatible): Likewise.
4669         * cpu-rs6000.c (rs6000_compatible): Likewise.
4671 2002-08-28  Catherine Moore  <clm@redhat.com>
4673         * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
4674         (v850-elf-reloc): Don't resolve pc relative relocs.
4675         (v850_elf_ignore_reloc): New routine.
4676         (v850_elf_final_link_relocate): Handle new relocs.
4677         (v850_elf_relax_delete_bytes ): New routine.
4678         (v850_elf_relax_section): New routine.
4679         (bfd_elf32_bfd_relax_section): Define.
4680         (HOWTO): New entries for new relocs.
4681         * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
4682         (BFD_RELOC_V850_LONGJUMP): New reloc.
4683         (BFD_RELOC_V850_ALIGN): New reloc.
4684         * archures.c: Remove redundant v850ea architecture.
4685         * cpu-v850.c: Remove redundant v850ea support.
4686         * libbfd.h: Regenerate.
4687         * bfd-in2.h: Regenerated.
4689 2002-08-28  Svein E. Seldal  <Svein.Seldal@solidas.com>
4691         * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
4692         * configure.in: Add tic4x_coff vector files.
4693         * configure: Regenerate.
4694         * Makefile.am: Add tic4x target.
4695         * Makefile.in: Regenerate.
4697 2002-08-27  Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4699         * archures.c: Add the BFD arch type tic4x.
4700         * bfd-in.h: Add BFD_IN_MEMORY flag.
4701         * coff-tic4x.c: New file.
4702         * coffswap.h (coff_swap_sym_out): Add preadjuster.
4703         * cpu-tic4x.c: New file.
4704         * targets.c: Added tic4x- in list of xvecs.
4705         * ticoff.h: New file.
4706         * bfd-in2.h: Regenerate.
4708 2002-08-27  Adam Nemet  <anemet@lnxw.com>
4710         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
4711         bit of DT_INIT and DT_FINI for Thumb functions.
4713 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
4715         * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
4717 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
4719         * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
4721 2002-08-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4723         * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
4724         (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
4725         Likewise.
4726         (struct elf_sh_pcrel_relocs_copied): Removed.
4727         (struct elf_sh_dyn_relocs): New.
4728         (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
4729         field with dyn_relocs.
4730         (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
4731         sections and sym_sec.
4732         (sh_elf_link_hash_newfunc): Clear dyn_relocs.
4733         (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
4734         (sh_elf_create_dynamic_sections): Use create_got_section instead
4735         of _bfd_elf_create_got_section.
4736         (sh_elf_check_relocs): Likewise.
4737         (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
4738         sections.
4739         (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
4740         sh_elf_relocate_section, sh_elf_check_relocs,
4741         sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
4742         Likewise.
4743         (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
4744         dynamic relocations and avoiding the copy relocation when we
4745         didn't find any dynamic relocations in the section which has
4746         contents or is read-only.
4747         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4748         (sh_elf_size_dynamic_sections): Don't reset the size of
4749         .rela.got section even if dynamic_sections_created flag is off.
4750         Don't use sh_elf_discard_copies. Scan all input bfd and use
4751         allocate_dynrelocs. Call readonly_dynrelocs to determine
4752         whether we need DT_TEXTREL.
4753         (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
4754         whether the symbol was never referred to.
4755         (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
4756         (sh_elf_gc_sweep_hook): Fill with the real sweep function.
4757         (sh_elf_check_relocs): Call create_got_section if the short-cut
4758         to .got is null. Increment reference counters only instead of
4759         allocating space on dynamic sections here. Don't conditionalize
4760         uninitialized got.offset value when marking the symbol as a
4761         global offset table entry. Keep relocations for symbols satisfied
4762         by a dynamic library to avoid copy relocations for the symbol.
4763         Set dynobj field of an elf hash table if needed.
4764         (sh_elf_finish_dynamic_sections): Handle null section pointer
4765         correctly.
4766         (elf_backend_copy_indirect_symbol): Defined.
4767         (elf_backend_can_refcount): Defined.
4769 2002-08-23  Nick Clifton  <nickc@redhat.com>
4771         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
4772         previous change.  Add comment explaining why.
4774 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
4776         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
4777         contents of .got.plt[2] to tr0, not address of .got.plt.
4778         (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
4779         patching absolute plt entry. For shmedia plt entry, set bottom bit
4780         of branch to plt0 as this is a branch to an shmedia instruction.
4781         * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
4782         Copy contents of .got.plt[2] to tr0, not address of .got.plt.
4783         (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
4784         branch to plt0.
4785         (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
4786         patching absolute plt entry. For shmedia plt entry, branch to
4787         plt0 is now ptrel, so use relative offset.  Set bottom bit of
4788         branch target as it is a branch to an shmedia instruction.
4790 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
4791             Richard Shann <richard.shann@superh.com>
4793         * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
4794         value if .init is an SHmedia function.  Similarly for DT_FINI.
4795         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
4797 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
4799         * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
4800         dynamic section.
4801         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
4803 2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
4805         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
4806         byte read when reading the return address register column.
4808 2002-08-22  Nick Clifton  <nickc@redhat.com>
4810         * config.bfd: Add powepc64-*-*bsd* target.
4812 2002-08-22  Graeme Peterson  <gp@qnx.com>
4814         * Makefile.am: Add entries for elf32-shqnx.c
4815         * Makefile.in: Regenerate.
4816         * config.bfd: Add support sh-*-nto* target.
4817         * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
4818         * configure: Regenerate.
4819         * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
4820         * elf32-sh.c: Do not include elf32-target.h if
4821         ELF32_SH_C_INCLUDED is defined.
4822         * elf32-shqnx.c: New file: Support for QNX.
4823         * targets.c: Add bfd_elf32_sh{l}qnx_vec.
4825 2002-08-22  Nick Clifton  <nickc@redhat.com>
4827         * po/tr.po: Updated Turkish translation.
4829         * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
4830         symbols are not read.
4832 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
4834         * elf32-m68hc11.c: Formatting fixes.
4835         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
4836         * elf32-m68hc12.c: Formatting fixes.
4837         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
4839 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
4841         * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
4842         SEC_DATA.
4843         (pmac_xcoff_vec): Likewise.
4844         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4845         (aix5coff64_vec): Likewise.
4847 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
4849         * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
4850         param to elf_backend_copy_indirect_symbol.
4851         (_bfd_elf_link_hash_copy_indirect): Likewise.
4852         * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
4853         calls to copy_indirect_symbol.
4854         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
4855         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
4856         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4857         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
4858         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4859         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
4860         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
4861         * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4862         * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4863         * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
4864         test refcounts for "used" values.
4866 2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4868         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
4869         argument declaration.
4871 2002-08-19  Elena Zannoni <ezannoni@redhat.com>
4873         * archures.c (bfd_mach_ppc_e500): Added.
4874         * bfd-in2.h: Rebuilt.
4875         * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
4877 2002-08-19  Alan Modra  <amodra@bigpond.net.au>
4879         * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
4881 2002-08-17  Andrew Cagney  <ac131313@redhat.com>
4883         * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
4884         `bfd_byte'.
4886 2002-08-17  Stan Cox  <scox@redhat.com>
4888         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
4889         IRIX 6 segment layout for NEWABI.
4891 2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
4893         * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4894         symbols when looking for section referred to by a relocation.
4895         * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
4897 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
4899         * elf32-i370.c: Move reloc enum to include/elf/i370.h.
4901 2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
4903         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
4904         missing check for whether the symbol is referenced by DSO before
4905         unexporting it as an unneeded dynamic symbol.
4907 2002-08-14  H.J. Lu <hjl@gnu.org>
4909         * libbfd.h: Regenerate.
4911 2002-08-14  H.J. Lu <hjl@gnu.org>
4913         * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
4915 2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
4917         * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
4918         instructions.
4919         (m68hc11_direct_relax): New to define table of relaxable instructions.
4920         (find_relaxable_insn): New, find a relaxable insn.
4921         (compare_reloc): New to compare two relocs.
4922         (m68hc11_elf_relax_section): New, relax text sections.
4923         (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
4924         (elf32_m68hc11_check_relocs): New function for GC support.
4925         (elf32_m68hc11_relocate_section): New function for GC support.
4926         (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
4927         (elf_backend_check_relocs): Likewise.
4928         (elf_backend_relocate_section): Likewise.
4930 2002-08-13  H.J. Lu <hjl@gnu.org>
4932         * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
4933         definitions in shared objects when checking symbol with
4934         undefined version.
4936 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4938         * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
4939         (elf32_m68hc11_gc_sweep_hook): Likewise.
4940         (elf_backend_gc_mark_hook): Define for GC section support.
4941         (elf_backend_gc_sweep_hook): Likewise.
4942         (elf_backend_can_gc_sections): Likewise.
4944         * elf32-m68hc12.c: Likewise.
4946 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4948         * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
4949         (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
4950         (_bfd_m68hc11_elf_set_private_flags): New function.
4951         Use them to set/check/print ELF flags specific to 68HC11.
4953         * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
4954         (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
4955         (_bfd_m68hc12_elf_set_private_flags): New function.
4956         Use them to set/check/print ELF flags specific to 68HC12.
4958 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4960         * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
4961         fix masks for PC-rel relocs.
4962         (m68hc11_elf_ignore_reloc): New function.
4964         * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
4965         68HC12 banked addressing relocs.
4966         (m68hc12_phys_addr): New to compute physical address of banked memory.
4967         (m68hc12_phys_page): Likewise for page.
4968         (m68hc12_addr_is_banked): New to see if address is in banked area.
4969         (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
4971 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4973         * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
4974         BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
4975         BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
4976         * bfd-in2.h: Regenerate.
4978 2002-08-12  H.J. Lu <hjl@gnu.org>
4980         * elflink.h (elf_add_default_symbol): Preserve section across
4981         elf_merge_symbol.
4983 2002-08-09  Graeme Peterson  <gp@qnx.com>
4985         * Makefile.am: Add entries for elf32-ppcqnx.c, and add
4986         elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
4987         * Makefile.in: Regenerate.
4988         * config.bfd: Add support for powerpc{le}-*-nto targets.
4989         * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
4990         * configure: Regenerate.
4991         * elf32-i386qnx.c: Moved backend functions into a QNX specific
4992         common file "elf32-qnx.h", and now include that file.
4993         * elf32-qnx.h: New file: QNX specific common elf backend.
4994         * elf32-ppc.c: Do not include elf32-target.h if
4995         ELF32_PPC_C_INCLUDED is defined.
4996         * elf32-ppcqnx.c: New file: Support for QNX.
4997         * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
4998         * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5000 2002-08-09  Nick Clifton  <nickc@redhat.com>
5002         * po/sv.po: Updated Swedish translation.
5004 2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5006         * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5007         g->global_gotsym is NULL.
5009 2002-08-08  H.J. Lu <hjl@gnu.org>
5011         * elflink.h (elf_add_default_symbol): Don't warn if a definition
5012         overrides an indirect versioned symbol.
5014 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
5016         * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5017         for R_386_TLS_TPOFF32 relocs against symndx 0.
5019 2002-08-07  H.J. Lu <hjl@gnu.org>
5021         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5022         with undefined version if needed.
5023         (elf_link_assign_sym_version): Match a default symbol with a
5024         version without definition. No need to hide the default
5025         definition separately.
5027 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
5029         * elflink.h (elf_link_output_extsym): Don't output symbols from
5030         SEC_EXCLUDE sections.
5032         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5034 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
5036         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5037         entries.
5039 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5041         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5042         mismatch.
5044 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5046         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5048 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5050         * elf32-mips.c (mips_reloc_map): Fix typo.
5052 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
5054         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5056 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
5058         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5060 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
5062         * libxcoff.h: Use PARAMS on function declarations.
5063         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5064         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5066         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5067         addend.
5068         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5070 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
5072         * coff-rs6000.c: Formatting fixes.
5073         (xcoff_calculate_relocation): Use PARAMS in declaration.
5074         (xcoff_complain_overflow): Likewise.
5075         (xcoff_ppc_relocate_section): Use old-style function pointer call.
5076         (bfd_xcoff_backend_data): Remove useless comments.
5077         (rs6000coff_vec): Likewise.
5078         (bfd_pmac_xcoff_backend_data): Likewise.
5079         (pmac_xcoff_vec): Likewise.
5081         * coff64-rs6000.c: Formatting fixes.
5082         (xcoff64_calculate_relocation): Use PARAMS in declaration.
5083         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5084         (bfd_xcoff_backend_data): Remove useless comments.
5085         (rs6000coff64_vec): Likewise.
5086         (bfd_xcoff_aix5_backend_data): Likewise.
5087         (aix5coff64_vec): Likewise.
5089 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
5091         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5092         mask entries.  Use complain_overflow_dont for R_REF.
5093         (xcoff_reloc_type_ba): Revert last change.
5094         (xcoff_reloc_type_br): Likewise.
5095         (xcoff_reloc_type_crel): Likewise.
5096         (xcoff_ppc_relocate_section): Likewise.
5097         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5098         (xcoff64_ppc_relocate_section): Likewise.
5099         (xcoff64_howto_table): Revert some of last change to mask entries.
5100         Use complain_overflow_dont for R_REF.
5102         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
5103         relocs with bitsize == 16 have size = 1.
5104         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5105         (xcoff_reloc_type_br): Likewise.
5106         (xcoff_reloc_type_crel): Likewise.
5107         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5108         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5109         dst_mask adjustment.
5110         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5111         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
5112         bitsize == 16 have size = 1.
5114 2002-08-01  Denis Chertykov  <denisc@overta.ru>
5116         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5117         (struct misc): New field isymbuf. All free_* fields removed.
5118         (symbol_value): Pass in internal syms. No need to swap syms in.
5119         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5120         possibly cached info.
5121         (tidyup_after_error): Removed.
5122         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5123         misc. Use new field.
5124         (adjust_all_relocations): Use internal syms. No need to swap syms
5125         in and out.
5126         (add_page_insn): Don't use removed fields of struct misc.
5128 2002-08-01  Nick Clifton  <nickc@redhat.com>
5130         * elf32-arm.h: Revert previous delta.
5132 2002-08-01  Nick Clifton  <nickc@redhat.com>
5134         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5135         * configure: Regenerate.
5137 2002-07-31  H.J. Lu <hjl@gnu.org>
5139         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5140         selected.
5142 2002-07-31  H.J. Lu <hjl@gnu.org>
5144         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5145         is selected.
5147 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
5149         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5150         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5152 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
5154         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5155         There is no 8 byte relocation type for this architecture.
5156         (do_ns32k_reloc): Use bfd_vma instead of native types.
5157         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5158         returns void.
5159         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5160         rely on generic code to do that.
5161         * aout-ns32k.c (howto_table): Add appropriate overflow detection
5162         to all table entries.
5163         (_bfd_ns32k_relocate_contents): put_data returns void.
5164         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5165         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5166         return void.
5168 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
5170         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5171         archive object is target dependant.
5173 2002-07-31  Adam Nemet  <anemet@lnxw.com>
5175         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5176         (THUMB_PLT_ENTRY_SIZE): New macro.
5177         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5178         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5179         ARM_PLT_ENTRY_SIZE.
5180         (elf32_arm_plt_entry): Likewise.
5181         (elf_backend_plt_header_size): Likewise.
5182         (elf32_thumb_plt0_entry): New global.
5183         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
5184         into .plt.thumb.
5185         (elf32_thumb_plt_entry): New global.
5186         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
5187         Thumb entries.  Set the bottom bit of the corresponding GOT entry
5188         for a Thumb PLT entry.
5189         (struct elf32_arm_plt_entry_info): New structure.
5190         (struct elf32_arm_link_hash_entry, plt_info): New member of this
5191         type.
5192         (elf32_arm_link_hash_newfunc): Initialize new member.
5193         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5194         relocations against the PLT.
5195         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5196         first_rel_type if this is the first time we encounter the symbol.
5197         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5198         Determine if relocation needs a PLT entry.  Set first_rel_type if
5199         this is the first time we encounter the symbol
5200         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5201         functions as well.
5202         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5203         (elf32_arm_create_dynamic_sections): New function.  Create the
5204         .plt.thumb section.
5205         (elf_backend_create_dynamic_sections): Call it.
5207 2002-07-31  Nick Clifton  <nickc@redhat.com>
5209         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5210         'alternative' in order to avoid shadowing global symbol of the
5211         same name.
5212         * bfd-in2.h: Regenerate.
5213         * libbfd.h: Regenerate.
5214         * libcoff.h: Regenerate.
5216 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5218         * Makefile.am: Add n32 ABI support.
5219         * Makefile.in: Regenerate.
5220         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5221         bit vectors for mips*-*-linux targets as optional.
5222         * configure.in: Add n32 ABI vectors.
5223         * configure: Regenerate.
5224         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5225         * elfn32-mips.c: New file, n32 ABI support.
5226         * targets.c: Add n32 ABI vectors.
5228 2002-07-30  Graeme Peterson  <gp@qnx.com>
5230         * elfarmqnx-nabi.c: New file: Support for QNX.
5231         * config.bfd: Add support for arm-*-nto target.
5232         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5233         * configure: Regenerate.
5234         * Makefile.am: Add entries for elfarmqnx-nabi.c.
5235         * Makefile.in: Regenerate.
5236         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5237         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5238         * elfarm-nabi.c: Do not include elf32-arm.h if
5239         ELFARM_NABI_C_INCLUDED is defined.
5240         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
5242 2002-07-30  Nick Clifton  <nickc@redhat.com>
5244         * po/sv.po: Updated Swedish translation.
5246 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
5248         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5250 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
5252         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5253         * archive.c (bfd_generic_archive_p): Likewise.
5254         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5255         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5256         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5257         (xcoff64_archive_p): Likewise.
5258         (xcoff64_openr_next_archived_file): Likewise.
5259         (xcoff64_archive_p): Clean up tdata properly on error.
5260         * coffgen.c (coff_real_object_p): Likewise.
5261         (coff_object_p): Release filehdr and opthdr.
5262         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5263         * ieee.c (ieee_archive_p): Likewise.
5264         * ihex.c (ihex_object_p): Likewise.
5265         (ihex_mkobject): Always allocate tdata.
5266         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5267         * srec.c (srec_mkobject): Always allocate tdata.
5268         (srec_object_p): Clean up tdata properly on error.
5269         (symbolsrec_object_p): Likewise.
5270         * versados.c (versados_object_p): Likewise.
5271         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5272         and bfd_realloc instead of realloc.
5273         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5274         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
5275         place of bfd_malloc, simplifying error freeing.  Free hash table too.
5276         (vms_object_p): Clean up tdata on error.
5277         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5278         (vms_close_and_cleanup): Adjust for bfd_alloc use.
5280 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
5282         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5284 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
5286         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5287         flags into resulting BFD.
5289 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
5291         From John Reiser <jreiser@BitWagon.com>
5292         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5293         tls_ldm_got.refcount.
5295 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5297         * elf64-mips.c: Update TODO comment.
5298         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5299         mips_elf64_gprel16_reloca): Remove prototypes.
5300         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5301         (UNUSED_RELOC): Replace by EMPTY_RELOC.
5302         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5303         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5304         R_MIPS_HIGHEST.
5305         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5306         R_MIPS_GOT16. Remove wrong comments.
5307         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5308         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5309         from elf32-mips.c.
5310         (mips_elf64_hi16_reloc): Fix formatting.
5311         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5312         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5313         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5314         (mips_elf64_gprel16_reloc): Make static. Add check for
5315         partial_inplace.
5316         (mips_elf64_gprel16_reloca): Remove.
5317         (mips_elf64_literal_reloc): New function.
5318         (mips_elf64_gprel32_reloc): Fix formatting.
5319         (mips_elf64_shift6_reloc): Fix comment. Make static.
5320         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5321         elf32-mips.c.
5322         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5323         elf32-mips.c
5324         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5325         specific relocations.
5326         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5327         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5328         (ELF_MAXPAGESIZE): Add comment.
5330 2002-07-25  Nick Clifton  <nickc@redhat.com>
5332         * po/sv.po: Updated Swedish translation.
5333         * po/es.po: Updated Spanish translation.
5334         * po/fr.po: Updated French translation.
5336 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
5338         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5339         as elf_link_record_local_dynamic_symbol.
5340         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5341         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
5342         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5343         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
5344         attempt is made to record a symbol in a discarded section, and
5345         return `2' in that case.
5347 2002-07-24  Nick Clifton  <nickc@redhat.com>
5349         * po/sv.po: Updated Swedish translation.
5350         * po/es.po: Updated Spanish translation.
5352 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
5354         * po/SRC-POTFILES.in: Regenerate.
5356         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5357         immediately.  Remove code handling relocatable linking.
5358         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5359         * elf32-cris.c (cris_elf_relocate_section): Likewise.
5360         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
5361         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5362         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5363         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5364         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5365         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5366         * elf32-v850.c (v850_elf_relocate_section): Likewise.
5367         * elf32-vax.c (elf_vax_relocate_section): Likewise.
5368         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5369         * elf32-avr.c (elf_backend_rela_normal): Define.
5370         * elf32-cris.c: Likewise.
5371         * elf32-fr30.c: Likewise.
5372         * elf32-frv.c: Likewise.
5373         * elf32-h8300.c: Likewise.
5374         * elf32-hppa.c: Likewise.
5375         * elf32-ip2k.c: Likewise.
5376         * elf32-sparc.c: Likewise.
5377         * elf32-v850.c: Likewise.
5378         * elf32-vax.c: Likewise.
5379         * elf64-hppa.c: Likewise.
5380         * elf64-sparc.c: Likewise.
5381         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
5382         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5383         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5384         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5385         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5386         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5387         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5388         * elf-m10200.c (USE_RELA): Don't define.
5389         * elf-m10300.c: Likewise.
5390         * elfarm-oabi.c: Likewise.
5391         * elf32-i370.c: Likewise.
5392         * elf32-ip2k.c: Likewise.
5393         * elf32-m68k.c: Likewise.
5394         * elf32-mcore.c: Likewise.
5395         * elf32-ppc.c: Likewise.
5396         * elf32-s390.c: Likewise.
5397         * elf32-vax.c: Likewise.
5398         * elf64-ppc.c: Likewise.
5399         * elf64-s390.c: Likewise.
5400         * elf64-x86-64.c: Likewise.
5401         * elfxx-ia64.c: Likewise.
5402         * elf32-avr.c (USE_REL): Don't undef.
5403         * elf32-ip2k.c: Likewise.
5405 2002-07-23  Nick Clifton  <nickc@redhat.com>
5407         * elf-bfd.h (struct elf_backend_data): Add new bitfield
5408         'want_p_paddr_set_to_zero'.
5409         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5410         to false;
5411         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5412         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5414 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
5416         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5417         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5418         show the Copyright string.
5419         Minor formatting tidy ups.
5421 2002-07-23  Nick Clifton  <nickc@redhat.com>
5423         * po/fr.po: Updated French translation.
5424         * po/sv.po: Updated Swedish translation.
5426 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
5428         * elflink.h (elf_link_input_bfd): Don't change internal symbols
5429         when outputting relocs.
5431 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
5433         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5434         DT_PLTGOT into the dynamic section if there is a PLT.
5436 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5438         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5439         elf32-mips.c.
5440         (_bfd_mips_elf_write_section): Likewise.
5441         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5442         (_bfd_mips_elf_write_section): Likewise.
5443         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5444         (elf32_mips_write_section): Likewise.
5445         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5446         (_bfd_mips_elf_write_section): Likewise.
5448 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
5450         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5451         PT_IA_64_UNWIND segments for a given section.
5453 2002-07-17  H.J. Lu <hjl@gnu.org>
5455         * Makefile.am: Fix a typo.
5456         * Makefile.in: Regenerate.
5458 2002-07-15  Denis Chertykov  <denisc@overta.ru>
5459             Frank Ch. Eigler  <fche@redhat.com>
5460             Ben Elliston  <bje@redhat.com>
5461             Alan Lehotsky  <alehotsky@cygnus.com>
5462             John Healy  <jhealy@redhat.com>
5463             Graham Stott  <grahams@redhat.com>
5464             Jeff Johnston  <jjohnstn@redhat.com>
5466         * Makefile.am: Add support for ip2k.
5467         * Makefile.in: Regenerate.
5468         * doc/Makefile.in: Regenerate.
5469         * archures.c: Add support for ip2k.
5470         * config.bfd: Add support for ip2k.
5471         * configure.in: Add support for ip2k.
5472         * configure: Regenerate.
5473         * reloc.c: Add support for ip2k.
5474         * targets.c: Add support for ip2k.
5475         * bfd-in2.h: Regenerate.
5476         * libbfd.h: Regenerate.
5477         * cpu-ip2k.c: New file.
5478         * elf32-ip2k.c: New file.
5480 2002-07-17  Ian Rickards  <irickard@arm.com>
5482         * dwarf2.c (concat_filename): If we can't establish the directory
5483         just return the filename.
5485 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
5487         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5489 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
5491         * elflink.h: Formatting fixes, tidy prototypes.
5492         (elf_link_assign_sym_version): Move common code out of loop.
5494 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
5496         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5497         reloc section size is zero.  Correct reloc output location.
5499 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5501         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
5502         the final type for the e_fsel selector when generating PA2.0W code.
5503         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
5504         relocations.
5506 2002-07-14  H.J. Lu <hjl@gnu.org>
5508         * elflink.h (elf_link_assign_sym_version): Hide the default
5509         definition if there is a hidden versioned definition.
5511 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
5513         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
5514         dynamic reference test in assertion when initializing GOT with
5515         static contents.  Just assert that there are either no dynamic
5516         sections, the symbol is defined in the regular objects or that the
5517         symbol is undef weak.  Tweak comment.
5518         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
5519         only if the symbol isn't defined in the program and isn't undef
5520         weak.
5521         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
5522         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
5523         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
5524         (elf_cris_discard_excess_program_dynamics): Don't consider
5525         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
5527 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
5529         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
5530         unresolved debugging relocs in dynamic applications.
5531         * elf32-s390.c (elf_s390_relocate_section): Likewise.
5532         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5533         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5534         * elf64-s390.c (elf_s390_relocate_section): Likewise.
5535         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5536         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5538 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
5540         * elf64-ppc.c (ONES): Define.
5541         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
5542         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
5543         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
5545         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
5546         (ppc64_elf_set_private_flags): Delete.
5547         (ppc64_elf_section_from_shdr): Delete.
5548         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
5549         (ppc64_elf_fake_sections): Delete.
5550         (bfd_elf64_bfd_set_private_flags): Don't define.
5551         (bfd_elf64_get_symbol_info): Likewise.
5552         (elf_backend_section_from_shdr): Likewise.
5553         (elf_backend_fake_sections): Likewise.
5555 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
5557         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
5558         when not already set.
5559         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
5560         (elf_backend_fake_sections): Define.
5562 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
5564         * merge.c (_bfd_merge_section): Remove redundant output_section check.
5565         Formatting.
5566         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
5568 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
5570         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
5571         NULL sym_hashes to just before use.
5572         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
5573         symbol with non-default visibility.
5574         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
5575         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5576         Ditto.
5577         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
5578         symbol with non-default visibility.
5579         (cris_elf_check_relocs): At tests for local symbol before
5580         increasing h->plt.refcount, also check for non-default
5581         visibility.  Ditto when checking for local symbol to eliminate
5582         pc-relative runtime relocs.
5584 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
5586         * elf.c: Formatting.
5587         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
5588         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
5589         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
5590         segments.
5592 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
5593             Alan Modra  <amodra@bigpond.net.au>
5595         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5596         account the impact of relocation count overflow when computing
5597         section offsets.
5598         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5599         or not to apply the PE COFF reloc overflow handling.  Fix a
5600         fencepost error in deciding whether or not to use that technique.
5602 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
5604         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
5605         change type of locsyms.
5606         (bfd_elf_get_elf_syms): Declare.
5607         * elf.c (bfd_elf_get_elf_syms): New function.
5608         (group_signature): Use bfd_elf_get_elf_syms.
5609         (bfd_section_from_r_symndx): Likewise.
5610         * elfcode.h (elf_slurp_symbol_table): Likewise.
5611         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5612         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
5613         locality of various data structures.  Properly free internal relocs.
5614         (elf_bfd_final_link): Properly free internal relocs.
5615         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
5616         (elf_link_input_bfd): Likewise.
5617         (elf_gc_mark): Likewise.  Properly free internal relocs.
5618         (elf_gc_sweep): Properly free internal relocs.
5619         (elf_reloc_symbol_deleted_p): No need to swap syms in.
5620         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
5621         internal relocs.
5622         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
5623         Properly free possibly cached info.
5624         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
5625         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
5626         symbol swapping code.
5627         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
5628         Properly free possibly cached info.
5629         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
5630         (mn10300_elf_relax_delete_bytes): Likewise.
5631         (mn10300_elf_symbol_address_p): Likewise.
5632         (mn10300_elf_get_relocated_section_contents): Likewise.
5633         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
5634         (elf32_h8_relax_delete_bytes): Likewise.
5635         (elf32_h8_symbol_address_p): Likewise.
5636         (elf32_h8_get_relocated_section_contents): Likewise.
5637         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
5638         (m32r_elf_relax_delete_bytes): Likewise.
5639         (m32r_elf_get_relocated_section_contents): Likewise.
5640         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
5641         elf_section_data to determine whether cached.
5642         (sh_elf_relax_section): As above for elf-m10200.c.
5643         (sh_elf_relax_delete_bytes): Likewise.
5644         (sh_elf_get_relocated_section_contents): Likewise.
5645         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
5646         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
5647         reading of local syms.
5648         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5649         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
5650         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
5651         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
5652         relocs.
5653         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
5654         free internal relocs and section contents.  Don't read symbols.
5655         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
5656         (elf32_hppa_size_stubs): Don't free local syms.
5657         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
5658         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
5659         possibly cached info.
5660         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5661         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
5662         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
5663         all_local_syms.
5664         (get_local_syms): Delete function.
5665         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
5666         on exit.
5667         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
5669 2002-07-05  Jim Wilson  <wilson@redhat.com>
5671         * syms.c (decode_section_type): New.
5672         (bfd_decode_symclass): Call decode_section_type.
5674 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
5676         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
5677         section content start.
5678         Reported by Michael Schumacher <mike@hightec-rt.com>.
5680 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
5682         * section.c (_bfd_strip_section_from_output): Remove unnecessary
5683         link order code.  Don't actually remove the output section here;
5684         Just set a flag for the linker to do so.
5685         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
5686         sections when setting up output section dynsyms.
5688 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
5690         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
5691         fudge.
5692         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
5693         libs here instead.
5695 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5697         * elf64-s390.c (create_got_section): Set .got section alignment to
5698         8 bytes.
5699         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
5701 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
5703         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
5705 2002-07-01  Matt Thomas  <matt@3am-software.com>
5707         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
5708         to EF_VAX_*.
5710 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5712         * elfxx-mips.c (ABI_64_P): Fix comment.
5713         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
5714         new section names for N64 ABI.
5715         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
5716         (mips_elf_calculate_relocation): Code formatting.
5717         (mips_elf_create_dynamic_relocation): Likewise.
5718         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
5719         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
5720         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
5721         in any NewABI.
5722         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
5723         for NewABI.
5724         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
5725         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
5726         here, too.
5728 2002-07-01  Andreas Schwab  <schwab@suse.de>
5730         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
5731         R_X86_64_64 to R_X86_64_RELATIVE.
5733 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5735         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
5736         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
5737         Run "make dep-am".
5738         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
5739         host_aout_vec.
5740         * configure.in (vaxbsd_vec): Add.
5741         * targets.c (vaxbsd_vec): Add.
5742         * Makefile.in: Rebuild.
5743         * configure: Rebuild.
5744         * po/SRC-POTFILES.in: Rebuild.
5746 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
5748         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
5749         examining to gc_mark_hook, rather than the bfd.
5750         (elf_gc_sections): Adjust.
5751         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
5752         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
5753         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
5754         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
5755         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
5756         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
5757         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
5758         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
5759         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
5760         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
5761         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
5762         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
5763         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
5764         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
5765         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
5766         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
5767         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
5768         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
5769         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
5770         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
5771         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
5772         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
5773         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
5774         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5775         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
5776         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
5777         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
5778         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
5779         redundant local sym tests.
5780         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
5781         (link_hash_newfunc): Init is_entry.
5782         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
5783         (ppc64_elf_link_hash_table_create): Init all_local_syms.
5784         (create_linkage_sections): Use bfd_make_section_anyway rather than
5785         bfd_make_section.
5786         (ppc64_elf_mark_entry_syms): New function.
5787         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
5788         up opd entry to function section map.
5789         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
5790         relocs that reference the opd section.
5791         (edit_opd): New function.
5792         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
5793         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
5794         (get_local_syms): Do so here.  Exit if we already have local syms.
5795         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
5796         read local syms on non-ELF input.
5797         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
5798         than duplicating it's function here.  Adjust free of internal
5799         relocs to suit.
5800         (ppc64_elf_relocate_section): Adjust local syms in opd section.
5801         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
5802         * elf32-hppa.c (elf32_hppa_size_stubs): Call
5803         _bfd_elf32_link_read_relocs rather than duplicating it's function
5804         here.  Adjust free of internal relocs to suit.
5806 2002-07-01  Andreas Jaeger  <aj@suse.de>
5808         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
5809         are not allowed in shared libs code, enforce -fPIC.
5811 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
5813         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
5814         trailing zero-sequences when there's previous left-over data.
5816 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5818         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
5819         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
5820         and opd_rel_sec in order for starting rela section.  Check _raw_size.
5821         (elf_backend_reloc_type_class): Define.
5823 2002-06-27  Kevin Buettner <kevinb@redhat.com>
5825         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
5826         DWARF2 formats.
5828 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
5830         * cpu-powerpc.c: Comment on ordering of arch_info.
5831         * elf32-ppc.c (ppc_elf_object_p): New function.
5832         (elf_backend_object_p): Define.
5833         * elf64-ppc.c (ppc64_elf_object_p): New function.
5834         (elf_backend_object_p): Define.
5836 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
5838         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
5839         * configure: Regenerate.
5841 2002-06-25  Jason Eckhardt  <jle@rice.edu>
5843         * dwarf2.c (decode_line_info): Check unit->addr_size
5844         to read in the proper number of prologue bytes.
5846 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
5848         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
5849         aix5coff64_vec if 64-bit bfd support has been enabled.
5850         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
5851         been enabled.
5853         * targets.c (_bfd_target_vector[]): Only include
5854         aix5coff64_vec if 64-bit bfd support has been enabled.
5856 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
5858         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
5859         * elf32-hppa.c (hppa_add_stub): Likewise.
5860         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5861         * elflink.h (elf_add_default_symbol): Fix comment typo.
5862         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
5863         (elf_link_add_object_symbols): Likewise.
5864         (elf_link_assign_sym_version): Likewise.
5865         * hash.c (bfd_hash_lookup): Likewise.
5866         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
5867         * section.c (bfd_get_unique_section_name): Likewise.
5868         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
5869         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
5870         (assign_section_numbers): Likewise.
5871         (_bfd_elfcore_make_pseudosection): Likewise.
5872         (elfcore_grok_lwpstatus): Likewise.
5873         (elfcore_grok_win32pstatus): Likewise.
5874         (elfcore_write_note): Constify input params.  Use PTR instead of
5875         void *.  Include terminating NUL in namesz.  Correct padding.
5876         Support NULL "name" param.  Use memcpy instead of strcpy.
5877         (elfcore_write_prpsinfo): Constify input params.
5878         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
5879         (elfcore_write_lwpstatus): Likewise.
5880         (elfcore_write_pstatus): Likewise.
5881         (elfcore_write_prfpreg): Likewise.
5882         (elfcore_write_prxfpreg): Likewise.
5883         * elf-bfd.h (elfcore_write_note): Update declaration.
5884         (elfcore_write_prpsinfo): Likewise.
5885         (elfcore_write_prstatus): Likewise.
5886         (elfcore_write_pstatus): Likewise.
5887         (elfcore_write_prfpreg): Likewise.
5888         (elfcore_write_prxfpreg): Likewise.
5889         (elfcore_write_lwpstatus): Likewise.
5891 2002-06-25  Jason Eckhardt  <jle@rice.edu>
5893         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
5894         symbols of type stProc and stStaticProc.
5896 2002-06-25  Nick Clifton  <nickc@redhat.com>
5898         * ecoff.c: VArious formatting fixes.
5900 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
5902         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
5904 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
5906         * aout-adobe.c: Don't compare against "true" or "false.
5907         * aout-target.h: Likewise.
5908         * aoutx.h: Likewise.
5909         * archive.c: Likewise.
5910         * bout.c: Likewise.
5911         * cache.c: Likewise.
5912         * coff-a29k.c: Likewise.
5913         * coff-alpha.c: Likewise.
5914         * coff-i386.c: Likewise.
5915         * coff-mips.c: Likewise.
5916         * coff-or32.c: Likewise.
5917         * coff64-rs6000.c: Likewise.
5918         * coffcode.h: Likewise.
5919         * coffgen.c: Likewise.
5920         * cpu-ns32k.c: Likewise.
5921         * ecoff.c: Likewise.
5922         * ecofflink.c: Likewise.
5923         * elf.c: Likewise.
5924         * elf32-arm.h: Likewise.
5925         * elf32-cris.c: Likewise.
5926         * elf32-d30v.c: Likewise.
5927         * elf32-i386.c: Likewise.
5928         * elf32-mcore.c: Likewise.
5929         * elf32-ppc.c: Likewise.
5930         * elf32-sh.c: Likewise.
5931         * elf32-sh64.c: Likewise.
5932         * elf32-v850.c: Likewise.
5933         * elf64-alpha.c: Likewise.
5934         * elf64-sh64.c: Likewise.
5935         * elfcode.h: Likewise.
5936         * elfcore.h: Likewise.
5937         * elflink.h: Likewise.
5938         * elfxx-mips.c: Likewise.
5939         * i386os9k.c: Likewise.
5940         * ieee.c: Likewise.
5941         * libbfd.c: Likewise.
5942         * linker.c: Likewise.
5943         * mmo.c: Likewise.
5944         * nlm32-alpha.c: Likewise.
5945         * nlm32-i386.c: Likewise.
5946         * nlm32-ppc.c: Likewise.
5947         * nlm32-sparc.c: Likewise.
5948         * nlmcode.h: Likewise.
5949         * oasys.c: Likewise.
5950         * pdp11.c: Likewise.
5951         * peicode.h: Likewise.
5952         * reloc.c: Likewise.
5953         * som.c: Likewise.
5954         * srec.c: Likewise.
5955         * tekhex.c: Likewise.
5956         * vms.c: Likewise.
5957         * xcofflink.c: Likewise.
5958         * elf64-sparc.c: Edit comment to not use "== false".
5960         * aoutf1.h: Don't use "? true : false".
5961         * ecoff.c: Likewise.
5962         * format.c: Likewise.
5963         * ieee.c: Likewise.
5964         * linker.c: Likewise.
5965         * mmo.c: Likewise.
5966         * oasys.c: Likewise.
5968 2002-06-23  H.J. Lu  <hjl@gnu.org>
5970         * elflink.h (elf_link_add_archive_symbols): For the default
5971         version, check references with only one `@' first.
5973 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5975         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
5976         function.
5977         (allocate_global_data_dlt): Don't add millicode symbols to dynamic
5978         symbol table.
5979         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
5980         (elf64_hppa_size_dynamic_sections): Revise to use
5981         elf64_hppa_mark_milli_and_exported_functions.
5982         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
5983         symbols out of dynamic symbol table.
5985 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
5987         * Makefile.in: Regenerate.
5988         * libbfd.h: Regenerate.
5989         * bfd-in2.h: Regenerate.
5990         * configure: Regenerate.
5991         * po/SRC-POTFILES.in: Regenerate.
5993         * elflink.h: Comment typo fixes.
5995 2002-06-23  H.J. Lu  <hjl@gnu.org>
5997         * elf-bfd.h (elf_link_loaded_list): New structure.
5998         (elf_link_hash_table): Add "loaded".
5999         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6000         * elflink.h (elf_link_check_versioned_symbol): New function.
6001         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6003 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
6005         * elflink.h (size_dynamic_sections): If the target does not
6006         support an ELF style hash table, return true, indicating that
6007         nothing needed to be done, rather than false, indicating that the
6008         section's size could not be computed.
6010 2002-06-18  Dave Brolley  <brolley@redhat.com>
6012         From Catherine Moore, Michael Meissner, Dave Brolley:
6013         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6014         * targets.c: Support bfd_elf32_frv_vec.
6015         * reloc.c: Add FRV relocs.
6016         * configure.in: Add support for bfd-elf32-frv-vec.
6017         * config.bfd (targ_cpu): Add support for frv-*-elf.
6018         * archures.c: Add frv arch and machines.
6019         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6020         (ALL_MACHINES_CFILES): Add cpu-frv.c.
6021         (BFD32_BACKENDS): Add elf32-frv.lo.
6022         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6023         (cpu-frv.lo): New target.
6024         (elf32-frv.lo): New target.
6025         * cpu-frv.c: New file.
6026         * elf32-frv.c: New file.
6028 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
6030         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6031         e_shnum == 0.
6032         Only read the first section header if e_shoff is non-zero.
6033         Don't consider e_shstrndx if there are no sections.
6035 2002-06-17  Tom Rix <trix@redhat.com>
6037         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
6038         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
6039         complain_overflow_bitfield.
6041 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
6043         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6044         (bfd_fdopenr): Likewise.
6045         (bfd_openstreamr): Likewise.
6046         (bfd_openw): Likewise.
6048         * targets.c: Sort target vecs.
6049         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6050         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6051         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6052         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6053         * configure.in: Sort target vecs.  Add m88kmach3_vec.
6054         * configure: Regenerate.
6056 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
6058         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6059         bpo_reloc_no to break sort order ties, not address of items.
6061 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6063         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6064         Skip excluded sections in determing __gp value.
6065         (elf_hppa_final_link_relocate): Use the symbol's address in
6066         R_PARISC_FPTR64 relocations that don't need an opd entry.
6067         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6068         (elf64_hppa_finalize_dynreloc): Likewise.
6069         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6070         (elf64_hppa_finish_dynamic_symbol): Break up assert.
6072 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
6074         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6075         alignment for .bss, .data and .text sections so that sse and sse2
6076         code will work.
6077         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6079 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
6081         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6082         sh[1234]*-elf*.
6084 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6086         * elflink.h (elf_bfd_final_link): Improve error handling for missing
6087         dynamic sections.
6089         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6090         for a symbol that has no output section.
6091         (allocate_dynrel_entries): Correct comment.
6092         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
6093         unless we want one.
6094         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6095         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
6096         with no section.  Remove unnecessary parentheses.
6098 2002-06-11  Tom Rix  <trix@redhat.com>
6100         * coffcode.h (coff_compute_section_file_positions): Add data
6101         section to AIX loader alignment check.
6103         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
6104         alignment to 4 bytes.
6105         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6106         power accessor macro.
6107         (do_shared_object_padding): Remove invalid assertion.
6109 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
6111         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6112         for removed output sections.
6114 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
6116         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6117         htab_alloc.
6118         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6120 2002-06-08  H.J. Lu <hjl@gnu.org>
6122         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6123         work around a long long bug in gcc 2.96 on mips.
6125 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
6127         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6128         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6129         Regenerate dependency lists.
6130         * Makefile.in: Regenerate.
6131         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6132         vax1knetbsd_vec to targ_selvecs.
6133         * configure.in: Add vax1knetbsd_vec.
6134         * configure: Regenerate.
6135         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6136         * vax1knetbsd.c: New file.
6137         * vaxnetbsd.c: Update copyright years.
6138         (TARGET_PAGE_SIZE): Set to 0x1000.
6139         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6141 2002-06-08  Matt Thomas  <matt@3am-software.com>
6143         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6145 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
6147         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6149 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
6151         * Makefile.am: Run "make dep-am".
6152         * Makefile.in: Regenerate.
6154         * armnetbsd.c: Replace CONST with const.
6155         * corefile.c: Likewise.
6156         * elf32-dlx.c: Likewise.
6157         * elf64-mips.c: Likewise.
6158         * mmo.c: Likewise.
6159         * ns32knetbsd.c: Likewise.
6161         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6162         table is elf64-sparc.
6164 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6166         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6167         Fix RELA addends to get not shifted in the result. Don't do special
6168         handling of R_MIPS_64 for NewABI.
6170 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
6172         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6173         (NAME(aout,slurp_reloc_table)): Likewise.
6174         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6175         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6176         (xcoff_write_archive_contents_big): Likewise.
6177         (xcoff_generate_rtinit): Likewise.
6178         (xcoff_generate_rtinit): Likewise, and check error return.
6179         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6180         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6181         (coff_get_normalized_symtab): Likewise.
6182         (coff_make_empty_symbol): Likewise.
6183         (bfd_coff_set_symbol_class): Likewise.
6184         * cofflink.c (coff_link_add_symbols): Likewise.
6185         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6186         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6187         (bfd_ecoff_write_accumulated_debug): Likewise.
6188         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6189         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6190         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6191         * ieee.c (do_with_relocs): Use bfd_zalloc.
6192         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6193         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6194         (NAME(aout,slurp_reloc_table)): Likewise.
6195         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6196         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6197         * som.c (som_build_and_write_symbol_table): Likewise.
6198         (som_slurp_string_table): Likewise.
6199         (som_slurp_symbol_table): Likewise.
6200         (som_bfd_ar_write_symbol_stuff): Likewise.
6201         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6202         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6203         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
6204         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6205         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6207 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
6209         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6210         "group" union.
6211         (elf_group_name): Update.
6212         (elf_group_id): Define.
6213         (bfd_elf_set_group_contents): Declare.
6214         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6215         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
6216         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
6217         that sym for the signature.
6218         (_bfd_elf_compute_section_file_positions): Don't call
6219         set_group_contents for "ld -r" case.
6220         (swap_out_syms): Use bfd_zalloc.
6221         * elflink.h (elf_link_add_archive_symbols): Likewise.
6222         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6223         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6225 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
6227         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6228         relocs in opd for non-shared too.
6230 2002-06-06  Jeffrey Law  <law@redhat.com>
6232         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6233         relocations.
6235 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
6237         * merge.c: Include libiberty.h.
6238         * elf-strtab.c: Include libiberty.h.
6240 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
6242         * peXXigen.c (pe_print_idata): Remove unused variable.
6244 2002-06-06  David Heine <dlheine@tensilica.com>
6246         * elf.c (assign_file_positions_for_segments): Remove unallocated
6247         sections from the section to segment mapping for PT_LOAD segments.
6248         Update comment about empty loadable segments.
6250 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
6252         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6253         is within the .stabstr section.
6255 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
6257         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6258         are "const PTR", not "const PTR *".
6259         (bfd_elf32_swap_symbol_in): Likewise.
6260         (bfd_elf64_swap_symbol_in): Likewise.
6261         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6262         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6263         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6264         (elf_link_add_object_symbols): Likewise.
6265         (elf_link_record_local_dynamic_symbol): Likewise.
6266         (elf_link_input_bfd): Likewise.
6267         (elf_gc_mark): Likewise.
6268         (elf_reloc_symbol_deleted_p): Likewise.
6269         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6270         (mn10200_elf_relax_delete_bytes): Likewise.
6271         (mn10200_elf_symbol_address_p): Likewise.
6272         (mn10200_elf_get_relocated_section_contents): Likewise.
6273         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6274         (mn10300_elf_relax_section): Likewise.
6275         (mn10300_elf_relax_delete_bytes): Likewise.
6276         (mn10300_elf_symbol_address_p): Likewise.
6277         (mn10300_elf_get_relocated_section_contents): Likewise.
6278         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6279         (elf32_h8_relax_delete_bytes): Likewise.
6280         (elf32_h8_symbol_address_p): Likewise.
6281         (elf32_h8_get_relocated_section_contents): Likewise.
6282         * elf32-hppa.c (get_local_syms): Likewise.
6283         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6284         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6285         * elf32-sh.c (sh_elf_relax_section): Likewise.
6286         (sh_elf_relax_delete_bytes): Likewise.
6287         (sh_elf_get_relocated_section_contents): Likewise.
6288         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6289         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6290         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6291         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6292         * elf64-ppc.c (get_local_syms): Likewise.
6293         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6294         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6296 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
6298         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6300 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
6302         * elf.c (group_signature): Swap in the whole symbol, and handle
6303         extracting section symbol names.
6304         (setup_group): Add comment.
6305         (set_group_contents): When called from objcopy or ld, arrange for
6306         section contents to be written.  Write group member output section
6307         indices to allow objcopy to reorganize sections.
6308         (_bfd_elf_copy_private_section_data): Copy group info.
6310         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6311         (bfd_elf32_swap_symbol_in): Update prototype.
6312         (bfd_elf64_swap_symbol_in): Likewise.
6313         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6314         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6315         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6316         (elf_link_add_object_symbols): Likewise.
6317         (elf_link_record_local_dynamic_symbol): Likewise.
6318         (elf_link_input_bfd): Likewise.
6319         (elf_gc_mark): Likewise.
6320         (elf_reloc_symbol_deleted_p): Likewise.
6321         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6322         (mn10200_elf_relax_delete_bytes): Likewise.
6323         (mn10200_elf_symbol_address_p): Likewise.
6324         (mn10200_elf_get_relocated_section_contents): Likewise.
6325         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6326         (mn10300_elf_relax_section): Likewise.
6327         (mn10300_elf_relax_delete_bytes): Likewise.
6328         (mn10300_elf_symbol_address_p): Likewise.
6329         (mn10300_elf_get_relocated_section_contents): Likewise.
6330         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6331         (elf32_h8_relax_delete_bytes): Likewise.
6332         (elf32_h8_symbol_address_p): Likewise.
6333         (elf32_h8_get_relocated_section_contents): Likewise.
6334         * elf32-hppa.c (get_local_syms): Likewise.
6335         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6336         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6337         * elf32-sh.c (sh_elf_relax_section): Likewise.
6338         (sh_elf_relax_delete_bytes): Likewise.
6339         (sh_elf_get_relocated_section_contents): Likewise.
6340         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6341         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6342         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6343         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6344         * elf64-ppc.c (get_local_syms): Likewise.
6345         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6346         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6347         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6348         * elf64-alpha.c (alpha_elf_size_info): Likewise.
6349         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6350         * elf64-mips.c (mips_elf64_size_info): Likewise.
6351         * elf64-s390.c (s390_elf64_size_info): Likewise.
6352         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6354 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
6356         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6357         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6358         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6359         _bfd_mips_elf_ignore_discarded_relocs.
6360         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6362 2002-06-05  H.J. Lu <hjl@gnu.org>
6364         * elfxx-mips.c (mips_elf_calculate_relocation): Call
6365         _bfd_elf_rel_local_sym for STT_SECTION relocations against
6366         the SEC_MERGE section.
6368 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
6370         * coff-alpha.c: Update copyright date.
6371         * coff-mips.c: Likewise.
6372         * xcoff-target.h: Likewise.
6374         * bfd-in.h: Remove "taken from the source" comment.
6375         * libbfd-in.h: Likewise.
6376         * libcoff-in.h: Likewise.
6377         * bfd-in2.h: Regenerate.
6378         * libbfd.h: Regenerate.
6379         * libcoff.h: Regenerate.
6381         * elf.c (bfd_elf_discard_group): Return true.
6382         * elf-bfd.h (bfd_elf_discard_group): Declare.
6383         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6384         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6385         * bfd.c (bfd_discard_group): Define.
6386         * targets.c (struct bfd_target): Add _bfd_discard_group.
6387         (BFD_JUMP_TABLE_LINK): Here too.
6388         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6389         * aout-adobe.c (aout_32_bfd_discard_group): Define.
6390         * aout-target.h (MY_bfd_discard_group): Define.
6391         * aout-tic30.c (MY_bfd_discard_group): Define.
6392         * binary.c (binary_bfd_discard_group): Define.
6393         * bout.c (b_out_bfd_discard_group): Define.
6394         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6395         * coffcode.h (coff_bfd_discard_group): Define.
6396         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6397         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6398         * i386msdos.c (msdos_bfd_discard_group): Define.
6399         * i386os9k.c (os9k_bfd_discard_group): Define.
6400         * ieee.c (ieee_bfd_discard_group): Define.
6401         * ihex.c (ihex_bfd_discard_group): Define.
6402         * mmo.c (mmo_bfd_discard_group): Define.
6403         * nlm-target.h (nlm_bfd_discard_group): Define.
6404         * oasys.c (oasys_bfd_discard_group): Define.
6405         * ppcboot.c (ppcboot_bfd_discard_group): Define.
6406         * som.c (som_bfd_discard_group): Define.
6407         * srec.c (srec_bfd_discard_group): Define.
6408         * tekhex.c (tekhex_bfd_discard_group): Define.
6409         * versados.c (versados_bfd_discard_group): Define.
6410         * vms.c (vms_bfd_discard_group): Define.
6411         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6412         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6413         (aix5coff64_vec): Likewise.
6414         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6416 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
6418         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6419         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6420         (elf32-sh64-com.lo): New dependency list.
6421         * Makefile.in: Regenerate.
6422         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6423         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6424         elf32-sh64-com.lo.
6425         * configure: Regenerate.
6426         * elf32-sh64.c (sh64_address_in_cranges)
6427         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6428         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6429         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6430         * elf32-sh64-com.c: ...here.  New file.
6432 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
6434         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6435         ATTRIBUTE_UNUSED on used params.
6436         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6437         before calling bfd_section_from_elf_index on local syms.
6438         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6440 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
6442         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6443         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6444         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6445         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6446         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6447         * Makefile.in: Regenerate.
6448         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6449         (sh64-*-netbsd*): New targets.
6450         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6451         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6452         * configure: Regenerate.
6453         * elf32-sh64-nbsd.c: New file.
6454         * elf64-sh64-nbsd.c: New file.
6455         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6456         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6457         bfd_elf64_sh64lnbsd_vec.
6459 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
6461         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6462         (bfd_section_from_shdr): Likewise.  Set section name of group
6463         sections from signature.
6464         (group_signature): Split out from setup_group.  Ensure symbol table
6465         is available.
6466         (bfd_elf_discard_group): New function.
6467         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6468         .gnu.linkonce* sections if they are members of a group.
6469         (set_group_contents): Set GRP_COMDAT flag.
6470         * section.c (bfd_discard_group): New function.
6471         * bfd-in.h (bfd_elf_discard_group): Declare.
6472         * bfd-in2.h: Regenerate.
6473         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6474         (elf_linkonce_p): Define.
6476 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
6478         * elf.c (bfd_section_from_shdr): Make "name" const.
6479         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6480         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6481         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6482         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6483         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6484         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6485         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6486         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6487         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6488         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6489         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6491 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
6493         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6494         ABI.
6496 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
6498         * elf32-arc.c: Fix formatting.
6499         * elf32-arm.h: Likewise.
6500         * elf32-cris.c: Likewise.
6501         * elf32-dlx.c: Likewise.
6502         * elf32-hppa.c: Likewise.
6503         * elf32-i386.c: Likewise.
6504         * elf32-i386qnx.c: Likewise.
6505         * elf32-or32.c: Likewise.
6506         * elf32-s390.c: Likewise.
6507         * elf32-sh64.c: Likewise.
6508         * elf32-vax.c: Likewise.
6509         * elf32-xstormy16.c: Likewise.
6510         * elf64-alpha.c: Likewise.
6511         * elf64-mmix.c: Likewise.
6512         * elf64-ppc.c: Likewise.
6513         * elf64-s390.c: Likewise.
6514         * elf64-sh64.c: Likewise.
6515         * elf64-x86-64.c: Likewise.
6517 2002-06-02  Richard Henderson  <rth@redhat.com>
6519         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
6520         null when there are no got entries for a symbol.
6521         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
6522         uninitialized variable warning.
6524 2002-06-01  Richard Henderson  <rth@redhat.com>
6526         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
6527         undefined symbols here.
6528         (elf64_alpha_relax_section): Do it here.  Also test for not
6529         defined in the current module.
6530         (elf64_alpha_relocate_section_r): Split out of ...
6531         (elf64_alpha_relocate_section): ... here.  Don't dereference
6532         NULL when looking up local got entries.
6534 2002-06-01  Richard Henderson  <rth@redhat.com>
6536         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
6537         symbols from JSR relaxation.
6538         (elf64_alpha_size_plt_section_1): New.
6539         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
6540         (elf64_alpha_size_rela_got_1): ... here.
6541         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
6542         (elf64_alpha_size_rela_got_section): ... here.
6543         (elf64_alpha_size_plt_section): New.
6544         (elf64_alpha_relax_section): Call them.
6545         (elf64_alpha_size_got_sections): Remove output_bfd arg.
6546         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
6548 2002-06-01  Richard Henderson  <rth@redhat.com>
6550         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
6551         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
6552         in shared libraries.  Fix DTPRELHI and TPRELHI value.
6553         (INSN_ADDQ, INSN_RDUNIQ): New.
6554         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
6555         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
6556         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
6557         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
6558         Handle GOTDTPREL and GOTTPREL relocations.
6559         (elf64_alpha_relax_gprelhilo): New.
6560         (elf64_alpha_relax_tls_get_addr): New.
6561         (elf64_alpha_relax_find_tls_segment): New.
6562         (elf64_alpha_relax_section): Handle TLS relocations.
6563         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
6564         (elf64_alpha_check_relocs): Set it.
6566 2002-06-01  Richard Henderson  <rth@redhat.com>
6568         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
6570         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
6571         check; don't suppress dynamic relocs for non-allocated sections.
6573         * elf64-alpha.c: Remove dead code.
6575 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
6577         * bfd-in2.h: Regenerate.
6578         * libbfd.h: Regenerate.
6579         * po/SRC-POTFILES.in: Regenerate.
6581         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
6582         space for bss .plt.
6584 2002-05-31  Graeme Peterson  <gp@qnx.com>
6586         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
6587         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
6588         Run "make dep-am".
6589         * Makefile.in: Regenerate.
6590         * config.bfd: Add i[3456]86-*-nto-qnx* support.
6591         * configure.in: Add bfd_elf32_i386qnx_vec support.
6592         * configure: Regenerate.
6593         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
6594         is_contained_by_filepos, and copy_private_bfd_data_p.
6595         * elf.c (assign_file_positions_for_segments): Call backend
6596         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
6597         (IS_CONTAINED_BY_FILEPOS): Define.
6598         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6599         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
6600         Fix non-K&R call to _bfd_error_handler.
6601         (_bfd_elf_copy_private_section_data): Use backend
6602         copy_private_bfd_data_p.
6603         * elf32-i386.c: Don't include elfxx-target.h when
6604         ELF32_I386_C_INCLUDED is defined.
6605         * elf32-i386qnx.c: New QNX elf backend file.
6606         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
6607         elf_backend_is_contained_by_filepos, and
6608         elf_backend_do_copy_private_bfd_data.
6609         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
6611 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
6613         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
6614         Move other similar defines to start of file.
6616 2002-05-30  Tom Rix  <trix@redhat.com>
6618         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
6619         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
6621 2002-05-30  Richard Henderson  <rth@redhat.com>
6623         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
6624         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
6625         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
6626         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
6627         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
6628         (struct alpha_elf_obj_tdata): Rename total_got_entries and
6629         n_local_got_entries to total_got_size and local_got_size.
6630         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
6631         (alpha_got_entry_size): New.
6632         (elf64_alpha_relax_with_lituse): Use it.
6633         (elf64_alpha_relax_without_lituse): Likewise.
6634         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
6635         (get_got_entry): New.
6636         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
6637         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
6638         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
6639         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
6640         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
6641         (elf64_alpha_calc_got_offsets): Likewise.
6642         (alpha_dynamic_entries_for_reloc): New.
6643         (elf64_alpha_calc_dynrel_sizes): Use it.
6644         (elf64_alpha_size_dynamic_sections): Likewise.
6645         (elf64_alpha_relocate_section): Handle TLS relocations.
6646         * reloc.c: Add Alpha TLS relocations.
6647         * bfd-in2.h, libbfd.h: Rebuild.
6649 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
6651         * peXXigen.c (pe_print_idata): Remove double printed
6652         import table lines; add Bound-To comment.
6654 2002-05-29  Matt Thomas  <matt@3am-software.com>
6656         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
6657         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
6658         (elf32-vax.lo): New rule.
6659         * Makefile.in: Regenerate.
6660         * configure.in (bfd_elf32_vax_vec)
6661         (vaxnetbsd_vec): New vectors.
6662         * configure: Regenerate.
6663         * config.bfd (vax-*-netbsdelf*)
6664         (vax-*-netbsdaout*)
6665         (vax-*-netbsd*): New targets.
6666         * elf32-vax.c: New file.
6667         * reloc.c: Add VAX relocations.
6668         * bfd-in2.h: Regenerate.
6669         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
6671 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
6673         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
6674         and bfd_elf32_bigarm_vec to targ_selvecs.
6676 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
6678         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
6679         with auto-imported symbols.
6681 2002-05-29  Adam Nemet  <anemet@lnxw.com>
6683         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
6684         sections only record bfd.
6685         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
6686         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
6687         * bfd-in2.h: Regenerate.
6689 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
6691         * syms.c (_bfd_stab_section_find_nearest_line): Move
6692         declaration and initialisation of saw_line and saw_func out of
6693         for loop.
6695 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
6697         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
6698         (bfd_elf64_get_symbol_info): Define.
6699         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
6701 2002-05-29  Andrey Volkov  <avolkov@transas.com>
6703         * cpu-h8300.c: Make default h8300 machine first in machine list.
6705 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
6707         * config.bfd: Added DLX configuraton.
6708         * Makefile.am: Added DLX configuraton.
6709         * configure.in: Added DLX configuraton.
6710         * archures.c: Add DLX architecure.
6711         * reloc.c: Add DLX relocs.
6712         * targets.c: Added DLX target vector.
6713         * configure: Regenerate.
6714         * Makefile.in: Regenreate.
6715         * bfd-in2.h: Regenreate.
6716         * elf32-dlx.c: New file: Support DLX target.
6717         * cpu-dlx.c: New file: Support DLX target.
6719 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
6721         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
6723         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
6724         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
6725         strings to point inside function code sym string.
6726         (func_desc_adjust): Likewise.
6727         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
6729 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
6731         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
6732         (elf64_x86_64_grok_psinfo): Added.
6734 2002-05-24  TAMURA Kent <kent@netbsd.org>
6736         * config.bfd: Add a target for i386-netbsdpe.
6738 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
6740         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
6741         and is_func_descriptor.
6742         (func_desc_adjust): Hide function code sym in shared libs unless
6743         there is a matching exported function descriptor sym.
6745 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
6747         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
6748         for symbols from SHF_TLS section.
6749         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
6750         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
6751         (map_sections_to_segments): Build PT_TLS segment if necessary.
6752         (assign_file_positions_for_segments): Likewise.
6753         (get_program_header_size): Account for PT_TLS segment.
6754         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
6755         SEC_THREAD_LOCAL sections to STT_TLS.
6756         * reloc.c: Add 386 and IA-64 TLS relocs.
6757         * section.c (SEC_THREAD_LOCAL): Define.
6758         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
6759         Remove.
6760         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
6761         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
6762         unconditionally.
6763         (struct elf_final_link_info): Add first_tls_sec.
6764         (elf_bfd_final_link): Set first_tls_sec.
6765         Compute elf_hash_table (info)->tls_segment.
6766         (elf_link_output_extsym): Handle STT_TLS symbols.
6767         (elf_link_input_bfd): Likewise.
6768         * syms.c (BSF_THREAD_LOCAL): Define.
6769         * bfd-in2.h: Rebuilt.
6770         * libbfd.h: Rebuilt.
6771         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
6772         elf_i386_mkobject, elf_i386_object_p): New functions.
6773         (elf_howto_table): Add TLS relocs.
6774         (elf_i386_reloc_type_lookup): Support TLS relocs.
6775         (elf_i386_info_to_howto_rel): Likewise.
6776         (struct elf_i386_link_hash_entry): Add tls_type.
6777         (struct elf_i386_obj_tdata): New.
6778         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
6779         New macros.
6780         (struct elf_i386_link_hash_table): Add tls_ldm_got.
6781         (link_hash_newfunc): Clear tls_type.
6782         (elf_i386_check_relocs): Support TLS relocs.
6783         (elf_i386_gc_sweep_hook): Likewise.
6784         (allocate_dynrelocs): Likewise.
6785         (elf_i386_size_dynamic_sections): Likewise.
6786         (elf_i386_relocate_section): Likewise.
6787         (elf_i386_finish_dynamic_symbol): Likewise.
6788         (bfd_elf32_mkobject, elf_backend_object_p): Define.
6789         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
6790         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
6791         want_tprel, want_dtpmod, want_dtprel.
6792         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
6793         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
6794         R_IA64_LTOFF_TPREL22.
6795         (elf_code_to_howto_index): Add TLS relocs.
6796         (elfNN_ia64_check_relocs): Support TLS relocs.
6797         (allocate_global_data_got): Account for TLS .got data.
6798         (allocate_dynrel_entries): Account for TLS dynamic relocations.
6799         (elfNN_ia64_install_value): Supprt TLS relocs.
6800         (set_got_entry): Support TLS relocs.
6801         (elfNN_ia64_relocate_section): Likewise.
6803 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
6805         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
6806         BLX reloc round the relocation up rather than down.
6807         * coff-arm.c (coff_arm_relocate_section): Likewise.
6809 2002-05-21  H.J. Lu  (hjl@gnu.org)
6811         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
6812         definition.
6814 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
6816         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
6817         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
6819 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
6821         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
6822         unresolved relocs.
6823         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
6825 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6827         * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
6828         non-ELF targets.
6830 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6832         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
6833         an error value.
6834         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
6835         return with false on error.
6836         (elf_link_input_bfd): Check reloc_emitter return value.
6838 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
6840         * config.bfd (armeb-*-netbsdelf*): New target.
6842 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
6844         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
6845         at the plt call stub.
6847 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6849         * cpu-mips.c (mips_compatible): Don't try to check machine
6850         compatibility.
6852 2002-05-18  Tom Rix  <trix@redhat.com>
6854         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
6856 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
6858         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
6859         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
6860         we've already warned about an undefined symbol.  Report more
6861         detail on reloc errors.
6863 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
6865         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
6866         * configure.in: Invoke AM_INSTALL_LIBBFD.
6867         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
6868         (install_libbfd): .. New target.
6869         (uninstall_libbfd): Likewise.
6870         (install-bfdlibLTLIBRARIES): Likewise.
6871         (uninstall-bfdlibLTLIBRARIES): Likewise.
6872         (bfdlibdir): New.
6873         (bfdincludedir): New.
6874         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
6875         * aclocal.m4: Regenerate.
6876         * configure: Regenerate.
6877         * Makefile.in: Regenerate.
6879 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
6881         * hash.c (bfd_hash_lookup): Remove computation of len from inside
6882         hash loop.
6884 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
6886         * config.bfd: Add targets for sh64-linux (little endian and
6887         big endian).
6889 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
6891         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
6892         is located in the same section as the import table.  Instead
6893         check, and if necessary load the section containing the thunk.
6895 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
6897         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
6898         bfd_bread.
6899         (xcoff64_core_file_matches_executable_p): Replace bfd_read
6900         with bfd_bread.
6902 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
6904         * aix5ppc-core.c: Warning fixes.
6905         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
6906         * aout-target.h (MY_bfd_link_just_syms): Define.
6907         * aout-tic30.c (MY_bfd_link_just_syms): Define.
6908         * bfd.c (bfd_link_just_syms): Define.
6909         * binary.c (binary_bfd_link_just_syms): Define.
6910         * bout.c (b_out_bfd_link_just_syms): Define.
6911         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
6912         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6913         * coffcode.h (coff_bfd_link_just_syms): Define.
6914         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
6915         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
6916         (_bfd_elf_link_just_syms): Declare.
6917         * elf.c (_bfd_elf_link_just_syms): New function.
6918         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
6919         sections haven't already been discarded by the linker.
6920         * elflink.h (elf_link_add_object_symbols): Likewise for stab
6921         sections and SEC_MERGE sections.
6922         (elf_bfd_discard_info): Similarly here.
6923         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
6924         * i386msdos.c (msdos_bfd_link_just_syms): Define.
6925         * i386os9k.c (os9k_bfd_link_just_syms): Define.
6926         * ieee.c (ieee_bfd_link_just_syms): Define.
6927         * ihex.c (ihex_bfd_link_just_syms): Define.
6928         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
6929         (_bfd_generic_link_just_syms): Declare.
6930         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
6931         * linker.c (_bfd_generic_link_just_syms): New function.
6932         * mmo.c (mmo_bfd_link_just_syms): Define.
6933         * nlm-target.h (nlm_bfd_link_just_syms): Define.
6934         * oasys.c (oasys_bfd_link_just_syms): Define.
6935         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
6936         * som.c (som_bfd_link_just_syms): Define.
6937         * srec.c (srec_bfd_link_just_syms): Define.
6938         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
6939         (BFD_JUMP_TABLE_LINK): And here.
6940         * tekhex.c (tekhex_bfd_link_just_syms): Define.
6941         * versados.c (versados_bfd_link_just_syms): Define.
6942         * vms.c (vms_bfd_link_just_syms): Define.
6943         * libbfd.h: Regenerate.
6944         * bfd-in2.h: Regenerate.
6946 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6948         * elf32-mips.c: Remove superfluous definitions copied from
6949         elfxx-mips.c.
6950         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
6951         SGIish vectors to check the special case.
6952         (mips_elf_hi16_reloc): Fix comment.
6953         (mips_elf_got16_reloc): Likewise.
6954         (_bfd_mips_elf32_gprel16_reloc): Likewise.
6955         (elf_reloc_map): Code cleanup.
6956         (mips_reloc_map): Add comment.
6957         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
6958         (mips_elf32_rtype_to_howto): Likewise.
6959         (mips_elf32_discard_info): Likewise.
6960         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
6961         lead to IRIX compatibility now.
6963 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6965         * elfxx-mips.c: Call it IRIX, not Irix in comments.
6967 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
6969         * config.bfd (shle-*-netbsdelf*): Add target which includes
6970         sh64 support.
6972 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
6974         * configure.in: Revert 2002-04-07.  Instead, auto-configure
6975         HAVE_ST_C_IMPL.
6976         * configure: Regenerate.
6977         * config.in: Regenerate.
6978         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
6979         or AIX_5_CORE.
6981 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
6983         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
6984         corefiles as well.2
6985         * configure: Regenerate.
6987 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
6989         * Makefile.am (install-data-local): Install headers to
6990         $(exec_prefix)/include.
6991         * Makefile.in: Regenerate.
6993 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
6994             Daniel Jacobowitz  <drow@mvista.com>
6996         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
6997         map BFD_RELOC_RVA.
6999 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
7001         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7002         hppa*-*-openbsd*): New targets.
7003         * configure.in (alpha*-*-openbsd*): Set COREFILE.
7004         * configure: Regenerate.
7006 2002-05-10  Tom Rix  <trix@redhat.com>
7008         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
7009         xcoff64_ppc_relocate_section.
7010         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7011         * libxcoff.h: Common xcoff_reloc_type function declaration.
7013 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
7015         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
7016         added in 2002-05-09 commit.
7018         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7019         don't look for stubs on all undefined syms.
7021 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
7023         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7024         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7025         pcrel_offset.
7027         * elf32-i386.c (elf_howto_table): Comments.
7028         (elf_i386_relocate_section): Handle more relocs for relocatable
7029         linking and against SEC_MERGE sections.
7031 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
7033         * elf32-ppc.c (ppc_elf_create_got): New function.
7034         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
7035         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
7036         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7037         _bfd_elf_create_got_section.
7039 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
7041         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7042         * elfxx-target.h (elf_backend_rela_normal): Define.
7043         (elfNN_bed): Init rela_normal.
7044         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7045         for section symbols here if rela_normal.  Simplify abs section test.
7046         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7047         return immediately.  Remove code handling relocatable linking.
7048         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7049         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7050         * elf32-i370.c (i370_elf_relocate_section): Likewise.
7051         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7052         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7053         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7054         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7055         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7056         * elf32-s390.c (elf_s390_relocate_section): Likewise.
7057         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7058         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7059         * elf64-s390.c (elf_s390_relocate_section): Likewise.
7060         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7061         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7062         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7063         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7064         * elf-m10200.c (elf_backend_rela_normal): Define.
7065         * elf-m10300.c (elf_backend_rela_normal): Define.
7066         * elf32-fr30.c (elf_backend_rela_normal): Define.
7067         * elf32-i370.c (elf_backend_rela_normal): Define.
7068         * elf32-i860.c (elf_backend_rela_normal): Define.
7069         * elf32-m68k.c (elf_backend_rela_normal): Define.
7070         * elf32-mcore.c (elf_backend_rela_normal): Define.
7071         * elf32-openrisc.c (elf_backend_rela_normal): Define.
7072         * elf32-ppc.c (elf_backend_rela_normal): Define.
7073         * elf32-s390.c (elf_backend_rela_normal): Define.
7074         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7075         * elf64-ppc.c (elf_backend_rela_normal): Define.
7076         * elf64-s390.c (elf_backend_rela_normal): Define.
7077         * elf64-x86-64.c (elf_backend_rela_normal): Define.
7078         * elfxx-ia64.c (elf_backend_rela_normal): Define.
7079         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7080         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7082 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
7084         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7085         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7087 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
7089         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7090         when not relocatable.  Fix reloc_emitter call for K&R.
7092 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
7094         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7095         reloading local sym addend mistakenly removed in 2002-05-01 change.
7097         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7098         (read_abbrevs): Change "offset" param to bfd_vma.
7099         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7100         Change "abbrev_offset" to bfd_vma.
7101         (read_indirect_string): Use correct conversion chars in error
7102         message format string, cast bfd_vma's to unsigned long.
7103         (read_abbrevs): Likewise.
7104         (read_attribute_value): Likewise.
7105         (decode_line_info): Likewise.
7106         (scan_unit_for_functions): Likewise.
7107         (parse_comp_unit): Likewise.
7109 2002-05-04  Tom Rix  <trix@redhat.com>
7111         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7112         (coff_swap_reloc_out): Same.
7113         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7114         (xcoff_swap_reloc_out): Same.
7115         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7116         case some 16 bit relocs. Add reloc value to output.
7117         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
7118         R_RBR. Improve names.
7119         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7120         (bfd_xcoff_backend_data): Update with new reloc swap names.
7121         (bfd_pmac_xcoff_backend_data) : Same.
7122         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7123         (xcoff64_swap_reloc_out): Same.
7124         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
7125         R_POS. Add reloc value to output.
7126         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
7127         bit R_RBR. Improve names, masks.
7128         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7129         (bfd_xcoff_backend_data): Update with new reloc swap names.
7130         (bfd_xcoff_aix5_backend_data) : Same.
7132 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
7134         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7135         bfd_count top_index, input_list, all_local_syms.
7136         (elf32_hppa_setup_section_lists): New function, split from
7137         elf32_hppa_size_stubs.
7138         (elf32_hppa_next_input_section): Likewise.
7139         (group_sections): Likewise.
7140         (get_local_syms): Likewise.
7141         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
7142         stubs on undefined syms too.
7143         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
7144         Only access htab elf fields when we have an elf hash table.
7145         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7146         (elf32_hppa_next_input_section): Declare.
7148 2002-05-04  Bob Byrnes  <byrnes@curl.com>
7150         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7151         _bfd_new_bfd.
7153 2002-05-03  H.J. Lu  (hjl@gnu.org)
7155         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7156         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7157         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7158         to hide a global symbol.
7159         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
7160         forced_local to true.
7162 2002-05-02  Richard Henderson  <rth@redhat.com>
7164         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7165         vs SHN_UNDEF to zero.
7167 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
7169         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7170         16 bit reloc.
7171         <R_PPC64_SECTOFF_DS>: Likewise.
7172         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7173         SECTOFF reloc.
7174         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7175         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7176         SECTOFF reloc.
7178         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7179         (ppc64_elf_ha_reloc): New function.
7180         (ppc64_elf_brtaken_reloc): New function.
7181         (ppc64_elf_sectoff_reloc): New function.
7182         (ppc64_elf_sectoff_ha_reloc): New function.
7183         (ppc64_elf_toc_reloc): New function.
7184         (ppc64_elf_toc_ha_reloc): New function.
7185         (ppc64_elf_toc64_reloc): New function.
7186         (ppc64_elf_unhandled_reloc): New function.
7187         (ppc64_elf_howto_raw): Use the above.
7188         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7189         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
7190         <R_PPC64_SECTOFF_DS>: Likewise.
7191         (IS_ABSOLUTE_RELOC): Update.
7192         (struct ppc_link_hash_table): Add have_undefweak.
7193         (ppc64_elf_link_hash_table_create): Init.
7194         (func_desc_adjust): Set have_undefweak.
7195         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
7196         add the .sfpr blr when have_undefweak.
7197         (ppc64_elf_setup_section_lists): Check hash table flavour.
7198         (ppc64_elf_next_input_section): Move output_section->owner test to
7199         ppc64elf.em.
7200         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7201         and relocatable test.  Return TOCstart and don't set elf_gp.
7202         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7203         offset calculation.  Add assert on weak sym branch tweaks.
7204         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7205         (ppc64_elf_toc): Declare.
7206         (ppc64_elf_next_input_section): Update.
7208 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
7210         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7211         file_name.
7213 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
7215         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7216         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
7217         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
7218         call branches.  Correct undefined weak destination.
7219         (ppc64_elf_func_desc_adjust): Always create at least one blr in
7220         .sfpr, and correct case where either only savef* or restf* is
7221         needed.
7223         Long branch stubs, multiple stub sections.
7224         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7225         (ppc64_elf_next_input_section): Declare.
7226         * elf64-ppc.c: Move linker-only prototypes.
7227         (STUB_SUFFIX): Define.
7228         (enum ppc_stub_type): New.
7229         (struct ppc_stub_hash_entry): New.
7230         (struct ppc_branch_hash_entry): New.
7231         (struct ppc_link_hash_entry): Add stub_cache, oh.
7232         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
7233         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7234         Rename plt_overflow to stub_error.
7235         (ppc_stub_hash_lookup): Define.
7236         (ppc_branch_hash_lookup): Define.
7237         (stub_hash_newfunc): New function.
7238         (branch_hash_newfunc): New function.
7239         (link_hash_newfunc): Init new fields.
7240         (ppc64_elf_link_hash_table_create): Likewise.
7241         (ppc64_elf_link_hash_table_free): New function.
7242         (ppc_stub_name): New function.
7243         (ppc_get_stub_entry): New function.
7244         (ppc_add_stub): New function.
7245         (create_linkage_sections): Use bfd_make_section_anyway.  Create
7246         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
7247         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7248         and set up for plt call stubs.  Link func and func desc syms.
7249         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7250         (func_desc_adjust): Avoid hash lookup when func desc sym available
7251         via shortcut, and set links when processing.
7252         (ppc64_elf_hide_symbol): Likewise.
7253         (allocate_dynrelocs): Don't allocate stub section here.
7254         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7255         Remove sstub code.
7256         (ppc_type_of_stub): New function.
7257         (build_one_stub): Delete.
7258         (ppc_build_one_stub): New function.
7259         (ppc_size_one_stub): New function.
7260         (ppc64_elf_setup_section_lists): New function.
7261         (ppc64_elf_next_input_section): New function.
7262         (group_sections): New function.
7263         (get_local_syms): New function.
7264         (ppc64_elf_size_stubs): Rewrite.
7265         (ppc64_elf_build_stubs): Rewrite.
7266         (ppc64_elf_relocate_section): Look up stub entry for REL24
7267         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
7268         branch stubs if REL14* or REL24 relocs won't reach.
7269         (bfd_elf64_bfd_link_hash_table_free): Define.
7271 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
7273         * config.bfd: Add support for powerpc-*-windiss.
7275 2002-04-30  Tom Rix  <trix@redhat.com>
7277         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7278         symbol names into the hash table.
7280 2002-04-28  Tom Rix  <trix@redhat.com>
7282         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
7283         calulating relocations.
7284         (xcoff_complain_overflow) : Function table for relocation errors.
7285         (xcoff_ppc_relocate_section): Use relocation and complain function
7286         tables.
7287         (xcoff_complain_overflow_unsigned_func): New complain function.
7288         (xcoff_complain_overflow_signed_func): Same.
7289         (xcoff_complain_overflow_bitfield_func): Same.
7290         (xcoff_complain_overflow_dont_func): Same.
7291         (xcoff_reloc_type_crel): New recot function.
7292         (xcoff_reloc_type_br): Same.
7293         (xcoff_reloc_type_ba): Same.
7294         (xcoff_reloc_type_toc): Same.
7295         (xcoff_reloc_type_rel): Same.
7296         (xcoff_reloc_type_neg): Same.
7297         (xcoff_reloc_type_pos): Same.
7298         (xcoff_reloc_type_fail): Same.
7299         (xcoff_reloc_type_noop): Same.
7300         * libxcoff.h : Declare common parts for xcoff64.
7301         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
7302         and complain function tables.
7304 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
7306         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7307         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7309 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
7311         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7312         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7314         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7315         same as the output before calling elf_link_input_bfd.
7317         * coffcode.h (coff_compute_section_file_positions): Set
7318         section_tail after shuffling section list.
7320 2002-04-24  Christian Groessler <chris@groessler.org>
7322         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7323         addresses are 23bit with a special layout, not plain 32bit
7324         values.  Prevent relocation of immediate values.
7326 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
7328         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7329         MIPS-16 ASE flags are set, print something to indicate that.
7331 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
7333         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7334         under which a plt call stub is used.
7335         (final_link_relocate): Similarly.
7336         (allocate_plt_static): Clear h-plabel except when plt entry is
7337         exclusively used for a plabel.
7338         (allocate_dynrelocs): Use the above to simplify plt sizing.
7339         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7340         (elf32_hppa_link_hash_table_create): Init.
7341         (BL22_RP): Define.
7342         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7343         (elf32_hppa_check_relocs): Set has_22bit_branch.
7345         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7346         (final_link_relocate): Likewise.
7348 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
7350         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7351         search table if some FDE is DW_EH_PE_aligned encoded either.
7352         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7354 2002-04-22  Richard Smith  <richard@ex-parrot.com>
7355             Jakub Jelinek  <jakub@redhat.com>
7357         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7358         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7359         encoded personality.
7360         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7361         for CIE/FDE removal.
7363 2002-04-20  Tom Rix  <trix@redhat.com>
7365         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7367 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
7369         * archures.c (bfd_lookup_arch): Move the list order comment..
7370         (struct bfd_arch_info): ..to where it belongs.
7371         * bfd-in2.h: Regenerate.
7373         * archures.c (bfd_lookup_arch): Add comment on list order.
7374         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7375         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7376         is always at head of list.
7378 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
7380         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7381         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7382         definition of these functions for ARM_WINCE builds as they are
7383         not used.
7384         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7385         for ARM_WINCE builds.
7387 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
7389         * coff-arm.c (bfd_arm_process_before_allocation):
7391 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
7393         * cpu-sh.c (scan_mach): Delete.
7394         (arch_info_struct): Replace scan_mach with bfd_default_scan.
7395         (bfd_sh_arch): Likewise.
7397 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
7399         * ihex.c (ihex_write_object_contents): Fix check for records
7400         crossing 64K boundaries.
7402 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
7404         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7405         type rather than just assuming entries are ELF.
7406         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7407         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7408         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7409         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7410         rather than elf_link_hash_entry.
7412 2002-04-15  Richard Henderson  <rth@redhat.com>
7414         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7415         n32 binaries.
7417 2002-04-15  Michael Snyder  <msnyder@redhat.com>
7419         * opncls.c (bfd_close): Write contents if writeable.
7420         Minor formatting tidy-ups.
7422 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
7424         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7426 2002-04-12  Michael Snyder  <msnyder@redhat.com>
7428         * bfd-in.h (bfd_get_section_lma): New access macro.
7429         Minor white-space fix-up.
7431 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
7433         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7434         header pad.
7436 2002-04-09  DJ Delorie  <dj@redhat.com>
7438         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7440 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
7442         * coffcode.h (coff_read_word): New.
7443         (coff_compute_checksum): New.
7444         (coff_apply_checksum): New.
7445         (coff_write_object_contents): Call coff_apply_checksum () to
7446         apply checksum to PE image.
7448 2002-04-08  Randolph Chung  <tausq@debian.org>
7450         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7451         (elf32_hppa_final_link): Split out sorting logic to..
7452         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7453         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7455 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
7457         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7458         pattern.
7459         * configure: Re-generate.
7461 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
7463         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7464         is greater or equal to 4.3.3.
7465         * configure: Regenerate.
7466         Fix PR gdb/344.
7468 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
7470         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7471         R_CRIS_32_PCREL>: Fix typo in name.
7472         (cris_elf_check_relocs): Always create .rela.got here when
7473         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7474         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7475         assume it's created.
7477 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
7479         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7480         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7481         define.
7482         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7483         * bfd.c (bfd_link_hash_table_free): Define.
7484         * binary.c (binary_bfd_link_hash_table_free): Define.
7485         * bout.c (b_out_bfd_link_hash_table_free): Define.
7486         * coff-rs6000.c (rs6000coff_vec): Include
7487         _bfd_generic_link_hash_table_free.
7488         (pmac_xcoff_vec): Likewise.
7489         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7490         (aix5coff64_vec): Likewise.
7491         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7492         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7493         (bfd_elf32_bfd_link_hash_table_free): Define.
7494         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7495         (bfd_elf32_bfd_link_hash_table_free): Define.
7496         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7497         define.
7498         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7499         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7500         * ieee.c (ieee_bfd_link_hash_table_free): Define.
7501         * ihex.c (ihex_bfd_link_hash_table_free): Define.
7502         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
7503         (_bfd_generic_link_hash_table_free): Add prototype.
7504         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
7505         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
7506         * linker.c (_bfd_generic_link_hash_table_free): New function.
7507         * mmo.c (mmo_bfd_link_hash_table_free): Define.
7508         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
7509         * oasys.c (oasys_bfd_link_hash_table_free): Define.
7510         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
7511         * som.c (som_bfd_link_hash_table_free): Define.
7512         * srec.c (srec_bfd_link_hash_table_free): Define.
7513         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
7514         * versados.c (versados_bfd_link_hash_table_free): Define.
7515         * vms.c (vms_bfd_link_hash_table_free): New function.
7516         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
7518         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
7519         instead of bfd_alloc.
7520         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
7521         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
7522         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
7523         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
7524         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
7525         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
7526         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
7527         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
7528         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
7529         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
7530         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
7531         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
7532         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
7533         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
7534         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
7535         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
7536         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
7537         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
7538         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
7539         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
7540         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
7541         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
7542         * m68klinux.c (linux_link_hash_table_create): Likewise.
7543         * sparclinux.c (linux_link_hash_table_create): Likewise.
7544         * sunos.c (sunos_link_hash_table_create): Likewise.
7545         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
7547         * targets.c: Add _bfd_link_hash_table_free to xvec.
7549         * bfd-in2.h: Regenerate.
7550         * libbfd.h: Regenerate.
7551         * libcoff.h: Regenerate.
7553 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
7555         * dep-in.sed: Cope with absolute paths.
7556         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
7557         Run "make dep-am".
7558         * Makefile.in: Regenerate.
7559         * coff-arm.c: Fix copyright date.
7560         * cpu-h8300.c: Likewise.
7561         * cpu-i370.c: Likewise.
7562         * cpu-s390.c: Likewise.
7563         * cpu-mips.c: Likewise.
7564         * po/SRC-POTFILES.in: Regenerate.
7566 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7568         * Makefile.am: Add elfxx-mips.c to the known backends.
7569         (elf32-mips.lo): remove dependency to coff/external.h.
7570         * Makefile.in: Regenerate.
7571         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
7572         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
7573         accordingly.
7574         * configure: Regenerate.
7575         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
7576         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
7577         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
7578         MIPS specific backend functions.
7579         * elf32-mips.c: Moved most code to elfxx-mips.c.
7580         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
7581         static.
7582         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
7583         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
7584         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
7585         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
7586         interface to allow selection of the right REL or RELA howto table.
7587         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
7588         static. Let it refuse n32 objects.
7589         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
7590         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
7591         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
7592         (elf32_mips_ignore_discarded_relocs): Rename from
7593         _bfd_elf32_mips_ignore_discarded_relocs.
7594         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
7595         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7596         (elf_mips_howto_table_rela): Remove.
7597         * elf64-mips.c: Moved most code to elfxx-mips.c.
7598         (bfd_elf64_bfd_reloc_type_lookup): Make static.
7599         (mips_elf64_rtype_to_howto): New function.
7600         (mips_elf64_object_p): Likewise.
7601         (elf64_mips_irix_compat): Likewise.
7602         * elfxx-mips.c: New file containing common code merged together from
7603         elf32-mips.c and elf64-mips.c.
7604         * elfxx-mips.h: New file containing MIPS specific prototypes from
7605         elf-bfd.h.
7606         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
7607         elf_backend_mips_rtype_to_howto.
7609 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
7611         * srec.c (MAXCHUNK, Chunk): Revise comments.
7612         (srec_write_record): Correct buffer size.
7613         (srec_write_header): Do without intermediate buffer.
7614         (srec_write_section): Validate Chunk.
7615         (srec_write_terminator): Pass NULL instead of dummy buffer.
7616         (srec_write_symbols): Pass file and symbol names directly to
7617         bfd_bwrite so sprintf won't overflow buffer.
7619 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
7621         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
7622         PC relative relocs against hidden symbols.
7623         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7625 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
7627         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
7628         LMAs, loop over segments until p_vaddr and p_memsz specify an
7629         extent enclosing the section.
7631 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
7633         * ihex.c (ihex_write_object_contents): Do not allow records to
7634         cross a 64K boundary - wrap if necessary.
7636 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
7638         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
7639         which caused the returned LWP ID to always be 0.
7641 2002-04-01  Richard Henderson  <rth@redhat.com>
7643         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7644         (elf32_sparc_relocate_section): Use it to figure out when to
7645         initialize .got entries.
7646         * elf64-sparc.c: Similarly.
7648 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
7650         * linker.c (link_action): Ignore duplicate warning syms.
7651         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
7652         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
7653         (elf_adjust_dynamic_symbol): Likewise.
7654         (elf_export_symbol): Likewise.
7655         (elf_link_find_version_dependencies): Likewise.
7656         (elf_link_assign_sym_version): Likewise.
7657         (elf_link_sec_merge_syms): Likewise.
7658         (elf_link_output_extsym): Likewise.
7659         (elf_gc_sweep_symbol): Likewise.
7660         (elf_gc_propagate_vtable_entries_used): Likewise.
7661         (elf_gc_smash_unused_vtentry_relocs): Likewise.
7662         (elf_gc_allocate_got_offsets): Likewise.
7663         (elf_collect_hash_codes): Likewise.
7664         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
7665         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
7666         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7667         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
7668         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
7669         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
7670         (elf_cris_discard_excess_dso_dynamics): Likewise.
7671         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
7672         (mark_PIC_calls): Likewise.
7673         (allocate_plt_static): Likewise.
7674         (allocate_dynrelocs): Likewise.
7675         (readonly_dynrelocs): Likewise.
7676         * elf32-i386.c (allocate_dynrelocs): Likewise.
7677         (readonly_dynrelocs): Likewise.
7678         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
7679         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
7680         * elf32-mips.c (mips_elf_output_extsym): Likewise.
7681         (mips_elf_sort_hash_table_f): Likewise.
7682         (mips_elf_check_mips16_stubs): Likewise.
7683         * elf32-s390.c (allocate_dynrelocs): Likewise.
7684         (readonly_dynrelocs): Likewise.
7685         * elf32-sh.c (sh_elf_discard_copies): Likewise.
7686         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
7687         (xstormy16_relax_plt_realloc): Likewise.
7688         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
7689         (elf64_alpha_output_extsym): Likewise.
7690         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
7691         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
7692         (mips_elf64_check_mips16_stubs): Likewise.
7693         (mips_elf64_output_extsym): Likewise.
7694         * elf64-ppc.c (func_desc_adjust): Likewise.
7695         (allocate_dynrelocs): Likewise.
7696         (readonly_dynrelocs): Likewise.
7697         * elf64-s390.c (allocate_dynrelocs): Likewise.
7698         (readonly_dynrelocs): Likewise.
7699         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
7700         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
7701         (readonly_dynrelocs): Likewise.
7702         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
7703         * aoutx.h (aout_link_write_other_symbol): Likewise.
7704         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
7705         (_bfd_coff_write_global_sym): Likewise.
7706         * i386linux.c (linux_tally_symbols): Likewise.
7707         * m68klinux.c (linux_tally_symbols): Likewise.
7708         * sparclinux.c (linux_tally_symbols): Likewise.
7709         * pdp11.c (aout_link_write_other_symbol): Likewise.
7710         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
7711         * xcofflink.c (xcoff_build_ldsyms): Likewise.
7712         (xcoff_write_global_symbol): Likewise.
7714         * cofflink.c (_bfd_coff_final_link): Formatting.
7715         * cpu-mips.c (mips_compatible): Make static, prototype.
7716         * elf32-i386.c (elf_i386_check_relocs): Formatting.
7717         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
7718         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
7719         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
7720         (mips_elf64_final_link): Likewise.
7721         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
7722         prototype.
7724 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
7726         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
7727         (SWAP_OUT_RELOC_OFFSET): Define.
7729 2002-03-27  Gregory Steuck <greg@nest.cx>
7731         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
7732         terminating NULL if empty symbol table.
7733         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
7735 2002-03-26  H.J. Lu  (hjl@gnu.org)
7737         * elflink.h (elf_link_input_bfd): Revert the last change since
7738         the gcc exception handling isn't fixed yet.
7740 2002-03-26  H.J. Lu  (hjl@gnu.org)
7742         * elflink.h (elf_link_input_bfd): Complain about relocations
7743         against local symbols in discarded sections.
7745 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
7747         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
7749 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
7751         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
7752         section file offset for !SEC_LOAD sections.
7754 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
7756         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
7757         <case R_ARM_GOT>): Handle relocations to Thumb functions.
7759 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
7761         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
7762         Whitespace changes.
7763         * archive.c: Update copyright date.
7764         * bfd-in2.h: Regenerate.
7765         * libbfd.h: Regenerate.
7766         * Makefile.am: Run "make dep-am"
7767         * Makefile.in: Regenerate.
7768         * po/SRC-POTFILES.in: Regenerate.
7770 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
7772         * dwarf2.c (struct funcinfo): Move up.
7773         (lookup_address_in_function_table): New argument function_ptr.
7774         Set it.
7775         (lookup_address_in_line_table): New argument function.  If function
7776         is non-NULL, use it to handle ``addr'' before the first line note of
7777         the function.
7778         (comp_unit_find_nearest_line): Update and swap calls to
7779         lookup_address_in_function_table and lookup_address_in_line_table.
7780         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
7781         N_SLINE encountered if we see an N_FUN before any N_SLINE.
7783 2002-03-20  Tom Rix  <trix@redhat.com>
7785         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
7786         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
7787         * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
7789 2002-03-19  Tom Rix  <trix@redhat.com>
7791         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
7792         dynamic objects in archives.
7794 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
7796         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
7797         STT_NOTYPE symbols to STT_OBJECT.
7799 2002-03-18  Jan Hubicka  <jh@suse.cz>
7801         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
7803 2002-03-18  Tom Rix  <trix@redhat.com>
7805         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
7806         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
7807         * coff-rs6000 (do_pad) : New function for archive padding.
7808         (do_copy) : New function for object file copying in archives.
7809         (do_shared_object_padding) : New function for padding shared
7810         objects to their text section alignment in archives.
7811         (bfd_xcoff_ar_achive_set_magic) : Stub.
7812         (xcoff_write_armap_big) : Use do_copy and do_pad.
7813         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
7814         do_copy and do_pad.
7815         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
7816         bfd_xcoff_magic_number.
7817         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
7818         fop.
7819         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
7820         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
7821         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
7822         * rs6000-core.c : Update copyright date.
7823         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
7824         csectpp.
7825         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
7826         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
7827         (coff_set_flags) : Use bfd_xcoff_magic_number.
7828         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
7829         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
7830         * Makefile.am : Same.
7831         * config.bfd : Same.
7832         * targets.c : Same.
7833         * configure : Regnerate.
7834         * Makefile.in : Same.
7835         * bfd-in2.h : Same.
7837 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
7839         * po/fr.po: Updated version.
7841 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
7843         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
7844         * libbfd.h: Regenerate.
7845         * archive.c (coff_write_armap): Pass on failures from
7846         bfd_write_bigendian_4byte_int.
7848 2002-03-14  H.J. Lu <hjl@gnu.org>
7850         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
7851         error to bfd_error_nonrepresentable_section for reinit_array
7852         section in DSO.
7854 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
7856         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
7857         OR it in rather than replacing previously selected flags.
7859         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
7860         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
7862 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
7864         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
7865         (N): Use the above.
7866         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
7867         ensure reloc size matches before calling elf_link_input_bfd.
7868         Add an assert to check reloc size when counting output relocs.
7870 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
7872         * mmo.c (mmo_get_loc): Return NULL rather than false.
7874 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
7876         * po/fr.po: Updated version.
7878 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
7880         * archures.c (bfd_default_compatible): Test bits_per_word.
7881         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
7882         bfd_default_compatible.
7883         * cpu-i370.c (i370_compatible): Likewise.
7884         * cpu-sparc.c (sparc_compatible): Likewise.
7885         * cpu-h8300.c (compatible): Test in->arch == out->arch.
7887         * elflink.h: Formatting fixes.
7888         (elf_link_output_extsym): Merge undefined and undef weak cases.
7890         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
7891         when word size of input matches output word size.
7893 2002-03-12  Andreas Jaeger  <aj@suse.de>
7895         * cpu-i386.c (i386_compatible): New.  Use it instead of
7896         bfd_default_compatible.
7898 2002-03-07  H.J. Lu  (hjl@gnu.org)
7900         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
7901         as the type for bfd_reloc_val.
7903 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7905         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
7906         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
7907         (elf_hppa_final_link_relocate): Correct relocations for indirect
7908         references to local data through the DLT.  Fix .opd creation for
7909         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
7910         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
7911         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
7912         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7913         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
7914         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
7915         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7917 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
7919         * merge.c (_bfd_merge_sections): Don't segfault if there
7920         is nothing to merge due to GC.
7922 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
7924         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
7925         symbols that have been forced local.
7927         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
7928         to output forced local syms for non-shared link.
7929         (elf_link_output_extsym): Tweak condition for calling backend
7930         adjust_dynamic_symbol so that previous behaviour is kept.
7931         Whitespace changes throughout file.
7933 2002-03-04  H.J. Lu <hjl@gnu.org>
7935         * elf.c (bfd_section_from_shdr): Handle special sections,
7936         .init_array, .fini_array and .preinit_array.
7937         (elf_fake_sections): Likewise.
7939         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
7940         DT entry only if the section is in output for .init_array,
7941         .fini_array and .preinit_array. Complain about .preinit_array
7942         section in DSO.
7943         (elf_bfd_final_link): Warn zero size for .init_array,
7944         .fini_array and .preinit_array sections.
7946         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
7947         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
7948         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
7949         .preinit_array.
7951 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
7953         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
7954         * configure: Regenerate.
7956 2002-03-02  Tom Rix  <trix@redhat.com>
7958         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
7959         symbolic equiv.
7960         * coff-rs6000.c (xcoff_howto_table): Same.
7962 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
7964         * elflink.h (size_dynamic_sections): If section named
7965         ".preinit_array" exists, create DT_PREINIT_ARRAY and
7966         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
7967         ".init_array" and ".fini_array".
7968         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
7969         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
7970         DT_FINI_ARRAY.
7972 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
7974         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
7975         dynsyms.
7977 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
7979         * elf64-hppa.h: Update copyright date.
7981         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
7982         (ppc64_elf_relocate_section): Don't generate power4 style branch
7983         hints for *_BRTAKEN and *_BRNTAKEN relocs.
7985 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
7987         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
7988         last patch.
7989         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7991 2002-02-21  Andreas Jaeger  <aj@suse.de>
7993         * elf64-x86-64.c: Major rework that introduces all recent changes
7994         to the x86-64 backend.  Get a closer match to elf32-i386.
7995         (struct elf64_x86_64_dyn_relocs): Rename from
7996         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
7997         all users.
7998         (struct elf64_x86_64_link_hash_table): Add short cuts to some
7999         sections.
8000         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8001         remove casts, initialize new hash members.
8002         (create_got_section): New.
8003         (elf64_x86_64_create_dynamic_sections): New.
8004         (elf64_x86_64_copy_indirect_symbol): New.
8005         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8006         relocs, .got or .relgot here but do it in allocate_dynrelocs.
8007         Reference count possible .plt and .got entries.  Don't test input
8008         section SEC_READONLY here to try to avoid copy relocs, and keep
8009         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
8010         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
8011         pointer to "sreloc" section in elf_section_data. Tweak condition
8012         under which .got created.  Report files with bad relocation
8013         section names.
8014         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8015         Reference count possible .plt entries.  Don't deallocate .got and
8016         .relgot space here.
8017         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
8018         do copy reloc processing for weakdefs.  Remove redundant casts and
8019         aborts.  Delay setting of vars until needed.  Move creation of
8020         dynamic symbols and allocation of .plt and .rela.plt to
8021         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
8022         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8023         (allocate_dynrelocs): New.
8024         (readonly_dynrelocs): New.
8025         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8026         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
8027         Zero out the dynamic allocated content space.
8028         (elf64_x86_64_discard_copies): Removed.
8029         (elf64_x86_64_relocate_section): Make use of dynamic section
8030         short-cuts.  Localise vars, and delay setting.  Better error
8031         reporting, replace BFD_ASSERT with abort.  Check
8032         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8033         regular object file and tread the weak definition as the normal
8034         one.  Don't discard relocs for undefweak or undefined symbols and
8035         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8036         relocs.
8037         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8038         symbols that have been forced local.  Use same test to decide if
8039         we can use a relative reloc for got as relocate_section.  Expand
8040         SHN_UNDEF comment.  Move expressions out of function calls.
8041         Replace BFD_ASSERT with abort.
8042         (bfd_elf64_bfd_final_link): Removed.
8043         (elf_backend_copy_indirect_symbol): Define.
8045 2002-02-20  Tom Rix  <trix@redhat.com>
8047         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8048         (_bfd_xcoff_reloc_type_lookup): Use it.
8049         * coff64-rs6000.c (xcoff64_howto_table): Same.
8050         (xcoff64_reloc_type_lookup): Same.
8052 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
8054         * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
8055         little endian.
8057 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8059         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8060         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8061         * bfd-in2.h: Regenerate.
8062         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8063         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8064         with "s390:64-bit".
8065         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8066         (elf_s390_reloc_type_lookup): Likewise.
8067         (elf_s390_check_relocs): Likewise.
8068         (elf_s390_gc_sweep_hook): Likewise.
8069         (elf_s390_relocate_section): Likewise.
8070         (elf_s390_object_p): Use renamed architecture define.
8071         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8073 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
8075         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
8077 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
8079         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8080         absptr -> pcrel optimization for shared libs.
8081         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8082         library cannot be converted to pcrel.
8083         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8084         relative.
8085         * elf32-i386.c (elf_i386_relocate_section): If
8086         _bfd_elf_section_offset returned -2, skip, but make sure the
8087         relocation is installed.
8088         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8089         * elf32-cris.c (cris_elf_relocate_section): Likewise.
8090         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8091         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8092         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8093         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8094         * elf32-s390.c (elf_s390_relocate_section): Likewise.
8095         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8096         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8097         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8098         * elf64-s390.c (elf_s390_relocate_section): Likewise.
8099         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8100         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8101         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8102         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8103         _bfd_elf_section_offset returning -2 the same way as -1.
8104         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8105         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8106         and BFD_ASSERT.
8107         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8109 2002-02-18  Tom Rix  <trix@redhat.com>
8111         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8112         (bfd_xcoff_size_dynamic_sections): Same.
8113         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8114         (bfd_xcoff_size_dynamic_sections): Same.
8115         * coff-rs6000.c (xcoff_generate_rtinit): Same.
8116         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8117         * libxcoff.h (struct xcoff_backend_data_rec): Same.
8118         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8119         * bfd-in2.h: Regenerate.
8121 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
8123         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8124         (struct ppc_link_hash_table): Add sfpr.
8125         (ppc64_elf_link_hash_table_create): Init it.
8126         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8127         .glink out to..
8128         (create_linkage_sections): ..here.  Make .sfpr too.
8129         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8130         dynobj early.
8131         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8132         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8133         ._restf* functions, and create as needed.
8134         (func_desc_adjust): Only force_local for shared libs.
8136 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
8138         * configure.in: Bump version number post 2.12 branching.
8139         * configure: Regenerate.
8141 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
8143         * mmo.c: Correct and improve comments.
8144         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8145         zero-pad.  Use input to fill up non-empty bfd buffer.
8146         (mmo_flush_chunk): New function.
8147         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8148         changed.  Don't emit location specifier if VMA is same as
8149         *LAST_VMAP after omitting leading zero contents.  Call
8150         mmo_flush_chunk before emitting location specifier.
8151         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8152         with mmo_write_loc_chunk calls.
8153         (mmo_internal_write_section): Call mmo_flush_chunk after
8154         mmo_write_chunk.
8155         (mmo_write_symbols_and_terminator): Move :Main to first position
8156         in symbol array.  Add faked one if it does not exist if there are
8157         other symbols.  Don't add it if there are no symbols at all.  Move
8158         out test for value of :Main from symbol loop.  Rename table
8159         fakemain to maintable and variable mainsym to fakemain.
8161 2002-02-15  Richard Henderson  <rth@redhat.com>
8163         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8164         section with no got matches any got.  Simplify error generaion.
8166 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
8168         Support arbitrary length fill patterns.
8169         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8170         (_bfd_default_link_order): Remove bfd_fill_link_order code.
8171         Call default_data_link_order.
8172         (default_fill_link_order): Delete.
8173         (default_data_link_order): New function.
8174         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8175         of bfd_fill_link_order with bfd_data_link_order.
8176         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8177         * elf64-mips.c (mips_elf64_final_link): Likewise.
8179         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8180         Correct value returned in "end" for "0x<non-hex>".
8182 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
8184         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8185         (scan): Test against 'mach' field in info structure.
8187 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
8189         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8191 2002-02-14  Matt Fredette  <fredette@netbsd.org>
8193         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8194         EF_M68000.
8196 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
8198         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
8199         non-zero physical addresses when adjusting the LMAs of new
8200         sections.
8202 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8204         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8205         from _bfd_elf_hppa_gen_reloc_type.
8206         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8207         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8208         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8209         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8211 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
8213         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8214         loading its contents if there's nothing to do in it.
8216 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
8218         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8219         64k boundary.
8221         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8222         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8223         (ppc64_elf_finish_dynamic_sections): Set values for them.
8225 2002-02-11  Michael Snyder  <msnyder@redhat.com>
8227         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8228         * elf.c (elfcore_grok_pstatus): Add prototype.
8229         (elfcore_grok_lwpstatus): Add prototype.
8230         (elfcore_write_lwpstatus): New function.
8231         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8233 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
8235         * elf32-sh.c: Added missing prototypes.
8236         * elf32-sh64.c: Likewise.
8237         (sh_elf_align_loads): Mark unused args as such.
8238         * elf64-sh64.c: Added missing prototypes.
8239         (struct elf_sh64_link_hash_entry): Fix typo.
8240         (sh_elf64_relocate_section): Fix info argument passed to
8241         _bfd_elf_section_offset.
8243 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
8245         * Makefile.am: "make dep-am".
8246         * Makefile.in: Regenerate.
8247         * aclocal.m4: Regenerate.
8248         * config.in: Regenerate.
8249         * configure: Regenerate.
8251 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
8253         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8254         variable warnings.
8255         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8256         comparison warning.
8257         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8258         cast warnings for the common case.
8260 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
8262         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8263         vectors.
8264         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8265         vectors.
8267 2002-02-09  Richard Henderson  <rth@redhat.com>
8269         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8270         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8271         (elf64_alpha_relocate_section): Likewise.
8272         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8273         * bfd-in2.h, libbfd.h: Rebuild.
8275 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
8277         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8278         that base-plus-offset reloc accounting is consistent.
8279         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8280         up to date for undefined symbols.
8282 2002-02-08  Eric Christopher  <echristo@redhat.com>
8284         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
8286         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8287         sections for the O32 ABI.
8289 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
8291         * elf32-arm.h: Fix formatting of _("...").
8292         * elf32-d10v.c: Likewise.
8293         * elf32-m68k.c: Likewise.
8294         * elf32-mips.c: Likewise.
8296 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
8298         * coff-or32.c: Fix compile time warning messages.
8300 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
8302         Contribute sh64-elf.
8303         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
8304         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8305         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8306         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8307         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8308         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8309         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8310         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8311         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8312         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8313         New relocs.
8314         * libbfd.h, bfd-in2.h: Rebuilt.
8315         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8316         (sh_reloc_map): Map them.
8317         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8318         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8319         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8320         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8321         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8322         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8323         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8324         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8325         datalabel_got_offset.
8326         (sh_elf_link_hash_newfunc): Initialize it.
8327         (sh_elf_relocate_section): Augment the scope of
8328         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
8329         GOT and GOTOFF handling to new SHmedia relocation types.  Support
8330         GOT_BIAS.
8331         (sh_elf_check_relocs): Likewise.
8332         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8333         PLT entries using movi_shori_putval.  Support GOT_BIAS.
8334         (sh_elf_finish_dynamic_sections): Likewise.
8335         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8336         relocation, it's now done by the caller.
8337         (GOT_BIAS): New.
8338         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8339         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8340         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8341         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8342         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8343         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8344         sh64_elf64_hash_table): New.
8345         (sh_elf64_howto_table): Introduce new relocs.
8346         (sh_elf64_info_to_howto): Accept new PIC relocs.
8347         (sh_elf64_relocate_section): Augment the scope of
8348         seen_stt_datalabel.  Support new PIC relocs.
8349         (sh_elf64_check_relocs): Support new PIC relocs.
8350         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8351         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8352         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8353         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8354         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8355         movi_shori_putval, movi_3shori_putval,
8356         sh64_elf64_create_dynamic_sections,
8357         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8358         sh64_elf64_size_dynamic_sections,
8359         sh64_elf64_finish_dynamic_symbol,
8360         sh64_elf64_finish_dynamic_sections): New.
8361         (elf_backend_create_dynamic-sections,
8362         bfd_elf64_bfd_link_hash_table_create,
8363         elf_backend_adjust_dynamic_symbol,
8364         elf_backend_size_dynamic_sections,
8365         elf_backend_finish_dynamic_symbol,
8366         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8367         elf_backend_plt_readonly, elf_backend_want_plt_sym,
8368         elf_backend_got_header_size, elf_backend_plt_header_size):
8369         Define.
8370         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
8371         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8372         match official numbers and names; moved unmaching ones to the
8373         range 0xf2-0xff.
8374         * elf32-sh64.c, elf64-sh64.c: Likewise.
8375         2001-03-12  DJ Delorie  <dj@redhat.com>
8376         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8377         sections.
8378         2001-03-12  DJ Delorie  <dj@redhat.com>
8379         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8380         be aligned.
8381         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
8382         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
8383         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8384         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8385         .cranges section with SEC_SORT_ENTRIES set.
8386         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8387         incoming sorted .cranges section.
8388         (sh64_bfd_elf_copy_private_section_data): New.
8389         (sh64_elf_final_write_processing): Only sort .cranges and modify
8390         start address if called by linker.
8391         2001-01-08  Ben Elliston  <bje@redhat.com>
8392         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
8393         Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
8394         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
8395         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
8396         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8397         line.  Add comments before all entries.
8398         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8399         comment.
8400         (sh_elf64_reloc): Correct head comment.
8401         (sh_elf64_relocate_section): Correct spacing.
8402         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8403         instead call reloc_dangerous callback.
8404         <case R_SH_SHMEDIA_CODE>: New case.
8405         (sh_elf64_gc_mark_hook): Correct spacing.
8406         (sh_elf64_check_relocs): Ditto.
8407         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8408         New case.
8409         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8410         functions.
8411         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8412         clarify describing comment.  Add comments before all entries.
8413         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8414         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
8415         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
8416         Sort .cranges section in final link.  Prepare to set bit 0 on
8417         entry address.
8418         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8419         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8420         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8421         .cranges section.
8422         (sh64_backend_section_from_shdr): New, to recognize
8423         SHT_SH5_CR_SORTED on incoming .cranges section.
8424         (elf_backend_section_from_shdr): Define.
8425         (sh64_elf_final_write_processing): Sort outgoing .cranges
8426         section.  (New, temporarily disabled:) Set bit 0 on entry address
8427         according to ISA type.
8428         (sh64_find_section_for_address): New.
8429         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8430         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8431         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
8432         bfd_malloc, not xmalloc.
8433         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
8434         global.
8435         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8436         temporarily disabled) setting bit 0 on entry address.
8437         (elf_backend_final_write_processing): Define.
8438         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
8439         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8440         be a proper relocation for PTA and PTB rather than a marker.
8441         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8442         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8443         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8444         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8445         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8446         Zero src_mask.
8447         * elf64-sh64.c: Ditto.
8448         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8449         * elf32-sh64.c: Include opcodes/sh64-opc.h
8450         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8451         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
8452         parameters.  No unused parameters.  Caller changed.
8453         <case R_SH_PT_16>: New case.
8454         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8455         * Makefile.in: Regenerate.
8456         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
8457         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8458         all code sections.
8459         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8460         (sh64_elf_merge_private_data): Ditto.
8461         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8462         to access stored section flags.
8463         (sh64_elf_final_write_processing): Return immediately unless
8464         called by linker.  Use sh64_elf_section_data (cranges) to get size
8465         of linker-generated cranges entries.
8466         (sh64_elf_copy_private_data): Add missing "return true".
8467         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8468         (sh_elf64_merge_private_data): Ditto.
8469         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
8470         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8471         elf64-sh64.c:sh64_elf_fake_sections.
8472         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
8473         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
8474         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8475         (sh64_elf_final_write_processing): New.
8476         (elf_backend_final_write_processing): Define.
8477         (sh64_elf_fake_sections): Get header flags from tdata field.
8478         (sh64_elf_copy_private_data): Do not call
8479         sh64_elf_copy_private_data_internal, just copy e_flags field.
8480         (sh64_elf_merge_private_data): Do not call
8481         sh64_elf_copy_private_data_internal.
8482         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
8483         Remove EF_SH64_ABI64, let ELF size make difference.
8484         Remove SH64-specific BFD section flag.
8485         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8486         containing SHmedia through elf_section_data (asect)->tdata
8487         non-zero, not using a BFD section flag.
8488         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8489         (sh64_elf_merge_private_data): Similar.
8490         (elf_backend_section_flags): Don't define.
8491         (sh64_elf_backend_section_flags): Delete.
8492         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8493         not EF_SH64_ABI64.
8494         (sh_elf64_merge_private_data): Similar.
8495         * section.c (Section flags definitions): Don't define
8496         SEC_SH_ISA_SHMEDIA.
8497         (bfd-in2.h): Regenerate.
8498         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
8499         Make DataLabel references work with partial linking.
8500         * elf32-sh64.c: Fix formatting.
8501         (sh64_elf_link_output_symbol_hook): New.
8502         (elf_backend_link_output_symbol_hook): Define to
8503         sh64_elf_link_output_symbol_hook.
8504         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
8505         undefined if partial linking.  Adjust sanity check.
8506         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
8507         (elf_backend_link_output_symbol_hook): Define to
8508         sh64_elf64_link_output_symbol_hook.
8509         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
8510         undefined if partial linking.  Adjust sanity check.
8511         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
8512         Implement semantics for inter-file DataLabel references.
8513         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
8514         (sh64_elf64_add_symbol_hook): New.
8515         (sh_elf64_relocate_section): If passing an indirect symbol with
8516         st_type STT_DATALABEL on the way to a symbol with st_other
8517         STO_SH5_ISA32, do not bitor 1 to the relocation.
8518         (elf_backend_add_symbol_hook): Define to
8519         sh64_elf64_add_symbol_hook.
8520         * elf64-sh32.c: Tweak comments.
8521         (DATALABEL_SUFFIX): Define.
8522         (sh64_elf_add_symbol_hook): New.
8523         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
8524         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
8525         symbol with st_type STT_DATALABEL on the way to a symbol with
8526         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
8527         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
8528         Pass through STT_DATALABEL.
8529         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
8530         (elf_backend_get_symbol_type): Define.
8531         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
8532         (elf_backend_get_symbol_type): Define.
8533         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
8534         * elf32-sh64.c: Tweak comments.
8535         (sh64_elf_copy_private_data_internal): Add prototype.
8536         (bfd_elf32_bfd_set_private_flags): Define.
8537         (sh64_elf_copy_private_data_internal): Compare machine name, not
8538         textual BFD target name, to check whether to copy section flag
8539         SHF_SH5_ISA32.
8540         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
8541         Tweak section-contents-type-mismatch message.
8542         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
8543         Validize reloc-types.
8544         * elf64-sh64.c: New file.
8545         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
8546         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
8547         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
8548         Regenerate dependencies.
8549         * Makefile.in: Regenerate.
8550         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
8551         bfd_elf64_sh64l_vec.
8552         * configure.in: Handle bfd_elf64_sh64_vec and
8553         bfd_elf64_sh64l_vec.
8554         * configure: Regenerate.
8555         * po/POTFILES.in: Regenerate.
8556         * po/bfd.pot: Regenerate.
8557         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
8558         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
8559         anything else but EF_SH64 and EF_SH64_ABI64.
8560         (sh64_elf_merge_private_data): Emit error for anything else but
8561         EF_SH64 and EF_SH64_ABI64.
8562         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
8563         from targ_selvecs.
8564         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
8565         bfd_elf32_sh64l_vec as a temporary measure.
8566         * configure: Regenerate.
8567         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
8568         * cpu-sh.c (arch_info_struct): Include sh5 item
8569         unconditionalized.
8570         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
8571         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
8572         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
8573         * elf32-sh64.c: Tweak comments.
8574         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
8575         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
8576         (sh64_elf_copy_private_data_internal): Wrap long line.
8577         (sh64_elf_merge_private_data): Rewrite to allow objects from
8578         SH64 subsets to be linked together.
8579         (INCLUDE_SHMEDIA): Define.
8580         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
8581         Parenthesize plus-expression inside or-expression.
8582         <global symbol>: Ditto.
8583         (sh_elf_set_mach_from_flags): Remove code refusing
8584         deleted EF_SH64_32BIT_ABI flag.
8585         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
8586         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
8587         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
8588         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
8589         (sh_elf_relocate_section) <local symbol>: Or 1 in
8590         calculation of relocation if sym->st_other & STO_SH5_ISA32.
8591         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
8592         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
8593         relocation.
8594         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
8595         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8596         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8597         Regenerate dependencies.
8598         * Makefile.in: Regenerate.
8599         * archures.c: Add bfd_mach_sh5.
8600         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8601         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
8602         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8603         * configure: Regenerate.
8604         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
8605         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
8606         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
8607         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
8608         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
8609         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
8610         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
8611         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
8612         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
8613         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
8614         in item for SH5.
8615         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
8616         for SHmedia relocs.
8617         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
8618         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
8619         shmedia_prepare_reloc, goto final_link_relocate if it returns
8620         non-zero, else fail as before.
8621         (sh_elf_set_mach_from_flags): Provide function only if not defined
8622         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
8623         (sh_elf_set_private_flags): Provide function only if not defined
8624         as a macro.
8625         (sh_elf_copy_private_data): Similar.
8626         (sh_elf_merge_private_data): Similar.
8627         * section.c (SEC_SH_ISA_SHMEDIA): New.
8628         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
8629         * elf32-sh64.c: New file.
8630         * libbfd.h: Regenerate.
8631         * bfd-in2.h: Regenerate.
8632         * po/POTFILES.in: Regenerate.
8633         * po/bfd.pot: Regenerate.
8634         * bfd-in2.h: Regenerate.
8635         * libbfd.h: Regenerate.
8637 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
8639         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
8640         been included, not drag it in.
8641         * bfd-in2.h: Regenerate.
8643 2002-02-06  H.J. Lu  (hjl@gnu.org)
8645         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
8646         the mach and ISA fields if necessary.
8648 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
8650         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
8651         ARM architecture when an F_ARM_5 flag is detected, since we cannot
8652         be sure exactly which architecture this represents.
8654 2002-02-05  Nick Clifton  <nickc@redhat.com>
8656         * po/tr.po: Updated translation.
8658 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
8660         From Jimi X <jimix@watson.ibm.com>
8661         * archures (bfd_mach_ppc64): Define.
8662         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
8663         (bfd_powerpc_arch): Define.
8664         * bfd-in2.h: Regenerate.
8665         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
8666         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
8667         (bfd_powerpc_archs): Add default powerpc64 arch.
8669 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
8671         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
8672         against section syms in readonly sections.  Don't do the global
8673         sym check if we find one.
8674         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
8675         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
8676         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
8677         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
8678         (elf_s390_grok_prstatus): Add missing prototype.
8680 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
8682         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
8683         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
8684         Call bfd_get_section_by_name only once.  Initialize
8685         bpodata->n_bpo_relocs_this_section.
8686         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
8687         referring to DSOs.
8688         (bpo_reloc_request_sort_fn): Don't use difference of values as
8689         return-value.
8691 2002-02-02  David O'Brien  <obrien@FreeBSD>
8693         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
8694         version 4.5 and later the same as 5-CURRENT.
8695         * configure: Re-generate.
8697 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
8699         * config.bfd (hppa*-*-netbsd*): New target.
8701 2002-01-31  Philipp Thomas  <pthomas@suse.de>
8703         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
8704         to front of message. Unify messages with elf32-arm.h. Use
8705         commas where neccessary.
8706         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
8707         ERROR in messages. Unify messages with coff-arm.c. Correct
8708         VFP/FPA error message.
8709         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
8710         APCS-32 for translation.
8712 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
8714         Perform on-demand global register allocation from
8715         R_MMIX_BASE_PLUS_OFFSET relocs.
8716         * elf64-mmix.c (struct bpo_reloc_section_info, struct
8717         bpo_reloc_request, struct bpo_greg_section_info): New.
8718         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
8719         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
8720         _bfd_mmix_check_all_relocs,
8721         _bfd_mmix_prepare_linker_allocated_gregs,
8722         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
8723         (elf_mmix_howto_table): Correct src_mask for most relocs.
8724         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
8725         case.
8726         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
8727         case.  Fix typo in comment.  New label do_mmix_reloc.
8728         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
8729         store first object file with a base-plus-offset reloc.  Call
8730         mmix_elf_check_common_relocs for the part common with mmo.
8731         (mmix_elf_final_link): Write out linker-allocated register
8732         contents section.
8733         (elf_backend_gc_sweep_hook): Define.
8734         (bfd_elf64_bfd_relax_section): Define.
8736         * mmo.c: Don't include <ctype.h>
8737         (mmo_init): Correct init-once logic.
8739 2002-02-01  Tom Rix  <trix@redhat.com>
8741         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
8743 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
8745         * Makefile.am: Run "make dep-am"
8746         * Makefile.in: Regenerate.
8748 2002-01-31  David O'Brien  <obrien@FreeBSD>
8750         * configure.in: Recognize the differences in core files from FreeBSD
8751         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
8752         5-CURRENT.
8753         * configure: Regenerate.
8755 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
8757         * coff-or32.c: New file.
8758         * cpu-or32.c: New file.
8759         * elf32-or32.c: New file.
8760         * archures.c: Add support for or32.
8761         * targets.c: Add support for or32.
8762         * bfd-in2.h: Regenerate.
8763         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
8764         coff_write_object_contents): Add support for or32.
8765         * config.bfd: Add target.
8766         * configure.in: Add support for or32.
8767         * configure: Regenerate.
8768         * Makefile.am: Add support for or32.
8769         * Makefile.in: Regenerate.
8770         * po/SRC-POTFILES.in: Add or32 files.
8771         * po/bfd.pot: Regenerate.
8773 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
8774             Don Lindsay  <lindsayd@cisco.com>
8776         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
8777         false' with a return of a bfd_reloc_ error code.
8779 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
8781         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
8782         unexport unreferenced symbols when --export-dynamic.  Call
8783         _bfd_elf_strtab_delref when unexporting.
8785 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
8787         * bfd-in.h: Include <stdbool.h> if it is available.
8788         * bfd-in2.h: Regenerated.
8790 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
8792         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
8793         not go via the plt.
8795 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
8797         * archures.c: Tidy up formatting of embedded comments.
8798         * bfd.c: Tidy up formatting of embedded comments.
8799         * bfd-in.h: Fix formatting of comments.
8800         * reloc.c: Tidy up formatting of ordinary & embedded comments.
8801         * section.c: Tidy up formatting of embedded comments.
8802         * syms.c: Tidy up formatting of embedded comments.
8803         * targets.c: Tidy up formatting of embedded comments.
8805         * bfd-in2.h: Regenerate.
8807 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
8809         * vms-tir.c (cmd_name): New function.
8810         (tir_cmd_name): New function.
8811         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
8812         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
8813         Fix formatting.
8815         * peXXigen.c (pe_print_idata): Rearrange message to aid in
8816         translation.
8817         (pe_print_pdata): Rearrange message to aid in translation.
8819         * libbfd.c (warn_deprecated): Rearrange error message to aid in
8820         translation.
8822         * ihex.c (ihex_write_object_contents): Fix spelling typo.
8824         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
8826         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
8827         message to aid in translation.
8829         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
8830         to aid in translation.
8832         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
8834 2002-01-30  Philipp Thomas  <pthomas@suse.de>
8836         * coff-arm.c, elf32-elf.h: Unify messages.
8838 2002-01-30  Nick Clifton <nickc@redhat.com>
8840         * po/sv.po: Updated translation.
8842 2002-01-30  Philipp Thomas  <pthomas@suse.de>
8844         * dwarf2.c (read_abbrev): Use full section name in error message.
8845         (decode_line_info): Likewise.
8847         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
8848         message.
8850 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
8852         * elf64-ppc.c (func_desc_adjust): Only provide missing function
8853         descriptor symbols for undefined function code syms.  Clear
8854         ELF_LINK_NON_ELF so that they can stay weak.
8856 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
8857             Mitch Lichtenberg  <mpl@broadcom.com>
8859         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
8860         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
8861         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
8862         generation.
8863         * bfd-in2.h: Regenerate.
8865 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
8867         * elf32-mips.c: Add additional comments about HI16 relocation
8868         processing.
8869         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
8870         pc-relative relocations.  (Reverts change made on 2001-10-31.)
8871         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
8872         for pc-relative relocations.
8873         (mips_elf_calculate_relocation): Add a comment about a kludge
8874         in the R_MIPS_GNU_REL_HI16 handling.
8875         (_bfd_mips_elf_relocate_section): Implement that kludge;
8876         adjust pc-relative HI16 relocation for difference in HI16 and
8877         LO16 addresses, since it can't easily be done in
8878         mips_elf_calculate_relocation.
8880 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8882         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
8883         relocations with PC32 relocations for undefined or weak symbols.
8884         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
8885         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
8887 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
8889         * elfcore.h (elf_core_file_p): Improve comment for last change.
8891 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
8893         * configure: Regenerated.
8895 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
8897         * elfcore.h (elf_core_file_p): Set the machine architecture
8898         before processing the program headers.
8900 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
8902         * configure.in <64-bit configuration>: If using gcc, check and
8903         emit error for egcs-1.1.2.
8904         * configure: Regenerate.
8906 2002-01-26  Egor Duda  <deo@logos-m.ru>
8908         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
8909         as possible to avoid stack corruption.
8911 2002-01-26  Richard Henderson  <rth@redhat.com>
8913         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
8914         for non-allocated sections.
8916 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
8918         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
8919         prstat.pr_reg even if it is a struct.
8921 2002-01-25  Steve Ellcey <sje@cup.hp.com>
8923         * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
8925 2002-01-25  Philipp Thomas  <pthomas@suse.de>
8927         * coffgen.c (coff_print_symbol): Don't mark info message
8928         for translation.
8930 2002-01-25  Nick Clifton <nickc@redhat.com>
8932         * po/fr.po: Updated translation.
8933         * po/es.po: Updated translation.
8935 2002-01-25  Philipp Thomas  <pthomas@suse.de>
8937         * coff-alpha.c (alpha_relocate_section): Unify warning message
8938         for GP relative relocations without GP defined.
8939         * coff-mips.c (mips_relocate_section): Likewise.
8941 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
8943         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
8944         unsigned overflow when new_offset < old_offset.
8946 2002-01-24  Philipp Thomas  <pthomas@suse.de>
8948         * bfd.c (_bfd_abort): Fix typo.
8950 2002-01-23  Richard Henderson  <rth@redhat.com>
8952         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
8953         plt entries for undefweak symbols.
8955 2002-01-23  Steve Ellcey <sje@cup.hp.com>
8957         * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
8958         (bfd_elf64_ia64_hpux_big_vec): Ditto.
8959         (bfd_elf32_h8300_vec): Ditto.
8961 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
8963         * elf64-ppc.c: Remove stale part of ABI comment.
8964         (NO_OPD_RELOCS): Define.
8965         (ppc64_elf_check_relocs): Use it.
8966         (ppc64_elf_relocate_section): Here too.
8967         (build_one_stub): Don't point function syms at the stub.  Instead,
8968         hijack plt.offset.
8969         (ppc64_elf_relocate_section): Check whether REL24 relocs should
8970         really go to the stub.  Make all dynamic relocs in opd against
8971         locals.
8972         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
8973         plt.offset.
8975 2002-01-22  Richard Henderson  <rth@redhat.com>
8977         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
8979 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
8981         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
8982         TOC_BASE_OFF adjustment.
8984         * Makefile.am: Run "make dep-am".
8985         * Makefile.in: Regenerate.
8986         * po/SRC-POTFILES.in: Regenerate.
8988 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8990         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
8991         host defines.
8993 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
8995         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
8996         Check for and emit error if sgot is NULL at this point.
8998 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
9000         * config.bfd (ia64*-*-netbsd*): New target.
9002 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9004         * som.c (som_write_space_strings): Comment typo fix.
9006 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
9008         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9009         is_func_descriptor fields.
9010         (link_hash_newfunc): Init them.
9011         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9012         dot are candidates for plt entries.  When processing .opd relocs,
9013         set function descriptor strings to point inside function code
9014         string, and set new ppc_link_hash_entry fields.
9015         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9016         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9017         function descriptors.  It's now done in..
9018         (func_desc_adjust): New.
9019         (ppc64_elf_func_desc_adjust): New.
9020         (define elf_backend_always_size_sections): Define.
9021         (ppc64_elf_hide_symbol): New.
9022         (define elf_backend_hide_symbol): Define.
9023         (allocate_dynrelocs): Remove code looking up function descriptors
9024         as that has been done earlier.
9025         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9026         table.
9027         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
9028         up function descriptor.
9029         (build_one_stub): Look up the function code sym.  Check for
9030         invalid plt offsets.
9031         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9032         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9034         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9035         boolean param.
9036         (_bfd_elf_link_hash_hide_symbol): Likewise.
9037         * elflink.h (elf_link_add_object_symbols): Adjust call to
9038         elf_backend_hide_symbol.
9039         (elf_fix_symbol_flags): Likewise.
9040         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9041         than bfd_alloc.
9042         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9043         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9044         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9045         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9046         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9047         and adjust to suit.
9048         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9049         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9050         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9052 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
9054         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9055         dynamic function descriptor symbol, not the associated function
9056         symbol.
9058 2002-01-17  Eric Christopher  <echristo@redhat.com>
9060         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9062 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
9064         * po/bfd.pot: Regenerate.
9065         * po/fr.po: Regenerate.
9067 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
9069         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9070         Remove "Elf_Internal_Shdr *" param.
9071         (_bfd_mips_elf_section_from_bfd_section): Ditto.
9072         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9073         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9074         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9075         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9076         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9077         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9078         function to override special sections.  Remove hdr arg from
9079         backend call, and don't loop.
9081 2002-01-16  Eric Christopher  <echristo@redhat.com>
9083         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9084         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9085         relocations requiring gp0 and gp.
9087 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
9089         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
9090         EF_ARM_VFP_FLOAT.
9091         (elf32_arm_print_private_bfd_data): Likewise.
9093 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
9095         * po/tr.po: Import new version.
9097 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
9099         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9100         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9101         (ORI_R0_R0_0): Correct.
9103 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
9105         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9106         when plt_not_loaded.
9107         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9108         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
9109         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9110         (ppc64_elf_glink_code): Delete.
9111         (PPC64_ELF_GLINK_SIZE): Delete.
9112         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9113         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9114         ORI_R0_R0_0): Define.
9115         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9116         (struct ppc_link_hash_table): Add sstub and plt_overflow.
9117         (ppc64_elf_link_hash_table_create): Init them.
9118         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9119         Don't copy to shared lib.
9120         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9121         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9122         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
9123         room for .stub and .glink code.
9124         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
9125         DT_PPC64_GLINK.
9126         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
9127         bfd_elf64_bfd_final_link.
9128         (bfd_elf64_bfd_final_link): Don't define.
9129         (ppc64_elf_size_stubs): New.
9130         (build_plt_stub): New.
9131         (build_one_stub): New.
9132         (ppc64_elf_build_stubs): New.
9133         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9134         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9135         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
9136         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9137         case output sections not separate.  Adjust DT_RELASZ to not
9138         include plt relocs.  Set reserved got entry.  Set got and plt
9139         entry size.
9140         (elf_backend_got_header_size): Set to 8.
9141         * elf64-ppc.h: New file.
9143 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
9145         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9146         sections, use bfd_section_list_remove.
9147         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9148         * elflink.h (elf_link_add_object_symbols): When removing all
9149         sections, use bfd_section_list_clear.
9151 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
9153         * po/sv.po: New file: Swedish translation.
9154         * configure.in (ALL_LINGUAS): Add sv.
9155         * configure: Regenerate.
9157 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
9159         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9160         * elf.c (merge_sections_remove_hook): New function.
9161         (_bfd_elf_merge_sections): Pass it as 3rd argument to
9162         _bfd_merge_sections.
9163         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9164         * libbfd.h: Rebuilt.
9165         * merge.c (_bfd_merge_sections): Add remove_hook argument.
9166         Call remove_hook if a SEC_EXCLUDE section is encountered.
9168 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
9170         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9171         (xstormy16_reloc_map): Initialise new field with correct howto
9172         table.
9173         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9174         howto entry.
9176 2002-01-10  Michael Snyder  <msnyder@redhat.com>
9178         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9179         (elfcore_write_pstatus): Use long instead of pid_t;
9180         * elf-bfd.h: Change prototypes to use long instead of pid_t;
9182 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
9184         * elf.c: Update copyright years.
9185         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9186         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
9188 2002-01-08  Michael Snyder  <msnyder@redhat.com>
9190         Add capability to write corefile note sections, for gdb.
9191         * elf.c (elfcore_write_note): New function.
9192         (elfcore_write_prpsinfo): New function.
9193         (elfcore_write_prstatus): New function.
9194         (elfcore_write_pstatus): New function.
9195         (elfcore_write_prfpreg): New function.
9196         (elfcore_write_prxfpreg): New function.
9197         * elf-bfd.h: Add prototypes for above functions.
9199 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
9201         * elf.c (elf_fake_sections): Propagate errors from
9202         elf_backend_fake_section.
9204 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
9206         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9207         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9208         (elf32-sh-nbsd.lo): New rule.
9209         * Makefile.in: Regenerate.
9210         * config.bfd (sh*le-*-netbsdelf*): New target.
9211         (sh*-*-netbsdelf*): New target.
9212         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9213         (bfd_elf32_shnbsd_vec): New vector.
9214         (bfd_elf32_shlnbsd_vec): New vector.
9215         * configure: Regenerate.
9216         * elf32-sh-nbsd.c: New file.
9217         * targets.c: Update copyright years.
9218         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
9219         bfd_elf32_shnbsd_vec.
9221 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
9223         * coff-rs6000.c (READ20): Use bfd_scan_vma.
9225 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
9227         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9228         of a symbol in a section that will be deleted.
9230 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
9232         * po/es.po: New file: Spanish translation.
9233         * configure.in (ALL_LINGUAS): Add es.
9234         * configure: Regenerate.
9236 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
9238         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9239         argument so we can handle HP-UX specially.
9240         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9241         (elfNN_hpux_backend_section_from_bfd_section): New for support
9242         of SHN_IA_64_ANSI_COMMON.
9243         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9244         (is_unwind_section_name): Add special HP-UX support.
9245         (elfNN_ia64_section_from_shdr): Add support for more sections.
9246         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9247         add support for more sections.
9248         (elfNN_ia64_additional_program_headers): Modify
9249         is_unwind_section_name call.
9250         (elfNN_ia64_modify_segment_map): Remove assumption that there is
9251         only one unwind section in segment.
9253 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
9255         * syms.c (_bfd_generic_make_empty_symbol): New function.
9256         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9257         _bfd_generic_make_empty_symbol.
9258         * libbfd.h: Regenerate.
9259         * bfd-in2.h: Regenerate.
9260         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9261         (hppabsd_core_get_symtab_upper_bound): Don't define.
9262         (hppabsd_core_get_symtab): Likewise.
9263         (hppabsd_core_print_symbol): Likewise.
9264         (hppabsd_core_get_symbol_info): Likewise.
9265         (hppabsd_core_bfd_is_local_label_name): Likewise.
9266         (hppabsd_core_get_lineno): Likewise.
9267         (hppabsd_core_find_nearest_line): Likewise.
9268         (hppabsd_core_bfd_make_debug_symbol): Likewise.
9269         (hppabsd_core_read_minisymbols): Likewise.
9270         (hppabsd_core_minisymbol_to_symbol): Likewise.
9271         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9272         Formatting fixes.
9273         * hpux-core.c: Similarly.
9274         * irix-core.c: Similarly.
9275         * osf-core.c: Similarly.
9276         * sco5-core.c: Similarly.
9277         * binary.c (binary_make_empty_symbol): Remove function, define as
9278         _bfd_generic_make_empty_symbol.
9279         * ihex.c (ihex_make_empty_symbol): Likewise.
9280         * mmo.c (mmo_make_empty_symbol): Likewise.
9281         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9282         * srec.c (srec_make_empty_symbol): Likewise.
9283         * versados.c (versados_make_empty_symbol): Likewise.
9284         * vms.c (_bfd_vms_make_empty_symbol): Remove.
9285         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9286         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9287         rather than _bfd_vms_make_empty_symbol.
9288         * vms-misc.c (new_symbol): Likewise.
9290 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
9292         * section.c (bfd_section_init): Remove unnecessary initialisations.
9293         (bfd_section_list_clear): New function.
9294         (bfd_section_list_remove, bfd_section_list_insert): New macros.
9295         (_bfd_strip_section_from_output): Use them.
9296         * coffcode.h (coff_set_alignment_hook): Likewise.
9297         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9298         * elf64-mips.c (mips_elf64_final_link): Likewise.
9299         * elf64-mmix.c (mmix_elf_final_link): Likewise.
9300         * sunos.c (sunos_add_dynamic_symbols): Likewise.
9301         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9302         * bfd-in2.h: Regenerate.
9304         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9305         rather than doing our own section handling.  Clean up after errors
9306         with bfd_release and bfd_section_list_clear.  Handle unexpected
9307         flags.
9308         * aoutf1.h (sunos4_core_file_p): Likewise.
9309         * aix386-core.c (aix386_core_file_p): Likewise.
9310         * cisco-core.c (cisco_core_file_validate): Likewise.
9311         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9312         * trad-core.c (trad_unix_core_file_p): Likewise.
9314         * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9315         with bfd_release and bfd_section_list_clear.
9316         * hpux-core.c (hpux_core_core_file_p): Likewise.
9317         * irix-core.c (irix_core_core_file_p): Likewise.
9318         * lynx-core.c (lynx_core_file_p): Likewise.
9319         * osf-core.c (osf_core_core_file_p): Likewise.
9320         * rs6000-core.c (rs6000coff_core_p): Likewise.
9321         * sco5-core.c (sco5_core_file_p): Likewise.
9323         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9324         sign extension adjustments without conditionals.
9326 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
9328         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9329         CIE at .eh_frame start is removed due to no FDEs referencing it.
9331 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
9333         * config.bfd (x86_64-*-netbsd*): New target.
9334         * configure.in (x86_64-*-netbsd*): Set COREFILE
9335         to netbsd-core.lo.
9336         * configure: Regenerated.
9338 2002-01-03  Tom Rix  <trix@redhat.com>
9340         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9341         for recent bfd_make_section_anyway change.
9343 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
9345         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9346         R_ARM_THM_PC11 reloc.
9348 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
9350         * configure.in (LINGUAS): Add ja.
9351         * configure: Regenerate.
9352         * po/ja.po: Import from translation project's web site.
9354 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
9356         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9357         messages to ease translation into other languages.
9359 For older changes see ChangeLog-0001
9361 Local Variables:
9362 mode: change-log
9363 left-margin: 8
9364 fill-column: 74
9365 version-control: never
9366 End: