* elf64-ppc.c (toc_adjusting_stub_needed): New function.
[binutils.git] / bfd / ChangeLog
blobea57ab79fcea3197ca8b56694d121e6b5e63ad5b
1 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
3         * elf64-ppc.c (toc_adjusting_stub_needed): New function.
4         (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
5         Return error condition.
6         (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
7         that have has_gp_reloc set.
8         (struct ppc_link_hash_table): Add stub_count.
9         (ppc_build_one_stub): Increment it.
10         (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
11         individual fields.
12         * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
14 2003-06-18  Alan Modra  <amodra@bigpond.net.au>
16         * elflink.h (elf_gc_record_vtentry): Revert last change.  Correct
17         size calculation from addend.  Round size up.
19 2003-06-18  Hans-Peter Nilsson  <hp@axis.com>
21         * elf32-cris.c (cris_elf_relocate_section) <case
22         R_CRIS_32_GOTREL>: When linking a program, don't complain about a
23         symbol from a normal object or an undefined weak symbol.
25 2003-06-18  Alan Modra  <amodra@bigpond.net.au>
27         * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
28         R_PPC64_TOC relocs.
30 2003-06-17  H.J. Lu <hongjiu.lu@intel.com>
32         * section.c (struct sec): Put back kept_section.
33         (STD_SECTION): Put back kept_section initialization.
34         * bfd-in2.h: Regenerate.
36         * elflink.h (elf_link_input_bfd): Also check discarded linkonce
37         sections for relocateable output. Use kept_section to preserve
38         debug information discarded by linkonce.
40 2003-06-17  Roland McGrath  <roland@redhat.com>
42         * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
43         segment-relative relocation between different segments.
45 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
47         * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
48         optimizations earlier.
50         * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
51         Restore previous input_list type.
52         (ppc64_elf_link_hash_table_create): Undo last change.
53         (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
54         per output section, but don't bother with bfd_abs_section marker.
55         (ppc64_elf_next_input_section): Adjust for multiple input section
56         lists.
57         (group_sections): Likewise.
59 2003-06-17  Jakub Jelinek  <jakub@redhat.com>
61         * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
62         *r_offset == r_addend for RELATIVE relocs against .got.
64 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
66         * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
68 2003-06-17  Nick Clifton  <nickc@redhat.com>
70         * elflink.h (elf_gc_record_vtentry): Allocate an extra element
71         in the vtable_entries_used array to allow for the accessing
72         the largest element.
74 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
76         * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index.  Modify
77         input_list.
78         (ppc64_elf_link_hash_table_create): Init input_list here.
79         (ppc64_elf_setup_section_lists): Remove code setting up input lists
80         per output section.  Set toc_off for abs and other standard sections.
81         (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
82         (ppc64_elf_next_input_section): Adjust for single input section list.
83         Don't set toc_curr from input bfds that haven't set elf_gp.
84         (group_sections): Adjust for single input section list.
86         * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
88 2003-06-16  Alan Modra  <amodra@bigpond.net.au>
90         * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
91         tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
92         dtprel entry.  Ensure TLS_LD DTPMOD reloc has a zero addend.  Write
93         got section for RELATIVE relocs.  Fix wrong comment.  Change condition
94         under which dynamic relocs update the section contents.
96 2003-06-13  Robert Millan  <zeratul2@wanadoo.es>
98         * config.bfd: Add i386-netbsd-gnu target.
100 2003-06-12  Nick Clifton  <nickc@redhat.com>
102         * opncls.c (calc_crc32): Rename to
103         bfd_calc_gnu_debuglink_crc32 and export.
104         (GNU_DEBUGLINK): Define and use to replace occurrences of
105         hard-coded ".gnu_debuglink" in the code.
106         (get_debug_link_info): Prevent aborts by replacing call to
107         xmalloc with a call to malloc.
108         (find_separate_debug_file): Prevent aborts by replacing calls
109         to xmalloc and xstrdup with calls to malloc and strdup.
110         (bfd_add_gnu_debuglink): New function.  Add a .gnu_debuglink
111         section to a bfd.
112         * bfd-in2.h: Regenerate.
114 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
116         * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
117         New target (was i[3-7]86-*-openbsd* before).
118         (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
119         (vax-*-openbsd*): New target.
121 2003-06-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
123         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
124         for n32, too.
125         (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
126         (mips_elf_rel_dyn_section): Use appropriate section alignment.
127         (mips_elf_create_got_section): Likewise.
128         (_bfd_mips_elf_create_dynamic_sections): Likewise.
130 2003-06-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
132         * elf32-mips.c (mips_elf_generic_reloc): New Function.
133         (elf_mips_howto_table_rel): Use it.
134         (gprel32_with_gp): Move prototype.
135         (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
136         Use mips_elf_generic_reloc.
137         (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
138         Code cleanup.
139         (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
140         zero addend.
141         (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
142         as in the other *_gprel*_reloc functions.
143         (gprel32_with_gp): Handle partial_inplace properly.
144         (mips32_64bit_reloc): Use mips_elf_generic_reloc.
145         (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
146         Do addend handling directly instead of calling
147         _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
148         * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
149         of zero addend. Handle partial_inplace properly.
150         (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
151         addend.
152         (mips_elf64_gprel16_reloc): Likewise.
153         (mips_elf64_literal_reloc): Likewise.
154         (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
155         logic as in the other *_gprel*_reloc functions. Handle
156         partial_inplace properly.
157         (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
158         addend. Handle partial_inplace properly.
159         (mips16_gprel_reloc): Likewise. Do addend handling directly instead
160         of calling _bfd_mips_elf_gprel16_with_gp.
161         * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
162         (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
163         of zero addend.
164         (mips_elf_shift6_reloc): Handle partial_inplace properly.
165         (mips16_gprel_reloc): Likewise. Do addend handling directly instead
166         of calling _bfd_mips_elf_gprel16_with_gp.
167         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
168         partial_inplace properly. Fix wrong addend handling. Fix overflow
169         check.
170         (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
171         exported.
172         (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
173         (_bfd_mips_elf_relocate_section): Likewise.
174         (mips_elf_create_dynamic_relocation): Update sec_info_type access.
175         * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
176         (_bfd_mips_elf_sign_extend): New prototype.
178 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
180         * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
181         New target (was sparc-*-openbsd* before).
182         (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
184         * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
185         * configure: Regenerate.
187 2003-06-11  H.J. Lu <hongjiu.lu@intel.com>
189         * po/Make-in (DESTDIR): New.
190         (install-data-yes): Support $(DESTDIR).
191         (uninstall): Likewise.
193 2003-06-11  Alan Modra  <amodra@bigpond.net.au>
195         * Makefile.am (config.status): Depend on version.h.
196         Run "make dep-am".
197         * Makefile.in: Regenerate.
198         * po/SRC-POTFILES.in: Regenerate.
200 2003-06-10  Alan Modra  <amodra@bigpond.net.au>
201             Gary Hade <garyhade@us.ibm.com>
203         * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
205 2003-06-10  Richard Sandiford  <rsandifo@redhat.com>
207         * archures.c (bfd_mach_h8300sxn): New architecture.
208         * bfd-in2.h: Regenerate.
209         * cpu-h8300.c (h8300_scan): Check for 'sxn'.
210         (h8300sxn_info_struct): New.
211         (h8300sx_info_struct): Link to it.
212         * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
213         (elf32_h8_final_write_processing): Likewise.
215 2003-06-08  Alan Modra  <amodra@bigpond.net.au>
217         * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
218         elfxx-target.h so that we can use elf_backend_got_header_size.
219         (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
220         (GLINK_CALL_STUB_SIZE): Modify.  Define new glink call stub and
221         associated macros.
222         (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
223         dst_mask.
224         (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
225         ppc_stub_plt_branch_r2off.
226         (struct ppc_stub_hash_entry): Reorganize.
227         (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
228         toc_curr, toc_off and emit_stub_syms.
229         (ppc64_elf_link_hash_table_create): Init them.
230         (ppc_stub_name): Correct string size.
231         (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
232         (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
233         used.
234         (ppc_type_of_stub): Tweak root.type test.
235         (build_plt_stub): Remove glink code.  Adjust for insn macro changes.
236         (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
237         ppc_stub_plt_branch_r2off.
238         (ppc_build_one_stub): Likewise.  Fix var shadowing.  Correct addis,addi
239         range test.  Use toc_off to calculte r2 values.  Handle emit_stub_syms.
240         (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
241         Initialize elf_gp and toc_curr.
242         (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
243         (ppc64_elf_next_input_section): Set toc_off.
244         (group_sections): Ensure groups have the same TOC.
245         (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
246         (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
247         Build new glink stub.
248         (ppc64_elf_relocate_section): Handle multiple TOCs.  Fix comments.
249         (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
250         * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
251         (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
252         * section.c (struct sec): Rename flag12 to has_gp_reloc.
253         (STD_SECTION): Update.
254         * ecoff.c (bfd_debug_section): Update comment.
255         * bfd-in2.h: Regenerate.
257 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
259         * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
260         NULL function pointers.
262 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
264         * simple.c (bfd_simple_get_relocated_section_contents): Call
265         _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
267 2003-06-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
269         * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
270         ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
271         swaptables.
272         * coff-tic4x.c: Ditto
273         * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
274         and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
275         CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
276         ticoff1_bad_format_hook() functions. Created the coff0 and coff1
277         swap tables.
278         * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
279         * coff-a29k.c: Append COFF_SWAP_TABLE argument
280         * coff-apollo.c: Ditto
281         * coff-arm.c: Ditto
282         * coff-h8300.c: Ditto
283         * coff-h8500.c: Ditto
284         * coff-i960.c: Ditto
285         * coff-m68k.c: Ditto
286         * coff-m88k.c: Ditto
287         * coff-mcore.c: Ditto
288         * coff-sh.c: Ditto
289         * coff-sparc.c: Ditto
290         * coff-tic80.c: Ditto
291         * coff-we32k.c: Ditto
292         * coff-z8k.c: Ditto
293         * coff-w65.c: Ditto
295 2003-06-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
297         * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
298         initialization bug
300 2003-06-03  Jakub Jelinek  <jakub@redhat.com>
302         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
303         (bfd_section_from_phdr): Likewise.
304         (map_sections_to_segments): Create PT_GNU_STACK segment header.
305         (get_program_header_size): Count with PT_GNU_STACK.
306         * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
307         * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
309 2003-06-03  H.J. Lu <hongjiu.lu@intel.com>
311         * elflink.h (elf_link_input_bfd): Call linker error_handler
312         for discarded definitions.
314 2003-06-03  Elias Athanasopoulos  <elathan@phys.uoa.gr>
316         * syms.c (decode_section_type): Return 'n' if section flags are
317         SEC_HAS_CONTENTS && SEC_READONLY.
319 2003-06-03  Nick Clifton  <nickc@redhat.com>
321         * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
322         R_V850_ABS32.  Add entry for R_V850_REL32.
323         (v850_elf_reloc_map): Likewise.
324         (v850_elf_check_relocs): Likewise.
325         (v850_elf_perform_relocation): Likewise.
326         (v850_elf_final_link_relocate): Likewise.  Include computation
327         to make R_V850_REl32 pc-relative.
329 2003-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
331         * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
332         and DT_DEBUG dynamic tag even for position independent executables.
333         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
335 2003-06-02  Daniel Jacobowitz  <drow@mvista.com>
337         * config.bfd: Move obsolete entries out of the range of the
338         targmatch sed script.
340 2003-06-02  Daniel Jacobowitz  <drow@mvista.com>
342         * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
344 2003-05-31  Jakub Jelinek  <jakub@redhat.com>
346         * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
347         plt entries, not just 8191.
349 2003-05-30  Daniel Jacobowitz  <drow@mvista.com>
351         * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
352         Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
354 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
355             Jakub Jelinek  <jakub@redhat.com>
357         * elflink.h (elf_link_add_object_symbols): Use !info->executable
358         instead of info->shared where appropriate.
359         (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
360         * elflink.c (_bfd_elf_create_got_section): Likewise.
361         (_bfd_elf_link_create_dynamic_sections): Likewise.
362         (_bfd_elf_link_assign_sym_version): Likewise.
363         * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
364         and DT_DEBUG dynamic tag even for position independent executables.
365         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
366         * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
367         * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
368         * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
369         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
370         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
371         * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
372         * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
373         * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
375 2003-05-30  Kris Warkentin <kewarken@qnx.com>
377         * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
378         signalled thread.
379         (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
381 2003-05-29  Nick Clifton  <nickc@redhat.com>
383         * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
384         Tidy up formatting.
385         * Makefile.am: Add dependency on safe-ctype.h.
386         * Makefile.in: Regenerate.
388 2003-05-29  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
390         * elfxx-mips.c: Don't force symbols local unconditionally.
392 2003-05-28  Alan Modra  <amodra@bigpond.net.au>
394         * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
395         undefined_symbol call.
397 2003-05-27  Richard Sandiford  <rsandifo@redhat.com>
399         * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
400         (mips_elf_link_hash_table): Likewise.
402 2003-05-22  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
404         * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
405         R_MIPS_GNU_REL16_S2 support.
406         (bfd_elf64_bfd_reloc_type_lookup): Use it.
407         (mips_elf64_rtype_to_howto): Use it.
408         * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
409         R_MIPS_GNU_REL16_S2 support.
410         (bfd_elf32_bfd_reloc_type_lookup): Use it.
411         (mips_elf_n32_rtype_to_howto): Use it.
413 2003-05-21  Stuart F. Downing  <sdowning@fame.com>
415         * som.h: Define PA_2_0 before including a.out.h
417 2003-05-07  Eric Christopher  <echristo@redhat.com>
418             Alexandre Oliva   <aoliva@redhat.com>
420         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
421         pic tests, change to warning.
422         (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
424 2003-05-21  Marcus Comstedt  <marcus@mc.pp.se>
426         * config.bfd: Check for a target triplet of shl-...-netbsdelf as
427         well as shle-...-netbsdelf.  Remove duplicate entry.
429 2003-05-21  Nick Clifton  <nickc@redhat.com>
431         * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
432         for X_STORMY16_REL_12 reloc.
434         * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
435         the type of the hash table in the bfd_link_info structure.
436         (bfd_elf_get_runpath_list): Likewise.
438 2003-05-19  Roland McGrath  <roland@redhat.com>
440         * elf.c (bfd_elf_bfd_from_remote_memory): New function.
441         * bfd-in.h: Declare it.
442         * bfd-in2.h: Regenerated.
443         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
444         * elf-bfd.h (struct elf_backend_data): New function pointer member
445         elf_backend_bfd_from_remote_memory.
446         (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
447         Declare them.
448         * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
449         (elfNN_bed): Add that to the initializer.
451 2003-05-15  Roland McGrath  <roland@redhat.com>
453         * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
455 2003-05-20  Jakub Jelinek  <jakub@redhat.com>
457         * elflink.h (elf_link_output_extsym): Only issue error about !=
458         STV_DEFAULT symbols if they are bfd_link_hash_undefined.
460 2003-05-20  H.J. Lu <hongjiu.lu@intel.com>
462         * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
463         when removing the old definition for symbols with non-default
464         visibility.
466 2003-05-18  Jason Eckhardt  <jle@rice.edu>
468         * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
470 2003-05-17  Andreas Schwab  <schwab@suse.de>
472         * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
473         elf_section_data during processing of pc-relative and absolute
474         relocations.
475         (elf_m68k_relocate_section): Use the cached reloc section instead
476         of computing it again.  Fix handling of visibility.  Don't modify
477         addend when copying over a relocation into the output.
479 2003-05-17  Alan Modra  <amodra@bigpond.net.au>
481         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
482         to trim plt entries.  Move undefweak non-default visibility test..
483         (allocate_dynrelocs): ..from here.
484         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
485         dynamic_sections_created here.  Update comment.  Move undefweak
486         non-default visibility test..
487         (allocate_dynrelocs): ..from here.  Fix comment.
488         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
489         to trim plt entries.  Move undefweak non-default visibility test..
490         (allocate_dynrelocs): ..from here.  Fix comment.
491         * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
492         STV_DEFAULT rather than comparing with zero.
493         * elflink.c (_bfd_elf_merge_symbol): Likewise.
494         (_bfd_elf_fix_symbol_flags): Likewise.  Format comment.
496 2003-05-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
498         * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
499         pointers.
500         (_bfd_set_gp_value): Likewise.
502 2003-05-16  Michael Snyder  <msnyder@redhat.com>
503         From Bernd Schmidt  <bernds@redhat.com>
504         * archures.c (bfd_mach_h8300sx): New.
505         * bfd-in2.h: Regenerate.
506         * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
507         (h8300sx_info_struct): New.
508         (h8300s_info_struct): Link to it.
509         * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
510         (elf32_h8_final_write_processing): Likewise.
511         (elf32_h8_relax_section): Likewise.
513 2003-05-16  Kelley Cook  <kelleycook@wideopenwest.com>
515         * config.bfd: Accept i[3-7]86 variants.
516         * configure.host: Likewise.
517         * configure.in: Likewise.
518         * configure: Regenerate.
520 2003-05-15  H.J. Lu <hongjiu.lu@intel.com>
522         * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
523         symbol.
525 2003-05-15  H.J. Lu <hongjiu.lu@intel.com>
527         * elflink.h (elf_link_check_versioned_symbol): Also allow
528         the base version.
530 2003-05-15  Alan Modra  <amodra@bigpond.net.au>
531             H.J. Lu <hongjiu.lu@intel.com>
533         * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
534         (elf_i386_relocate_section): Likewise.
535         * elf32-ppc.c (allocate_dynrelocs): Likewise.
536         (ppc_elf_relocate_section): Likewise.
537         * elf64-ppc.c (allocate_dynrelocs): Likewise.
538         (ppc64_elf_relocate_section): Likewise.
540 2003-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
542         * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
544 2003-05-13  Stephane Carrez  <stcarrez@nerim.fr>
546         * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
547         processor capability, allow merge of HC12 and HCS12 in some cases.
548         (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
549         * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
550         (bfd_m68hc12_arch): Link it.
551         (scan_mach): New function.
553 2003-05-13  Andrew Haley  <aph@redhat.com>
555         * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
557 2003-05-13  Alan Modra  <amodra@bigpond.net.au>
558             H.J. Lu  <hongjiu.lu@intel.com>
560         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
561         elf32-ppc.c.  Add ELF_LINK_FORCED_LOCAL check.
562         * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
563         (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
564         (ppc_elf_relocate_section): Likewise.
565         * elf64-ppc.c (allocate_dynrelocs): Likewise.
566         (ppc64_elf_relocate_section): Likewise.  Use for .got relocs too.
567         (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
568         relocs need no other types.
569         * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
570         dynreloc check.
571         (elf_i386_relocate_section): Likewise.  Use for .got relocs too.
572         (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
573         .got relocs.
575 2003-05-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
577         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
578         copy ELF_LINK_NON_GOT_REF from weakdef.
579         (allocate_dynrelocs): For undef weak syms with non-default
580         visibility, a) don't allocate plt entries, b) don't allocate
581         .got relocs, c) discard dyn rel space
582         (sh_elf_relocate_section): d) don't generate .got relocs, e)
583         don't generate dynamic relocs.
584         (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
585         for weakdefs when symbol already adjusted.
587 2003-05-12  Nick Clifton  <nickc@redhat.com>
589         * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
590         overflow detection for R_XSTORMY16_16 reloc.
592 2003-05-12  Paul Clarke  <paulc@senet.com.au>
594         * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
596 2003-05-11  Jason Eckhardt  <jle@rice.edu>
598         * elf32-i860.c (elf32_i860_relocate_highadj): Properly
599         adjust upper bits.
600         (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
601         proper place.
602         (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
603         proper place.
605 2003-05-11  Andreas Schwab  <schwab@suse.de>
607         * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
608         complicated tests for unresolvable relocs with a simple direct
609         scheme using "unresolved_reloc" var.  Report some detail on
610         bfd_reloc_outofrange and similar errors.
612 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
614         * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
615         Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
616         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
617         * elf64-s390.c: Likewise.
619 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
621         * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
622         (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
623         ELF_LINK_NON_GOT_REF from weakdef.
624         (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
625         already been adjusted before treating it specially.
626         * el64-s390.c: Likwise.
628 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
630         * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
631         non-default visibility, a) don't make them dynamic, b) discard
632         space for dynamic relocs.
633         (elf_s390_relocate_section): Initialize the GOT entries and skip
634         R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
635         symbols with non-default visibility.
636         * elf64-s390.c: Likewise.
638 2003-05-09  Alan Modra  <amodra@bigpond.net.au>
640         * cpu-arm.c (arm_check_note): Warning fix.
641         * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes.  Arrange
642         to keep relocs if edited.
643         (iq2000_elf_print_private_bfd_data): Return TRUE.
644         * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
645         ELF64_R_SYM.
646         (elfNN_ia64_relax_ldxmov): Warning fix.
647         * xtensa-isa.c (xtensa_add_isa): Warning fix.
648         * xtensa-modules.c (get_num_opcodes): Warning fix.
650 2003-05-09  Andrey Petrov <petrov@netbsd.org>
652         * elf.c (elf_fake_sections): Use correct cast for sh_name.
654 2003-05-09  Alan Modra  <amodra@bigpond.net.au>
656         * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
657         elflink.h.  Replace LOG_FILE_ALIGN with bed->s->log_file_align.
658         (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
659         (bfd_elf_record_link_assignment): Move from elflink.h.
660         (_bfd_elf_merge_symbol): Likewise.
661         (_bfd_elf_add_default_symbol): Likewise.
662         (_bfd_elf_export_symbol): Likewise.
663         (_bfd_elf_link_find_version_dependencies): Likewise.
664         (_bfd_elf_link_assign_sym_version): Likewise.
665         (_bfd_elf_link_read_relocs): Likewise.
666         (_bfd_elf_link_size_reloc_section): Likewise.
667         (_bfd_elf_fix_symbol_flags): Likewise.
668         (_bfd_elf_adjust_dynamic_symbol): Likewise.
669         (_bfd_elf_link_sec_merge_syms): Likewise.
670         (elf_link_read_relocs_from_section): Likewise.  Use bed->s->sizeof_rel
671         and bed->s->sizeof_rela.
672         (_bfd_elf_link_output_relocs): Likewise.
673         * elf-bfd.h (struct elf_size_info): Rename file_align to
674         log_file_align.
675         (struct elf_info_failed): Move from elflink.h.
676         (struct elf_assign_sym_version_info): Likewise.
677         (struct elf_find_verdep_info): Likewise.
678         (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
679         (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
680         _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
681         _bfd_elf_link_assign_sym_version,
682         _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
683         _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
684         _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
685         _bfd_elf_link_sec_merge_syms): Declare.
686         (bfd_elf32_link_create_dynamic_sections): Don't declare.
687         (_bfd_elf32_link_read_relocs): Likewise.
688         (bfd_elf64_link_create_dynamic_sections): Likewise.
689         (_bfd_elf64_link_read_relocs): Likewise.
690         * elflink.h: Move lots o' stuff elsewhere.
691         * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
692         (bfd_elf64_record_link_assignment): Likewise.
693         (bfd_elf_record_link_assignment): Declare.
694         * bfd-in2.h: Regenerate.
695         * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
696         (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
697         * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
698         (assign_file_positions_for_segments): Likewise.
699         (assign_file_positions_except_relocs): Likewise.
700         (swap_out_syms, elfcore_write_note): Likewise.
701         * elf-m10200.c: Adjust for changed function names.
702         * elf-m10300.c: Likewise.
703         * elf32-arm.h: Likewise.
704         * elf32-h8300.c: Likewise.
705         * elf32-hppa.c: Likewise.
706         * elf32-ip2k.c: Likewise.
707         * elf32-m32r.c: Likewise.
708         * elf32-m68hc11.c: Likewise.
709         * elf32-m68hc1x.c: Likewise.
710         * elf32-m68k.c: Likewise.
711         * elf32-mips.c: Likewise.
712         * elf32-ppc.c: Likewise.
713         * elf32-sh.c: Likewise.
714         * elf32-v850.c: Likewise.
715         * elf32-xtensa.c: Likewise.
716         * elf64-alpha.c: Likewise.
717         * elf64-hppa.c: Likewise.
718         * elf64-mmix.c: Likewise.
719         * elf64-ppc.c: Likewise.
720         * elf64-sh64.c: Likewise.
721         * elfxx-ia64.c: Likewise.
722         * elfxx-mips.c: Likewise.
723         (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
724         * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
725         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
726         * elf64-mips.c (mips_elf64_size_info): Likewise.
727         * elf64-s390.c (s390_elf64_size_info): Likewise.
728         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
730 2003-05-08  H.J. Lu <hongjiu.lu@intel.com>
732         * elflink.h (elf_add_default_symbol): After skipping the
733         unversioned symbol, go to non-default one.
735 2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
737         * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
738         want_plt field.
739         (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
740         for symbols with non-default visibility.
742 2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
744         * elflink.h (elf_link_check_versioned_symbol): Also handle the
745         case that a DSO references a hidden symbol which may be
746         satisfied by a versioned symbol in another DSO.
747         (elf_link_output_extsym): Check versioned definition for hidden
748         symbol referenced by a DSO.
750 2003-05-07  Nick Clifton  <nickc@redhat.com>
752         * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
753         R_XSTORMY16_16 reloc to ignore overflows.
755 2003-05-06  Alexandre Oliva  <aoliva@redhat.com>
757         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
758         error message for mixing different-endian files.  Check for ABI
759         compatibility of input files with the selected emulation.
761 2003-05-05  Alan Modra  <amodra@bigpond.net.au>
763         * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
764         non-default visibility, a) don't make them dynamic, b) discard
765         space for dynamic relocs.
766         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
768         * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
769         non-default visibility, a) don't allocate plt entries, b) don't
770         allocate .got relocs, c) discard dyn rel space,
771         (ppc_elf_relocate_section): d) don't generate .got relocs, e)
772         don't generate dynamic relocs.
773         * elf64-ppc.c (allocate_dynrelocs): As above.
774         (ppc64_elf_relocate_section): As above.
776 2003-05-05  Andreas Jaeger  <aj@suse.de>
778         * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
779         relocation entries for weak undefined symbols with non-default
780         visibility.
781         (elf64_x86_64_relocate_section): Initialize the GOT entries and
782         skip R_386_32/R_386_PC32 for weak undefined symbols with
783         non-default visibility.
785 2003-05-04  H.J. Lu <hjl@gnu.org>
787         * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
788         relocation entries for weak undefined symbols with non-default
789         visibility.
790         (elf_i386_relocate_section): Initialize the GOT entries and
791         skip R_386_32/R_386_PC32 for weak undefined symbols with
792         non-default visibility.
794         * elfxx-ia64.c (allocate_fptr): Don't allocate function
795         descriptors for weak undefined symbols with non-default
796         visibility.
797         (allocate_dynrel_entries): Don't allocate relocation entries
798         for symbols resolved to 0.
799         (set_got_entry): Don't install dynamic relocation for weak
800         undefined symbols with non-default visibility.
801         (set_pltoff_entry): Likewise.
803         * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
804         with non-default visibility.
805         (elf_link_output_extsym): Don't make weak undefined symbols
806         with non-default visibility dynamic.
808 2003-05-04  H.J. Lu <hjl@gnu.org>
810         * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
812 2003-05-04  H.J. Lu <hjl@gnu.org>
814         * elflink.h (elf_merge_symbol): Don't record a hidden/internal
815         symbol dynamic. Check indirection when removing the old
816         definition for symbols with non-default visibility.
817         (elf_add_default_symbol): Skip when told by elf_merge_symbol.
819 2003-05-02  Nick Clifton  <nickc@redhat.com>
821         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
822         R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
823         unsigned overflow.
825 2003-05-02  Andreas Jaeger  <aj@suse.de>
827         * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
828         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
829         (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
830         (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
831         ELF_LINK_NON_GOT_REF from weakdef.
833 2003-05-02  Charles Lepple <clepple@ghz.cc>
834             Nick Clifton <nickc@redhat.com>
836         * acinclude.m4: Fix name of --enable-install-libbfd switch.
837         * aclocal.m4: Regenerate.
838         * configure: Regenerate.
839         * Makefile.in: Regenerate.
841 2003-05-01  Alan Modra  <amodra@bigpond.net.au>
843         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
844         weakdef sym has already been adjusted before treating it specially.
845         * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
846         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
847         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
848         (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
850 2003-04-28  H.J. Lu <hjl@gnu.org>
852         * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
853         the relax finalize pass.
855         * section.c (struct sec): Add need_finalize_relax and remove
856         flag11.
857         (STD_SECTION): Update struct sec initializer.
858         * bfd-in2.h: Regenerated.
860 2003-04-28  H.J. Lu <hjl@gnu.org>
862         * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
863         to copy any information related to dynamic linking when we flip
864         the indirection.
866 2003-04-27  H.J. Lu <hjl@gnu.org>
868         * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
869         (ELF_LINK_DYNAMIC_WEAK): New.
871         * elflink.h (elf_merge_symbol): Add one argument to indicate if
872         a symbol should be skipped. Ignore definitions in dynamic
873         objects for symbols with non-default visibility.
874         (elf_add_default_symbol): Adjusted.
875         (elf_link_add_object_symbols): Check if a symbol should be
876         skipped. Don't merge the visibility field with the one from
877         a dynamic object.
878         (elf_link_check_versioned_symbol): Use undef_bfd.
879         (elf_link_output_extsym): Warn if a forced local symbol is
880         referenced from dynamic objects. Make non-weak undefined symbol
881         with non-default visibility a fatal error.
883 2003-04-27  Daniel Jacobowitz  <drow@mvista.com>
885         * configure.in: Bump version on HEAD to 2.14.90.
886         * configure: Regenerated.
888 2003-04-26  Stephane Carrez  <stcarrez@nerim.fr>
890         PR savannah/3331:
891         * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
892         when we couldn't relax something.
894 2003-04-25  Alan Modra  <amodra@bigpond.net.au>
896         * elflink.h (elf_merge_symbol): When we find a regular definition
897         for an indirect symbol, flip the indirection so that the old
898         direct symbol now points to the new definition.
900 2003-04-24  Roland McGrath  <roland@redhat.com>
902         * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
904 2003-04-24  Alan Modra  <amodra@bigpond.net.au>
906         * elf32-ppc.c: Formatting and comment fixes.
907         (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
908         (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
910 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
912         * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
913         * bfd-in2.h: Rebuilt.
914         * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
915         * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
916         & H8300SNMAGIC.
917         (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
918         * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
919         (h8300sn_info_struct, h8300hn_info_struct): New.
920         * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
921         (elf32_h8_final_write_processing): Likewise.
923 2003-04-23  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
925         * elf32-sh.c (tpoff): New.
926         (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
927         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
928         (allocate_dynrelocs): Don't make unnecessary dynamic TLS
929         relocations.  Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
930         (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
931         (dtpoff_base): Fix wrong indentation.
932         (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
933         relocations.  Don't set tls_tpoff32 flag.  Don't make unnecessary
934         R_SH_TLS_TPOFF32 relocations.
936 2003-04-23  J"orn Rennecke <joern.rennecke@superh.com>
938         * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
939         * cpu-sh.c: Likewise.
940         * elf32-sh.c: Likewise.
941         * reloc.c (bfd_reloc_code_real): Likewise.
942         * elf32-sh64-com.c: Change comment to refer to SuperH.
943         * elf32-sh64.c: Likewise.
944         * elf64-sh64.c: Likewise.
945         * bfd-in2.h (enum bfd_architecture): Regenerate.
947 2003-04-23  Alan Modra  <amodra@bigpond.net.au>
949         From Julien LEMOINE <speedblue@debian.org>
950         * elf32-i386.c (elf_i386_info_to_howto): Delete.
951         (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
953 2003-04-22  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
955         * archures.c: Replace references to Mitsubishi M32R with references
956         to Renesas M32R.
957         * relocs.c: Likewise.
958         * bfd-in2.h: Regenerate.
960 2003-04-21  Richard Henderson  <rth@redhat.com>
962         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
963         executable when a symbol is defined both regular and dynamic.
965 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
967         * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
968         (elf32-m68hc1x.lo): Update dependencies
969         * configure.in: Add elf32-m68hc1x.lo.
970         * configure: Rebuild.
971         * Makefile.in: Rebuild.
973 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
975         * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
976         (m68hc11_elf_hash_table_create): New function.
977         (elf32_m68hc11_link_hash_table_free): New function.
978         (stub_hash_newfunc): New function.
979         (m68hc11_add_stub): New function.
980         (elf32_m68hc11_add_symbol_hook): New function.
981         (elf32_m68hc11_setup_section_lists): New function.
982         (elf32_m68hc11_next_input_section): New function.
983         (elf32_m68hc11_size_stubs): New function.
984         (elf32_m68hc11_build_stubs): New function.
985         (m68hc11_get_relocation_value): New function.
986         (elf32_m68hc11_relocate_section): Call the above to redirect
987         some relocations to the trampoline code.
988         (m68hc11_elf_export_one_stub): New function.
989         (m68hc11_elf_set_symbol): New function.
990         (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
991         (m68hc11_elf_get_bank_parameters): Get parameters only when the info
992         is not yet initialized.
994         * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
995         (elf32_m68hc11_stub_hash_entry): New struct.
996         (m68hc11_page_info): Add trampoline handler address.
997         (m68hc11_elf_link_hash_table): Add stubs generation members.
998         (elf32_m68hc11_add_symbol_hook): Declare.
999         (elf32_m68hc11_setup_section_lists): Declare.
1000         (elf32_m68hc11_size_stubs): Declare.
1001         (elf32_m68hc11_build_stubs): Declare.
1003         * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1004         (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1005         (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1006         (_bfd_m68hc11_elf_set_private_flags): Ditto.
1007         (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
1008         (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
1009         (bfd_elf32_bfd_link_hash_table_create): Define.
1010         (elf_backend_add_symbol_hook): Define.
1011         (m68hc11_elf_bfd_link_hash_table_create): New function.
1012         (m68hc11_elf_build_one_stub): New function.
1013         (m68hc11_elf_size_one_stub): New function.
1014         (m68hc11_elf_bfd_link_hash_table_create): Install the above.
1015         (bfd_elf32_bfd_link_hash_table_create): Define.
1017         * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
1018         (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
1019         (m68hc12_phys_addr): Ditto.
1020         (m68hc12_phys_page): Ditto.
1021         (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
1022         (elf32_m68hc11_gc_mark_hook): Likewise.
1023         (elf32_m68hc11_gc_sweep_hook): Likewise.
1024         (elf32_m68hc11_check_relocs): Likewise.
1025         (elf32_m68hc11_relocate_section): Likewise.
1026         (_bfd_m68hc12_elf_set_private_flags): Likewise.
1027         (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
1028         (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
1029         (m68hc12_elf_build_one_stub): New function.
1030         (m68hc12_elf_size_one_stub): New function.
1031         (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
1032         (elf_backend_add_symbol_hook): Define.
1033         (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
1035 2003-04-18  Nick Clifton  <nickc@redhat.com>
1037         * format.c (bfd_check_format_matches): Only check associated
1038         vector if the matching_vector has been created.
1040 2003-04-15  Alexandre Oliva  <aoliva@redhat.com>
1042         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
1043         2003-04-09's change.
1045 2003-04-15  Brian Ford  <ford@vss.fsi.com>
1047         * peicode.h (coff_swap_scnhdr_in): If a section holds
1048         uninitialized data and is from an object file or from an
1049         executable image that has not initialized the s_size field, or if
1050         the physical size is padded, use the virtual size (stored in
1051         s_paddr) instead.
1053 2003-04-15  H.J. Lu <hjl@gnu.org>
1055         * elflink.h (elf_link_add_object_symbols): Properly report
1056         filename for alignment reduction.
1058 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
1060         * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
1061         * reloc.c: Likewise.
1062         * coff-h8300.c: Likewise.
1063         * coff-h8500.c: Likewise.
1064         * coff-sh.c: Likewise.
1065         * cpu-h8300.c: Likewise.
1066         * cpu-sh.c: Likewise.
1067         * elf32-h8300.c: Likewise.
1068         * elf32-sh.c: Likewise.
1069         * elf32-sh64-com.c: Likewise.
1070         * elf32-sh64.c: Likewise.
1071         * elf64-sh64.c: Likewise.
1072         * bfd-in2.h: Regenerate.
1074 2003-04-14  H.J. Lu <hjl@gnu.org>
1076         * elflink.h (elf_link_add_object_symbols): Maintain maximum
1077         alignment for common symbols. Warn reducing alignment for
1078         common symbols. Report old filename when symbol size changes.
1080 2003-04-12  Alexandre Oliva  <aoliva@redhat.com>
1082         * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
1083         occurrences of the same test changed in the previous patch.
1084         Optimize.
1086 2003-04-11  Alexandre Oliva  <aoliva@redhat.com>
1088         * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
1089         (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
1090         GOT_DISP/addend only if the symbol got a global GOT entry.
1092 2003-04-10  Alexandre Oliva  <aoliva@redhat.com>
1094         * elfxx-mips.c (mips_elf_calculate_relocation): Decay
1095         GOT_PAGE/GOT_OFST referencing overridable symbol to
1096         GOT_DISP/addend.
1097         (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
1098         global symbol as GOT_DISP.
1100 2003-04-10  Bob Wilson  <bob.wilson@acm.org>
1102         * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
1103         next relocation on an undefined symbol.
1105 2003-04-09  Richard Henderson  <rth@redhat.com>
1107         * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
1108         Ignore relocations against r_symndx == 0.
1110 2003-04-09  H.J. Lu <hjl@gnu.org>
1112         * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
1113         FALSE for undefined symbols.
1114         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1116 2003-04-09  Alexandre Oliva  <aoliva@redhat.com>
1118         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
1119         and IRIX-specific shift-to-64-bit 4-byte lengths before following
1120         addr_size.
1122 2003-04-08  Alexandre Oliva  <aoliva@redhat.com>
1124         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
1125         pointer size from ABI, not arch_bits_per_address.
1127 2003-04-07  Kevin Buettner  <kevinb@redhat.com>
1129         * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
1130         constants for n32 ABI.
1132 2003-04-06  Andrew Cagney  <cagney@redhat.com>
1134         * simple.c (bfd_simple_get_relocated_section_contents): Disable
1135         free that leads to GDB vs BFD memory corruption.
1137 2003-04-04  Stephane Carrez  <stcarrez@nerim.fr>
1139         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
1140         symbols that mark the end of the section.
1141         (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
1142         converting to a relative branch so that the offset is computed after
1143         the relaxation; also relocate a jsr into a bsr if possible but don't
1144         relax them if they are to a far symbol as we need to call the
1145         trampoline code.
1146         (elf_m68hc11_howto_table): Set pcrel_offset to true.
1148 2003-04-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
1150         * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
1151         bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
1152         * bfd-in2.h: Regenerate
1153         * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
1154         * cpu-tic4x.c: Ditto
1156 2003-04-03  Nick Clifton  <nickc@redhat.com>
1158         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
1159         differently for object files and executables.
1160         * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
1161         for object files or for executables who have not already
1162         initialised the field.
1163         * libpei.h (bfd_pe_executable_p): New macro.  Return true if
1164         the PE format bfd is an executable.
1166 2003-04-03  Alan Modra  <amodra@bigpond.net.au>
1168         * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
1169         here as it's too early to reliably determine locality.
1170         (ppc_elf_gc_sweep_hook): Likewise.
1171         (SYMBOL_REFERENCES_LOCAL): Expand comment.
1173 2003-04-02  Bob Wilson  <bob.wilson@acm.org>
1175         * xtensa-modules.c: Remove comment indicating that this is a
1176         generated file.
1178 2003-04-02  Alan Modra  <amodra@bigpond.net.au>
1180         * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
1182 2003-04-01  Bob Wilson  <bob.wilson@acm.org>
1184         * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
1185         (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
1186         (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
1187         xtensa-modules.lo.
1188         (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
1189         xtensa-modules.c.
1190         (cpu-xtensa.lo): New target.
1191         (elf32-xtensa.lo): Likewise.
1192         (xtensa-isa.lo): Likewise.
1193         (xtensa-modules.lo): Likewise.
1194         * Makefile.in: Regenerate.
1195         * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
1196         (bfd_archures_list): Add bfd_xtensa_arch.
1197         * config.bfd: Handle xtensa-*-*.
1198         * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
1199         * configure: Regenerate.
1200         * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
1201         PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
1202         * targets.c (bfd_elf32_xtensa_be_vec): Declare.
1203         (bfd_elf32_xtensa_le_vec): Likewise.
1204         (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
1205         * cpu-xtensa.c: New file.
1206         * elf32-xtensa.c: Likewise.
1207         * xtensa-isa.c: Likewise.
1208         * xtensa-modules.c: Likewise.
1209         * libbfd.h: Regenerate.
1210         * bfd-in2.h: Likewise.
1212 2003-04-01  Nick Clifton  <nickc@redhat.com>
1214         * archures.c (bfd_mach_arm_unknown): Define.
1215         * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
1216         bfd_arm_get_mach_from_notes): Prototype.
1217         * bfd-in2.h: Regenerate.
1218         * coff-arm.c (coff_arm_merge_private_bfd_data): Call
1219         bfd_arm_merge_machines.
1220         (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
1221         * coffcode.h (coff_set_arch_mach_hook): Call
1222         bfd_arm_get_mach_from_notes.
1223         * coffgen.c (coff_real_object_p): Revert previous delta.
1224         * cpu_arm.c (arm_check_note): New function.  Examine a note in a
1225         .note section.
1226         (bfd_arm_merge_machines): New function: Handle the merging of ARM
1227         binaries compiled for different architectures..
1228         (bfd_arm_update_notes): New function: Update an ARM note section.
1229         (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
1230         number from an ARM note section.
1231         * elf32-arm.h (elf32_arm_object_p): Use
1232         bfd_arm_get_mach_from_notes.
1233         (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
1234         (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
1236 2003-04-01  Ben Elliston  <bje@wasabisystems.com>
1238         * dwarf2.c (read_attribute_value): Correct typo in comment.
1240 2003-04-01  Nick Clifton  <nickc@redhat.com>
1242         * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
1243         instead of concat().
1244         (decode_line_info): Only free filename if it is not NULL.
1245         (add_line_info): Make a copy of the filename when storing it into
1246         the info structure.
1248 2003-03-31  Andreas Schwab  <schwab@suse.de>
1249             Daniel Jacobowitz  <drow@mvista.com>
1251         * simple.c (bfd_simple_get_relocated_section_contents): Add
1252         parameter symbol_table.  Optionally use it instead of the symbol
1253         table from the bfd.  Save and restore output offsets and output
1254         sections  around bfd_get_relocated_section_contents.  Fix a memory
1255         leak.
1256         (simple_save_output_info, simple_restore_output_info): New
1257         functions.
1258         * bfd-in2.h: Regenerate.
1259         * dwarf2.c (read_abbrevs): Use
1260         bfd_simple_get_relocated_section_contents instead of
1261         bfd_get_section_contents.
1262         (decode_line_info): Likewise.
1263         (_bfd_dwarf2_find_nearest_line): Likewise.  Don't call
1264         find_rela_addend.
1265         (find_rela_addend): Remove.
1266         * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
1267         debugging sections.
1268         (elfNN_ia64_hash_table_create): Create the hash table with malloc,
1269         not bfd_zalloc.
1271 2003-03-31  David Heine  <dlheine@suif.stanford.edu>
1273         * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
1274         bfd_alloc.
1275         * dwarf2.c (concat_filename): Always allocate space for the
1276         returned filename.
1277         (decode_line_info): Free the allocated filename returned by
1278         concat_filename.
1279         * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
1280         * elf.c (copy_private_bfd_data): Likewise.
1281         (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
1282         * elflink.h (elf_link_sort_relocs): Fix memory leak.
1283         * format.c (bfd_check_format_matches): Likewise.
1284         * linker.c (bfd_generic_final_link): Likewise.
1285         * opncls.c (find_separate_debug_info): Likewise.
1286         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
1288 2003-03-28  H.J. Lu <hjl@gnu.org>
1290         * elflink.h (elf_link_add_object_symbols): Correctly combine
1291         visibilities.
1293 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
1295         * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
1296         to -1 before recomputing got offsets.
1298 2003-03-26  Andreas Schwab  <schwab@suse.de>
1300         * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1301         (elf_m68k_relocate_section): Use it to correctly handle symbols
1302         forced to be local.
1303         (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
1304         entries for symbols that are forced to be local.
1306 2003-03-25  Alexandre Oliva  <aoliva@redhat.com>
1308         * elfxx-mips.c (_bfd_mips_relax_section): New function.
1309         * elfxx-mips.h (_bfd_mips_relax_section): Declare.
1310         * elfn32-mips.c, elf64-mips.c: Use it.
1312 2003-03-25  Stan Cox   <scox@redhat.com>
1313             Nick Clifton  <nickc@redhat.com>
1315         Contribute support for Intel's iWMMXt chip - an ARM variant:
1317         * archures.c: Add bfd_mach_arm_iWMMXt.
1318         * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
1319         * bfd-in2.h: Regenerate.
1320         * libbfd.h: Regenerate.
1321         * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
1322         object files to be linked with XScale ones.
1323         (coff_arm_final_link_postscript): Update note section.
1324         * coffcode.h (coff_set_arch_mach_hook): Handle note section.
1325         * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
1326         after identifying a coff binary.
1327         * cpu-arm.c (processors): Add iWMMXt.
1328         (arch_inf): Likewise.
1329         * elf32-arm.h (arm_object_p): Handle note section.
1330         (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
1331         be linked with XScale ones.
1332         (elf32_arm_section_flags): New function: Set flags on note section.
1333         (elf32_arm_final_write_processing): Handle note section.
1335 2003-03-21  DJ Delorie  <dj@redhat.com>
1337         * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
1338         _bfd_elf_rela_local_sym.
1340 2003-03-20  H.J. Lu <hjl@gnu.org>
1342         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
1343         non-ELF outputs.
1345 2003-03-20  Nick Clifton  <nickc@redhat.com>
1347         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
1348         $idata5 in case bfd_coff_final_link is not called.
1350 2003-03-19  Jakub Jelinek  <jakub@redhat.com>
1352         * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
1353         field.
1354         (canon_reloc_count): Define.
1355         (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
1356         sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
1357         reloc_count.
1358         (sparc64_elf_canonicalize_reloc): New routine.
1359         (bfd_elf64_canonicalize_reloc): Define.
1361 2003-03-18  Jakub Jelinek  <jakub@redhat.com>
1363         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
1364         againt mergeable sections.  Take r_addend into account when caching
1365         trampolines.
1367 2003-03-18  Richard Henderson  <rth@redhat.com>
1369         * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
1370         local symbols that have no dyninfo.
1372 2003-03-14  Gene Smith  <gene.smith@siemens.com>
1374         * ieee.c (ieee_write_expression): Handle the case where symbol is
1375         NULL.
1376         General formatting improvements.
1378 2003-03-13  Nick Clifton  <nickc@redhat.com>
1380         * configure.in (LINGUAS): Add zh_CN.
1381         * configure: Regenerate.
1382         * po/zh_CN.po: New file.
1384 2003-03-13  Elias Athanasopoulos  <elathan@phys.uoa.gr>
1386         * aout-cris.c (BYTES_IN_WORD): Don't define.
1387         aout-encap.c: Likewise.
1388         aout-ns32k.c: Likewise.
1389         aout-tic30.c: Likewise.
1390         hp300bsd.c: Likewise.
1391         i386aout.c: Likewise.
1392         i386dynix.c: Likewise.
1393         i386linux.c: Likewise.
1394         i386lynx.c: Likewise.
1395         i386mach3.c: Likewise.
1396         m68k4knetbsd.c: Likewise.
1397         m68klinux.c: Likewise.
1398         m68klynx.c: Likewise.
1399         m68knetbsd.c: Likewise.
1400         m88kmach3.c: Likewise.
1401         mipsbsd.c: Likewise.
1402         newsos3.c: Likewise.
1403         sparclinux.c: Likewise.
1404         sparclynx.c: Likewise.
1405         sparcnetbsd.c: Likewise.
1406         vaxbsd.c: Likewise. Fix comment formatting.
1408 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
1410         * Reverted 2003-03-02's patch.
1412         * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
1413         overridable.
1414         * elf64-mips.c (mips_elf64_canonicalize_reloc,
1415         mips_elf64_get_dynamic_reloc_upper_bound,
1416         mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
1417         (bfd_elf64_get_canonicalize_reloc,
1418         bfd_elf64_get_dynamic_reloc_upper_bound,
1419         bfd_elf64_canonicalize_dynamic_reloc): Define.
1420         (mips_elf64_slurp_reloc_table): Support dynamic.
1421         (mips_elf64_slurp_one_reloc_table): Adjust.
1423 2003-03-12  Nick Clifton  <nickc@redhat.com>
1425         * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
1426         'index' to 'offset' in test for zero value.
1428 2003-03-11  Alexandre Oliva  <aoliva@redhat.com>
1430         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
1431         dynamic relocations pointing to local or section symbols, use the
1432         NULL symbol instead.  Document the choice to not emit an
1433         additional R_MIPS_64 relocation.
1435 2003-03-11  Alan Modra  <amodra@bigpond.net.au>
1437         * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
1438         zero index dynamic tls relocs generated for the GOT.  Tidy code.
1439         Set "relocation" to 1 on DTPMOD32 relocs.  Optimize HA adjustment.
1440         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1442 2003-03-07  Alan Modra  <amodra@bigpond.net.au>
1444         * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
1445         a tls_get_addr call.
1447         * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
1448         (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
1449         ELF_LINK_NON_GOT_REF from weakdef.
1450         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
1451         (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
1452         ELF_LINK_NON_GOT_REF from weakdef.
1453         * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
1454         (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
1455         ELF_LINK_NON_GOT_REF from weakdef.
1457 2003-03-06  Jakub Jelinek <jakub@redhat.com>
1458         Andrew Haley  <aph@redhat.com>
1460         * elflink.h (elf_bfd_discard_info): Don't process eh frames if
1461         output is relocateable.
1463 2003-03-06  Steven Konopa <skonopa@kgo.csc.com>
1465         * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
1466         R_COMMENT.
1468 2003-03-06  Alan Modra  <amodra@bigpond.net.au>
1470         * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
1471         error messages.
1472         (ELIMINATE_COPY_RELOCS): Define to zero.
1473         (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
1474         TLSLD relocs.  Report reloc types on a number of errors.  Optimize
1475         LOCAL24PC check for non-local syms.  Don't capitalize error messages.
1476         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
1477         (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
1478         calculating TLSLD relocs.  Report reloc types on a number of errors.
1479         Don't capitalize error messages.
1481 2003-03-03  H.J. Lu <hjl@gnu.org>
1483         * elfxx-ia64.c (USE_BRL): Removed.
1484         (oor_ip): Removed.
1486 2003-03-03  J"orn Rennecke <joern.rennecke@superh.com>
1488         * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
1489         relocation (no special function), and make it non-partial_inplace.
1490         (sh_elf_relax_section): When creating a bsr, use a consistent value
1491         no matter if the symbol is extern or not;  set addend to -4.
1492         Don't swap load / non-load instructions for SH4.
1493         (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
1494         rather than if the symbol is external to determine if adjusting the
1495         offset makes sense.  Adjust the addend too if appropriate.
1496         (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
1497         relocation.
1499 2003-03-03  Nick Clifton  <nickc@redhat.com>
1501         * po/da.po: Installed latest translation.
1503 2003-03-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1505         * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
1506         R_MIPS_PC16 to rightshift 2.
1507         (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
1508         (bfd_elf32_bfd_reloc_type_lookup): Support
1509         BFD_RELOC_MIPSEMB_16_PCREL_S2.
1510         * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
1511         R_MIPS_PC16 to rightshift 2.
1512         (mips_elf64_howto_table_rela): Likewise.
1513         (mips_reloc_map): Map to rightshifted BFD reloc.
1514         * elfn32-mips.c: The same as in elf64-mips.c.
1515         * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
1516         (mips_elf_calculate_relocation): Handle rightshifted addends for
1517         R_MIPS_PC16.
1518         * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
1519         MIPS Embedded PIC. Remove superfluous empty COMMENT.
1520         * libbfd.h: Regenerate.
1521         * bfd-in2.h: Regenerate.
1523 2003-02-28  Richard Henderson  <rth@redhat.com>
1525         * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
1526         for ltoff22x relaxation.
1528 2003-03-01  Alan Modra  <amodra@bigpond.net.au>
1530         * bfd-in.h (_bfd): Don't define.
1531         * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
1532         * syms.c: Likewise.
1533         * bfd-in2.h: Regenerate.
1535 2003-02-27  Richard Henderson  <rth@redhat.com>
1537         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
1538         (elfNN_ia64_check_relocs): Set it.
1539         (allocate_global_data_got): Check it.
1540         (allocate_local_got): Likewise.
1541         (allocate_dynrel_entries): Likewise.
1542         (elfNN_ia64_relax_ldxmov): New.
1543         (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
1544         (elfNN_ia64_choose_gp): Split out from ...
1545         (elfNN_ia64_final_link): ... here.
1547 2003-02-27  Andrew Cagney  <cagney@redhat.com>
1549         * bfd.c (struct bfd): Rename "struct _bfd".
1550         * bfd-in.h: Update copyright.
1551         (struct bfd): Rename "struct _bfd".
1552         (_bfd): Define for backward compatibility.
1553         * bfd-in2.h: Regenerate.
1555 2003-02-25  Alan Modra  <amodra@bigpond.net.au>
1557         * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
1558         and rel_hdr2 when initially counting input relocs rather than after
1559         creating output reloc sections.
1560         (elf_link_read_relocs_from_section): Don't abort with wrong reloc
1561         sizes.
1563         * Makefile.am: Run "make dep-am".
1564         * Makefile.in: Regenerate.
1566 2003-02-24  Kris Warkentin  <kewarken@qnx.com>
1568         * elf.c (elfcore_read_notes): Add check for QNX style core file.
1569         (elfcore_grog_nto_note): New function.
1570         (elfcore_grog_nto_gregs): New function.
1571         (elfcore_grog_nto_status): New function.
1573 2003-02-24  Alan Modra  <amodra@bigpond.net.au>
1575         * elflink.c (_bfd_elf_create_got_section): Check existing .got
1576         section flags before concluding that we've already been called.
1577         Don't use register keyword.
1578         (_bfd_elf_create_dynamic_sections): Don't use register keyword.
1579         (_bfd_elf_create_linker_section): Formatting.
1581 2003-02-20  jmc  <jmc@prioris.mini.pw.edu.pl>
1583         * coff-h8300.c: Fix typo: intial -> initial.
1584         * coff-ppc.c: Likewise.
1586 2003-02-20  Alan Modra  <amodra@bigpond.net.au>
1588         * elf32-ppc.c: Formatting.
1589         (allocate_dynrelocs): LD and GD relocs against the same sym need
1590         separate GOT entries.
1591         (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
1592         entries per symbol.
1594 2003-02-19  Alan Modra  <amodra@bigpond.net.au>
1596         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
1597         removal.  Localize vars.  Remove unnecessary dynobj test.
1598         * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
1599         of INFO.
1600         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1601         and optimize.
1602         (elf_i386_relocate_section): Likewise.
1603         (elf_i386_gc_sweep_hook): Simplify dyn reloc removal.  Localize vars.
1604         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1605         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1606         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1607         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1608         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.  Remove
1609         local_dynrel for section too.  Don't touch HIPLT22, LOPLT10, PCPLT32
1610         or PCPLT10 relocs.  Don't subtract twice on PLT32 relocs.
1611         Formatting.
1613         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
1614         (ppc64_elf_check_relocs): Use it.  Correct comment.  Move SEC_ALLOC
1615         test.
1616         (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
1617         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1618         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1619         and optimize.  Use ELIMINATE_COPY_RELOCS.
1620         (ppc64_elf_relocate_section): Likewise.
1622         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
1623         (ppc_elf_copy_indirect_symbol): Copy pc_count field.
1624         (ELIMINATE_COPY_RELOCS): Define.
1625         (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
1626         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1627         (MUST_BE_DYN_RELOC): Define.
1628         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1629         and optimize.  Trim dyn_relocs.
1630         (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
1631         not be used.  Do generate dyn_relocs for copy reloc avoidance.  Keep
1632         track of pc_rel dyn relocs.
1633         (ppc_elf_relocate_section): Remove "will_become_local".  Adjust
1634         WILL_CALL_FINISH_DYNAMIC_SYMBOL use.  Trim dyn relocs as per
1635         allocate_dynrelocs.  Don't recalculate "sec".
1637 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
1639         * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
1640         * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
1641         on invalid LD relocs.
1642         (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
1643         (ppc64_elf_relocate_section): Unify new handling of LD relocs and
1644         tlsld_got entry.  Use IS_PPC64_TLS_RELOC.
1646         * elf32-ppc.h: New file.
1647         * elf32-ppc.c: Include elf32-ppc.h.
1648         (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
1649         (struct ppc_elf_link_hash_entry): Rename "root" to "elf".  Adjust uses.
1650         Add "tls_mask" field.
1651         (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
1652         (struct ppc_elf_link_hash_table): Rename "root" to "elf".  Adjust uses.
1653         Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
1654         sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
1655         Make use of htab shortcuts throughout file.
1656         (ppc_elf_link_hash_newfunc): Init tls_mask field.
1657         (ppc_elf_link_hash_table_create): Init new fields.
1658         (ppc_elf_copy_indirect_symbol): Copy tls_mask.
1659         (ppc_elf_howto_raw): Add tls relocs.
1660         (ppc_elf_reloc_type_lookup): Handle them.
1661         (ppc_elf_unhandled_reloc): New function.
1662         (ppc_elf_create_got): Stash got section pointer in hash table,
1663         return status.  Make .rela.got too.
1664         (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
1665         (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
1666         NON_GOT_REF set.  Don't allocate space in .plt here..
1667         (allocate_dynrelocs): ..do so here instead, properly ref-counting and
1668         not allocating plt entries unnecessarily.  Allocate got entries here.
1669         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1670         (ppc_elf_size_dynamic_sections): Allocate local got entries.  Pass
1671         "info" during allocate_dynrelocs hash traversal.  Use htab section
1672         shortcuts rather than searching for named sections.  Get rid of
1673         "plt" and "strip" booleans.
1674         (update_local_sym_info, bad_shared_reloc): New functions.
1675         (ppc_elf_check_relocs): Handle TLS relocs.  Move .rela.got creation to
1676         ppc_elf_create_got.  Don't mark got or plt reloc syms dynamic, do so
1677         in allocate_dynreloc.  Use update_local_sym_info and bad_shared_reloc.
1678         Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
1679         R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
1680         in shared libs.  R_PPC_PLTREL32 is a plt reloc too.  Refcount all
1681         relocs that might use a plt entry.  Set NON_GOT_REF too.
1682         Enumerate all do-nothing relocs.
1683         (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs.  Handle
1684         tls relocs and all plt relocs.
1685         (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
1686         (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
1687         (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
1688         shortcuts.
1689         (ppc_elf_relocate_section): Tidy.  Handle TLS relocs.  Use
1690         bfd_elf_local_sym_name.  Simplify unresolved reloc code.  Build got
1691         entries and got relocs here.  Warn on non-zero got reloc addend.
1692         Split out branch taken/not taken reloc code into a separate switch
1693         and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
1694         Split out HA reloc adjustments to separate switch statement.  Don't
1695         warn on reloc overflow if we've already warned about undefined.
1696         Don't rebuild sym name when reporting errors.  Report all possible
1697         errors from _bfd_final_link_relocate.
1698         (bfd_elf32_bfd_final_link): Don't define.
1700 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
1702         * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r".  Don't
1703         rebuild sym name when reporting errors.
1705 2003-02-17  Nick Clifton  <nickc@redhat.com>
1707         * elflink.h (elf_link_output_extsym): Only check
1708         allow_shlib_undefined for shared libraries.
1709         * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
1710         of allow_shlib_undefined.
1711         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1712         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1713         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1714         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1715         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1716         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1717         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1718         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1719         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1720         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1721         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1722         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1723         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1724         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1725         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1726         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1728 2003-02-17  Nick Clifton  <nickc@redhat.com>
1730         * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
1731         address field to use in the comparison.
1732         (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
1734 2003-02-14  Bob Wilson  <bob.wilson@acm.org>
1736         * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
1737         backends when checking if the generic ELF target should be used.
1739         * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
1740         outside of functions, treat values as absolute addresses.
1742         * bfd.c: Change embedded documentation to use consistent indentation
1743         and to split up long lines.  Change informal style of description
1744         for functions lacking real documentation.
1745         * coffcode.h: Break up long lines in embedded documentation.
1746         * format.c: Likewise.
1747         * targets.c: Likewise.
1748         * libcoff.h: Regenerate.
1749         * bfd-in2.h: Regenerate.
1751 2003-02-14  Alan Modra  <amodra@bigpond.net.au>
1753         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
1754         (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
1755         (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
1756         (allocate_dynrelocs): Don't treat undefined and undefweak specially.
1757         (ppc_size_one_stub): Fix warning, and tighten plt entry check.
1758         (group_sections): Don't share a stub section if stubs are for a large
1759         section.  Adjust comment.
1760         (ppc64_elf_size_stubs): Roughly double the size left for stubs if
1761         !stubs_always_before_branch.
1762         (ppc64_elf_relocate_section): Initialize tlsld GOT entry once.  Don't
1763         treat undefined and undefweak specially when processing dyn relocs.
1765 2003-02-13  Jakub Jelinek  <jakub@redhat.com>
1767         * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
1769 2003-02-13  Nick Clifton  <nickc@redhat.com>
1771         * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
1772         in computation of offset to insert into BL instruction.
1774 2003-02-11  Uwe Stieber  <uwe@wwws.de>
1776         * config.bfd: Add support for kaOS as cross build target system.
1778 2003-02-11  Alan Modra  <amodra@bigpond.net.au>
1780         * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
1781         .__tls_get_addr too.
1782         (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
1784 2003-02-10  Kaz kojima  <kkojima@rr.iij4u.or.jp>
1786         * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
1787         (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
1788         (sh_elf_link_hash_newfunc): Remove the initialization of
1789         tls_tpoff32 field.
1790         (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
1791         for which tls_tpoff32 flag is set.
1792         (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
1793         of the symbol includes the entry matched with the input_section
1794         and having tls_tpoff32 flag on.  When linking statically, set
1795         symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
1796         is defined in this executable.
1797         (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
1799 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1801         * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
1802         even if there is just non-empty .rela.plt.
1804 2003-02-10  Nick Clifton  <nickc@redhat.com>
1806         * archures.c (bfd_mach_arm_ep9312): Define.
1807         * bfd-in2.h: Regenerate.
1808         * cpu-arm.c (processors[]): Add ep9312.
1809         (bfd_arm_arch): Add ep9312.
1810         * elf32-arm.h (elf32_arm_merge_private_data): Update error
1811         messages and add test for Maverick floating point support.
1812         (elf32_arm_print_private_bfd_data): Handle
1813         EF_ARM_MAVERICK_FLOAT flag.
1814         (elf32_arm_object_p): New function.
1815         (elf_backend_object_p): Define.
1817 2003-02-10  Alan Modra  <amodra@bigpond.net.au>
1819         * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
1820         variables, structure fields or function params to tls_mask or
1821         similar to better reflect usage.
1822         (struct got_entry): Comment.
1823         (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
1824         (get_tls_mask): Rename from get_tls_type.
1826 2003-02-09  Alan Modra  <amodra@bigpond.net.au>
1828         * elf64-ppc.c (TLS_GD_LD): Don't define..
1829         (TLS_GD): ..define this instead and update all uses.
1830         (TLS_TPRELGD): Define.
1831         (ppc64_elf_link_hash_table_create): Tweak initialization of
1832         init_refcount and init_offset.
1833         (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
1834         Mark second slot of GD or LD toc entries.
1835         (get_tls_type): Return an int.  Distinguish toc GD and LD entries
1836         from other tls types.
1837         (ppc64_elf_tls_setup): New function, split out from..
1838         (ppc64_elf_tls_optimize): ..here.  Don't optimize when symbols are
1839         defined in a dynamic object.  Fix LD optimization.  Don't set TLS_TPREL
1840         on GD->IE optimization, use TLS_TPRELGD instead.  Use get_tls_type
1841         return value to properly decide whether toc GD and LD entries can
1842         optimize away __tls_get_addr call.  Check next reloc after DTPMOD64
1843         to determine GD or LD rather than looking at TLS_LD flag.  Don't
1844         attempt to adjust got entry tls_type here..
1845         (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
1846         look for possible merges.
1847         (ppc64_elf_size_dynamic_sections): Adjust local got entries for
1848         optimization.
1849         (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
1850         (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
1851         Make use of return value from get_tls_type to properly detect GD and
1852         LD optimizations.  Split tlsld/gd hi/ha from lo/ds case.  Don't
1853         handle tls_get_addr removal when looking at REL24 relocs, do it when
1854         looking at the previous reloc.  Check reloc after DTPMOD64 to determine
1855         GD or LD.
1856         * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
1858 2003-02-08  Alan Modra  <amodra@bigpond.net.au>
1860         * elf32-hppa.c (group_sections): Don't share a stub section if
1861         stubs are for a large section.
1863         * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
1864         stubs if !stubs_always_before_branch.
1866 2003-02-07  Nick Clifton  <nickc@redhat.com>
1868         * elf.c (swap_out_syms): Generate an error message if an
1869         equivalent output section cannot be found for a symbol.
1871 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1873         * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
1874         local_got_entries is NULL.
1876 2003-02-06  Andreas Schwab  <schwab@suse.de>
1878         * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
1879         (read_value): Add parameter is_signed, use signed extraction if
1880         the value is signed.
1881         (_bfd_elf_write_section_eh_frame): Pass signed flag of the
1882         encoding to read_value.
1884 2003-02-06  Alan Modra  <amodra@bigpond.net.au>
1886         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
1887         plt info when called to transfer weak sym info.
1889 2003-02-05  Alan Modra  <amodra@bigpond.net.au>
1891         * reloc.c: Add PPC and PPC64 TLS relocs.
1892         * libbfd.h: Regenerate.
1893         * bfd-in2.h: Regenerate.
1894         * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
1895         (ppc64_elf_howto_raw): Add TLS howto's.  Adjust R_PPC64_NONE to be
1896         against a 32 bit field.
1897         (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
1898         (_ppc64_elf_section_data): Add t_symndx and comments.
1899         (ppc64_elf_section_data): Use elf_section_data macro.
1900         (ppc64_elf_new_section_hook): American spelling.
1901         (struct got_entry, struct plt_entry): New.
1902         (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
1903         (struct ppc_stub_hash_entry): Add "addend" field.
1904         (struct ppc_link_hash_entry): Add "tls_type".
1905         (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1906         TLS_EXPLICIT): Define.
1907         (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
1908         (link_hash_newfunc): Init new fields.
1909         (ppc64_elf_link_hash_table_create): Likewise.  Set init_refcount and
1910         init_offset to NULL.
1911         (ppc64_elf_copy_indirect_symbol): Copy got and plt info.  Don't call
1912         _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
1913         there.
1914         (update_local_sym_info, update_plt_info): New functions.
1915         (ppc64_elf_check_relocs): Use them.  Handle TLS relocs.  Adjust GOT
1916         handling to use got.glist rather than got.refcount.  Likewise for PLT.
1917         (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
1918         (func_desc_adjust): Adjust for new PLT list.
1919         (ppc64_elf_adjust_dynamic_symbol): Likewise.
1920         (get_sym_h, get_tls_type): New functions.
1921         (ppc64_elf_edit_opd): Remove unused variable.  Use get_sym_h.
1922         (ppc64_elf_tls_optimize): New function.
1923         (allocate_dynrelocs): Adjust for new PLT and GOT lists.  Allocate
1924         TLS relocs.
1925         (ppc64_elf_size_dynamic_sections): Likewise.
1926         (ppc_type_of_stub): Adjust for new PLT list.
1927         (ppc_build_one_stub): Likewise.
1928         (ppc64_elf_size_stubs): Likewise.  Use get_sym_h.  Treat __tls_get_addr
1929         calls specially.
1930         (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists.  Handle
1931         TLS relocs.  Report local syms using bfd_elf_local_sym_name.  Don't
1932         init GOT entries that have a reloc.  Generate GOT relocs here..
1933         (ppc64_elf_finish_dynamic_symbol): ..not here.  Adjust for PLT list.
1934         * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
1936 2003-02-04  Andreas Schwab  <schwab@suse.de>
1938         * elf32-m68k.c (elf_m68k_hash_entry): Define.
1939         (elf_m68k_link_hash_traverse): Remove.
1940         (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
1941         elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
1942         reduce casting.
1943         (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
1944         casting.
1945         (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
1946         instead of elf_m68k_link_hash_traverse.
1947         (elf_m68k_discard_copies): Change first parameter to pointer to
1948         struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
1949         elf_m68k_link_hash_entry is needed.
1951 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
1953         * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
1954         (struct elf_link_hash_entry): Add "glist" and "plist" fields to
1955         "got" union, and declare as gotplt_union.  Use gotplt_uinion for
1956         "plt" field.
1957         (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
1958         Add "init_offset" field.
1959         (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
1960         (elf_local_got_ents): Declare.
1961         * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
1962         and "plt".
1963         (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
1964         (_bfd_elf_link_hash_table_init): Set "init_offset".
1965         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
1966         from init_offset.
1967         (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
1969         * elf.c (bfd_elf_local_sym_name): Split out from..
1970         (group_signature): ..here.
1971         * elf-bfd.h (bfd_elf_local_sym_name): Declare.
1973 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
1975         * elf-bfd.h (enum elf_link_info_type): Remove.
1976         (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
1977         to struct sec.  Remove linkonce_p field.
1978         (elf_linkonce_p): Delete.
1979         (elf_discarded_section): Update for sec_info_type change.
1980         * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
1981         flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
1982         (ELF_INFO_TYPE_NONE): Define.
1983         (ELF_INFO_TYPE_STABS): Define.
1984         (ELF_INFO_TYPE_MERGE): Define.
1985         (ELF_INFO_TYPE_EH_FRAME): Define.
1986         (ELF_INFO_TYPE_JUST_SYMS): Define.
1987         (STD_SECTION): Update struct sec initializer.
1988         * ecoff.c (bfd_debug_section): Likewise.
1989         * elf.c: Likewise.  Update occurrences of sec_info_type and use_rela_p.
1990         * elflink.h: Likewise.
1991         * elf-eh-frame.c: Likewise.
1992         * elf64-alpha.c: Likewise.
1993         * elfxx-ia64.c: Likewise.
1994         * elfxx-mips.c: Likewise.
1995         * bfd-in2.h: Regenerate.
1997         * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
1998         referring to used_by_bfd.
1999         * elf64-sparc.c (sec_do_relax): Likewise.
2000         * elf64-mmix.c (mmix_elf_section_data): Likewise.
2001         * elfxx-mips.c (mips_elf_section_data): Likewise.
2002         * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2003         (ieee_get_section_contents): Likewise.
2004         (ieee_new_section_hook): Formatting.
2005         (ieee_canonicalize_reloc): Remove commented out code.
2006         * mmo.c (mmo_section_data): Define.  Use throughout file.
2007         * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
2009 2003-01-31  Graydon Hoare <graydon@redhat.com>
2011         * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
2012         * Makefile.in: Regenerate.
2013         * opncls.c (calc_crc32, get_debug_link_info,
2014         seperate_debug_file_exists, find_seperate_debug_file): New
2015         internal functions.
2016         (bfd_follow_gnu_debuglink): New function.  Follow the pointer
2017         contained inside a .gnu_debuglink section.
2018         * bfd-in2.h: Regenerate.
2020 2003-01-29  Alexandre Oliva  <aoliva@redhat.com>
2022         * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
2023         entry->abfd when it's NULL.
2025 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
2027         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
2028         _bfd_elf_section_offset returning -2 the same way as -1.
2030         * elfxx-mips.c (mips_elf_multi_got): New function.
2031         (struct mips_got_entry): Make symndx and gotidx signed.  Moved
2032         addend into union along with address and link hash entry.
2033         (struct mips_got_info): Added bfd2got and next.
2034         (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
2035         (mips_elf_got_section, mips_elf_create_got_section): Use
2036         SEC_EXCLUDE bit to tell whether we really need the got
2037         section.  Take boolean arguments to disregard an excluded
2038         section, or to create it as excluded.  Adjust all callers.
2039         Use mips_elf_got_section all over.
2040         (mips_elf_local_got_index, mips_elf_got_page,
2041         mips_elf_got16_entry): Take input bfd as argument, and pass it
2042         on to mips_elf_create_local_got_entry.
2043         (mips_elf_global_got_index, mips_elf_create_local_got_entry):
2044         Take input bfd as argument, and manage entries in the
2045         appropriate GOT.
2046         (mips_elf_got_offset_from_index): Take input bfd as argument,
2047         and use it to adjust the GP offset of the bfd.
2048         (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
2049         unreferenced GOT entries of global symbols to the end.
2050         (mips_elf_record_global_got_symbol): Take input bfd as
2051         argument.  Add entries to the master GOT hash table.
2052         (struct mips_elf_bfd2got_hash): New.
2053         (struct mips_elf_got_per_bfd_arg): New.
2054         (struct mips_elf_set_global_got_offset_arg): New.
2055         (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
2056         mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
2057         mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
2058         mips_elf_merge_gots, mips_elf_set_global_got_offset,
2059         mips_elf_resolve_final_got_entry,
2060         mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
2061         mips_elf_got_for_ibfd): New functions.
2062         (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
2063         (MIPS_ELF_GOT_MAX_SIZE): New macro.
2064         (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
2065         (mips_elf_got_entry_hash): Take new fields into account.  Use
2066         mips_elf_hash_bfd_vma.
2067         (mips_elf_got_entry_eq): Take new fields into account.
2068         (mips_elf_create_got_section): Initialize new fields.
2069         (mips_elf_calculate_relocation): Pass input_bfd to functions
2070         that now take it.  Adjust gp for the input_bfd.
2071         (mips_elf_allocate_dynamic_relocation,
2072         mips_elf_create_dynamic_relocation,
2073         _bfd_mips_elf_create_dynamic_sections): Use...
2074         (mips_elf_rel_dyn_section): New function.  Borrow code from...
2075         (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
2076         now take it.  Create the got section if needed, even if
2077         excluded, before recording a global got symbol.  Move some
2078         code to...
2079         (mips_elf_record_local_got_symbol): New fn.
2080         (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
2081         Compute multi-got global entries offsets.  Move GOT code to...
2082         (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
2083         if the GOT is too big.
2084         (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
2085         undefweak symbol to zero.  Generate dynamic relocations for
2086         non-primary GOT entries for global symbols.
2087         (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
2088         case.  Generate dynamic relocations for local got entries.
2089         Sort dynamic relocations on N64 too, using...
2090         (sort_dynamic_relocs_64): New fns.
2091         (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
2092         (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
2094 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
2096         * bfd.c (struct _bfd): Added id field.
2097         * opncls.c (_bfd_id_counter): New static variable.
2098         (_bfd_new_bfd): Use it.
2099         * bfd-in2.h: Rebuilt.
2101 2003-01-25  Alan Modra  <amodra@bigpond.net.au>
2103         * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
2105 2003-01-25  Jakub Jelinek  <jakub@redhat.com>
2107         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
2108         (elf32_sparc_rev32_howto): New variable.
2109         (sparc_reloc_map): Add TLS relocs.
2110         (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
2111         Handle REV32.
2112         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
2113         New functions.
2114         (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
2115         struct elf32_sparc_link_hash_table):
2116         New structures.
2117         (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
2118         elf32_sparc_hash_table): Define.
2119         (link_hash_newfunc, elf32_sparc_link_hash_table_create,
2120         create_got_section, elf32_sparc_create_dynamic_sections,
2121         elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
2122         functions.
2123         (elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
2124         reference counting.
2125         (elf32_sparc_gc_sweep_hook): Likewise.
2126         (elf32_sparc_adjust_dynamic_symbol): Likewise.
2127         (elf32_sparc_size_dynamic_sections): Likewise.
2128         (elf32_sparc_relocate_section): Likewise.
2129         (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
2130         New functions.
2131         (elf32_sparc_object_p): Allocate backend private object data.
2132         (bfd_elf32_bfd_link_hash_table_create,
2133         elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
2134         elf_backend_can_refcount): Define.
2135         (elf_backend_create_dynamic_sections): Define to
2136         elf32_sparc_create_dynamic_sections.
2137         * reloc.c: Add SPARC TLS relocs.
2138         * bfd-in2.h, libbfd.h: Rebuilt.
2139         * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
2140         (sparc_reloc_map): Likewise.
2142 2003-01-24  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2144         * bfd-in2.h: Regenerate.
2145         * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
2146         s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
2147         (elf_howto_table): Add TLS relocs.
2148         (elf_s390_reloc_type_lookup): Likewise.
2149         (elf_s390_link_hash_entry): Add tls_type.
2150         (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
2151         New macros.
2152         (elf_s390_link_hash_table): Add tls_ldm_got.
2153         (link_hash_newfunc): Initialize tls_type.
2154         (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
2155         (elf_s390_copy_indirect_symbol): Copy tls_type information.
2156         (elf_s390_check_relocs): Support TLS relocs.
2157         (elf_s390_gc_sweep_hook): Likewise.
2158         (allocate_dynrelocs): Likewise.
2159         (elf_s390_size_dynamic_sections): Likewise.
2160         (elf_s390_relocate_section): Likewise.
2161         (elf_s390_finish_dynamic_symbol): Likewise.
2162         (bfd_elf32_mkobject): Define for TLS.
2163         * elf64-s390.c: Same changes as for elf32-s390.c.
2164         * libbfd.h: Regenerate.
2165         * reloc.c: Add s390 TLS relocations.
2167 2003-01-24  Charles Lepple  <clepple@ghz.cc>
2169         * aclocal.m4: Fix name of --enable-install-libbfd switch.
2171 2003-01-23  Nick Clifton  <nickc@redhat.com>
2173         * Add sh2e support:
2174         2002-04-02  Elena Zannoni  <ezannoni@redhat.com>
2175         * archures.c (bfd_mach_sh2e): Added.
2176         * bfd-in2.h: Rebuilt.
2177         * cpu-sh.c (arch_info_struct): Added SH2e.
2178         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
2180 2003-01-23  Alan Modra  <amodra@bigpond.net.au>
2182         * elf-bfd.h (struct bfd_elf_section_data): Remove tdata.  Change
2183         dynindx to an int.  Rearrange for better packing.
2184         * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
2185         * elf32-mips.c (bfd_elf32_new_section_hook): Define.
2186         * elf32-sh64.h: New.  Split out from include/elf/sh.h.
2187         (struct _sh64_elf_section_data): New struct.
2188         (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
2189         * elf32-sh64-com.c: Include elf32-sh64.h.
2190         * elf32-sh64.c: Likewise.
2191         (sh64_elf_new_section_hook): New function.
2192         (bfd_elf32_new_section_hook): Define.
2193         (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
2194         (sh64_bfd_elf_copy_private_section_data): Likewise.
2195         (sh64_elf_final_write_processing): Likewise.
2196         * elf32-sparc.c (struct elf32_sparc_section_data): New.
2197         (elf32_sparc_new_section_hook): New function.
2198         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2199         (sec_do_relax): Define.
2200         (elf32_sparc_relax_section): Adjust to use sec_do_relax.
2201         (elf32_sparc_relocate_section): Likewise.
2202         * elf64-mips.c (bfd_elf64_new_section_hook): Define.
2203         * elf64-mmix.c (struct _mmix_elf_section_data): New.
2204         (mmix_elf_section_data): Define.  Use throughout file.
2205         (mmix_elf_new_section_hook): New function.
2206         (bfd_elf64_new_section_hook): Define.
2207         * elf64-ppc.c (struct _ppc64_elf_section_data): New.
2208         (ppc64_elf_section_data): Define.  Use throughout.
2209         (ppc64_elf_new_section_hook): New function.
2210         (bfd_elf64_new_section_hook): Define.
2211         * elf64-sparc.c (struct sparc64_elf_section_data): New.
2212         (sparc64_elf_new_section_hook): New function.
2213         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2214         (sec_do_relax): Define.
2215         (sparc64_elf_relax_section): Adjust to use sec_do_relax.
2216         (sparc64_elf_relocate_section): Likewise.
2217         (bfd_elf64_new_section_hook): Define.
2218         * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
2219         * elfxx-mips.c (struct _mips_elf_section_data): New.
2220         (mips_elf_section_data): Define.  Use throughout.
2221         (_bfd_mips_elf_new_section_hook): New function.
2222         (mips_elf_create_got_section): Don't alloc used_by_bfd.
2223         * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
2224         * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
2225         * Makefile.am: Run "make dep-am".
2226         * Makefile.in: Regenerate.
2228 2003-01-21  Richard Henderson  <rth@redhat.com>
2230         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
2231         (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
2232         (elf64_alpha_adjust_dynamic_symbol): Set them.
2233         (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
2234         (elf64_alpha_relax_tls_get_addr): Handle LDM relocs.  Frob the
2235         symbol index when relaxing LDM to TPREL.
2236         (elf64_alpha_relax_section): Likewise.  Allow relaxation of GD
2237         relocs, even if the target isn't locally defined.
2238         (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
2239         (elf64_alpha_relocate_section): Likewise.  Force TP-relative
2240         relocs vs symndx 0 to the tp base.
2242 2003-01-21  Fabio Alemagna  <falemagn@aros.org>
2244         * config.bfd: Handle i[3456]86-*-aros*.
2246 2003-01-21  Andreas Schwab  <schwab@suse.de>
2248         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
2249         (struct ppc_elf_link_hash_entry): Define.
2250         (ppc_elf_hash_entry): New function.
2251         (struct ppc_elf_link_hash_table): Define.
2252         (ppc_elf_hash_table): New function.
2253         (ppc_elf_link_hash_newfunc): New function.
2254         (ppc_elf_link_hash_table_create): New function.
2255         (ppc_elf_copy_indirect_symbol): New function.
2256         (allocate_dynrelocs): New function.
2257         (readonly_dynrelocs): New function.
2258         (ppc_elf_size_dynamic_sections): Allocate space for dynamic
2259         relocs and determine DT_TEXTREL.
2260         (ppc_elf_check_relocs): Don't do that here, just count the
2261         dynamic relocs.
2262         (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
2263         removed section.
2264         (bfd_elf32_bfd_link_hash_table_create): Define.
2265         (elf_backend_copy_indirect_symbol): Define.
2267 2003-01-21  Richard Henderson  <rth@redhat.com>
2269         * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
2270         TPREL also get a reloc if shared.  Remove SREL support.
2271         (elf64_alpha_emit_dynrel): New.
2272         (elf64_alpha_relocate_section): Use it.  Resolve dynamic TPREL
2273         and GOTTPREL relocs to local symbols against the tp base.
2274         (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
2276         * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
2277         use count before clobbering r_type.
2278         (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
2279         ordering would mean dataflow inspection is necessary.
2281 2003-01-20  Svein E. Seldal  <Svein.Seldal@solidas.com>
2283         * coffcode.h (coff_set_flags): Added get/set arch hooks.
2285 2003-01-20  Fabio Alemagna  <falemagn@aros.org>
2287         * elf32-sh.c: Treat elfNN_bed like other macros defined in
2288           elfxx-target.h and #undef it before #define'ing it.
2289         * elf32-i386.c: Likewise.
2290         * elf32-sh64.c: Likewise.
2291         * elf64-alpha.c: Likewise.
2292         * elf64-sh64.c: Likewise.
2294 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2296         * bfd-in2.h: Regenerate.
2297         * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
2298         (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
2299         R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
2300         R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
2301         R_390_PLTOFF32 and R_390_PLTOFF64.
2302         (elf_s390_reloc_type_lookup): Likewise.
2303         (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
2304         of GOTPLT references to a function.
2305         (link_hash_newfunc): Initialize gotplt_refcount.
2306         (elf_s390_check_relocs): Move allocation of local_got_refcounts array
2307         and creation of the got section out of the main switch. Add support
2308         for the gotoff, gotplt and pltoff relocations.
2309         (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
2310         and pltoff.
2311         (elf_s390_adjust_gotplt): New function.
2312         (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
2313         plt entries.
2314         (allocate_dynrelocs): Add comment.
2315         (elf_s390_relocate_section): Change r_type to unsigned. Add support
2316         for gotoff, gotplt and pltoff relocations.
2317         * elf64-s390.c: Same changes as for elf32-s390.c.
2318         * libbfd.h: Regenerate.
2319         * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
2320         BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
2321         BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
2322         and BFD_RELOC_390_PLTOFF64.
2324 2003-01-18  Jakub Jelinek  <jakub@redhat.com>
2326         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
2327         R_IA64_TPREL64[LM]SB against non-global symbol properly.
2329 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
2331         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
2332         self_dtpmod_done and self_dtpmod_offset.
2333         (allocate_global_data_got): Only use one got entry for all
2334         dtpmod relocs against local symbols.
2335         (allocate_dynrel_entries): Only need .rela.got entry for
2336         dtpmod against global symbol.
2337         (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
2338         Reserve space in .rela.got for the local dtpmod entry.
2339         (set_got_entry): Initialize the common local dtpmod .got entry.
2340         (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
2341         and R_IA_64_DTPREL64MSB.
2343 2003-01-16  Alan Modra  <amodra@bigpond.net.au>
2345         * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
2346         (R_PPC_*): Rename all occurrences to R_PPC64_*.
2347         (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
2348         (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
2349         (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
2350         relative relocs, not with absolute ones.
2351         * Makefile.am: Run "make dep-am".
2352         * Makefile.in: Regenerate.
2353         * po/SRC-POTFILES.in: Regenerate.
2355 2003-01-15  Andreas Schwab  <schwab@suse.de>
2357         * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
2358         relocation against a non-allocated readonly section.
2360 2003-01-10  Alan Modra  <amodra@bigpond.net.au>
2362         * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
2363         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.  PLTGOT16_HA too.
2365 2002-01-08  Klee Dienes  <kdienes@apple.com>
2367         * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
2368         (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
2369         * Makefile.in: Regenerate.
2371 2003-01-08  Alexandre Oliva  <aoliva@redhat.com>
2373         * elfn32-mips.c (prev_reloc_section): New.
2374         (GET_RELOC_ADDEND): Use it.  Parenthesize macro arguments.
2375         (SET_RELOC_ADDEND): Parenthesize macro argument.
2377 2003-01-07  John David Anglin  <dave.anglin@nrc.gc.ca>
2379         * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
2380         adjust addil instructions if the symbol has no section.
2382 2003-01-07  DJ Delorie  <dj@redhat.com>
2384         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
2385         partial_inplace.
2387 2003-01-07  Andreas Schwab  <schwab@suse.de>
2389         * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
2390         PC relative relocations.
2391         (elf_m68k_discard_copies): Set it here instead.
2393 2002-01-02  Ben Elliston  <bje@redhat.com>
2394             Jeff Johnston  <jjohnstn@redhat.com>
2396         * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
2397         (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
2398         (BFD32_BACKENDS): Add elf32-iq2000.lo.
2399         (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
2400         (cpu-iq2000.lo): New target.
2401         * Makefile.in: Regenerate.
2402         * config.bfd: Handle iq2000-*-elf.
2403         * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
2404         (bfd_archures_list): Add bfd_iq2000_arch.
2405         * configure.in: Handle bfd_elf32_iq2000_vec.
2406         * configure: Regenerate.
2407         * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
2408         and BFD_RELOC_IQ2000_UHI16.
2409         * targets.c (bfd_elf32_iq2000_vec): Declare.
2410         (bfd_target_vector): Add bfd_elf32_iq2000_vec.
2411         * elf.c (prep_headers): Set e_machine to EM_IQ2000.
2412         * cpu-iq2000.c: New file.
2413         * elf32-iq2000.c: Likewise.
2414         * libbfd.h: Regenerate.
2415         * bfd-in2.h: Likewise.
2417 2003-01-02  Richard Sandiford  <rsandifo@redhat.com>
2419         * elfxx-mips.c: Include libiberty.h.
2420         (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
2421         (mips_set_isa_flags): New function, split out from...
2422         (_bfd_mips_elf_final_write_processing): ...here.  Only call
2423         mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
2424         (mips_mach_extensions): New array.
2425         (mips_32bit_flags_p): New function.
2426         (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
2427         Use mips_32bit_flags_p to check if one binary is 32-bit and the
2428         other is 64-bit.  When adopting IBFD's architecture, adopt the
2429         bfd_mach as well as the flags.
2431 2003-01-02  Nick Kelsey  <nickk@ubicom.com>
2433         * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
2434         fix internal errors, fix bad code generation, fix incorrect stabs
2435         information, and improve ability to eliminate redundant page
2436         instructions. Added code to ip2k_final_link_relocate to self-verify
2437         the linker relaxation.  Fix formatting problems.
2439 2002-12-30  Chris Demetriou  <cgd@broadcom.com>
2441         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
2442         * archures.c (bfd_mach_mipsisa32r2): New define.
2443         * bfd-in2.h: Regenerate.
2444         * cpu-mips.c (I_mipsisa32r2): New enum value.
2445         (arch_info_struct): Add entry for I_mipsisa32r2.
2446         * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
2447         (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
2448         (_bfd_mips_elf_final_write_processing): Add
2449         bfd_mach_mipsisa32r2 case.
2450         (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
2451         binaries marked as using MIPS32 Release 2.
2453 2002-12-30    Dmitry Diky <diwil@mail.ru>
2455         * Makefile.am: Add msp430 target.
2456         * configure.in: Likewise.
2457         * Makefile.in: Regenerate.
2458         * configure: Regenerate.
2459         * archures.c: Add msp430 architecture vector.
2460         * config.bfd: Likewise.
2461         * reloc.c: Add msp430 relocs.
2462         * targets.c: Add msp320 target.
2463         * cpu-msp430.c: New file: msp430 cpu detection.
2464         * elf32-msp430.c: New file: msp430 reloc processing.
2465         * bfd-in2.h: Regenerate.
2466         * libbfd.h: Regenerate.
2468 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
2470         * elf.c (elf_sort_sections): Don't reorder .tbss.
2471         (assign_file_positions_for_segments): Only adjust off/voff
2472         for increased alignment in PT_LOAD or PT_NOTE segment,
2473         but adjust p_filesz for .tbss too.  in PT_LOAD consider
2474         .tbss to have zero memory size.
2475         (copy_private_bfd_data) [SECTION_SIZE]: Define.
2476         [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
2477         [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
2478         into PT_TLS segment.  Never put SHF_TLS sections in
2479         segments other than PT_TLS or PT_LOAD.
2481         * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
2482         sh_entsize.
2484 2002-12-23  DJ Delorie  <dj@redhat.com>
2486         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
2488 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
2490         * elflink.h (elf_link_output_extsym): Heed strip_discarded.
2492 2002-12-23  Nick Clifton  <nickc@redhat.com>
2494         * archures.c (bfd_arch_get_compatible): Add third parameter
2495         'accept_unknowns'.  Only accept unknown format BFDs if
2496         accept_unknowns is true, or if the format is "binary".
2497         * bfd-in2.h: Regenerate.
2499 2002-12-21  Nick Clifton  <nickc@redhat.com>
2501         * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
2502         that subtracted 8 from pc relative relocations.
2504 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
2506         * coff-h8300.c: Fix comment typos.
2507         * coffcode.h: Likewise.
2508         * cpu-cris.c: Likewise.
2509         * elf32-vax.c: Likewise.
2510         * genlink.h: Likewise.
2511         * linker.c: Likewise.
2512         * som.c: Likewise.
2513         * tekhex.c: Likewise.
2514         * vms-misc.c: Likewise.
2516 2002-12-20  DJ Delorie  <dj@redhat.com>
2518         * reloc.c: Add BFD_RELOC_XSTORMY16_12.
2519         * libbfd.h: Regenerate.
2520         * bfd-in2.h: Regenerate.
2521         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
2522         (xstormy16_reloc_map): Add R_XSTORMY16_12.
2524 2002-12-19  Kazu Hirata  <kazu@cs.umass.edu>
2526         * doc/bfdint.texi: Fix typos.
2528 2002-12-20  Paul Eggert  <eggert@twinsun.com>
2530         Port to POSIX 1003.1-2001.
2531         * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
2532         * configure.in (build-warnings): Likewise.
2533         (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
2534         * aclocal.m4: Regenerate.
2535         * config.in: Regenerate.
2536         * configure: Regenerate.
2538 2002-12-19  Alan Modra  <amodra@bigpond.net.au>
2540         * coff-h8300.c: Include libiberty.h.
2541         (h8300_reloc16_extra_cases): Check the hash table creator before
2542         referencing h8300 specific fields.  Stash the hash table pointer
2543         in a local var.  Comment typo fixes.
2544         (h8300_bfd_link_add_symbols): Likewise.
2546         * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
2547         dst_mask comments.
2548         * bfd-in2.h: Regenerate.
2550 2002-12-18  Alan Modra  <amodra@bigpond.net.au>
2552         * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
2553         code a little.  Comment on dynamic relocs against section symbols.
2555 2002-12-17  Roger Sayle  <roger@eyesopen.com>
2557         * configure.host (ia64-*-hpux*): Support 64 bit targets using
2558         the HP compiler's "long long".
2560 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
2562         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
2563         and R_XSTORMY16_HI16) howto entries.
2564         (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
2565         (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
2566         determine the start of the second reloc table.
2568 2002-12-16  Nathan Tallent  <eraxxon@alumni.rice.edu>
2570         * ecofflink.c: Fix the reading of the debugging information
2571         of Tru64/Alpha binaries that are produced by recent Compaq
2572         compilers.
2573         (mk_fdrtab): Fix error in creating the FDR (file descriptor)
2574         table.
2575         (lookup_line): Because of the strange information sometimes
2576         generated by Compaq's recent compilers, change how the FDR
2577         table is searched so that PDRs (procedure descriptors) are
2578         correctly found.  Note that this change is really more of a hack;
2579         however, I have included extensive documentation as to why
2580         this is the best solution short of an extensive rewrite or
2581         another hack.
2582         (fdrtab_lookup): Add comments to explain the algorithm.
2584 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
2586         * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
2587         initializers to match struct declaration.
2589 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
2591         * dwarf2.c (comp_unit_contains_address): Comment typo fix.
2592         * elf.c (get_program_header_size): Likewise.
2593         * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
2594         (m32r_elf_generic_reloc): Likewise.
2595         * elf32-ppc.c (ppc_elf_howto_init): Likewise.
2596         * elflink.h (elf_bfd_discard_info): Likewise.
2598 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
2600         * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
2601         to DT_JMPREL.  Use srelplt input section size for DT_PLTRELSZ and
2602         DT_RELSZ adjustment, not output section.  Avoid writing tags when
2603         unchanged.  Don't assume linker script is sane, adjust DT_REL too.
2604         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
2605         size of srelplt for DT_PLTRELSZ.  Use srelplt input section size for
2606         DT_RELASZ adjustment, not output section.  Avoid writing tags when
2607         unchanged.  Adjust DT_RELA.
2608         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
2609         formatting.  Avoid writing tags when unchanged.  Adjust DT_RELA.
2611 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
2613         * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
2614         addend by 4.
2616 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
2618         * elfxx-mips.c (struct mips_got_entry): New.
2619         (struct mips_got_info): Added got_entries field.
2620         (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
2621         (mips_elf_local_got_index, mips_elf_got_page,
2622         mips_elf_got16_entry): Re-implement in terms of new...
2623         (mips_elf_create_local_got_entry): Rewrite to use got_entries.
2624         Change return type.
2625         (mips_elf_highest): Warning clean-up.
2626         (mips_elf_create_got_section): Initialize got_entries.
2627         (_bfd_mips_elf_check_relocs): Use got_entries to estimate
2628         local got size.
2629         (_bfd_mips_elf_size_dynamic_sections): Do not account for
2630         GOT_PAGE entries, since we now reuse GOT16 entries.
2632 2002-12-10  Jason Thorpe  <thorpej@wasabisystems.com>
2634         * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
2635         read-only section that lies after .text and before .data to be
2636         written into the output file and included in a_text.
2637         (translate_to_native_sym_flags): If an otherwise unrepresentable
2638         section was merged with .text, convert its symbols to N_TEXT
2639         symbols.
2640         * libaout.h (aout_section_merge_with_text_p): New macro.
2642 2002-12-08  Alan Modra  <amodra@bigpond.net.au>
2644         * bfd-in.h: Comment typo fix.  Formatting.
2645         * bfd-in2.h: Regenerate.
2646         * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
2647         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
2648         * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
2650 2002-12-05  Richard Henderson  <rth@redhat.com>
2652         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
2653         Only send PCREL21B though the plt.  Fix installed reloc type.
2654         (elfNN_ia64_relocate_section): Give error for dynamic reloc
2655         against PCREL22 or PCREL64I; clean up error messages for
2656         branch relocs.
2658 2002-12-04  Kevin Buettner  <kevinb@redhat.com>
2660         * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
2661         New functions.
2662         (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2664 2002-12-04  David Mosberger  <davidm@hpl.hp.com>
2666         * cpu-ia64-opc.c: Add operand constant "ar.csd".
2668 2002-12-04  H.J. Lu <hjl@gnu.org>
2670         * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
2671         BFD address when constructing local name.
2673 2002-12-04  Andreas Schwab  <schwab@suse.de>
2675         * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
2676         member.
2677         (elf_m68k_link_hash_table_create): Initialize it.
2678         (elf_m68k_check_relocs): Handle symbols that are forced to be
2679         local due to visibility changes.
2680         (elf_m68k_adjust_dynamic_symbol): Likewise.
2681         (elf_m68k_size_dynamic_sections): Likewise.
2682         (elf_m68k_discard_copies): Likewise.
2683         (elf_m68k_relocate_section): Likewise.
2685 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
2687         * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
2689 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
2691         * srec.c (srec_write_symbols): Restore '$' prefix to address
2692         accidentally removed in 2002-04-04 change.
2693         (srec_get_symtab): Use 0 instead of `(long) FALSE'.
2695 2002-12-03  Nick Clifton  <nickc@redhat.com>
2697         * elf32-ppc.c (apuinfo_list_init): New function.
2698         (apuinfo_list_add): New function: Add a value to the list.
2699         (apuinfo_list_length): New function: Return the number of
2700         values on the list.
2701         (apuinfo_list_element): New function: Return a value on the
2702         list.
2703         (apuinfo_list_finish): New function: Free the resources used
2704         by the list.
2705         (ppc_elf_begin_write_processing): New function.  Scan the
2706         input bfds for apuinfo sections.
2707         (ppc_elf_write_section): New function: Delay the creation of
2708         the contents of an apuinfo section in an output bfd.
2709         (ppc_elf_final_write_processing): New function.  Create the
2710         contents of an apuinfo section in an output bfd.
2711         (elf_backend_begin_write_processing): Define.
2712         (elf_backend_final_write_processing): Define.
2713         (elf_backend_write_section): Define.
2715 2002-12-03  Richard Henderson  <rth@redhat.com>
2717         * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
2719 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
2721         Fix PR savannah/1417:
2722         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
2723         branch if it goes to the start of the deleted region.
2725 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
2727         * bfd-in2.h (bfd_mach_m6812): Rebuild.
2728         * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
2729         bfd_mach_m6812s): Declare.
2731         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
2732         (_bfd_m68hc12_elf_set_private_flags): Call it.
2733         (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
2734         (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
2735         report microcontroller incompatibilities (HC12 vs HCS12).
2736         (elf_backend_object_p): Update.
2738 2002-11-30  Alan Modra  <amodra@bigpond.net.au>
2740         * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
2741         (enum bfd_boolean, boolean): Delete.
2742         (bfd_boolean): Typedef to an int.
2743         (FALSE, TRUE): Define.
2744         * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
2745         aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
2746         aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
2747         binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
2748         coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
2749         coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
2750         coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
2751         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
2752         coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
2753         coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
2754         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
2755         cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
2756         cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
2757         cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
2758         cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
2759         cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
2760         cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
2761         cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
2762         cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
2763         cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
2764         dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
2765         elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
2766         elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
2767         elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
2768         elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
2769         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2770         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2771         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2772         elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
2773         elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2774         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2775         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2776         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
2777         elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
2778         elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
2779         elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
2780         hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
2781         i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
2782         libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
2783         libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
2784         m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
2785         mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
2786         nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
2787         pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
2788         pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
2789         pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
2790         reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
2791         som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
2792         syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
2793         vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
2794         xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
2795         bfd_boolean, true with TRUE, false with FALSE.  Simplify comparisons
2796         of bfd_boolean vars with TRUE/FALSE.  Formatting.
2797         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
2799 2002-11-28  Alan Modra  <amodra@bigpond.net.au>
2801         * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
2802         Elf64_Internal_* with Elf_Internal_*.  Replace Elf_Internal_Rel
2803         with Elf_Internal_Rela.
2804         * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
2805         elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
2806         elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
2807         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2808         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2809         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2810         elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
2811         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2812         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2813         elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
2814         elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
2815         * elf-hppa.h (elf_hppa_internal_shdr): Delete.  Use Elf_Internal_Shdr
2816         throughout instead.
2817         * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
2818         * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
2819         Remove INLINE keyword.
2820         (elf_swap_reloc_in): Likewise.  Also clear r_addend.
2821         (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
2822         as a bfd_byte *.
2823         (elf_write_relocs): Consolidate REL and RELA code.
2824         (elf_slurp_reloc_table_from_section): Simplify REL code.
2825         (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
2826         * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
2827         * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
2828         RELA code.
2829         (elf_link_adjust_relocs): Likewise.  Don't malloc space for temp
2830         reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
2831         (elf_link_output_relocs): Likewise.
2832         (elf_reloc_link_order): Likewise.
2833         (elf_finish_pointer_linker_section): Likewise.
2834         (struct elf_link_sort_rela): Remove union.
2835         (elf_link_sort_cmp1): Update to suit.
2836         (elf_link_sort_cmp2): Here too.
2837         (elf_link_sort_relocs): Consolidate REL and RELA code.  Fix memory
2838         over-allocation for int_rels_per_ext_rel != 1 case.
2839         * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
2840         * elf32-i386.c: Likewise.
2841         * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
2842         * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
2843         elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
2844         * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
2845         * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2846         elf64-sparc.c, elf64-x86-64.c: Likewise.
2847         * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
2848         * elfxx-mips.c (sort_dynamic_relocs): Likewise for
2849         bfd_elf32_swap_reloc_in.
2851         * elf32-arm.h: Update elf32_arm_info_to_howto calls.
2852         * elf32-mips.c: Likewise for mips_info_to_howto_rel.
2853         (mips_elf64_swap_reloc_in): Zero r_addend.
2854         (mips_elf64_be_swap_reloc_in): Likewise.
2855         (mips_elf64_slurp_one_reloc_table): Simplify.
2857         * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
2858         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2859         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2861 2002-11-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2863         * elf32-sh.c (sh_elf_relocate_section): Don't complain about
2864         unresolved debugging relocs in dynamic applications.
2865         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2867 2002-11-26  Alan Modra  <amodra@bigpond.net.au>
2869         * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
2870         (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
2871         on a relocatable link.  Comment typos.
2872         * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
2873         in the order they are declared.  Clear elf_hash_value too.
2874         (_bfd_elf_link_hash_table_init): Likewise assign in order.  Clear
2875         eh_info and tls_segment.
2876         * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
2877         sorted when discarding relocs by turning them into R_*_NONE.
2879         * libbfd.c (warn_deprecated): Comment spelling.
2880         * po/SRC-POTFILES.in: Regenerate.
2882 2002-11-21  Richard Henderson  <rth@redhat.com>
2884         * elflink.h (elf_link_add_object_symbols): Don't overwrite the
2885         arch's st_other bits when merging visibilities.
2886         (elf_link_output_extsym): Tidy clearing of visibility field.
2888 2002-11-21  Alan Modra  <amodra@bigpond.net.au>
2890         * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
2891         (SWAP_OUT_RELOC_OFFSET): Define.
2893 2002-11-20  Alexandre Oliva  <aoliva@redhat.com>
2895         * elf.c (_bfd_elf_link_hash_table_init): Make sure
2896         can_refcount is properly extended to the type of
2897         init_refcount.
2899 2002-11-19  Alexandre Oliva  <aoliva@redhat.com>
2901         * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
2902         (_bfd_mips_elf_relocate_section): Use it.
2904         * elfxx-mips.c (MNAME): New macro.
2905         (_bfd_mips_elf_check_relocs): Use it.
2906         (_bfd_mips_elf_discard_info): Likewise.
2907         (_bfd_mips_elf_final_link): Likewise.
2909 2002-11-19  Alan Modra  <amodra@bigpond.net.au>
2911         * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
2912         rel_hdr.sh_size too.
2914 2002-11-18  Klee Dienes  <kdienes@apple.com>
2916         * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
2917         (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
2918         (BFD_H_FILES): Add bfdwin.c, bfdio.c.
2919         (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
2920         Add dependencies for bfdwin.c, bfdio.c.
2921         * bfd.c: Remove bfd_get_mtime, bfd_get_size.
2922         * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
2923         bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
2924         bfd_tell, bfd_flush, bfd_stat, bfd_seek.
2925         * bfdio.c: New file.  Contains real_read, bfd_bread, bfd_write,
2926         bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
2927         bfd_get_size (moved from libbfd.c and bfd.c).
2928         * bfdwin.c New file.  Contains _bfd_window_internal,
2929         bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
2930         libbfd.c and bfd.c).
2931         * po/SRC-POTFILES.in: Regenerate.
2932         * po/bfd.pot: Regenerate.
2933         * libbfd.h: Regenerate.
2934         * bfd-in2.h: Regenerate.
2935         * aclocal.m4: Regenerate.
2936         * Makefile.in: Regenerate.
2937         * configure: Regenerate.
2939 2002-11-18  Klee Dienes  <kdienes@apple.com>
2941         * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
2943 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
2945         * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
2946         jsr after a short jump.
2947         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2949 2002-11-15  Klee Dienes  <kdienes@apple.com>
2951         * pef.c (bfd_pef_convert_architecture): Move declaration of
2952         ARCH_POWERPC and ARCH_M68K to the start of the function.
2954 2002-11-14  Svein E. Seldal  <Svein.Seldal@solidas.com>
2956         * coff-tic4x.c (tic4x_howto_table): Formatting fixup
2958 2002-11-14  Hans-Peter Nilsson  <hp@bitrange.com>
2960         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
2961         For bpo_gregs_section->contents, allocate _raw_size, not
2962         _cooked_size.
2964 2002-11-13  Klee Dienes  <kdienes@apple.com>
2966         * config.bfd: Add entries for powerpc-*-darwin and cousins.
2968 2002-11-13  H.J. Lu <hjl@gnu.org>
2970         * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
2972 2002-11-13  Klee Dienes  <kdienes@apple.com>
2973             Alan Modra  <amodra@bigpond.net.au>
2975         * bfd.c (struct bfd_preserve): New.
2976         (bfd_preserve_save): New function.
2977         (bfd_preserve_restore): Ditto.
2978         (bfd_preserve_finish): Ditto.
2979         * bfd-in2.h: Regenerate.
2980         * mach-o.c: Formatting.
2981         (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
2982         (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
2983         (bfd_mach_o_core_p): Ditto.
2984         (bfd_mach_o_scan): Pass in mdata.
2985         * mach-o.h (bfd_mach_o_scan): Update prototype.
2986         * pef.c: Formatting.
2987         (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
2988         (bfd_pef_xlib_object_p): Ditto.
2989         (bfd_pef_scan): Pass in mdata.  Move version check to bfd_pef_object_p.
2990         * pef.h (bfd_pef_scan): Update prototype.
2991         * xsym.c: Formatting, K&R fixes.
2992         (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
2993         (bfd_sym_scan): New function split out from bfd_sym_object_p.
2994         * xsym.h (bfd_sym_scan): Declare.
2995         * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
2996         * elfcore.h (elf_core_file_p): Likewise.
2997         * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2999 2002-11-12  Nick Clifton  <nickc@redhat.com>
3001         * po/da.po: Updated Danish translation.
3003 2002-11-12  Alan Modra  <amodra@bigpond.net.au>
3005         * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3006         relocatable link too.
3007         (elf_link_input_bfd): When emitting relocs, adjust offsets for
3008         eh_frame and stab sections.  Zap deleted relocs.
3009         (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
3010         (elf_bfd_discard_info): Run for relocatable link too.
3011         * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd.  Make global.
3012         Handle ld -r case.
3013         (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
3014         * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
3016         * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
3017         (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
3018         (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
3019         (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
3020         (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
3021         (struct elf_link_hash_table): Add eh_info.
3022         (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
3023         (_bfd_elf_discard_section_eh_frame): Update prototype.
3024         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
3025         (_bfd_elf_write_section_eh_frame): Likewise.
3026         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
3027         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
3028         param.  Get "hdr_info" from link hash table.
3029         (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param.  Get
3030         header section from link hash table.  Save header section to elf_tdata.
3031         (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec".  Use
3032         header section from link hash table.  Don't alloc hdr_info.  Clear
3033         hdr_sec instead of setting "strip".
3034         (_bfd_elf_eh_frame_section_offset): Formatting.
3035         (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
3036         Get header section from link hash table.
3037         (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
3038         Get header section from link hash table.
3039         * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
3040         (get_program_header_size): Likewise.
3041         (_bfd_elf_section_offset): Formatting.
3042         * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
3043         section pointer in link hash table.
3044         (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
3045         and _bfd_elf_write_section_eh_frame calls.  Update comment about
3046         eh_frame entries.
3047         (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
3048         _bfd_elf_discard_section_eh_frame_hdr calls.  Remove "ehdr".
3050         * po/SRC-POTFILES.in: Regenerate.
3052         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
3053         relocs for discarded FDEs.  Remove dead code.
3054         (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
3055         * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
3056         Tidy conditions under which stabs are edited.  Formatting.
3057         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3058         from discarded relocs.
3059         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
3060         section adjustments after testing magic values.
3062 2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
3064         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
3065         references to large plt symbols.
3067 2002-11-12  Klee Dienes  <kdienes@apple.com>
3069         * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
3070         looking for an unused section name.
3072 2002-11-11  Kazu Hirata  <kazu@cs.umass.edu>
3074         * coff-h8300.c: Fix formatting.
3075         * elf32-h8300.c: Likewise.
3076         * reloc16.c: Likewise.
3078 2002-11-09  Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
3080         * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
3081         section when dynamic section unused;  _bfd_strip_section_from_output
3082         instead.
3084 2002-11-08  Alan Modra  <amodra@bigpond.net.au>
3086         * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
3087         and sym_vec.
3089         * dwarf2.c: Revert last change.
3091 2002-11-07  Michal Ludvig  <mludvig@suse.cz>
3093         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
3094         _bfd_dwarf2_find_nearest_line): Use
3095         bfd_simple_get_relocated_section_contents() instead of
3096         bfd_get_section_contents().
3097         * reloc.c (bfd_perform_relocation): Add sanity check.
3098         * simple.c (simple_get_relocated_section_contents): If the section
3099         does not have any relocs associated with it, just return the
3100         unadjusted contents.
3102 2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
3104         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
3105         case R_CRIS_32_GOT>: Correct test for filling in constant .got
3106         contents, enabling for a non-DSO, for symbols defined in the
3107         program with --export-dynamic.
3109 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
3111         * elf64-ppc.c: Comment typo fixes.
3112         (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
3114 2002-11-07  Nick Clifton  <nickc@redhat.com>
3116         * po/da.po: Updated Danish translation.
3118 2002-11-06  Alexandre Oliva  <aoliva@redhat.com>
3120         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
3121         exactly three internal relocs per external reloc.  Set reloc_count
3122         to the external reloc count.
3124 2002-11-06  Klee Dienes  <kdienes@apple.com>
3126          * coff-stgo32.c (stub_bytes): Mark as const.
3127          Fix comment formatting.
3129 2002-11-06  Klee Dienes  <kdienes@apple.com>
3131         * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3132         xsym.lo.
3133         (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
3134         (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
3135         * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
3136         * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
3137         * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
3138         sym.
3139         (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3140         * Makefile.in: Regenerate.
3141         * doc/Makefile.in: Regenerate.
3142         * bfd-in2.h: Regenerate.
3143         * xsym.c: New file.  Contains support for the Apple/Metrowerks
3144         xSYM debugging format.
3145         * xsym.h: New file.
3146         * pef.c: New file.  Contains support for the Apple Code Fragment
3147         Manager Preferred Executable Format
3148         * pef.h: New file.
3149         * pef-traceback.h: New file.  Contains support for parsing PowerPC
3150         traceback tables as used by PEF executables (and perhaps other
3151         systems as well).
3152         * mach-o.c: New file.  Contains support for the Mach-O object file
3153         format.
3154         * mach-o.h: New file.
3155         * mach-o-target.c: New file.  Declares the mach-o targets
3156         themselves.  Included three times by mach-o.c; each time with a
3157         different set of macros set.
3159 2002-11-06  Graeme Peterson  <gp@qnx.com>
3161         * Makefile.am: Remove entries for elf32-qnx.[ch].
3162         * Makefile.in: Regenerate.
3163         * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
3164         ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
3165         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3166         * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
3167         bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
3168         and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
3169         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3170         * configure: Regenerate.
3171         * elf32-qnx.c: Remove.
3172         * elf32-qnx.h: Remove.
3173         * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
3174         is_contained_by_filepos, and copy_private_bfd_data_p.
3175         * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
3176         is_contained_by_filepos, and copy_private_bfd_data_p.
3177         * elf32-i386.c: Remove QNX extended bfd support.
3178         * elf32-ppc.c: Remove QNX extended bfd support.
3179         * elf32-sh.c: Remove QNX extended bfd support.
3180         * elfarm-nabi.c: Remove QNX extended bfd support.
3181         * targets.c: Remove qnx vectors.
3182         * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
3183         (elf_backend_is_contained_by_filepos): Remove.
3184         (elf_backend_copy_private_bfd_data_p): Remove.
3185         * po/SRC-POTFILES.in: Regenerate.
3187 2002-11-06  David O'Brien  <obrien@FreeBSD.org>
3188             Alan Modra  <amodra@bigpond.net.au>
3190         * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
3191         dynamic relocs against section symbols for the output section vma.
3193 2002-11-05  Alan Modra  <amodra@bigpond.net.au>
3195         * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
3196         t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
3198 2002-11-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3199             Alan Modra  <amodra@bigpond.net.au>
3201         * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
3202         vectors in target_selvecs.
3203         (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
3204         in target_selvecs.
3205         (sh-*-netbsdelf*): Likewise.
3206         * configure.in (assocvecs): New variable.  Handle assocvecs like
3207         selvecs.
3208         * configure: Regenerate.
3209         * format.c (bfd_check_format_matches): Store bfd_target pointers
3210         in matching_vector instead of target names.  Select first target
3211         from bfd_associated_vector that matches a list of ambiguous targets.
3212         * targets.c (_bfd_associated_vector): New array.
3213         (bfd_associated_vector): New variable.
3214         (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
3215         * libbfd-in.h (bfd_associated_vector): Declare.
3216         * libbfd.h: Regenerate.
3218 2002-11-05  Elias Athanasopoulos  <eathan@otenet.gr>
3220         * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
3221         non-NULL before dereferencing.
3223 2002-11-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3225         * vms.c (vms_object_p): Restore the start address when returning
3226         NULL.
3228 2002-11-04  Alan Modra  <amodra@bigpond.net.au>
3229             Hans-Peter Nilsson  <hp@axis.com>
3231         * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
3232         (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
3233         Set up a larger symshndxbuf, and write it out.  Free it on
3234         exit rather than freeing symbuf twice.  Correct section index
3235         on output section symbol loop.
3236         (elf_link_output_sym): Accumulate symbol extension section
3237         indices, reallocating symshndxbuf rather than writing it out.
3238         (elf_link_flush_output_syms): Don't flush symshndxbuf.
3239         * elf.c (assign_section_numbers): Init i_shdrp to all zero.
3240         Use bfd_zalloc to clear i_shdrp[0] too.
3242 2002-11-03  Stephen Clarke <stephen.clarke@earthling.net>
3244          * elf32-sh64-com.c (sh64_address_in_cranges): Use
3245         _raw_size of cranges section if _cooked_size not yet set.
3247 2002-11-03  Hans-Peter Nilsson  <hp@axis.com>
3249         * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
3250         for bfd_elf32_swap_symbol_out.
3252 2002-10-31  David O'Brien  <obrien@FreeBSD.org>
3254         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
3255         signed and unsigned in comparison.
3257 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
3259         * coffcode.h: Remove extraneous '\'.
3261 2002-10-28  H.J. Lu <hjl@gnu.org>
3263         * Makefile.am (targets.lo): Depend on Makefile instead of
3264         config.status.
3265         (archures.lo): Likewise.
3266         * Makefile.in: Regenerated.
3268 2002-10-25  Jason Thorpe  <thorpej@wasabisystems.com>
3270         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
3271         bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
3272         targ_selvecs.
3274 2002-10-25  Jim Wilson  <wilson@redhat.com>
3276         * elf64-sh64.c (sh_elf64_relocate_section): Call
3277         _bfd_elf_rela_local_sym.  Handle relocs against STT_SECTION symbol
3278         of SHF_MERGE section.
3280 2002-10-25  Hans-Peter Nilsson  <hp@axis.com>
3282         * simple.c: Correct placement of ATTRIBUTE_UNUSED.
3284 2002-10-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3286         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
3287         unsigned int.  Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
3288         unsigned int.
3289         (NAME(aout,final_link)): Cast enum used in assignment.
3290         (aout_link_write_symbols): Cast enums in comparisons, int values to
3291         boolean, enums in assignments to int.
3292         (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3293         (aout_link_input_section_ext): Likewise.  Cast enums used in comparisons
3294         with unsigned ints.
3295         (aout_link_reloc_link_order): Cast enum to int in assignment.
3296         * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
3297         calls to char *.
3298         * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
3299         assignment.
3300         * bfd-in2.h (bfd_set_section_vma): Likewise.
3301         * bfd.c (bfd_record_phdr): Cast enums in assignments.
3302         * binary.c (bfd_alloc): Cast enum to long.
3303         * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
3304         * dwarf2.c (read_abbrevs): Add casts to enum types.
3305         (read_attribute_value): Likewise.
3306         (arange_add): Cast result of bfd_zalloc call.
3307         (comp_unit_contains_address): Return true and false.
3308         (comp_unit_find_nearest_line): Cast return to boolean.
3309         * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
3310         * gen-aout.c: define macro '_' if not defined.
3311         * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
3312         (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
3313         (bfd_write_bigendian_4byte_int): Cast return to boolean.
3314         (bfd_seek): Cast bfd_realloc to bfd_byte *.
3315         (bfd_generic_is_local_label_name): Cast return to boolean.
3316         * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
3317         * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
3318         struct bfd_hash_entry *.
3319         (_bfd_generic_link_hash_newfunc): likewise.
3320         (_bfd_generic_final_link): Cast enum to unsigned int.
3321         * merge.c (sec_merge_emit): Cast return to boolean.
3322         (merge_strings): Add casts to const unsigned char *.
3323         * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
3324         (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3325         * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
3326         struct bfd_hash_entry *.
3327         (bfd_set_section_content): Add cast to PTR in comparison.
3328         * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
3329         simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
3330         simple_dummy_unattached_reloc,
3331         bfd_simple_get_relocated_section_contents): Add K&R declarations and
3332         function definitions.
3333         * srec.c (S3Forced): Initialize to false.
3334         (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
3335         * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
3336         (_bfd_discard_section_stabs): Likewise.  Also cast return to boolean.
3337         * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
3338         (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
3339         comparisons.
3341 2002-10-23  Jakub Jelinek  <jakub@redhat.com>
3343         * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
3344         relocs into shared lib non-allocated reloc sections.
3346 2002-10-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
3348         * dwarf2.c (add_line_info): Ensure that the line_info_table is
3349         sorted even when given an out-of-order line sequence.
3350         (lookup_address_in_line_info_table): When an exact VMA match is
3351         not found, return line information with the closest VMA.
3353 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
3355         * elf64-hppa.c: Force DT_FLAGS to always be set.  Required by
3356         HPUX 11.00 patch PHSS_26559.
3358 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
3360         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
3361         the options section into a separate section unless IRIX 6
3362         compatibility is enabled.
3364 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
3366         * elflink.h (struct elf_link_sort_rela): Turn rel and rela
3367         into arrays.
3368         (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
3369         (elf_link_sort_relocs): Likewise.  Take int_rels_per_ext_rel
3370         into account.
3371         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
3372         R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
3374 2002-10-21  Graeme Peterson  <gp@qnx.com>
3376         * targets.c (_bfd_target_vector): Add missing qnx vectors.
3378 2002-10-21  Alan Modra  <amodra@bigpond.net.au>
3380         * targets.c (bfd_target_list): Don't return the default target twice.
3382 2002-10-21  Elias Athanasopoulos  <eathan@otenet.gr>
3384         * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
3385         perror with bfd_perror.
3387 2002-10-19  H.J. Lu <hjl@gnu.org>
3389         * elflink.h (elf_link_add_object_symbols): Correctly handle
3390         DT_RPATH and DT_RUNPATH.
3392 2002-10-19  Mark Kettenis  <kettenis@gnu.org>
3394         * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
3396 2002-10-17  Denis Chertykov  <denisc@overta.ru>
3398         * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
3399         for ip2k port.
3401 2002-10-17  Alan Modra  <amodra@bigpond.net.au>
3403         * elfxx-target.h (USE_REL): Don't define as 1.
3404         * elf32-arm.h (USE_REL): Provide a default define of 0.
3405         Use #if rather than #ifdef when testing USE_REL.
3406         * elf32-m32r.c: Likewise.
3408         * elf32-arc.c (USE_REL): Define as 1.
3409         * elf32-d10v.c (USE_REL): Likewise.
3410         * elf32-m32r.c (USE_REL): Likewise.
3411         * elf32-m68hc11.c (USE_REL): Likewise.
3412         * elf32-m68hc12.c (USE_REL): Likewise.
3413         * elf32-or32.c (USE_REL): Likewise.
3414         * elfarm-nabi.c (USE_REL): Likewise.
3416 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
3418         * config.bfd (s390-*-linux*): Add targ64_selvecs.
3419         (s390x-*-linux*): Add targ_selvecs.
3421 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
3423         * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
3424         elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
3425         elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
3426         elf32-sh64-nbsd.lo, elf32-shqnx.lo.  Add elf32-qnx.lo.
3427         (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
3428         (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
3429         (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
3430         (SOURCE_HFILES): Add elf32-qnx.h.
3431         (BUILD_HFILES): Add bfdver.h.
3432         Run "make dep-am".
3433         * Makefile.in: Regenerate.
3434         * configure.in Update bfd vector dependencies.
3435         * configure: Regenerate.
3436         * elf32-i386-fbsd.c: Delete.  Move code to elf32-i386.c.
3437         * elf32-i386qnx.c: Likewise.
3438         * elf32-ppcqnx.c: Delete.  Move code to elf32-ppc.c.
3439         * elf32-sh-nbsd.c: Delete.  Move code to elf32-sh.c.
3440         * elf32-sh-lin.c: Likewise.
3441         * elf32-shqnx.c: Likewise.
3442         * elf32-sh64-lin.c: Delete.  Move code to elf32-sh64.c.
3443         * elf32-sh64-nbsd.c: Likewise.
3444         * elf64-sh64-lin.c: Delete.  Move code to elf64-sh64.c.
3445         * elf64-sh64-nbsd.c: Likewise.
3446         * elfarmqnx-nabi.c: Delete.  Move code to elfarm-nabi.c.
3447         * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
3448         * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
3449         * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
3450         * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
3451         (elf_backend_is_contained_by_filepos): Likewise.
3452         (elf_backend_copy_private_bfd_data_p): Likewise.
3453         Globalize and move functions to..
3454         * elf32-qnx.c: ..here.  New file.
3455         * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests.  Don't
3456         emit target vectors when INCLUDE_SHMEDIA.
3457         * elf32-sh64.c: Remove ELF_ARCH test.  Move TARGET_* etc. defines to
3458         end of file.
3459         * elf64-sh64.c: Remove ELF_ARCH test.
3460         * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
3461         * po/BLD-POTFILES.in: Regenerate.
3462         * po/SRC-POTFILES.in: Regenerate.
3464 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
3466         * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
3467         loaded with --just-symbols.
3469         * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
3470         * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3471         * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3472         * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3474 2002-10-15  Richard Henderson  <rth@redhat.com>
3476         * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
3477         (BFD64_BACKENDS_CFILES): Likewise.
3478         * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
3479         * elf64-alpha-fbsd.c: Remove file, move code ...
3480         * elf64-alpha.c: ... here.
3481         * Makefile.in, configure: Rebuild.
3483 2002-10-14  Richard Henderson  <rth@redhat.com>
3485         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
3486         VALUE, not ADDEND.
3488 2002-10-14  Stephen Clarke <stephen.clarke@superh.com>
3490         * elf32-sh.c (elf_sh_link_hash_entry): Replace
3491         datalabel_got_offset with union of datalabel_got
3492         offset and refcount.
3493         (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
3494         (allocate_dynrelocs): Delete unnecessary code for
3495         STT_DATALABEL type.  Create entry in got for
3496         datalabel version of symbol if datalabel_got.refcount > 0.
3497         (sh_elf_relocate_section): Use datalabel_got union.
3498         (sh_elf_gc_sweep_hook): Pull common code to initialize
3499         h and eh out of switch statement.  Declare seen_stt_datalabel.
3500         Initialize it.  Decrement datalabel_got.refcount for
3501         got relocs when seen_stt_datalabel is true.
3502         Decrement local_got_refcounts entry for datalabel got relocs
3503         of local symbols.
3504         (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
3505         (sh_elf_check_relocs): Declare seen_stt_datalabel.
3506         Initialize it.  When seen_stt_datalabel is true, increment
3507         datalabel_got refcount rather than got.refcount.
3508         (sh_elf_finish_dynamic_symbol): Create relocs to
3509         initialize got entry for datalabel version of symbol.
3511 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
3513         * Makefile.am: Run "make dep-am".
3514         (BFD_H_FILES): Remove version.h.
3515         * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
3516         * version.h: ..to here.
3517         * configure.in (bfd_version_date): Remove.
3518         (AC_OUTPUT): Make bfdver.h from version.h.
3519         * bfd.c: #include "bfdver.h".
3520         * vms-hdr.c: Likewise.
3521         * Makefile.in: Regenerate.
3522         * bfd-in2.h: Regenerate.
3523         * configure: Regenerate.
3524         * po/SRC-POTFILES.in: Regenerate.
3526 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
3528         * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
3529         bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
3530         bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
3531         bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
3532         bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
3533         bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
3534         bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
3535         bfd_mach_ip2022, bfd_mach_ip2022ext,
3536         bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
3537         * bfd-in2.h: Regenerate.
3539 2002-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3541         * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
3542         endian vector to targ_selvecs.
3544 2002-10-13  Alexandre Oliva  <aoliva@redhat.com>
3546         * elfxx-mips.c (mips_elf_calculate_relocation): Take
3547         save_addend argument.  Don't apply the 32-bit mask to a
3548         GPREL32 value if it's to be used in another relocation.  Don't
3549         use forced-check computation of local_p to decide whether to
3550         add gp0 to GPREL16 value.  Don't use only the lowest 16 bits
3551         of the addend of a non-in-place GPREL16 relocation.
3552         (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
3553         mips_elf_calculate_relocation().
3555 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
3557         * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
3558         with symbols in other sections if we relaxed something;  the sections
3559         output offsets must be re-computed before.
3561 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
3563         * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
3564         handling to use Elf_Internal_Sym.
3565         (m68hc11_elf_relax_delete_bytes): Likewise.
3567 2002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3569         * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
3570         sh_elf_object_p, dtpoff_base): New functions.
3571         (sh_elf_howto_table): Add TLS relocs.
3572         (sh_reloc_map): Likewise.
3573         (sh_elf_info_to_howto): Support TLS relocs.
3574         (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
3575         (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
3576         New macros.
3577         (sh_elf_obj_tdata): New.
3578         (elf_sh_link_hash_table): Add tls_ldm_got.
3579         (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
3580         (allocate_dynrelocs): Support TLS relocs.
3581         (sh_elf_size_dynamic_sections): Likewise.
3582         (sh_elf_relocate_section): Support TLS relocs.  Don't try to find
3583         .rela.got section when found already.  Return false after printing
3584         error about unresolvable relocation.
3585         (sh_elf_gc_sweep_hook): Support TLS relocs.
3586         (sh_elf_check_relocs): Likewise.
3587         (sh_elf_finish_dynamic_symbol): Likewise.
3588         (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
3589         * reloc.c: Add SH TLS relocs.
3590         * bfd-in2.h, libbfd.h: Regenerate.
3592 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
3594         * Makefile.in: Regenerated.
3596 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
3598         * Makefile.am: Run dep-am.
3599         (BFD_H_DEP): Add simple.c and linker.c.
3600         (BFD32_LIBS): Add simple.lo.
3601         (BFD32_LIBS_CFILES): Add simple.c.
3602         * Makefile.in: Regenerated.
3603         * bfd-in2.h: Regenerated.
3604         * simple.c: New file.
3606 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
3608         * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
3609         (record_thumb_to_arm_glue): Likewise.
3610         * ecoff.c (ecoff_link_add_externals): Likewise.
3611         * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
3612         (record_thumb_to_arm_glue): Likewise.
3613         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
3614         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
3615         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3616         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
3617         * elf64-ppc.c (func_desc_adjust): Likewise.
3618         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3619         (sh64_elf64_create_dynamic_sections): Likewise.
3620         * elflink.c (_bfd_elf_create_got_section): Likewise.
3621         (_bfd_elf_create_dynamic_sections): Likewise.
3622         (_bfd_elf_create_linker_section): Likewise.
3623         * elflink.h (elf_add_default_symbol): Likewise.
3624         (elf_link_create_dynamic_sections): Likewise.
3625         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3626         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
3627         * elfxx-mips.c (mips_elf_create_got_section): Likewise.
3628         (_bfd_mips_elf_add_symbol_hook): Likewise.
3629         (_bfd_mips_elf_create_dynamic_sections): Likewise.
3630         * linker.c (generic_link_add_symbol_list): Likewise.
3631         * xcofflink.c (xcoff_link_add_symbols): Likewise.
3633         * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
3635         * elf64-ppc.c (edit_opd): Only zero opd syms when function is
3636         completely removed.  Correct local sym adjustment.
3638 2002-10-10  Stephen Clarke <stephen.clarke@superh.com>
3640         * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3641         Correct mistake in calculation of address of .got.
3642         * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
3643         elf_sh64_pic_plt_entry_le): Likewise.
3645 2002-10-09  Richard Shann <richard.shann@superh.com>
3646             Stephen Clarke <stephen.clarke@superh.com>
3648         * Makefile.am: Add entries for elf32-sh64-lin.c and
3649         elf64-sh64-lin.c. Regenerate.
3650         * Makefile.in: Regenerate.
3651         * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
3652         to use sh64 vectors rather than sh vectors.
3653         * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
3654         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3655         * configure: Regenerate.
3656         * elf32-sh64-lin.c: New file.
3657         * elf64-sh64-lin.c: New file.
3658         * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
3659         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3661 2002-10-08  H.J. Lu <hjl@gnu.org>
3663         * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
3664         IE->LE transition for R_386_TLS_IE.
3666 2002-10-08  Alan Modra  <amodra@bigpond.net.au>
3668         * elf64-ppc.c (edit_opd): Correct test for discarded sections.
3670 2002-10-07  Mark Elbrecht  <snowball3@softhome.net>
3672         * cofflink.c (mark_relocs): Don't mark relocations in excluded
3673         sections.
3675 2002-10-07  Alan Modra  <amodra@bigpond.net.au>
3677         * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
3678         code.
3680         * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
3682 2002-10-06  Alan Modra  <amodra@bigpond.net.au>
3684         * opncls.c: Formatting.
3685         (_bfd_new_bfd): Use a smaller section hash table.
3687 2002-10-05  Alexandre Oliva  <aoliva@redhat.com>
3689         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
3690         of the other two relocations packed with a REL32 to NONE.
3692 2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
3694         * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
3695         (sh_elf_link_hash_newfunc): Initialize it.
3696         (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
3697         to got.refcount for symbols that are forced local or when
3698         we have direct got refs.
3699         (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
3700         to correctly adjust got.refcount and plt.refcount.
3701         (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
3702         (sh_elf_check_relocs): Increment gotplt_refcount.
3704 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
3706         * elf32-i386.c (elf_i386_relocate_section): Fix
3707         movl foo@indntpoff, %eax IE->LE transition.
3709 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
3711         * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
3712         sequence and its transitions.
3714 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
3716         * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
3717         to st_value + addend in non-code sections.
3718         * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
3719         R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
3721 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
3722             Ken Raeburn  <raeburn@cygnus.com>
3723             Aldy Hernandez  <aldyh@redhat.com>
3724             Eric Christopher  <echristo@redhat.com>
3725             Richard Sandiford  <rsandifo@redhat.com>
3727         * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
3728         (bfd_mach_mips5500): New.
3729         * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
3730         (arch_info_struct): Add corresponding entries here.
3731         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
3732         E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
3733         (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
3734         bfd_mach_mips5400 and bfd_mach_mips5500.
3735         (_bfd_mips_elf_mach_extends_p): New function.
3736         (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
3737         the EF_MIPS_MACH flags.
3738         * bfd-in2.h: Regenerate.
3740 2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
3742         * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
3743         .got sections.
3745 2002-09-28  Alan Modra  <amodra@bigpond.net.au>
3747         * elf.c (map_sections_to_segments): Correct test for start of
3748         writable section in the same page as end of read-only section.
3750 2002-09-27  Matt Thomas  <matt@3am-software.com>
3752         * elf32-vax.c (elf_vax_check_relocs): Remove unused
3753         local_got_refcounts usage.  Remove allocation of got slot.
3754         (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
3755         Remove de-allocation of got slot.
3756         (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
3757         traversal for elf_vax_instantiate_got_entries.  Allow empty .got
3758         sections to be GC'ed.
3759         (elf_vax_instantiate_got_entries): New function.
3760         (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
3761         tests that are now handled by elf_vax_instantiate_got_entries.
3762         Assert GOT entry falls within .got section size.  Remove redundant
3763         comparisions.  Fix comments.
3765 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
3767         * reloc.c: Add x86-64 TLS relocs.
3768         * bfd-in2.h, libbfd.h: Rebuilt.
3769         * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
3770         relocs.  Add TLS relocs.
3771         (x86_64_reloc_map): Add TLS relocs.
3772         (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
3773         (struct elf64_x86_64_link_hash_entry): Add tls_type field.
3774         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
3775         (elf64_x86_64_hash_entry): Define.
3776         (struct elf64_x86_64_obj_tdata): New.
3777         (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
3778         (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
3779         (link_hash_newfunc): Initialize tls_type.
3780         (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
3781         (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
3782         (elf64_x86_64_mkobject): New.
3783         (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
3784         (elf64_x86_64_tls_transition): New.
3785         (elf64_x86_64_check_relocs): Add r_type variable and use it.
3786         Handle TLS relocs.
3787         (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
3788         (allocate_dynrelocs): Allocate GOT space for TLS relocs.
3789         (elf64_x86_64_size_dynamic_sections): Likewise.
3790         (dtpoff_base, tpoff): New.
3791         (elf64_x86_64_relocate_section): Handle TLS relocs.
3792         (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
3793         entries.
3794         (bfd_elf64_mkobject): Define.
3796         * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
3797         DF_STATIC_TLS if shared.
3799 2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3801         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
3802         empty relocation sections.
3804 2002-09-26  Alan Modra  <amodra@bigpond.net.au>
3806         * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
3807         (ppc64_elf_build_stubs): Build them here instead.
3809 2002-09-24  Jakub Jelinek  <jakub@redhat.com>
3811         * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
3812         addend into r_addend, not *r_offset.
3813         (elf32_sparc_finish_dynamic_symbol): Likewise.
3814         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
3815         R_SPARC_RELATIVE's r_offset.
3817 2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
3819         * dwarf2.c (decode_line_info): Update to correctly decode
3820         the (non-standard DWARF2) out-of-order address sequences
3821         generated by the Intel C++ 6.0 compiler for ia64-Linux.
3823 2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
3825         * config.bfd: For DJGPP targets, match with any cpu and any machine.
3827 2002-09-23  Alan Modra  <amodra@bigpond.net.au>
3829         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
3830         for discarded FDEs.  Remove redundant assignment.
3831         * elflink.h (elf_bfd_discard_info): Save edited relocs.
3833 2002-09-22  H.J. Lu <hjl@gnu.org>
3835         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
3836         the relocation count between different .reloc sections.
3838 2002-09-21  Alan Modra  <amodra@bigpond.net.au>
3840         * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
3841         ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
3842         R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
3843         R_PPC_EMB_RELSDA.
3845         * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
3846         unsigned.  Move "symcount" assignment out of loop.
3847         * Makefile.am: Run "make dep-am".
3848         * Makefile.in: Regenerate.
3849         * configure: Regenerate.
3850         * po/SRC-POTFILES.in: Regnerate.
3852 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
3854         * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
3855         zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
3856         (e.g. IRIX64).
3858 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
3860         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
3861         even if generating R_PPC_RELATIVE reloc.
3862         (ppc_elf_relocate_section): Make sure relocation is performed
3863         if skip == -2.  Clear memory at r_offset when creating dynamic
3864         relocation.
3866 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
3868         * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
3869         BFD_RELOC_386_TLS_GOTIE): Add.
3870         * bfd-in2.h, libbfd.h: Rebuilt.
3871         * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
3872         and R_386_TLS_GOTIE.
3873         (elf_i386_reloc_type_lookup): Handle it.
3874         (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
3875         char instead of enum, change GOT_* into defines.
3876         (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
3877         (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3878         (elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
3879         accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
3880         R_386_PLT32 cases so that R_386_TLS_IE can fall through.
3881         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3882         (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3883         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3884         (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
3885         tls_type is GOT_TLS_IE_BOTH.
3886         (elf_i386_size_dynamic_sections): Likewise.
3887         (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3888         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3889         (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
3890         all 4 GOT_TLS_* TLS types.
3892 2002-09-19  Nick Clifton  <nickc@redhat.com>
3894         * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
3895         follow indirect links.
3897 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
3899         * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
3900         correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
3901         on 64 bit machines.
3902         (ecoff_swap_sym_in) <iss>: Likewise.
3903         * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
3904         ECOFF information: 'ioptMax' refers to the actual *size*
3905         of the optimization symtab, not the number of entries.
3907 2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
3909         * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
3910         ELF_LINK_HASH_NEEDS_PLT logic.
3912 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
3914         * elfcode.h (elf_slurp_reloc_table_from_section): Check
3915         correct relocation count.
3917 2002-09-17  Daniel Jacobowitz  <drow@mvista.com>
3919         * bfd-in.h (bfd_get_dynamic_symcount): Define.
3920         * bfd.c (struct _bfd): Add dynsymcount.
3921         * bfd-in2.h: Regenerated.
3922         * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
3923         abfd->dynsymcount.
3924         * elfcode.h (elf_slurp_reloc_table_from_section): Check
3925         for overflow.
3927 2002-09-17  Stan Cox <scox@redhat.com>
3929         * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
3930         (mips_elf64_final_gp): Don't make up gp value.
3931         * elfn32-mips.c (mips_elf_final_gp): Likewise.
3932         * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
3933         .MIPS.options/.options section.
3935 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
3937         * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
3938         It is benign for FreeBSD < 4.1.  Minor reformatting.
3939         * elf64-alpha-fbsd.c: Likewise.
3941 2002-09-17  Jakub Jelinek  <jakub@redhat.com>
3943         * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
3944         addend.
3946 2002-09-17  Alan Modra  <amodra@bigpond.net.au>
3948         * elf64-alpha.c (alpha_elf_size_info): Make static.
3950 2002-09-17  Svein E. Seldal  <Svein.Seldal@solidas.com>
3952         * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
3953         * cpu-tic4x.c: Ditto.
3955 2002-09-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3957         * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
3958         duplicate define.
3960 2002-09-16  Bruno Haible  <bruno@clisp.org>
3962         * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
3963         by a target variant implementation.
3964         * elf64-alpha.c: Likewise.
3965         * elf32-i386-fbsd.c: New file.
3966         * elf64-alpha-fbsd.c: New file.
3967         * targets.c: Support bfd_elf32_i386_freebsd_vec and
3968         bfd_elf64_alpha_freebsd_vec.
3969         * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
3970         bfd_elf64_alpha_freebsd_vec.
3971         * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
3972         (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
3973         (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
3974         (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
3975         (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
3976         * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
3977         specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
3979 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
3981         * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
3982         NULL.
3983         (elf_i386_relocate_section): Return false after printing error about
3984         unresolvable relocation.
3986 2002-09-12  Nick Clifton  <nickc@redhat.com>
3988         * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
3989         R_ARM_THM_PC11.
3991 2002-09-11  Jeffrey Law  <law@redhat.com>
3993         * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
3995 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
3997         * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
3998         line_ptr before deciding we've found a symbol.
4000 2002-09-11  Nick Clifton  <nickc@redhat.com>
4002         * po/da.po: New Danish translation file.
4003         * configure.in (LINGUAS): Add 'da'.
4004         * configure: Regenerate.
4006 2002-09-10  Michael Snyder  <msnyder@redhat.com>
4008         * irix-core.c (do_sections, do_sections64): New functions.
4009         (irix_core_core_file_p): Call new functions do_sections,
4010         do_sections64, depending on corefile (32-bit or 64-bit).
4012 2002-09-09  Richard Henderson  <rth@redhat.com>
4014         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
4015         and PCREL21F like PCREL21B.
4017 2002-09-04  Kevin Buettner  <kevinb@redhat.com>
4019         * config.bfd (mips*-*-irix6*): Add new ABI vectors.  Make n32 default
4020         vector.
4022 2002-09-02  Nick Clifton  <nickc@redhat.com>
4024         * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
4025         names instead of cryptically overloaded bfd_reloc error
4026         codes.
4027         (v850_elf_relocate_section): Likewise.
4028         (v850_elf_relax_section): Replace caching of external symbols
4029         with caching of internal symbols obtained from calling
4030         bfd_elf_get_elf_syms().
4031         Fixup problems with freeing cached allocated memory blocks.
4033 2002-09-02  Alan Modra  <amodra@bigpond.net.au>
4035         * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
4036         (bfd_pj_arch): Use bfd_default_scan.
4037         * cpu-v850.c (scan): Remove.
4038         (N): Use bfd_default_scan.
4039         * cpu-z8k.c (scan_mach): Remove.
4040         (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
4041         first.  Use bfd_default_scan.
4043         * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
4044         bfd_mach constants.
4045         (ecoff_get_magic): Likewise.
4046         * elf32-v850.c (v850_elf_object_p): Likewise.
4047         (v850_elf_final_write_processing): Likewise.
4048         * mipsbsd.c (MY(set_arch_mach)): Likewise.
4049         (MY(write_object_contents)): Likewise.
4050         * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
4051         * coffcode.h (coff_write_object_contents): Likewise.
4052         (coff_set_arch_mach_hook): Add comment describing machine == 0.
4053         Remove unnecessary "machine" assignments.
4054         (coff_write_relocs): Test for the absolute section sym by testing
4055         section and flags.
4057         * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
4058         and bfd_mach_i386_i386_intel_syntax.
4059         * pdp11.c (NAME(aout,machine_type)): Likewise.
4061 2002-08-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4063         * bfd-in.h (align_power): Cast constants to bfd_vma type.
4064         * bfd-in2.h (align_power): Likewise.
4066 2002-08-30  Alan Modra  <amodra@bigpond.net.au>
4068         * Makefile.am: Run "make dep-am".
4069         * Makefile.in: Regenerate.
4071         * cpu-avr.c (compatible): Don't use hard-coded mach constants.
4072         * cpu-powerpc.c (powerpc_compatible): Likewise.
4073         * cpu-rs6000.c (rs6000_compatible): Likewise.
4075 2002-08-28  Catherine Moore  <clm@redhat.com>
4077         * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
4078         (v850-elf-reloc): Don't resolve pc relative relocs.
4079         (v850_elf_ignore_reloc): New routine.
4080         (v850_elf_final_link_relocate): Handle new relocs.
4081         (v850_elf_relax_delete_bytes ): New routine.
4082         (v850_elf_relax_section): New routine.
4083         (bfd_elf32_bfd_relax_section): Define.
4084         (HOWTO): New entries for new relocs.
4085         * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
4086         (BFD_RELOC_V850_LONGJUMP): New reloc.
4087         (BFD_RELOC_V850_ALIGN): New reloc.
4088         * archures.c: Remove redundant v850ea architecture.
4089         * cpu-v850.c: Remove redundant v850ea support.
4090         * libbfd.h: Regenerate.
4091         * bfd-in2.h: Regenerated.
4093 2002-08-28  Svein E. Seldal  <Svein.Seldal@solidas.com>
4095         * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
4096         * configure.in: Add tic4x_coff vector files.
4097         * configure: Regenerate.
4098         * Makefile.am: Add tic4x target.
4099         * Makefile.in: Regenerate.
4101 2002-08-27  Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4103         * archures.c: Add the BFD arch type tic4x.
4104         * bfd-in.h: Add BFD_IN_MEMORY flag.
4105         * coff-tic4x.c: New file.
4106         * coffswap.h (coff_swap_sym_out): Add preadjuster.
4107         * cpu-tic4x.c: New file.
4108         * targets.c: Added tic4x- in list of xvecs.
4109         * ticoff.h: New file.
4110         * bfd-in2.h: Regenerate.
4112 2002-08-27  Adam Nemet  <anemet@lnxw.com>
4114         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
4115         bit of DT_INIT and DT_FINI for Thumb functions.
4117 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
4119         * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
4121 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
4123         * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
4125 2002-08-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4127         * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
4128         (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
4129         Likewise.
4130         (struct elf_sh_pcrel_relocs_copied): Removed.
4131         (struct elf_sh_dyn_relocs): New.
4132         (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
4133         field with dyn_relocs.
4134         (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
4135         sections and sym_sec.
4136         (sh_elf_link_hash_newfunc): Clear dyn_relocs.
4137         (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
4138         (sh_elf_create_dynamic_sections): Use create_got_section instead
4139         of _bfd_elf_create_got_section.
4140         (sh_elf_check_relocs): Likewise.
4141         (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
4142         sections.
4143         (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
4144         sh_elf_relocate_section, sh_elf_check_relocs,
4145         sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
4146         Likewise.
4147         (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
4148         dynamic relocations and avoiding the copy relocation when we
4149         didn't find any dynamic relocations in the section which has
4150         contents or is read-only.
4151         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4152         (sh_elf_size_dynamic_sections): Don't reset the size of
4153         .rela.got section even if dynamic_sections_created flag is off.
4154         Don't use sh_elf_discard_copies. Scan all input bfd and use
4155         allocate_dynrelocs. Call readonly_dynrelocs to determine
4156         whether we need DT_TEXTREL.
4157         (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
4158         whether the symbol was never referred to.
4159         (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
4160         (sh_elf_gc_sweep_hook): Fill with the real sweep function.
4161         (sh_elf_check_relocs): Call create_got_section if the short-cut
4162         to .got is null. Increment reference counters only instead of
4163         allocating space on dynamic sections here. Don't conditionalize
4164         uninitialized got.offset value when marking the symbol as a
4165         global offset table entry. Keep relocations for symbols satisfied
4166         by a dynamic library to avoid copy relocations for the symbol.
4167         Set dynobj field of an elf hash table if needed.
4168         (sh_elf_finish_dynamic_sections): Handle null section pointer
4169         correctly.
4170         (elf_backend_copy_indirect_symbol): Defined.
4171         (elf_backend_can_refcount): Defined.
4173 2002-08-23  Nick Clifton  <nickc@redhat.com>
4175         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
4176         previous change.  Add comment explaining why.
4178 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
4180         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
4181         contents of .got.plt[2] to tr0, not address of .got.plt.
4182         (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
4183         patching absolute plt entry. For shmedia plt entry, set bottom bit
4184         of branch to plt0 as this is a branch to an shmedia instruction.
4185         * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
4186         Copy contents of .got.plt[2] to tr0, not address of .got.plt.
4187         (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
4188         branch to plt0.
4189         (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
4190         patching absolute plt entry. For shmedia plt entry, branch to
4191         plt0 is now ptrel, so use relative offset.  Set bottom bit of
4192         branch target as it is a branch to an shmedia instruction.
4194 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
4195             Richard Shann <richard.shann@superh.com>
4197         * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
4198         value if .init is an SHmedia function.  Similarly for DT_FINI.
4199         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
4201 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
4203         * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
4204         dynamic section.
4205         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
4207 2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
4209         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
4210         byte read when reading the return address register column.
4212 2002-08-22  Nick Clifton  <nickc@redhat.com>
4214         * config.bfd: Add powepc64-*-*bsd* target.
4216 2002-08-22  Graeme Peterson  <gp@qnx.com>
4218         * Makefile.am: Add entries for elf32-shqnx.c
4219         * Makefile.in: Regenerate.
4220         * config.bfd: Add support sh-*-nto* target.
4221         * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
4222         * configure: Regenerate.
4223         * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
4224         * elf32-sh.c: Do not include elf32-target.h if
4225         ELF32_SH_C_INCLUDED is defined.
4226         * elf32-shqnx.c: New file: Support for QNX.
4227         * targets.c: Add bfd_elf32_sh{l}qnx_vec.
4229 2002-08-22  Nick Clifton  <nickc@redhat.com>
4231         * po/tr.po: Updated Turkish translation.
4233         * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
4234         symbols are not read.
4236 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
4238         * elf32-m68hc11.c: Formatting fixes.
4239         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
4240         * elf32-m68hc12.c: Formatting fixes.
4241         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
4243 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
4245         * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
4246         SEC_DATA.
4247         (pmac_xcoff_vec): Likewise.
4248         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4249         (aix5coff64_vec): Likewise.
4251 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
4253         * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
4254         param to elf_backend_copy_indirect_symbol.
4255         (_bfd_elf_link_hash_copy_indirect): Likewise.
4256         * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
4257         calls to copy_indirect_symbol.
4258         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
4259         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
4260         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4261         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
4262         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4263         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
4264         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
4265         * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4266         * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4267         * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
4268         test refcounts for "used" values.
4270 2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4272         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
4273         argument declaration.
4275 2002-08-19  Elena Zannoni <ezannoni@redhat.com>
4277         * archures.c (bfd_mach_ppc_e500): Added.
4278         * bfd-in2.h: Rebuilt.
4279         * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
4281 2002-08-19  Alan Modra  <amodra@bigpond.net.au>
4283         * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
4285 2002-08-17  Andrew Cagney  <ac131313@redhat.com>
4287         * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
4288         `bfd_byte'.
4290 2002-08-17  Stan Cox  <scox@redhat.com>
4292         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
4293         IRIX 6 segment layout for NEWABI.
4295 2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
4297         * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4298         symbols when looking for section referred to by a relocation.
4299         * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
4301 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
4303         * elf32-i370.c: Move reloc enum to include/elf/i370.h.
4305 2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
4307         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
4308         missing check for whether the symbol is referenced by DSO before
4309         unexporting it as an unneeded dynamic symbol.
4311 2002-08-14  H.J. Lu <hjl@gnu.org>
4313         * libbfd.h: Regenerate.
4315 2002-08-14  H.J. Lu <hjl@gnu.org>
4317         * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
4319 2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
4321         * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
4322         instructions.
4323         (m68hc11_direct_relax): New to define table of relaxable instructions.
4324         (find_relaxable_insn): New, find a relaxable insn.
4325         (compare_reloc): New to compare two relocs.
4326         (m68hc11_elf_relax_section): New, relax text sections.
4327         (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
4328         (elf32_m68hc11_check_relocs): New function for GC support.
4329         (elf32_m68hc11_relocate_section): New function for GC support.
4330         (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
4331         (elf_backend_check_relocs): Likewise.
4332         (elf_backend_relocate_section): Likewise.
4334 2002-08-13  H.J. Lu <hjl@gnu.org>
4336         * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
4337         definitions in shared objects when checking symbol with
4338         undefined version.
4340 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4342         * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
4343         (elf32_m68hc11_gc_sweep_hook): Likewise.
4344         (elf_backend_gc_mark_hook): Define for GC section support.
4345         (elf_backend_gc_sweep_hook): Likewise.
4346         (elf_backend_can_gc_sections): Likewise.
4348         * elf32-m68hc12.c: Likewise.
4350 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4352         * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
4353         (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
4354         (_bfd_m68hc11_elf_set_private_flags): New function.
4355         Use them to set/check/print ELF flags specific to 68HC11.
4357         * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
4358         (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
4359         (_bfd_m68hc12_elf_set_private_flags): New function.
4360         Use them to set/check/print ELF flags specific to 68HC12.
4362 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4364         * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
4365         fix masks for PC-rel relocs.
4366         (m68hc11_elf_ignore_reloc): New function.
4368         * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
4369         68HC12 banked addressing relocs.
4370         (m68hc12_phys_addr): New to compute physical address of banked memory.
4371         (m68hc12_phys_page): Likewise for page.
4372         (m68hc12_addr_is_banked): New to see if address is in banked area.
4373         (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
4375 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
4377         * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
4378         BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
4379         BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
4380         * bfd-in2.h: Regenerate.
4382 2002-08-12  H.J. Lu <hjl@gnu.org>
4384         * elflink.h (elf_add_default_symbol): Preserve section across
4385         elf_merge_symbol.
4387 2002-08-09  Graeme Peterson  <gp@qnx.com>
4389         * Makefile.am: Add entries for elf32-ppcqnx.c, and add
4390         elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
4391         * Makefile.in: Regenerate.
4392         * config.bfd: Add support for powerpc{le}-*-nto targets.
4393         * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
4394         * configure: Regenerate.
4395         * elf32-i386qnx.c: Moved backend functions into a QNX specific
4396         common file "elf32-qnx.h", and now include that file.
4397         * elf32-qnx.h: New file: QNX specific common elf backend.
4398         * elf32-ppc.c: Do not include elf32-target.h if
4399         ELF32_PPC_C_INCLUDED is defined.
4400         * elf32-ppcqnx.c: New file: Support for QNX.
4401         * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
4402         * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
4404 2002-08-09  Nick Clifton  <nickc@redhat.com>
4406         * po/sv.po: Updated Swedish translation.
4408 2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4410         * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
4411         g->global_gotsym is NULL.
4413 2002-08-08  H.J. Lu <hjl@gnu.org>
4415         * elflink.h (elf_add_default_symbol): Don't warn if a definition
4416         overrides an indirect versioned symbol.
4418 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
4420         * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
4421         for R_386_TLS_TPOFF32 relocs against symndx 0.
4423 2002-08-07  H.J. Lu <hjl@gnu.org>
4425         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
4426         with undefined version if needed.
4427         (elf_link_assign_sym_version): Match a default symbol with a
4428         version without definition. No need to hide the default
4429         definition separately.
4431 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
4433         * elflink.h (elf_link_output_extsym): Don't output symbols from
4434         SEC_EXCLUDE sections.
4436         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
4438 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
4440         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
4441         entries.
4443 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4445         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
4446         mismatch.
4448 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4450         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
4452 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4454         * elf32-mips.c (mips_reloc_map): Fix typo.
4456 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
4458         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
4460 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
4462         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
4464 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
4466         * libxcoff.h: Use PARAMS on function declarations.
4467         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
4468         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4470         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
4471         addend.
4472         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
4474 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
4476         * coff-rs6000.c: Formatting fixes.
4477         (xcoff_calculate_relocation): Use PARAMS in declaration.
4478         (xcoff_complain_overflow): Likewise.
4479         (xcoff_ppc_relocate_section): Use old-style function pointer call.
4480         (bfd_xcoff_backend_data): Remove useless comments.
4481         (rs6000coff_vec): Likewise.
4482         (bfd_pmac_xcoff_backend_data): Likewise.
4483         (pmac_xcoff_vec): Likewise.
4485         * coff64-rs6000.c: Formatting fixes.
4486         (xcoff64_calculate_relocation): Use PARAMS in declaration.
4487         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
4488         (bfd_xcoff_backend_data): Remove useless comments.
4489         (rs6000coff64_vec): Likewise.
4490         (bfd_xcoff_aix5_backend_data): Likewise.
4491         (aix5coff64_vec): Likewise.
4493 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
4495         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
4496         mask entries.  Use complain_overflow_dont for R_REF.
4497         (xcoff_reloc_type_ba): Revert last change.
4498         (xcoff_reloc_type_br): Likewise.
4499         (xcoff_reloc_type_crel): Likewise.
4500         (xcoff_ppc_relocate_section): Likewise.
4501         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
4502         (xcoff64_ppc_relocate_section): Likewise.
4503         (xcoff64_howto_table): Revert some of last change to mask entries.
4504         Use complain_overflow_dont for R_REF.
4506         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
4507         relocs with bitsize == 16 have size = 1.
4508         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
4509         (xcoff_reloc_type_br): Likewise.
4510         (xcoff_reloc_type_crel): Likewise.
4511         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4512         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
4513         dst_mask adjustment.
4514         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4515         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
4516         bitsize == 16 have size = 1.
4518 2002-08-01  Denis Chertykov  <denisc@overta.ru>
4520         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
4521         (struct misc): New field isymbuf. All free_* fields removed.
4522         (symbol_value): Pass in internal syms. No need to swap syms in.
4523         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
4524         possibly cached info.
4525         (tidyup_after_error): Removed.
4526         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
4527         misc. Use new field.
4528         (adjust_all_relocations): Use internal syms. No need to swap syms
4529         in and out.
4530         (add_page_insn): Don't use removed fields of struct misc.
4532 2002-08-01  Nick Clifton  <nickc@redhat.com>
4534         * elf32-arm.h: Revert previous delta.
4536 2002-08-01  Nick Clifton  <nickc@redhat.com>
4538         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
4539         * configure: Regenerate.
4541 2002-07-31  H.J. Lu <hjl@gnu.org>
4543         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
4544         selected.
4546 2002-07-31  H.J. Lu <hjl@gnu.org>
4548         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
4549         is selected.
4551 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
4553         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
4554         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
4556 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
4558         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
4559         There is no 8 byte relocation type for this architecture.
4560         (do_ns32k_reloc): Use bfd_vma instead of native types.
4561         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
4562         returns void.
4563         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
4564         rely on generic code to do that.
4565         * aout-ns32k.c (howto_table): Add appropriate overflow detection
4566         to all table entries.
4567         (_bfd_ns32k_relocate_contents): put_data returns void.
4568         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
4569         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
4570         return void.
4572 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
4574         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
4575         archive object is target dependant.
4577 2002-07-31  Adam Nemet  <anemet@lnxw.com>
4579         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
4580         (THUMB_PLT_ENTRY_SIZE): New macro.
4581         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
4582         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
4583         ARM_PLT_ENTRY_SIZE.
4584         (elf32_arm_plt_entry): Likewise.
4585         (elf_backend_plt_header_size): Likewise.
4586         (elf32_thumb_plt0_entry): New global.
4587         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
4588         into .plt.thumb.
4589         (elf32_thumb_plt_entry): New global.
4590         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
4591         Thumb entries.  Set the bottom bit of the corresponding GOT entry
4592         for a Thumb PLT entry.
4593         (struct elf32_arm_plt_entry_info): New structure.
4594         (struct elf32_arm_link_hash_entry, plt_info): New member of this
4595         type.
4596         (elf32_arm_link_hash_newfunc): Initialize new member.
4597         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
4598         relocations against the PLT.
4599         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
4600         first_rel_type if this is the first time we encounter the symbol.
4601         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
4602         Determine if relocation needs a PLT entry.  Set first_rel_type if
4603         this is the first time we encounter the symbol
4604         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
4605         functions as well.
4606         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
4607         (elf32_arm_create_dynamic_sections): New function.  Create the
4608         .plt.thumb section.
4609         (elf_backend_create_dynamic_sections): Call it.
4611 2002-07-31  Nick Clifton  <nickc@redhat.com>
4613         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
4614         'alternative' in order to avoid shadowing global symbol of the
4615         same name.
4616         * bfd-in2.h: Regenerate.
4617         * libbfd.h: Regenerate.
4618         * libcoff.h: Regenerate.
4620 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4622         * Makefile.am: Add n32 ABI support.
4623         * Makefile.in: Regenerate.
4624         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
4625         bit vectors for mips*-*-linux targets as optional.
4626         * configure.in: Add n32 ABI vectors.
4627         * configure: Regenerate.
4628         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
4629         * elfn32-mips.c: New file, n32 ABI support.
4630         * targets.c: Add n32 ABI vectors.
4632 2002-07-30  Graeme Peterson  <gp@qnx.com>
4634         * elfarmqnx-nabi.c: New file: Support for QNX.
4635         * config.bfd: Add support for arm-*-nto target.
4636         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
4637         * configure: Regenerate.
4638         * Makefile.am: Add entries for elfarmqnx-nabi.c.
4639         * Makefile.in: Regenerate.
4640         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
4641         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
4642         * elfarm-nabi.c: Do not include elf32-arm.h if
4643         ELFARM_NABI_C_INCLUDED is defined.
4644         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
4646 2002-07-30  Nick Clifton  <nickc@redhat.com>
4648         * po/sv.po: Updated Swedish translation.
4650 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
4652         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
4654 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
4656         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
4657         * archive.c (bfd_generic_archive_p): Likewise.
4658         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
4659         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
4660         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
4661         (xcoff64_archive_p): Likewise.
4662         (xcoff64_openr_next_archived_file): Likewise.
4663         (xcoff64_archive_p): Clean up tdata properly on error.
4664         * coffgen.c (coff_real_object_p): Likewise.
4665         (coff_object_p): Release filehdr and opthdr.
4666         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
4667         * ieee.c (ieee_archive_p): Likewise.
4668         * ihex.c (ihex_object_p): Likewise.
4669         (ihex_mkobject): Always allocate tdata.
4670         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
4671         * srec.c (srec_mkobject): Always allocate tdata.
4672         (srec_object_p): Clean up tdata properly on error.
4673         (symbolsrec_object_p): Likewise.
4674         * versados.c (versados_object_p): Likewise.
4675         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
4676         and bfd_realloc instead of realloc.
4677         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
4678         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
4679         place of bfd_malloc, simplifying error freeing.  Free hash table too.
4680         (vms_object_p): Clean up tdata on error.
4681         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
4682         (vms_close_and_cleanup): Adjust for bfd_alloc use.
4684 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
4686         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
4688 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
4690         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
4691         flags into resulting BFD.
4693 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
4695         From John Reiser <jreiser@BitWagon.com>
4696         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
4697         tls_ldm_got.refcount.
4699 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4701         * elf64-mips.c: Update TODO comment.
4702         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
4703         mips_elf64_gprel16_reloca): Remove prototypes.
4704         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
4705         (UNUSED_RELOC): Replace by EMPTY_RELOC.
4706         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
4707         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
4708         R_MIPS_HIGHEST.
4709         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
4710         R_MIPS_GOT16. Remove wrong comments.
4711         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
4712         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
4713         from elf32-mips.c.
4714         (mips_elf64_hi16_reloc): Fix formatting.
4715         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
4716         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
4717         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
4718         (mips_elf64_gprel16_reloc): Make static. Add check for
4719         partial_inplace.
4720         (mips_elf64_gprel16_reloca): Remove.
4721         (mips_elf64_literal_reloc): New function.
4722         (mips_elf64_gprel32_reloc): Fix formatting.
4723         (mips_elf64_shift6_reloc): Fix comment. Make static.
4724         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
4725         elf32-mips.c.
4726         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
4727         elf32-mips.c
4728         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
4729         specific relocations.
4730         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
4731         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
4732         (ELF_MAXPAGESIZE): Add comment.
4734 2002-07-25  Nick Clifton  <nickc@redhat.com>
4736         * po/sv.po: Updated Swedish translation.
4737         * po/es.po: Updated Spanish translation.
4738         * po/fr.po: Updated French translation.
4740 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
4742         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
4743         as elf_link_record_local_dynamic_symbol.
4744         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
4745         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
4746         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
4747         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
4748         attempt is made to record a symbol in a discarded section, and
4749         return `2' in that case.
4751 2002-07-24  Nick Clifton  <nickc@redhat.com>
4753         * po/sv.po: Updated Swedish translation.
4754         * po/es.po: Updated Spanish translation.
4756 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
4758         * po/SRC-POTFILES.in: Regenerate.
4760         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
4761         immediately.  Remove code handling relocatable linking.
4762         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4763         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4764         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
4765         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4766         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4767         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4768         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4769         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4770         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4771         * elf32-vax.c (elf_vax_relocate_section): Likewise.
4772         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4773         * elf32-avr.c (elf_backend_rela_normal): Define.
4774         * elf32-cris.c: Likewise.
4775         * elf32-fr30.c: Likewise.
4776         * elf32-frv.c: Likewise.
4777         * elf32-h8300.c: Likewise.
4778         * elf32-hppa.c: Likewise.
4779         * elf32-ip2k.c: Likewise.
4780         * elf32-sparc.c: Likewise.
4781         * elf32-v850.c: Likewise.
4782         * elf32-vax.c: Likewise.
4783         * elf64-hppa.c: Likewise.
4784         * elf64-sparc.c: Likewise.
4785         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
4786         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4787         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4788         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4789         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4790         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4791         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4792         * elf-m10200.c (USE_RELA): Don't define.
4793         * elf-m10300.c: Likewise.
4794         * elfarm-oabi.c: Likewise.
4795         * elf32-i370.c: Likewise.
4796         * elf32-ip2k.c: Likewise.
4797         * elf32-m68k.c: Likewise.
4798         * elf32-mcore.c: Likewise.
4799         * elf32-ppc.c: Likewise.
4800         * elf32-s390.c: Likewise.
4801         * elf32-vax.c: Likewise.
4802         * elf64-ppc.c: Likewise.
4803         * elf64-s390.c: Likewise.
4804         * elf64-x86-64.c: Likewise.
4805         * elfxx-ia64.c: Likewise.
4806         * elf32-avr.c (USE_REL): Don't undef.
4807         * elf32-ip2k.c: Likewise.
4809 2002-07-23  Nick Clifton  <nickc@redhat.com>
4811         * elf-bfd.h (struct elf_backend_data): Add new bitfield
4812         'want_p_paddr_set_to_zero'.
4813         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
4814         to false;
4815         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
4816         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
4818 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
4820         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
4821         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
4822         show the Copyright string.
4823         Minor formatting tidy ups.
4825 2002-07-23  Nick Clifton  <nickc@redhat.com>
4827         * po/fr.po: Updated French translation.
4828         * po/sv.po: Updated Swedish translation.
4830 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
4832         * elflink.h (elf_link_input_bfd): Don't change internal symbols
4833         when outputting relocs.
4835 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
4837         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
4838         DT_PLTGOT into the dynamic section if there is a PLT.
4840 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4842         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
4843         elf32-mips.c.
4844         (_bfd_mips_elf_write_section): Likewise.
4845         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
4846         (_bfd_mips_elf_write_section): Likewise.
4847         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
4848         (elf32_mips_write_section): Likewise.
4849         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
4850         (_bfd_mips_elf_write_section): Likewise.
4852 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
4854         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
4855         PT_IA_64_UNWIND segments for a given section.
4857 2002-07-17  H.J. Lu <hjl@gnu.org>
4859         * Makefile.am: Fix a typo.
4860         * Makefile.in: Regenerate.
4862 2002-07-15  Denis Chertykov  <denisc@overta.ru>
4863             Frank Ch. Eigler  <fche@redhat.com>
4864             Ben Elliston  <bje@redhat.com>
4865             Alan Lehotsky  <alehotsky@cygnus.com>
4866             John Healy  <jhealy@redhat.com>
4867             Graham Stott  <grahams@redhat.com>
4868             Jeff Johnston  <jjohnstn@redhat.com>
4870         * Makefile.am: Add support for ip2k.
4871         * Makefile.in: Regenerate.
4872         * doc/Makefile.in: Regenerate.
4873         * archures.c: Add support for ip2k.
4874         * config.bfd: Add support for ip2k.
4875         * configure.in: Add support for ip2k.
4876         * configure: Regenerate.
4877         * reloc.c: Add support for ip2k.
4878         * targets.c: Add support for ip2k.
4879         * bfd-in2.h: Regenerate.
4880         * libbfd.h: Regenerate.
4881         * cpu-ip2k.c: New file.
4882         * elf32-ip2k.c: New file.
4884 2002-07-17  Ian Rickards  <irickard@arm.com>
4886         * dwarf2.c (concat_filename): If we can't establish the directory
4887         just return the filename.
4889 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
4891         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
4893 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
4895         * elflink.h: Formatting fixes, tidy prototypes.
4896         (elf_link_assign_sym_version): Move common code out of loop.
4898 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
4900         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
4901         reloc section size is zero.  Correct reloc output location.
4903 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4905         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
4906         the final type for the e_fsel selector when generating PA2.0W code.
4907         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
4908         relocations.
4910 2002-07-14  H.J. Lu <hjl@gnu.org>
4912         * elflink.h (elf_link_assign_sym_version): Hide the default
4913         definition if there is a hidden versioned definition.
4915 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
4917         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
4918         dynamic reference test in assertion when initializing GOT with
4919         static contents.  Just assert that there are either no dynamic
4920         sections, the symbol is defined in the regular objects or that the
4921         symbol is undef weak.  Tweak comment.
4922         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
4923         only if the symbol isn't defined in the program and isn't undef
4924         weak.
4925         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
4926         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
4927         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
4928         (elf_cris_discard_excess_program_dynamics): Don't consider
4929         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
4931 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
4933         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
4934         unresolved debugging relocs in dynamic applications.
4935         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4936         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4937         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4938         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4939         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4940         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4942 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
4944         * elf64-ppc.c (ONES): Define.
4945         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
4946         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
4947         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
4949         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
4950         (ppc64_elf_set_private_flags): Delete.
4951         (ppc64_elf_section_from_shdr): Delete.
4952         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
4953         (ppc64_elf_fake_sections): Delete.
4954         (bfd_elf64_bfd_set_private_flags): Don't define.
4955         (bfd_elf64_get_symbol_info): Likewise.
4956         (elf_backend_section_from_shdr): Likewise.
4957         (elf_backend_fake_sections): Likewise.
4959 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
4961         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
4962         when not already set.
4963         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
4964         (elf_backend_fake_sections): Define.
4966 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
4968         * merge.c (_bfd_merge_section): Remove redundant output_section check.
4969         Formatting.
4970         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
4972 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
4974         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
4975         NULL sym_hashes to just before use.
4976         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
4977         symbol with non-default visibility.
4978         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
4979         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4980         Ditto.
4981         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
4982         symbol with non-default visibility.
4983         (cris_elf_check_relocs): At tests for local symbol before
4984         increasing h->plt.refcount, also check for non-default
4985         visibility.  Ditto when checking for local symbol to eliminate
4986         pc-relative runtime relocs.
4988 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
4990         * elf.c: Formatting.
4991         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
4992         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
4993         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
4994         segments.
4996 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
4997             Alan Modra  <amodra@bigpond.net.au>
4999         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5000         account the impact of relocation count overflow when computing
5001         section offsets.
5002         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5003         or not to apply the PE COFF reloc overflow handling.  Fix a
5004         fencepost error in deciding whether or not to use that technique.
5006 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
5008         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
5009         change type of locsyms.
5010         (bfd_elf_get_elf_syms): Declare.
5011         * elf.c (bfd_elf_get_elf_syms): New function.
5012         (group_signature): Use bfd_elf_get_elf_syms.
5013         (bfd_section_from_r_symndx): Likewise.
5014         * elfcode.h (elf_slurp_symbol_table): Likewise.
5015         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5016         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
5017         locality of various data structures.  Properly free internal relocs.
5018         (elf_bfd_final_link): Properly free internal relocs.
5019         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
5020         (elf_link_input_bfd): Likewise.
5021         (elf_gc_mark): Likewise.  Properly free internal relocs.
5022         (elf_gc_sweep): Properly free internal relocs.
5023         (elf_reloc_symbol_deleted_p): No need to swap syms in.
5024         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
5025         internal relocs.
5026         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
5027         Properly free possibly cached info.
5028         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
5029         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
5030         symbol swapping code.
5031         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
5032         Properly free possibly cached info.
5033         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
5034         (mn10300_elf_relax_delete_bytes): Likewise.
5035         (mn10300_elf_symbol_address_p): Likewise.
5036         (mn10300_elf_get_relocated_section_contents): Likewise.
5037         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
5038         (elf32_h8_relax_delete_bytes): Likewise.
5039         (elf32_h8_symbol_address_p): Likewise.
5040         (elf32_h8_get_relocated_section_contents): Likewise.
5041         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
5042         (m32r_elf_relax_delete_bytes): Likewise.
5043         (m32r_elf_get_relocated_section_contents): Likewise.
5044         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
5045         elf_section_data to determine whether cached.
5046         (sh_elf_relax_section): As above for elf-m10200.c.
5047         (sh_elf_relax_delete_bytes): Likewise.
5048         (sh_elf_get_relocated_section_contents): Likewise.
5049         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
5050         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
5051         reading of local syms.
5052         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5053         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
5054         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
5055         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
5056         relocs.
5057         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
5058         free internal relocs and section contents.  Don't read symbols.
5059         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
5060         (elf32_hppa_size_stubs): Don't free local syms.
5061         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
5062         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
5063         possibly cached info.
5064         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5065         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
5066         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
5067         all_local_syms.
5068         (get_local_syms): Delete function.
5069         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
5070         on exit.
5071         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
5073 2002-07-05  Jim Wilson  <wilson@redhat.com>
5075         * syms.c (decode_section_type): New.
5076         (bfd_decode_symclass): Call decode_section_type.
5078 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
5080         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
5081         section content start.
5082         Reported by Michael Schumacher <mike@hightec-rt.com>.
5084 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
5086         * section.c (_bfd_strip_section_from_output): Remove unnecessary
5087         link order code.  Don't actually remove the output section here;
5088         Just set a flag for the linker to do so.
5089         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
5090         sections when setting up output section dynsyms.
5092 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
5094         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
5095         fudge.
5096         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
5097         libs here instead.
5099 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5101         * elf64-s390.c (create_got_section): Set .got section alignment to
5102         8 bytes.
5103         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
5105 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
5107         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
5109 2002-07-01  Matt Thomas  <matt@3am-software.com>
5111         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
5112         to EF_VAX_*.
5114 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5116         * elfxx-mips.c (ABI_64_P): Fix comment.
5117         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
5118         new section names for N64 ABI.
5119         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
5120         (mips_elf_calculate_relocation): Code formatting.
5121         (mips_elf_create_dynamic_relocation): Likewise.
5122         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
5123         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
5124         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
5125         in any NewABI.
5126         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
5127         for NewABI.
5128         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
5129         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
5130         here, too.
5132 2002-07-01  Andreas Schwab  <schwab@suse.de>
5134         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
5135         R_X86_64_64 to R_X86_64_RELATIVE.
5137 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5139         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
5140         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
5141         Run "make dep-am".
5142         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
5143         host_aout_vec.
5144         * configure.in (vaxbsd_vec): Add.
5145         * targets.c (vaxbsd_vec): Add.
5146         * Makefile.in: Rebuild.
5147         * configure: Rebuild.
5148         * po/SRC-POTFILES.in: Rebuild.
5150 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
5152         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
5153         examining to gc_mark_hook, rather than the bfd.
5154         (elf_gc_sections): Adjust.
5155         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
5156         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
5157         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
5158         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
5159         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
5160         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
5161         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
5162         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
5163         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
5164         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
5165         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
5166         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
5167         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
5168         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
5169         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
5170         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
5171         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
5172         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
5173         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
5174         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
5175         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
5176         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
5177         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
5178         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5179         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
5180         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
5181         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
5182         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
5183         redundant local sym tests.
5184         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
5185         (link_hash_newfunc): Init is_entry.
5186         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
5187         (ppc64_elf_link_hash_table_create): Init all_local_syms.
5188         (create_linkage_sections): Use bfd_make_section_anyway rather than
5189         bfd_make_section.
5190         (ppc64_elf_mark_entry_syms): New function.
5191         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
5192         up opd entry to function section map.
5193         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
5194         relocs that reference the opd section.
5195         (edit_opd): New function.
5196         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
5197         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
5198         (get_local_syms): Do so here.  Exit if we already have local syms.
5199         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
5200         read local syms on non-ELF input.
5201         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
5202         than duplicating it's function here.  Adjust free of internal
5203         relocs to suit.
5204         (ppc64_elf_relocate_section): Adjust local syms in opd section.
5205         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
5206         * elf32-hppa.c (elf32_hppa_size_stubs): Call
5207         _bfd_elf32_link_read_relocs rather than duplicating it's function
5208         here.  Adjust free of internal relocs to suit.
5210 2002-07-01  Andreas Jaeger  <aj@suse.de>
5212         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
5213         are not allowed in shared libs code, enforce -fPIC.
5215 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
5217         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
5218         trailing zero-sequences when there's previous left-over data.
5220 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5222         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
5223         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
5224         and opd_rel_sec in order for starting rela section.  Check _raw_size.
5225         (elf_backend_reloc_type_class): Define.
5227 2002-06-27  Kevin Buettner <kevinb@redhat.com>
5229         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
5230         DWARF2 formats.
5232 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
5234         * cpu-powerpc.c: Comment on ordering of arch_info.
5235         * elf32-ppc.c (ppc_elf_object_p): New function.
5236         (elf_backend_object_p): Define.
5237         * elf64-ppc.c (ppc64_elf_object_p): New function.
5238         (elf_backend_object_p): Define.
5240 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
5242         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
5243         * configure: Regenerate.
5245 2002-06-25  Jason Eckhardt  <jle@rice.edu>
5247         * dwarf2.c (decode_line_info): Check unit->addr_size
5248         to read in the proper number of prologue bytes.
5250 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
5252         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
5253         aix5coff64_vec if 64-bit bfd support has been enabled.
5254         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
5255         been enabled.
5257         * targets.c (_bfd_target_vector[]): Only include
5258         aix5coff64_vec if 64-bit bfd support has been enabled.
5260 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
5262         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
5263         * elf32-hppa.c (hppa_add_stub): Likewise.
5264         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5265         * elflink.h (elf_add_default_symbol): Fix comment typo.
5266         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
5267         (elf_link_add_object_symbols): Likewise.
5268         (elf_link_assign_sym_version): Likewise.
5269         * hash.c (bfd_hash_lookup): Likewise.
5270         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
5271         * section.c (bfd_get_unique_section_name): Likewise.
5272         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
5273         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
5274         (assign_section_numbers): Likewise.
5275         (_bfd_elfcore_make_pseudosection): Likewise.
5276         (elfcore_grok_lwpstatus): Likewise.
5277         (elfcore_grok_win32pstatus): Likewise.
5278         (elfcore_write_note): Constify input params.  Use PTR instead of
5279         void *.  Include terminating NUL in namesz.  Correct padding.
5280         Support NULL "name" param.  Use memcpy instead of strcpy.
5281         (elfcore_write_prpsinfo): Constify input params.
5282         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
5283         (elfcore_write_lwpstatus): Likewise.
5284         (elfcore_write_pstatus): Likewise.
5285         (elfcore_write_prfpreg): Likewise.
5286         (elfcore_write_prxfpreg): Likewise.
5287         * elf-bfd.h (elfcore_write_note): Update declaration.
5288         (elfcore_write_prpsinfo): Likewise.
5289         (elfcore_write_prstatus): Likewise.
5290         (elfcore_write_pstatus): Likewise.
5291         (elfcore_write_prfpreg): Likewise.
5292         (elfcore_write_prxfpreg): Likewise.
5293         (elfcore_write_lwpstatus): Likewise.
5295 2002-06-25  Jason Eckhardt  <jle@rice.edu>
5297         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
5298         symbols of type stProc and stStaticProc.
5300 2002-06-25  Nick Clifton  <nickc@redhat.com>
5302         * ecoff.c: VArious formatting fixes.
5304 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
5306         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
5308 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
5310         * aout-adobe.c: Don't compare against "true" or "false.
5311         * aout-target.h: Likewise.
5312         * aoutx.h: Likewise.
5313         * archive.c: Likewise.
5314         * bout.c: Likewise.
5315         * cache.c: Likewise.
5316         * coff-a29k.c: Likewise.
5317         * coff-alpha.c: Likewise.
5318         * coff-i386.c: Likewise.
5319         * coff-mips.c: Likewise.
5320         * coff-or32.c: Likewise.
5321         * coff64-rs6000.c: Likewise.
5322         * coffcode.h: Likewise.
5323         * coffgen.c: Likewise.
5324         * cpu-ns32k.c: Likewise.
5325         * ecoff.c: Likewise.
5326         * ecofflink.c: Likewise.
5327         * elf.c: Likewise.
5328         * elf32-arm.h: Likewise.
5329         * elf32-cris.c: Likewise.
5330         * elf32-d30v.c: Likewise.
5331         * elf32-i386.c: Likewise.
5332         * elf32-mcore.c: Likewise.
5333         * elf32-ppc.c: Likewise.
5334         * elf32-sh.c: Likewise.
5335         * elf32-sh64.c: Likewise.
5336         * elf32-v850.c: Likewise.
5337         * elf64-alpha.c: Likewise.
5338         * elf64-sh64.c: Likewise.
5339         * elfcode.h: Likewise.
5340         * elfcore.h: Likewise.
5341         * elflink.h: Likewise.
5342         * elfxx-mips.c: Likewise.
5343         * i386os9k.c: Likewise.
5344         * ieee.c: Likewise.
5345         * libbfd.c: Likewise.
5346         * linker.c: Likewise.
5347         * mmo.c: Likewise.
5348         * nlm32-alpha.c: Likewise.
5349         * nlm32-i386.c: Likewise.
5350         * nlm32-ppc.c: Likewise.
5351         * nlm32-sparc.c: Likewise.
5352         * nlmcode.h: Likewise.
5353         * oasys.c: Likewise.
5354         * pdp11.c: Likewise.
5355         * peicode.h: Likewise.
5356         * reloc.c: Likewise.
5357         * som.c: Likewise.
5358         * srec.c: Likewise.
5359         * tekhex.c: Likewise.
5360         * vms.c: Likewise.
5361         * xcofflink.c: Likewise.
5362         * elf64-sparc.c: Edit comment to not use "== false".
5364         * aoutf1.h: Don't use "? true : false".
5365         * ecoff.c: Likewise.
5366         * format.c: Likewise.
5367         * ieee.c: Likewise.
5368         * linker.c: Likewise.
5369         * mmo.c: Likewise.
5370         * oasys.c: Likewise.
5372 2002-06-23  H.J. Lu  <hjl@gnu.org>
5374         * elflink.h (elf_link_add_archive_symbols): For the default
5375         version, check references with only one `@' first.
5377 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5379         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
5380         function.
5381         (allocate_global_data_dlt): Don't add millicode symbols to dynamic
5382         symbol table.
5383         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
5384         (elf64_hppa_size_dynamic_sections): Revise to use
5385         elf64_hppa_mark_milli_and_exported_functions.
5386         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
5387         symbols out of dynamic symbol table.
5389 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
5391         * Makefile.in: Regenerate.
5392         * libbfd.h: Regenerate.
5393         * bfd-in2.h: Regenerate.
5394         * configure: Regenerate.
5395         * po/SRC-POTFILES.in: Regenerate.
5397         * elflink.h: Comment typo fixes.
5399 2002-06-23  H.J. Lu  <hjl@gnu.org>
5401         * elf-bfd.h (elf_link_loaded_list): New structure.
5402         (elf_link_hash_table): Add "loaded".
5403         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
5404         * elflink.h (elf_link_check_versioned_symbol): New function.
5405         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
5407 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
5409         * elflink.h (size_dynamic_sections): If the target does not
5410         support an ELF style hash table, return true, indicating that
5411         nothing needed to be done, rather than false, indicating that the
5412         section's size could not be computed.
5414 2002-06-18  Dave Brolley  <brolley@redhat.com>
5416         From Catherine Moore, Michael Meissner, Dave Brolley:
5417         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
5418         * targets.c: Support bfd_elf32_frv_vec.
5419         * reloc.c: Add FRV relocs.
5420         * configure.in: Add support for bfd-elf32-frv-vec.
5421         * config.bfd (targ_cpu): Add support for frv-*-elf.
5422         * archures.c: Add frv arch and machines.
5423         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
5424         (ALL_MACHINES_CFILES): Add cpu-frv.c.
5425         (BFD32_BACKENDS): Add elf32-frv.lo.
5426         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
5427         (cpu-frv.lo): New target.
5428         (elf32-frv.lo): New target.
5429         * cpu-frv.c: New file.
5430         * elf32-frv.c: New file.
5432 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
5434         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
5435         e_shnum == 0.
5436         Only read the first section header if e_shoff is non-zero.
5437         Don't consider e_shstrndx if there are no sections.
5439 2002-06-17  Tom Rix <trix@redhat.com>
5441         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
5442         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
5443         complain_overflow_bitfield.
5445 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
5447         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
5448         (bfd_fdopenr): Likewise.
5449         (bfd_openstreamr): Likewise.
5450         (bfd_openw): Likewise.
5452         * targets.c: Sort target vecs.
5453         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
5454         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
5455         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
5456         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
5457         * configure.in: Sort target vecs.  Add m88kmach3_vec.
5458         * configure: Regenerate.
5460 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
5462         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
5463         bpo_reloc_no to break sort order ties, not address of items.
5465 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5467         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
5468         Skip excluded sections in determing __gp value.
5469         (elf_hppa_final_link_relocate): Use the symbol's address in
5470         R_PARISC_FPTR64 relocations that don't need an opd entry.
5471         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
5472         (elf64_hppa_finalize_dynreloc): Likewise.
5473         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
5474         (elf64_hppa_finish_dynamic_symbol): Break up assert.
5476 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
5478         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5479         alignment for .bss, .data and .text sections so that sse and sse2
5480         code will work.
5481         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5483 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
5485         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
5486         sh[1234]*-elf*.
5488 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5490         * elflink.h (elf_bfd_final_link): Improve error handling for missing
5491         dynamic sections.
5493         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
5494         for a symbol that has no output section.
5495         (allocate_dynrel_entries): Correct comment.
5496         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
5497         unless we want one.
5498         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
5499         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
5500         with no section.  Remove unnecessary parentheses.
5502 2002-06-11  Tom Rix  <trix@redhat.com>
5504         * coffcode.h (coff_compute_section_file_positions): Add data
5505         section to AIX loader alignment check.
5507         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
5508         alignment to 4 bytes.
5509         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
5510         power accessor macro.
5511         (do_shared_object_padding): Remove invalid assertion.
5513 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
5515         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
5516         for removed output sections.
5518 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
5520         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
5521         htab_alloc.
5522         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
5524 2002-06-08  H.J. Lu <hjl@gnu.org>
5526         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
5527         work around a long long bug in gcc 2.96 on mips.
5529 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
5531         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
5532         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
5533         Regenerate dependency lists.
5534         * Makefile.in: Regenerate.
5535         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
5536         vax1knetbsd_vec to targ_selvecs.
5537         * configure.in: Add vax1knetbsd_vec.
5538         * configure: Regenerate.
5539         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
5540         * vax1knetbsd.c: New file.
5541         * vaxnetbsd.c: Update copyright years.
5542         (TARGET_PAGE_SIZE): Set to 0x1000.
5543         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
5545 2002-06-08  Matt Thomas  <matt@3am-software.com>
5547         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
5549 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
5551         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
5553 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
5555         * Makefile.am: Run "make dep-am".
5556         * Makefile.in: Regenerate.
5558         * armnetbsd.c: Replace CONST with const.
5559         * corefile.c: Likewise.
5560         * elf32-dlx.c: Likewise.
5561         * elf64-mips.c: Likewise.
5562         * mmo.c: Likewise.
5563         * ns32knetbsd.c: Likewise.
5565         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
5566         table is elf64-sparc.
5568 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5570         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
5571         Fix RELA addends to get not shifted in the result. Don't do special
5572         handling of R_MIPS_64 for NewABI.
5574 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
5576         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5577         (NAME(aout,slurp_reloc_table)): Likewise.
5578         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
5579         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
5580         (xcoff_write_archive_contents_big): Likewise.
5581         (xcoff_generate_rtinit): Likewise.
5582         (xcoff_generate_rtinit): Likewise, and check error return.
5583         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5584         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
5585         (coff_get_normalized_symtab): Likewise.
5586         (coff_make_empty_symbol): Likewise.
5587         (bfd_coff_set_symbol_class): Likewise.
5588         * cofflink.c (coff_link_add_symbols): Likewise.
5589         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
5590         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
5591         (bfd_ecoff_write_accumulated_debug): Likewise.
5592         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
5593         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
5594         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
5595         * ieee.c (do_with_relocs): Use bfd_zalloc.
5596         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
5597         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5598         (NAME(aout,slurp_reloc_table)): Likewise.
5599         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
5600         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
5601         * som.c (som_build_and_write_symbol_table): Likewise.
5602         (som_slurp_string_table): Likewise.
5603         (som_slurp_symbol_table): Likewise.
5604         (som_bfd_ar_write_symbol_stuff): Likewise.
5605         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
5606         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
5607         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
5608         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
5609         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
5611 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
5613         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
5614         "group" union.
5615         (elf_group_name): Update.
5616         (elf_group_id): Define.
5617         (bfd_elf_set_group_contents): Declare.
5618         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
5619         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
5620         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
5621         that sym for the signature.
5622         (_bfd_elf_compute_section_file_positions): Don't call
5623         set_group_contents for "ld -r" case.
5624         (swap_out_syms): Use bfd_zalloc.
5625         * elflink.h (elf_link_add_archive_symbols): Likewise.
5626         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5627         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
5629 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
5631         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
5632         relocs in opd for non-shared too.
5634 2002-06-06  Jeffrey Law  <law@redhat.com>
5636         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
5637         relocations.
5639 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
5641         * merge.c: Include libiberty.h.
5642         * elf-strtab.c: Include libiberty.h.
5644 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
5646         * peXXigen.c (pe_print_idata): Remove unused variable.
5648 2002-06-06  David Heine <dlheine@tensilica.com>
5650         * elf.c (assign_file_positions_for_segments): Remove unallocated
5651         sections from the section to segment mapping for PT_LOAD segments.
5652         Update comment about empty loadable segments.
5654 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
5656         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
5657         is within the .stabstr section.
5659 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
5661         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
5662         are "const PTR", not "const PTR *".
5663         (bfd_elf32_swap_symbol_in): Likewise.
5664         (bfd_elf64_swap_symbol_in): Likewise.
5665         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
5666         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5667         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5668         (elf_link_add_object_symbols): Likewise.
5669         (elf_link_record_local_dynamic_symbol): Likewise.
5670         (elf_link_input_bfd): Likewise.
5671         (elf_gc_mark): Likewise.
5672         (elf_reloc_symbol_deleted_p): Likewise.
5673         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5674         (mn10200_elf_relax_delete_bytes): Likewise.
5675         (mn10200_elf_symbol_address_p): Likewise.
5676         (mn10200_elf_get_relocated_section_contents): Likewise.
5677         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5678         (mn10300_elf_relax_section): Likewise.
5679         (mn10300_elf_relax_delete_bytes): Likewise.
5680         (mn10300_elf_symbol_address_p): Likewise.
5681         (mn10300_elf_get_relocated_section_contents): Likewise.
5682         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5683         (elf32_h8_relax_delete_bytes): Likewise.
5684         (elf32_h8_symbol_address_p): Likewise.
5685         (elf32_h8_get_relocated_section_contents): Likewise.
5686         * elf32-hppa.c (get_local_syms): Likewise.
5687         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5688         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5689         * elf32-sh.c (sh_elf_relax_section): Likewise.
5690         (sh_elf_relax_delete_bytes): Likewise.
5691         (sh_elf_get_relocated_section_contents): Likewise.
5692         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5693         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5694         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5695         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5696         * elf64-ppc.c (get_local_syms): Likewise.
5697         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5698         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5700 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
5702         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
5704 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
5706         * elf.c (group_signature): Swap in the whole symbol, and handle
5707         extracting section symbol names.
5708         (setup_group): Add comment.
5709         (set_group_contents): When called from objcopy or ld, arrange for
5710         section contents to be written.  Write group member output section
5711         indices to allow objcopy to reorganize sections.
5712         (_bfd_elf_copy_private_section_data): Copy group info.
5714         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
5715         (bfd_elf32_swap_symbol_in): Update prototype.
5716         (bfd_elf64_swap_symbol_in): Likewise.
5717         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
5718         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5719         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5720         (elf_link_add_object_symbols): Likewise.
5721         (elf_link_record_local_dynamic_symbol): Likewise.
5722         (elf_link_input_bfd): Likewise.
5723         (elf_gc_mark): Likewise.
5724         (elf_reloc_symbol_deleted_p): Likewise.
5725         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5726         (mn10200_elf_relax_delete_bytes): Likewise.
5727         (mn10200_elf_symbol_address_p): Likewise.
5728         (mn10200_elf_get_relocated_section_contents): Likewise.
5729         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5730         (mn10300_elf_relax_section): Likewise.
5731         (mn10300_elf_relax_delete_bytes): Likewise.
5732         (mn10300_elf_symbol_address_p): Likewise.
5733         (mn10300_elf_get_relocated_section_contents): Likewise.
5734         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5735         (elf32_h8_relax_delete_bytes): Likewise.
5736         (elf32_h8_symbol_address_p): Likewise.
5737         (elf32_h8_get_relocated_section_contents): Likewise.
5738         * elf32-hppa.c (get_local_syms): Likewise.
5739         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5740         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5741         * elf32-sh.c (sh_elf_relax_section): Likewise.
5742         (sh_elf_relax_delete_bytes): Likewise.
5743         (sh_elf_get_relocated_section_contents): Likewise.
5744         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5745         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5746         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5747         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5748         * elf64-ppc.c (get_local_syms): Likewise.
5749         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5750         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5751         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
5752         * elf64-alpha.c (alpha_elf_size_info): Likewise.
5753         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5754         * elf64-mips.c (mips_elf64_size_info): Likewise.
5755         * elf64-s390.c (s390_elf64_size_info): Likewise.
5756         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5758 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5760         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
5761         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
5762         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
5763         _bfd_mips_elf_ignore_discarded_relocs.
5764         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
5766 2002-06-05  H.J. Lu <hjl@gnu.org>
5768         * elfxx-mips.c (mips_elf_calculate_relocation): Call
5769         _bfd_elf_rel_local_sym for STT_SECTION relocations against
5770         the SEC_MERGE section.
5772 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
5774         * coff-alpha.c: Update copyright date.
5775         * coff-mips.c: Likewise.
5776         * xcoff-target.h: Likewise.
5778         * bfd-in.h: Remove "taken from the source" comment.
5779         * libbfd-in.h: Likewise.
5780         * libcoff-in.h: Likewise.
5781         * bfd-in2.h: Regenerate.
5782         * libbfd.h: Regenerate.
5783         * libcoff.h: Regenerate.
5785         * elf.c (bfd_elf_discard_group): Return true.
5786         * elf-bfd.h (bfd_elf_discard_group): Declare.
5787         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
5788         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
5789         * bfd.c (bfd_discard_group): Define.
5790         * targets.c (struct bfd_target): Add _bfd_discard_group.
5791         (BFD_JUMP_TABLE_LINK): Here too.
5792         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
5793         * aout-adobe.c (aout_32_bfd_discard_group): Define.
5794         * aout-target.h (MY_bfd_discard_group): Define.
5795         * aout-tic30.c (MY_bfd_discard_group): Define.
5796         * binary.c (binary_bfd_discard_group): Define.
5797         * bout.c (b_out_bfd_discard_group): Define.
5798         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
5799         * coffcode.h (coff_bfd_discard_group): Define.
5800         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
5801         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
5802         * i386msdos.c (msdos_bfd_discard_group): Define.
5803         * i386os9k.c (os9k_bfd_discard_group): Define.
5804         * ieee.c (ieee_bfd_discard_group): Define.
5805         * ihex.c (ihex_bfd_discard_group): Define.
5806         * mmo.c (mmo_bfd_discard_group): Define.
5807         * nlm-target.h (nlm_bfd_discard_group): Define.
5808         * oasys.c (oasys_bfd_discard_group): Define.
5809         * ppcboot.c (ppcboot_bfd_discard_group): Define.
5810         * som.c (som_bfd_discard_group): Define.
5811         * srec.c (srec_bfd_discard_group): Define.
5812         * tekhex.c (tekhex_bfd_discard_group): Define.
5813         * versados.c (versados_bfd_discard_group): Define.
5814         * vms.c (vms_bfd_discard_group): Define.
5815         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
5816         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
5817         (aix5coff64_vec): Likewise.
5818         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
5820 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
5822         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
5823         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
5824         (elf32-sh64-com.lo): New dependency list.
5825         * Makefile.in: Regenerate.
5826         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
5827         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
5828         elf32-sh64-com.lo.
5829         * configure: Regenerate.
5830         * elf32-sh64.c (sh64_address_in_cranges)
5831         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
5832         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
5833         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
5834         * elf32-sh64-com.c: ...here.  New file.
5836 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
5838         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
5839         ATTRIBUTE_UNUSED on used params.
5840         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
5841         before calling bfd_section_from_elf_index on local syms.
5842         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5844 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
5846         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
5847         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
5848         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
5849         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
5850         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
5851         * Makefile.in: Regenerate.
5852         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
5853         (sh64-*-netbsd*): New targets.
5854         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
5855         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
5856         * configure: Regenerate.
5857         * elf32-sh64-nbsd.c: New file.
5858         * elf64-sh64-nbsd.c: New file.
5859         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
5860         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
5861         bfd_elf64_sh64lnbsd_vec.
5863 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
5865         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
5866         (bfd_section_from_shdr): Likewise.  Set section name of group
5867         sections from signature.
5868         (group_signature): Split out from setup_group.  Ensure symbol table
5869         is available.
5870         (bfd_elf_discard_group): New function.
5871         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
5872         .gnu.linkonce* sections if they are members of a group.
5873         (set_group_contents): Set GRP_COMDAT flag.
5874         * section.c (bfd_discard_group): New function.
5875         * bfd-in.h (bfd_elf_discard_group): Declare.
5876         * bfd-in2.h: Regenerate.
5877         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
5878         (elf_linkonce_p): Define.
5880 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
5882         * elf.c (bfd_section_from_shdr): Make "name" const.
5883         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
5884         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
5885         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
5886         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
5887         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
5888         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
5889         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
5890         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
5891         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
5892         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
5893         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
5895 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5897         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
5898         ABI.
5900 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
5902         * elf32-arc.c: Fix formatting.
5903         * elf32-arm.h: Likewise.
5904         * elf32-cris.c: Likewise.
5905         * elf32-dlx.c: Likewise.
5906         * elf32-hppa.c: Likewise.
5907         * elf32-i386.c: Likewise.
5908         * elf32-i386qnx.c: Likewise.
5909         * elf32-or32.c: Likewise.
5910         * elf32-s390.c: Likewise.
5911         * elf32-sh64.c: Likewise.
5912         * elf32-vax.c: Likewise.
5913         * elf32-xstormy16.c: Likewise.
5914         * elf64-alpha.c: Likewise.
5915         * elf64-mmix.c: Likewise.
5916         * elf64-ppc.c: Likewise.
5917         * elf64-s390.c: Likewise.
5918         * elf64-sh64.c: Likewise.
5919         * elf64-x86-64.c: Likewise.
5921 2002-06-02  Richard Henderson  <rth@redhat.com>
5923         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
5924         null when there are no got entries for a symbol.
5925         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
5926         uninitialized variable warning.
5928 2002-06-01  Richard Henderson  <rth@redhat.com>
5930         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
5931         undefined symbols here.
5932         (elf64_alpha_relax_section): Do it here.  Also test for not
5933         defined in the current module.
5934         (elf64_alpha_relocate_section_r): Split out of ...
5935         (elf64_alpha_relocate_section): ... here.  Don't dereference
5936         NULL when looking up local got entries.
5938 2002-06-01  Richard Henderson  <rth@redhat.com>
5940         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
5941         symbols from JSR relaxation.
5942         (elf64_alpha_size_plt_section_1): New.
5943         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
5944         (elf64_alpha_size_rela_got_1): ... here.
5945         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
5946         (elf64_alpha_size_rela_got_section): ... here.
5947         (elf64_alpha_size_plt_section): New.
5948         (elf64_alpha_relax_section): Call them.
5949         (elf64_alpha_size_got_sections): Remove output_bfd arg.
5950         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
5952 2002-06-01  Richard Henderson  <rth@redhat.com>
5954         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
5955         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
5956         in shared libraries.  Fix DTPRELHI and TPRELHI value.
5957         (INSN_ADDQ, INSN_RDUNIQ): New.
5958         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
5959         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
5960         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
5961         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
5962         Handle GOTDTPREL and GOTTPREL relocations.
5963         (elf64_alpha_relax_gprelhilo): New.
5964         (elf64_alpha_relax_tls_get_addr): New.
5965         (elf64_alpha_relax_find_tls_segment): New.
5966         (elf64_alpha_relax_section): Handle TLS relocations.
5967         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
5968         (elf64_alpha_check_relocs): Set it.
5970 2002-06-01  Richard Henderson  <rth@redhat.com>
5972         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
5974         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
5975         check; don't suppress dynamic relocs for non-allocated sections.
5977         * elf64-alpha.c: Remove dead code.
5979 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
5981         * bfd-in2.h: Regenerate.
5982         * libbfd.h: Regenerate.
5983         * po/SRC-POTFILES.in: Regenerate.
5985         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
5986         space for bss .plt.
5988 2002-05-31  Graeme Peterson  <gp@qnx.com>
5990         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
5991         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
5992         Run "make dep-am".
5993         * Makefile.in: Regenerate.
5994         * config.bfd: Add i[3456]86-*-nto-qnx* support.
5995         * configure.in: Add bfd_elf32_i386qnx_vec support.
5996         * configure: Regenerate.
5997         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
5998         is_contained_by_filepos, and copy_private_bfd_data_p.
5999         * elf.c (assign_file_positions_for_segments): Call backend
6000         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
6001         (IS_CONTAINED_BY_FILEPOS): Define.
6002         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6003         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
6004         Fix non-K&R call to _bfd_error_handler.
6005         (_bfd_elf_copy_private_section_data): Use backend
6006         copy_private_bfd_data_p.
6007         * elf32-i386.c: Don't include elfxx-target.h when
6008         ELF32_I386_C_INCLUDED is defined.
6009         * elf32-i386qnx.c: New QNX elf backend file.
6010         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
6011         elf_backend_is_contained_by_filepos, and
6012         elf_backend_do_copy_private_bfd_data.
6013         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
6015 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
6017         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
6018         Move other similar defines to start of file.
6020 2002-05-30  Tom Rix  <trix@redhat.com>
6022         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
6023         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
6025 2002-05-30  Richard Henderson  <rth@redhat.com>
6027         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
6028         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
6029         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
6030         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
6031         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
6032         (struct alpha_elf_obj_tdata): Rename total_got_entries and
6033         n_local_got_entries to total_got_size and local_got_size.
6034         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
6035         (alpha_got_entry_size): New.
6036         (elf64_alpha_relax_with_lituse): Use it.
6037         (elf64_alpha_relax_without_lituse): Likewise.
6038         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
6039         (get_got_entry): New.
6040         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
6041         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
6042         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
6043         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
6044         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
6045         (elf64_alpha_calc_got_offsets): Likewise.
6046         (alpha_dynamic_entries_for_reloc): New.
6047         (elf64_alpha_calc_dynrel_sizes): Use it.
6048         (elf64_alpha_size_dynamic_sections): Likewise.
6049         (elf64_alpha_relocate_section): Handle TLS relocations.
6050         * reloc.c: Add Alpha TLS relocations.
6051         * bfd-in2.h, libbfd.h: Rebuild.
6053 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
6055         * peXXigen.c (pe_print_idata): Remove double printed
6056         import table lines; add Bound-To comment.
6058 2002-05-29  Matt Thomas  <matt@3am-software.com>
6060         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
6061         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
6062         (elf32-vax.lo): New rule.
6063         * Makefile.in: Regenerate.
6064         * configure.in (bfd_elf32_vax_vec)
6065         (vaxnetbsd_vec): New vectors.
6066         * configure: Regenerate.
6067         * config.bfd (vax-*-netbsdelf*)
6068         (vax-*-netbsdaout*)
6069         (vax-*-netbsd*): New targets.
6070         * elf32-vax.c: New file.
6071         * reloc.c: Add VAX relocations.
6072         * bfd-in2.h: Regenerate.
6073         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
6075 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
6077         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
6078         and bfd_elf32_bigarm_vec to targ_selvecs.
6080 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
6082         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
6083         with auto-imported symbols.
6085 2002-05-29  Adam Nemet  <anemet@lnxw.com>
6087         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
6088         sections only record bfd.
6089         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
6090         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
6091         * bfd-in2.h: Regenerate.
6093 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
6095         * syms.c (_bfd_stab_section_find_nearest_line): Move
6096         declaration and initialisation of saw_line and saw_func out of
6097         for loop.
6099 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
6101         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
6102         (bfd_elf64_get_symbol_info): Define.
6103         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
6105 2002-05-29  Andrey Volkov  <avolkov@transas.com>
6107         * cpu-h8300.c: Make default h8300 machine first in machine list.
6109 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
6111         * config.bfd: Added DLX configuraton.
6112         * Makefile.am: Added DLX configuraton.
6113         * configure.in: Added DLX configuraton.
6114         * archures.c: Add DLX architecure.
6115         * reloc.c: Add DLX relocs.
6116         * targets.c: Added DLX target vector.
6117         * configure: Regenerate.
6118         * Makefile.in: Regenreate.
6119         * bfd-in2.h: Regenreate.
6120         * elf32-dlx.c: New file: Support DLX target.
6121         * cpu-dlx.c: New file: Support DLX target.
6123 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
6125         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
6127         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
6128         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
6129         strings to point inside function code sym string.
6130         (func_desc_adjust): Likewise.
6131         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
6133 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
6135         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
6136         (elf64_x86_64_grok_psinfo): Added.
6138 2002-05-24  TAMURA Kent <kent@netbsd.org>
6140         * config.bfd: Add a target for i386-netbsdpe.
6142 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
6144         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
6145         and is_func_descriptor.
6146         (func_desc_adjust): Hide function code sym in shared libs unless
6147         there is a matching exported function descriptor sym.
6149 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
6151         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
6152         for symbols from SHF_TLS section.
6153         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
6154         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
6155         (map_sections_to_segments): Build PT_TLS segment if necessary.
6156         (assign_file_positions_for_segments): Likewise.
6157         (get_program_header_size): Account for PT_TLS segment.
6158         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
6159         SEC_THREAD_LOCAL sections to STT_TLS.
6160         * reloc.c: Add 386 and IA-64 TLS relocs.
6161         * section.c (SEC_THREAD_LOCAL): Define.
6162         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
6163         Remove.
6164         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
6165         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
6166         unconditionally.
6167         (struct elf_final_link_info): Add first_tls_sec.
6168         (elf_bfd_final_link): Set first_tls_sec.
6169         Compute elf_hash_table (info)->tls_segment.
6170         (elf_link_output_extsym): Handle STT_TLS symbols.
6171         (elf_link_input_bfd): Likewise.
6172         * syms.c (BSF_THREAD_LOCAL): Define.
6173         * bfd-in2.h: Rebuilt.
6174         * libbfd.h: Rebuilt.
6175         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
6176         elf_i386_mkobject, elf_i386_object_p): New functions.
6177         (elf_howto_table): Add TLS relocs.
6178         (elf_i386_reloc_type_lookup): Support TLS relocs.
6179         (elf_i386_info_to_howto_rel): Likewise.
6180         (struct elf_i386_link_hash_entry): Add tls_type.
6181         (struct elf_i386_obj_tdata): New.
6182         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
6183         New macros.
6184         (struct elf_i386_link_hash_table): Add tls_ldm_got.
6185         (link_hash_newfunc): Clear tls_type.
6186         (elf_i386_check_relocs): Support TLS relocs.
6187         (elf_i386_gc_sweep_hook): Likewise.
6188         (allocate_dynrelocs): Likewise.
6189         (elf_i386_size_dynamic_sections): Likewise.
6190         (elf_i386_relocate_section): Likewise.
6191         (elf_i386_finish_dynamic_symbol): Likewise.
6192         (bfd_elf32_mkobject, elf_backend_object_p): Define.
6193         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
6194         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
6195         want_tprel, want_dtpmod, want_dtprel.
6196         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
6197         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
6198         R_IA64_LTOFF_TPREL22.
6199         (elf_code_to_howto_index): Add TLS relocs.
6200         (elfNN_ia64_check_relocs): Support TLS relocs.
6201         (allocate_global_data_got): Account for TLS .got data.
6202         (allocate_dynrel_entries): Account for TLS dynamic relocations.
6203         (elfNN_ia64_install_value): Supprt TLS relocs.
6204         (set_got_entry): Support TLS relocs.
6205         (elfNN_ia64_relocate_section): Likewise.
6207 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
6209         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
6210         BLX reloc round the relocation up rather than down.
6211         * coff-arm.c (coff_arm_relocate_section): Likewise.
6213 2002-05-21  H.J. Lu  (hjl@gnu.org)
6215         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
6216         definition.
6218 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
6220         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
6221         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
6223 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
6225         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
6226         unresolved relocs.
6227         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
6229 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6231         * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
6232         non-ELF targets.
6234 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6236         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
6237         an error value.
6238         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
6239         return with false on error.
6240         (elf_link_input_bfd): Check reloc_emitter return value.
6242 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
6244         * config.bfd (armeb-*-netbsdelf*): New target.
6246 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
6248         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
6249         at the plt call stub.
6251 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6253         * cpu-mips.c (mips_compatible): Don't try to check machine
6254         compatibility.
6256 2002-05-18  Tom Rix  <trix@redhat.com>
6258         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
6260 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
6262         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
6263         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
6264         we've already warned about an undefined symbol.  Report more
6265         detail on reloc errors.
6267 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
6269         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
6270         * configure.in: Invoke AM_INSTALL_LIBBFD.
6271         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
6272         (install_libbfd): .. New target.
6273         (uninstall_libbfd): Likewise.
6274         (install-bfdlibLTLIBRARIES): Likewise.
6275         (uninstall-bfdlibLTLIBRARIES): Likewise.
6276         (bfdlibdir): New.
6277         (bfdincludedir): New.
6278         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
6279         * aclocal.m4: Regenerate.
6280         * configure: Regenerate.
6281         * Makefile.in: Regenerate.
6283 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
6285         * hash.c (bfd_hash_lookup): Remove computation of len from inside
6286         hash loop.
6288 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
6290         * config.bfd: Add targets for sh64-linux (little endian and
6291         big endian).
6293 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
6295         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
6296         is located in the same section as the import table.  Instead
6297         check, and if necessary load the section containing the thunk.
6299 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
6301         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
6302         bfd_bread.
6303         (xcoff64_core_file_matches_executable_p): Replace bfd_read
6304         with bfd_bread.
6306 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
6308         * aix5ppc-core.c: Warning fixes.
6309         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
6310         * aout-target.h (MY_bfd_link_just_syms): Define.
6311         * aout-tic30.c (MY_bfd_link_just_syms): Define.
6312         * bfd.c (bfd_link_just_syms): Define.
6313         * binary.c (binary_bfd_link_just_syms): Define.
6314         * bout.c (b_out_bfd_link_just_syms): Define.
6315         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
6316         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6317         * coffcode.h (coff_bfd_link_just_syms): Define.
6318         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
6319         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
6320         (_bfd_elf_link_just_syms): Declare.
6321         * elf.c (_bfd_elf_link_just_syms): New function.
6322         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
6323         sections haven't already been discarded by the linker.
6324         * elflink.h (elf_link_add_object_symbols): Likewise for stab
6325         sections and SEC_MERGE sections.
6326         (elf_bfd_discard_info): Similarly here.
6327         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
6328         * i386msdos.c (msdos_bfd_link_just_syms): Define.
6329         * i386os9k.c (os9k_bfd_link_just_syms): Define.
6330         * ieee.c (ieee_bfd_link_just_syms): Define.
6331         * ihex.c (ihex_bfd_link_just_syms): Define.
6332         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
6333         (_bfd_generic_link_just_syms): Declare.
6334         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
6335         * linker.c (_bfd_generic_link_just_syms): New function.
6336         * mmo.c (mmo_bfd_link_just_syms): Define.
6337         * nlm-target.h (nlm_bfd_link_just_syms): Define.
6338         * oasys.c (oasys_bfd_link_just_syms): Define.
6339         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
6340         * som.c (som_bfd_link_just_syms): Define.
6341         * srec.c (srec_bfd_link_just_syms): Define.
6342         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
6343         (BFD_JUMP_TABLE_LINK): And here.
6344         * tekhex.c (tekhex_bfd_link_just_syms): Define.
6345         * versados.c (versados_bfd_link_just_syms): Define.
6346         * vms.c (vms_bfd_link_just_syms): Define.
6347         * libbfd.h: Regenerate.
6348         * bfd-in2.h: Regenerate.
6350 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6352         * elf32-mips.c: Remove superfluous definitions copied from
6353         elfxx-mips.c.
6354         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
6355         SGIish vectors to check the special case.
6356         (mips_elf_hi16_reloc): Fix comment.
6357         (mips_elf_got16_reloc): Likewise.
6358         (_bfd_mips_elf32_gprel16_reloc): Likewise.
6359         (elf_reloc_map): Code cleanup.
6360         (mips_reloc_map): Add comment.
6361         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
6362         (mips_elf32_rtype_to_howto): Likewise.
6363         (mips_elf32_discard_info): Likewise.
6364         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
6365         lead to IRIX compatibility now.
6367 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6369         * elfxx-mips.c: Call it IRIX, not Irix in comments.
6371 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
6373         * config.bfd (shle-*-netbsdelf*): Add target which includes
6374         sh64 support.
6376 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
6378         * configure.in: Revert 2002-04-07.  Instead, auto-configure
6379         HAVE_ST_C_IMPL.
6380         * configure: Regenerate.
6381         * config.in: Regenerate.
6382         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
6383         or AIX_5_CORE.
6385 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
6387         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
6388         corefiles as well.2
6389         * configure: Regenerate.
6391 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
6393         * Makefile.am (install-data-local): Install headers to
6394         $(exec_prefix)/include.
6395         * Makefile.in: Regenerate.
6397 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
6398             Daniel Jacobowitz  <drow@mvista.com>
6400         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
6401         map BFD_RELOC_RVA.
6403 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
6405         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
6406         hppa*-*-openbsd*): New targets.
6407         * configure.in (alpha*-*-openbsd*): Set COREFILE.
6408         * configure: Regenerate.
6410 2002-05-10  Tom Rix  <trix@redhat.com>
6412         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
6413         xcoff64_ppc_relocate_section.
6414         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
6415         * libxcoff.h: Common xcoff_reloc_type function declaration.
6417 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
6419         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
6420         added in 2002-05-09 commit.
6422         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
6423         don't look for stubs on all undefined syms.
6425 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
6427         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
6428         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
6429         pcrel_offset.
6431         * elf32-i386.c (elf_howto_table): Comments.
6432         (elf_i386_relocate_section): Handle more relocs for relocatable
6433         linking and against SEC_MERGE sections.
6435 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
6437         * elf32-ppc.c (ppc_elf_create_got): New function.
6438         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
6439         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
6440         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
6441         _bfd_elf_create_got_section.
6443 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
6445         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
6446         * elfxx-target.h (elf_backend_rela_normal): Define.
6447         (elfNN_bed): Init rela_normal.
6448         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
6449         for section symbols here if rela_normal.  Simplify abs section test.
6450         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
6451         return immediately.  Remove code handling relocatable linking.
6452         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
6453         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6454         * elf32-i370.c (i370_elf_relocate_section): Likewise.
6455         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6456         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6457         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6458         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6459         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6460         * elf32-s390.c (elf_s390_relocate_section): Likewise.
6461         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6462         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6463         * elf64-s390.c (elf_s390_relocate_section): Likewise.
6464         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6465         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
6466         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
6467         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6468         * elf-m10200.c (elf_backend_rela_normal): Define.
6469         * elf-m10300.c (elf_backend_rela_normal): Define.
6470         * elf32-fr30.c (elf_backend_rela_normal): Define.
6471         * elf32-i370.c (elf_backend_rela_normal): Define.
6472         * elf32-i860.c (elf_backend_rela_normal): Define.
6473         * elf32-m68k.c (elf_backend_rela_normal): Define.
6474         * elf32-mcore.c (elf_backend_rela_normal): Define.
6475         * elf32-openrisc.c (elf_backend_rela_normal): Define.
6476         * elf32-ppc.c (elf_backend_rela_normal): Define.
6477         * elf32-s390.c (elf_backend_rela_normal): Define.
6478         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
6479         * elf64-ppc.c (elf_backend_rela_normal): Define.
6480         * elf64-s390.c (elf_backend_rela_normal): Define.
6481         * elf64-x86-64.c (elf_backend_rela_normal): Define.
6482         * elfxx-ia64.c (elf_backend_rela_normal): Define.
6483         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
6484         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
6486 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
6488         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
6489         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
6491 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
6493         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
6494         when not relocatable.  Fix reloc_emitter call for K&R.
6496 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
6498         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
6499         reloading local sym addend mistakenly removed in 2002-05-01 change.
6501         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
6502         (read_abbrevs): Change "offset" param to bfd_vma.
6503         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
6504         Change "abbrev_offset" to bfd_vma.
6505         (read_indirect_string): Use correct conversion chars in error
6506         message format string, cast bfd_vma's to unsigned long.
6507         (read_abbrevs): Likewise.
6508         (read_attribute_value): Likewise.
6509         (decode_line_info): Likewise.
6510         (scan_unit_for_functions): Likewise.
6511         (parse_comp_unit): Likewise.
6513 2002-05-04  Tom Rix  <trix@redhat.com>
6515         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
6516         (coff_swap_reloc_out): Same.
6517         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
6518         (xcoff_swap_reloc_out): Same.
6519         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
6520         case some 16 bit relocs. Add reloc value to output.
6521         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
6522         R_RBR. Improve names.
6523         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
6524         (bfd_xcoff_backend_data): Update with new reloc swap names.
6525         (bfd_pmac_xcoff_backend_data) : Same.
6526         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
6527         (xcoff64_swap_reloc_out): Same.
6528         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
6529         R_POS. Add reloc value to output.
6530         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
6531         bit R_RBR. Improve names, masks.
6532         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
6533         (bfd_xcoff_backend_data): Update with new reloc swap names.
6534         (bfd_xcoff_aix5_backend_data) : Same.
6536 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
6538         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
6539         bfd_count top_index, input_list, all_local_syms.
6540         (elf32_hppa_setup_section_lists): New function, split from
6541         elf32_hppa_size_stubs.
6542         (elf32_hppa_next_input_section): Likewise.
6543         (group_sections): Likewise.
6544         (get_local_syms): Likewise.
6545         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
6546         stubs on undefined syms too.
6547         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
6548         Only access htab elf fields when we have an elf hash table.
6549         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
6550         (elf32_hppa_next_input_section): Declare.
6552 2002-05-04  Bob Byrnes  <byrnes@curl.com>
6554         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
6555         _bfd_new_bfd.
6557 2002-05-03  H.J. Lu  (hjl@gnu.org)
6559         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
6560         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
6561         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
6562         to hide a global symbol.
6563         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
6564         forced_local to true.
6566 2002-05-02  Richard Henderson  <rth@redhat.com>
6568         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
6569         vs SHN_UNDEF to zero.
6571 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
6573         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
6574         16 bit reloc.
6575         <R_PPC64_SECTOFF_DS>: Likewise.
6576         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6577         SECTOFF reloc.
6578         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
6579         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6580         SECTOFF reloc.
6582         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
6583         (ppc64_elf_ha_reloc): New function.
6584         (ppc64_elf_brtaken_reloc): New function.
6585         (ppc64_elf_sectoff_reloc): New function.
6586         (ppc64_elf_sectoff_ha_reloc): New function.
6587         (ppc64_elf_toc_reloc): New function.
6588         (ppc64_elf_toc_ha_reloc): New function.
6589         (ppc64_elf_toc64_reloc): New function.
6590         (ppc64_elf_unhandled_reloc): New function.
6591         (ppc64_elf_howto_raw): Use the above.
6592         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
6593         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
6594         <R_PPC64_SECTOFF_DS>: Likewise.
6595         (IS_ABSOLUTE_RELOC): Update.
6596         (struct ppc_link_hash_table): Add have_undefweak.
6597         (ppc64_elf_link_hash_table_create): Init.
6598         (func_desc_adjust): Set have_undefweak.
6599         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
6600         add the .sfpr blr when have_undefweak.
6601         (ppc64_elf_setup_section_lists): Check hash table flavour.
6602         (ppc64_elf_next_input_section): Move output_section->owner test to
6603         ppc64elf.em.
6604         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
6605         and relocatable test.  Return TOCstart and don't set elf_gp.
6606         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
6607         offset calculation.  Add assert on weak sym branch tweaks.
6608         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
6609         (ppc64_elf_toc): Declare.
6610         (ppc64_elf_next_input_section): Update.
6612 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
6614         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
6615         file_name.
6617 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
6619         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
6620         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
6621         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
6622         call branches.  Correct undefined weak destination.
6623         (ppc64_elf_func_desc_adjust): Always create at least one blr in
6624         .sfpr, and correct case where either only savef* or restf* is
6625         needed.
6627         Long branch stubs, multiple stub sections.
6628         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
6629         (ppc64_elf_next_input_section): Declare.
6630         * elf64-ppc.c: Move linker-only prototypes.
6631         (STUB_SUFFIX): Define.
6632         (enum ppc_stub_type): New.
6633         (struct ppc_stub_hash_entry): New.
6634         (struct ppc_branch_hash_entry): New.
6635         (struct ppc_link_hash_entry): Add stub_cache, oh.
6636         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
6637         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
6638         Rename plt_overflow to stub_error.
6639         (ppc_stub_hash_lookup): Define.
6640         (ppc_branch_hash_lookup): Define.
6641         (stub_hash_newfunc): New function.
6642         (branch_hash_newfunc): New function.
6643         (link_hash_newfunc): Init new fields.
6644         (ppc64_elf_link_hash_table_create): Likewise.
6645         (ppc64_elf_link_hash_table_free): New function.
6646         (ppc_stub_name): New function.
6647         (ppc_get_stub_entry): New function.
6648         (ppc_add_stub): New function.
6649         (create_linkage_sections): Use bfd_make_section_anyway.  Create
6650         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
6651         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
6652         and set up for plt call stubs.  Link func and func desc syms.
6653         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
6654         (func_desc_adjust): Avoid hash lookup when func desc sym available
6655         via shortcut, and set links when processing.
6656         (ppc64_elf_hide_symbol): Likewise.
6657         (allocate_dynrelocs): Don't allocate stub section here.
6658         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
6659         Remove sstub code.
6660         (ppc_type_of_stub): New function.
6661         (build_one_stub): Delete.
6662         (ppc_build_one_stub): New function.
6663         (ppc_size_one_stub): New function.
6664         (ppc64_elf_setup_section_lists): New function.
6665         (ppc64_elf_next_input_section): New function.
6666         (group_sections): New function.
6667         (get_local_syms): New function.
6668         (ppc64_elf_size_stubs): Rewrite.
6669         (ppc64_elf_build_stubs): Rewrite.
6670         (ppc64_elf_relocate_section): Look up stub entry for REL24
6671         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
6672         branch stubs if REL14* or REL24 relocs won't reach.
6673         (bfd_elf64_bfd_link_hash_table_free): Define.
6675 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
6677         * config.bfd: Add support for powerpc-*-windiss.
6679 2002-04-30  Tom Rix  <trix@redhat.com>
6681         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
6682         symbol names into the hash table.
6684 2002-04-28  Tom Rix  <trix@redhat.com>
6686         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
6687         calulating relocations.
6688         (xcoff_complain_overflow) : Function table for relocation errors.
6689         (xcoff_ppc_relocate_section): Use relocation and complain function
6690         tables.
6691         (xcoff_complain_overflow_unsigned_func): New complain function.
6692         (xcoff_complain_overflow_signed_func): Same.
6693         (xcoff_complain_overflow_bitfield_func): Same.
6694         (xcoff_complain_overflow_dont_func): Same.
6695         (xcoff_reloc_type_crel): New recot function.
6696         (xcoff_reloc_type_br): Same.
6697         (xcoff_reloc_type_ba): Same.
6698         (xcoff_reloc_type_toc): Same.
6699         (xcoff_reloc_type_rel): Same.
6700         (xcoff_reloc_type_neg): Same.
6701         (xcoff_reloc_type_pos): Same.
6702         (xcoff_reloc_type_fail): Same.
6703         (xcoff_reloc_type_noop): Same.
6704         * libxcoff.h : Declare common parts for xcoff64.
6705         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
6706         and complain function tables.
6708 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
6710         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
6711         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
6713 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
6715         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
6716         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
6718         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
6719         same as the output before calling elf_link_input_bfd.
6721         * coffcode.h (coff_compute_section_file_positions): Set
6722         section_tail after shuffling section list.
6724 2002-04-24  Christian Groessler <chris@groessler.org>
6726         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
6727         addresses are 23bit with a special layout, not plain 32bit
6728         values.  Prevent relocation of immediate values.
6730 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
6732         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
6733         MIPS-16 ASE flags are set, print something to indicate that.
6735 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
6737         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
6738         under which a plt call stub is used.
6739         (final_link_relocate): Similarly.
6740         (allocate_plt_static): Clear h-plabel except when plt entry is
6741         exclusively used for a plabel.
6742         (allocate_dynrelocs): Use the above to simplify plt sizing.
6743         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
6744         (elf32_hppa_link_hash_table_create): Init.
6745         (BL22_RP): Define.
6746         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
6747         (elf32_hppa_check_relocs): Set has_22bit_branch.
6749         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
6750         (final_link_relocate): Likewise.
6752 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
6754         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
6755         search table if some FDE is DW_EH_PE_aligned encoded either.
6756         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
6758 2002-04-22  Richard Smith  <richard@ex-parrot.com>
6759             Jakub Jelinek  <jakub@redhat.com>
6761         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
6762         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
6763         encoded personality.
6764         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
6765         for CIE/FDE removal.
6767 2002-04-20  Tom Rix  <trix@redhat.com>
6769         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
6771 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
6773         * archures.c (bfd_lookup_arch): Move the list order comment..
6774         (struct bfd_arch_info): ..to where it belongs.
6775         * bfd-in2.h: Regenerate.
6777         * archures.c (bfd_lookup_arch): Add comment on list order.
6778         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
6779         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
6780         is always at head of list.
6782 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
6784         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
6785         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
6786         definition of these functions for ARM_WINCE builds as they are
6787         not used.
6788         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
6789         for ARM_WINCE builds.
6791 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
6793         * coff-arm.c (bfd_arm_process_before_allocation):
6795 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
6797         * cpu-sh.c (scan_mach): Delete.
6798         (arch_info_struct): Replace scan_mach with bfd_default_scan.
6799         (bfd_sh_arch): Likewise.
6801 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
6803         * ihex.c (ihex_write_object_contents): Fix check for records
6804         crossing 64K boundaries.
6806 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
6808         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
6809         type rather than just assuming entries are ELF.
6810         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6811         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6812         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
6813         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
6814         rather than elf_link_hash_entry.
6816 2002-04-15  Richard Henderson  <rth@redhat.com>
6818         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
6819         n32 binaries.
6821 2002-04-15  Michael Snyder  <msnyder@redhat.com>
6823         * opncls.c (bfd_close): Write contents if writeable.
6824         Minor formatting tidy-ups.
6826 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
6828         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
6830 2002-04-12  Michael Snyder  <msnyder@redhat.com>
6832         * bfd-in.h (bfd_get_section_lma): New access macro.
6833         Minor white-space fix-up.
6835 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
6837         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
6838         header pad.
6840 2002-04-09  DJ Delorie  <dj@redhat.com>
6842         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
6844 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
6846         * coffcode.h (coff_read_word): New.
6847         (coff_compute_checksum): New.
6848         (coff_apply_checksum): New.
6849         (coff_write_object_contents): Call coff_apply_checksum () to
6850         apply checksum to PE image.
6852 2002-04-08  Randolph Chung  <tausq@debian.org>
6854         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
6855         (elf32_hppa_final_link): Split out sorting logic to..
6856         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
6857         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
6859 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
6861         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
6862         pattern.
6863         * configure: Re-generate.
6865 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
6867         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
6868         is greater or equal to 4.3.3.
6869         * configure: Regenerate.
6870         Fix PR gdb/344.
6872 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
6874         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
6875         R_CRIS_32_PCREL>: Fix typo in name.
6876         (cris_elf_check_relocs): Always create .rela.got here when
6877         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
6878         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
6879         assume it's created.
6881 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
6883         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
6884         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
6885         define.
6886         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
6887         * bfd.c (bfd_link_hash_table_free): Define.
6888         * binary.c (binary_bfd_link_hash_table_free): Define.
6889         * bout.c (b_out_bfd_link_hash_table_free): Define.
6890         * coff-rs6000.c (rs6000coff_vec): Include
6891         _bfd_generic_link_hash_table_free.
6892         (pmac_xcoff_vec): Likewise.
6893         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6894         (aix5coff64_vec): Likewise.
6895         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
6896         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
6897         (bfd_elf32_bfd_link_hash_table_free): Define.
6898         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
6899         (bfd_elf32_bfd_link_hash_table_free): Define.
6900         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
6901         define.
6902         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
6903         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
6904         * ieee.c (ieee_bfd_link_hash_table_free): Define.
6905         * ihex.c (ihex_bfd_link_hash_table_free): Define.
6906         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
6907         (_bfd_generic_link_hash_table_free): Add prototype.
6908         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
6909         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
6910         * linker.c (_bfd_generic_link_hash_table_free): New function.
6911         * mmo.c (mmo_bfd_link_hash_table_free): Define.
6912         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
6913         * oasys.c (oasys_bfd_link_hash_table_free): Define.
6914         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
6915         * som.c (som_bfd_link_hash_table_free): Define.
6916         * srec.c (srec_bfd_link_hash_table_free): Define.
6917         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
6918         * versados.c (versados_bfd_link_hash_table_free): Define.
6919         * vms.c (vms_bfd_link_hash_table_free): New function.
6920         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
6922         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
6923         instead of bfd_alloc.
6924         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
6925         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
6926         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
6927         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
6928         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
6929         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
6930         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
6931         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
6932         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
6933         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
6934         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
6935         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
6936         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
6937         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
6938         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
6939         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
6940         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
6941         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
6942         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
6943         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
6944         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
6945         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
6946         * m68klinux.c (linux_link_hash_table_create): Likewise.
6947         * sparclinux.c (linux_link_hash_table_create): Likewise.
6948         * sunos.c (sunos_link_hash_table_create): Likewise.
6949         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
6951         * targets.c: Add _bfd_link_hash_table_free to xvec.
6953         * bfd-in2.h: Regenerate.
6954         * libbfd.h: Regenerate.
6955         * libcoff.h: Regenerate.
6957 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
6959         * dep-in.sed: Cope with absolute paths.
6960         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
6961         Run "make dep-am".
6962         * Makefile.in: Regenerate.
6963         * coff-arm.c: Fix copyright date.
6964         * cpu-h8300.c: Likewise.
6965         * cpu-i370.c: Likewise.
6966         * cpu-s390.c: Likewise.
6967         * cpu-mips.c: Likewise.
6968         * po/SRC-POTFILES.in: Regenerate.
6970 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6972         * Makefile.am: Add elfxx-mips.c to the known backends.
6973         (elf32-mips.lo): remove dependency to coff/external.h.
6974         * Makefile.in: Regenerate.
6975         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
6976         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
6977         accordingly.
6978         * configure: Regenerate.
6979         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
6980         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
6981         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
6982         MIPS specific backend functions.
6983         * elf32-mips.c: Moved most code to elfxx-mips.c.
6984         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
6985         static.
6986         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
6987         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
6988         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
6989         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
6990         interface to allow selection of the right REL or RELA howto table.
6991         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
6992         static. Let it refuse n32 objects.
6993         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
6994         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
6995         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
6996         (elf32_mips_ignore_discarded_relocs): Rename from
6997         _bfd_elf32_mips_ignore_discarded_relocs.
6998         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
6999         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7000         (elf_mips_howto_table_rela): Remove.
7001         * elf64-mips.c: Moved most code to elfxx-mips.c.
7002         (bfd_elf64_bfd_reloc_type_lookup): Make static.
7003         (mips_elf64_rtype_to_howto): New function.
7004         (mips_elf64_object_p): Likewise.
7005         (elf64_mips_irix_compat): Likewise.
7006         * elfxx-mips.c: New file containing common code merged together from
7007         elf32-mips.c and elf64-mips.c.
7008         * elfxx-mips.h: New file containing MIPS specific prototypes from
7009         elf-bfd.h.
7010         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
7011         elf_backend_mips_rtype_to_howto.
7013 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
7015         * srec.c (MAXCHUNK, Chunk): Revise comments.
7016         (srec_write_record): Correct buffer size.
7017         (srec_write_header): Do without intermediate buffer.
7018         (srec_write_section): Validate Chunk.
7019         (srec_write_terminator): Pass NULL instead of dummy buffer.
7020         (srec_write_symbols): Pass file and symbol names directly to
7021         bfd_bwrite so sprintf won't overflow buffer.
7023 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
7025         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
7026         PC relative relocs against hidden symbols.
7027         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7029 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
7031         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
7032         LMAs, loop over segments until p_vaddr and p_memsz specify an
7033         extent enclosing the section.
7035 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
7037         * ihex.c (ihex_write_object_contents): Do not allow records to
7038         cross a 64K boundary - wrap if necessary.
7040 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
7042         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
7043         which caused the returned LWP ID to always be 0.
7045 2002-04-01  Richard Henderson  <rth@redhat.com>
7047         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7048         (elf32_sparc_relocate_section): Use it to figure out when to
7049         initialize .got entries.
7050         * elf64-sparc.c: Similarly.
7052 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
7054         * linker.c (link_action): Ignore duplicate warning syms.
7055         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
7056         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
7057         (elf_adjust_dynamic_symbol): Likewise.
7058         (elf_export_symbol): Likewise.
7059         (elf_link_find_version_dependencies): Likewise.
7060         (elf_link_assign_sym_version): Likewise.
7061         (elf_link_sec_merge_syms): Likewise.
7062         (elf_link_output_extsym): Likewise.
7063         (elf_gc_sweep_symbol): Likewise.
7064         (elf_gc_propagate_vtable_entries_used): Likewise.
7065         (elf_gc_smash_unused_vtentry_relocs): Likewise.
7066         (elf_gc_allocate_got_offsets): Likewise.
7067         (elf_collect_hash_codes): Likewise.
7068         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
7069         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
7070         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7071         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
7072         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
7073         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
7074         (elf_cris_discard_excess_dso_dynamics): Likewise.
7075         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
7076         (mark_PIC_calls): Likewise.
7077         (allocate_plt_static): Likewise.
7078         (allocate_dynrelocs): Likewise.
7079         (readonly_dynrelocs): Likewise.
7080         * elf32-i386.c (allocate_dynrelocs): Likewise.
7081         (readonly_dynrelocs): Likewise.
7082         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
7083         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
7084         * elf32-mips.c (mips_elf_output_extsym): Likewise.
7085         (mips_elf_sort_hash_table_f): Likewise.
7086         (mips_elf_check_mips16_stubs): Likewise.
7087         * elf32-s390.c (allocate_dynrelocs): Likewise.
7088         (readonly_dynrelocs): Likewise.
7089         * elf32-sh.c (sh_elf_discard_copies): Likewise.
7090         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
7091         (xstormy16_relax_plt_realloc): Likewise.
7092         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
7093         (elf64_alpha_output_extsym): Likewise.
7094         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
7095         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
7096         (mips_elf64_check_mips16_stubs): Likewise.
7097         (mips_elf64_output_extsym): Likewise.
7098         * elf64-ppc.c (func_desc_adjust): Likewise.
7099         (allocate_dynrelocs): Likewise.
7100         (readonly_dynrelocs): Likewise.
7101         * elf64-s390.c (allocate_dynrelocs): Likewise.
7102         (readonly_dynrelocs): Likewise.
7103         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
7104         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
7105         (readonly_dynrelocs): Likewise.
7106         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
7107         * aoutx.h (aout_link_write_other_symbol): Likewise.
7108         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
7109         (_bfd_coff_write_global_sym): Likewise.
7110         * i386linux.c (linux_tally_symbols): Likewise.
7111         * m68klinux.c (linux_tally_symbols): Likewise.
7112         * sparclinux.c (linux_tally_symbols): Likewise.
7113         * pdp11.c (aout_link_write_other_symbol): Likewise.
7114         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
7115         * xcofflink.c (xcoff_build_ldsyms): Likewise.
7116         (xcoff_write_global_symbol): Likewise.
7118         * cofflink.c (_bfd_coff_final_link): Formatting.
7119         * cpu-mips.c (mips_compatible): Make static, prototype.
7120         * elf32-i386.c (elf_i386_check_relocs): Formatting.
7121         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
7122         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
7123         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
7124         (mips_elf64_final_link): Likewise.
7125         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
7126         prototype.
7128 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
7130         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
7131         (SWAP_OUT_RELOC_OFFSET): Define.
7133 2002-03-27  Gregory Steuck <greg@nest.cx>
7135         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
7136         terminating NULL if empty symbol table.
7137         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
7139 2002-03-26  H.J. Lu  (hjl@gnu.org)
7141         * elflink.h (elf_link_input_bfd): Revert the last change since
7142         the gcc exception handling isn't fixed yet.
7144 2002-03-26  H.J. Lu  (hjl@gnu.org)
7146         * elflink.h (elf_link_input_bfd): Complain about relocations
7147         against local symbols in discarded sections.
7149 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
7151         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
7153 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
7155         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
7156         section file offset for !SEC_LOAD sections.
7158 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
7160         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
7161         <case R_ARM_GOT>): Handle relocations to Thumb functions.
7163 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
7165         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
7166         Whitespace changes.
7167         * archive.c: Update copyright date.
7168         * bfd-in2.h: Regenerate.
7169         * libbfd.h: Regenerate.
7170         * Makefile.am: Run "make dep-am"
7171         * Makefile.in: Regenerate.
7172         * po/SRC-POTFILES.in: Regenerate.
7174 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
7176         * dwarf2.c (struct funcinfo): Move up.
7177         (lookup_address_in_function_table): New argument function_ptr.
7178         Set it.
7179         (lookup_address_in_line_table): New argument function.  If function
7180         is non-NULL, use it to handle ``addr'' before the first line note of
7181         the function.
7182         (comp_unit_find_nearest_line): Update and swap calls to
7183         lookup_address_in_function_table and lookup_address_in_line_table.
7184         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
7185         N_SLINE encountered if we see an N_FUN before any N_SLINE.
7187 2002-03-20  Tom Rix  <trix@redhat.com>
7189         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
7190         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
7191         * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
7193 2002-03-19  Tom Rix  <trix@redhat.com>
7195         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
7196         dynamic objects in archives.
7198 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
7200         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
7201         STT_NOTYPE symbols to STT_OBJECT.
7203 2002-03-18  Jan Hubicka  <jh@suse.cz>
7205         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
7207 2002-03-18  Tom Rix  <trix@redhat.com>
7209         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
7210         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
7211         * coff-rs6000 (do_pad) : New function for archive padding.
7212         (do_copy) : New function for object file copying in archives.
7213         (do_shared_object_padding) : New function for padding shared
7214         objects to their text section alignment in archives.
7215         (bfd_xcoff_ar_achive_set_magic) : Stub.
7216         (xcoff_write_armap_big) : Use do_copy and do_pad.
7217         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
7218         do_copy and do_pad.
7219         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
7220         bfd_xcoff_magic_number.
7221         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
7222         fop.
7223         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
7224         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
7225         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
7226         * rs6000-core.c : Update copyright date.
7227         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
7228         csectpp.
7229         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
7230         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
7231         (coff_set_flags) : Use bfd_xcoff_magic_number.
7232         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
7233         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
7234         * Makefile.am : Same.
7235         * config.bfd : Same.
7236         * targets.c : Same.
7237         * configure : Regnerate.
7238         * Makefile.in : Same.
7239         * bfd-in2.h : Same.
7241 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
7243         * po/fr.po: Updated version.
7245 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
7247         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
7248         * libbfd.h: Regenerate.
7249         * archive.c (coff_write_armap): Pass on failures from
7250         bfd_write_bigendian_4byte_int.
7252 2002-03-14  H.J. Lu <hjl@gnu.org>
7254         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
7255         error to bfd_error_nonrepresentable_section for reinit_array
7256         section in DSO.
7258 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
7260         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
7261         OR it in rather than replacing previously selected flags.
7263         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
7264         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
7266 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
7268         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
7269         (N): Use the above.
7270         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
7271         ensure reloc size matches before calling elf_link_input_bfd.
7272         Add an assert to check reloc size when counting output relocs.
7274 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
7276         * mmo.c (mmo_get_loc): Return NULL rather than false.
7278 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
7280         * po/fr.po: Updated version.
7282 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
7284         * archures.c (bfd_default_compatible): Test bits_per_word.
7285         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
7286         bfd_default_compatible.
7287         * cpu-i370.c (i370_compatible): Likewise.
7288         * cpu-sparc.c (sparc_compatible): Likewise.
7289         * cpu-h8300.c (compatible): Test in->arch == out->arch.
7291         * elflink.h: Formatting fixes.
7292         (elf_link_output_extsym): Merge undefined and undef weak cases.
7294         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
7295         when word size of input matches output word size.
7297 2002-03-12  Andreas Jaeger  <aj@suse.de>
7299         * cpu-i386.c (i386_compatible): New.  Use it instead of
7300         bfd_default_compatible.
7302 2002-03-07  H.J. Lu  (hjl@gnu.org)
7304         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
7305         as the type for bfd_reloc_val.
7307 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7309         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
7310         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
7311         (elf_hppa_final_link_relocate): Correct relocations for indirect
7312         references to local data through the DLT.  Fix .opd creation for
7313         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
7314         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
7315         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
7316         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7317         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
7318         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
7319         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7321 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
7323         * merge.c (_bfd_merge_sections): Don't segfault if there
7324         is nothing to merge due to GC.
7326 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
7328         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
7329         symbols that have been forced local.
7331         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
7332         to output forced local syms for non-shared link.
7333         (elf_link_output_extsym): Tweak condition for calling backend
7334         adjust_dynamic_symbol so that previous behaviour is kept.
7335         Whitespace changes throughout file.
7337 2002-03-04  H.J. Lu <hjl@gnu.org>
7339         * elf.c (bfd_section_from_shdr): Handle special sections,
7340         .init_array, .fini_array and .preinit_array.
7341         (elf_fake_sections): Likewise.
7343         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
7344         DT entry only if the section is in output for .init_array,
7345         .fini_array and .preinit_array. Complain about .preinit_array
7346         section in DSO.
7347         (elf_bfd_final_link): Warn zero size for .init_array,
7348         .fini_array and .preinit_array sections.
7350         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
7351         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
7352         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
7353         .preinit_array.
7355 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
7357         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
7358         * configure: Regenerate.
7360 2002-03-02  Tom Rix  <trix@redhat.com>
7362         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
7363         symbolic equiv.
7364         * coff-rs6000.c (xcoff_howto_table): Same.
7366 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
7368         * elflink.h (size_dynamic_sections): If section named
7369         ".preinit_array" exists, create DT_PREINIT_ARRAY and
7370         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
7371         ".init_array" and ".fini_array".
7372         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
7373         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
7374         DT_FINI_ARRAY.
7376 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
7378         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
7379         dynsyms.
7381 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
7383         * elf64-hppa.h: Update copyright date.
7385         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
7386         (ppc64_elf_relocate_section): Don't generate power4 style branch
7387         hints for *_BRTAKEN and *_BRNTAKEN relocs.
7389 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
7391         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
7392         last patch.
7393         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7395 2002-02-21  Andreas Jaeger  <aj@suse.de>
7397         * elf64-x86-64.c: Major rework that introduces all recent changes
7398         to the x86-64 backend.  Get a closer match to elf32-i386.
7399         (struct elf64_x86_64_dyn_relocs): Rename from
7400         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
7401         all users.
7402         (struct elf64_x86_64_link_hash_table): Add short cuts to some
7403         sections.
7404         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
7405         remove casts, initialize new hash members.
7406         (create_got_section): New.
7407         (elf64_x86_64_create_dynamic_sections): New.
7408         (elf64_x86_64_copy_indirect_symbol): New.
7409         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
7410         relocs, .got or .relgot here but do it in allocate_dynrelocs.
7411         Reference count possible .plt and .got entries.  Don't test input
7412         section SEC_READONLY here to try to avoid copy relocs, and keep
7413         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
7414         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
7415         pointer to "sreloc" section in elf_section_data. Tweak condition
7416         under which .got created.  Report files with bad relocation
7417         section names.
7418         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
7419         Reference count possible .plt entries.  Don't deallocate .got and
7420         .relgot space here.
7421         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
7422         do copy reloc processing for weakdefs.  Remove redundant casts and
7423         aborts.  Delay setting of vars until needed.  Move creation of
7424         dynamic symbols and allocation of .plt and .rela.plt to
7425         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
7426         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7427         (allocate_dynrelocs): New.
7428         (readonly_dynrelocs): New.
7429         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
7430         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
7431         Zero out the dynamic allocated content space.
7432         (elf64_x86_64_discard_copies): Removed.
7433         (elf64_x86_64_relocate_section): Make use of dynamic section
7434         short-cuts.  Localise vars, and delay setting.  Better error
7435         reporting, replace BFD_ASSERT with abort.  Check
7436         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
7437         regular object file and tread the weak definition as the normal
7438         one.  Don't discard relocs for undefweak or undefined symbols and
7439         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
7440         relocs.
7441         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
7442         symbols that have been forced local.  Use same test to decide if
7443         we can use a relative reloc for got as relocate_section.  Expand
7444         SHN_UNDEF comment.  Move expressions out of function calls.
7445         Replace BFD_ASSERT with abort.
7446         (bfd_elf64_bfd_final_link): Removed.
7447         (elf_backend_copy_indirect_symbol): Define.
7449 2002-02-20  Tom Rix  <trix@redhat.com>
7451         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
7452         (_bfd_xcoff_reloc_type_lookup): Use it.
7453         * coff64-rs6000.c (xcoff64_howto_table): Same.
7454         (xcoff64_reloc_type_lookup): Same.
7456 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
7458         * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
7459         little endian.
7461 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7463         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
7464         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
7465         * bfd-in2.h: Regenerate.
7466         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
7467         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
7468         with "s390:64-bit".
7469         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
7470         (elf_s390_reloc_type_lookup): Likewise.
7471         (elf_s390_check_relocs): Likewise.
7472         (elf_s390_gc_sweep_hook): Likewise.
7473         (elf_s390_relocate_section): Likewise.
7474         (elf_s390_object_p): Use renamed architecture define.
7475         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
7477 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
7479         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
7481 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
7483         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
7484         absptr -> pcrel optimization for shared libs.
7485         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
7486         library cannot be converted to pcrel.
7487         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
7488         relative.
7489         * elf32-i386.c (elf_i386_relocate_section): If
7490         _bfd_elf_section_offset returned -2, skip, but make sure the
7491         relocation is installed.
7492         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
7493         * elf32-cris.c (cris_elf_relocate_section): Likewise.
7494         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7495         * elf32-i370.c (i370_elf_relocate_section): Likewise.
7496         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7497         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7498         * elf32-s390.c (elf_s390_relocate_section): Likewise.
7499         * elf32-sh.c (sh_elf_relocate_section): Likewise.
7500         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7501         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7502         * elf64-s390.c (elf_s390_relocate_section): Likewise.
7503         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7504         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7505         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7506         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
7507         _bfd_elf_section_offset returning -2 the same way as -1.
7508         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
7509         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
7510         and BFD_ASSERT.
7511         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
7513 2002-02-18  Tom Rix  <trix@redhat.com>
7515         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
7516         (bfd_xcoff_size_dynamic_sections): Same.
7517         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
7518         (bfd_xcoff_size_dynamic_sections): Same.
7519         * coff-rs6000.c (xcoff_generate_rtinit): Same.
7520         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
7521         * libxcoff.h (struct xcoff_backend_data_rec): Same.
7522         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
7523         * bfd-in2.h: Regenerate.
7525 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
7527         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
7528         (struct ppc_link_hash_table): Add sfpr.
7529         (ppc64_elf_link_hash_table_create): Init it.
7530         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
7531         .glink out to..
7532         (create_linkage_sections): ..here.  Make .sfpr too.
7533         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
7534         dynobj early.
7535         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
7536         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
7537         ._restf* functions, and create as needed.
7538         (func_desc_adjust): Only force_local for shared libs.
7540 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
7542         * configure.in: Bump version number post 2.12 branching.
7543         * configure: Regenerate.
7545 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
7547         * mmo.c: Correct and improve comments.
7548         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
7549         zero-pad.  Use input to fill up non-empty bfd buffer.
7550         (mmo_flush_chunk): New function.
7551         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
7552         changed.  Don't emit location specifier if VMA is same as
7553         *LAST_VMAP after omitting leading zero contents.  Call
7554         mmo_flush_chunk before emitting location specifier.
7555         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
7556         with mmo_write_loc_chunk calls.
7557         (mmo_internal_write_section): Call mmo_flush_chunk after
7558         mmo_write_chunk.
7559         (mmo_write_symbols_and_terminator): Move :Main to first position
7560         in symbol array.  Add faked one if it does not exist if there are
7561         other symbols.  Don't add it if there are no symbols at all.  Move
7562         out test for value of :Main from symbol loop.  Rename table
7563         fakemain to maintable and variable mainsym to fakemain.
7565 2002-02-15  Richard Henderson  <rth@redhat.com>
7567         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
7568         section with no got matches any got.  Simplify error generaion.
7570 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
7572         Support arbitrary length fill patterns.
7573         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
7574         (_bfd_default_link_order): Remove bfd_fill_link_order code.
7575         Call default_data_link_order.
7576         (default_fill_link_order): Delete.
7577         (default_data_link_order): New function.
7578         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
7579         of bfd_fill_link_order with bfd_data_link_order.
7580         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
7581         * elf64-mips.c (mips_elf64_final_link): Likewise.
7583         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
7584         Correct value returned in "end" for "0x<non-hex>".
7586 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
7588         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
7589         (scan): Test against 'mach' field in info structure.
7591 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
7593         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
7595 2002-02-14  Matt Fredette  <fredette@netbsd.org>
7597         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
7598         EF_M68000.
7600 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
7602         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
7603         non-zero physical addresses when adjusting the LMAs of new
7604         sections.
7606 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7608         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
7609         from _bfd_elf_hppa_gen_reloc_type.
7610         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
7611         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
7612         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
7613         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
7615 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
7617         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
7618         loading its contents if there's nothing to do in it.
7620 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
7622         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
7623         64k boundary.
7625         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
7626         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
7627         (ppc64_elf_finish_dynamic_sections): Set values for them.
7629 2002-02-11  Michael Snyder  <msnyder@redhat.com>
7631         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
7632         * elf.c (elfcore_grok_pstatus): Add prototype.
7633         (elfcore_grok_lwpstatus): Add prototype.
7634         (elfcore_write_lwpstatus): New function.
7635         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
7637 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
7639         * elf32-sh.c: Added missing prototypes.
7640         * elf32-sh64.c: Likewise.
7641         (sh_elf_align_loads): Mark unused args as such.
7642         * elf64-sh64.c: Added missing prototypes.
7643         (struct elf_sh64_link_hash_entry): Fix typo.
7644         (sh_elf64_relocate_section): Fix info argument passed to
7645         _bfd_elf_section_offset.
7647 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
7649         * Makefile.am: "make dep-am".
7650         * Makefile.in: Regenerate.
7651         * aclocal.m4: Regenerate.
7652         * config.in: Regenerate.
7653         * configure: Regenerate.
7655 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
7657         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
7658         variable warnings.
7659         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
7660         comparison warning.
7661         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
7662         cast warnings for the common case.
7664 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
7666         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
7667         vectors.
7668         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
7669         vectors.
7671 2002-02-09  Richard Henderson  <rth@redhat.com>
7673         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
7674         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
7675         (elf64_alpha_relocate_section): Likewise.
7676         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
7677         * bfd-in2.h, libbfd.h: Rebuild.
7679 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
7681         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
7682         that base-plus-offset reloc accounting is consistent.
7683         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
7684         up to date for undefined symbols.
7686 2002-02-08  Eric Christopher  <echristo@redhat.com>
7688         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
7690         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
7691         sections for the O32 ABI.
7693 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
7695         * elf32-arm.h: Fix formatting of _("...").
7696         * elf32-d10v.c: Likewise.
7697         * elf32-m68k.c: Likewise.
7698         * elf32-mips.c: Likewise.
7700 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
7702         * coff-or32.c: Fix compile time warning messages.
7704 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
7706         Contribute sh64-elf.
7707         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
7708         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
7709         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
7710         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
7711         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
7712         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
7713         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
7714         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
7715         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
7716         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
7717         New relocs.
7718         * libbfd.h, bfd-in2.h: Rebuilt.
7719         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
7720         (sh_reloc_map): Map them.
7721         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
7722         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
7723         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
7724         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
7725         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
7726         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
7727         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
7728         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
7729         datalabel_got_offset.
7730         (sh_elf_link_hash_newfunc): Initialize it.
7731         (sh_elf_relocate_section): Augment the scope of
7732         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
7733         GOT and GOTOFF handling to new SHmedia relocation types.  Support
7734         GOT_BIAS.
7735         (sh_elf_check_relocs): Likewise.
7736         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
7737         PLT entries using movi_shori_putval.  Support GOT_BIAS.
7738         (sh_elf_finish_dynamic_sections): Likewise.
7739         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
7740         relocation, it's now done by the caller.
7741         (GOT_BIAS): New.
7742         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
7743         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
7744         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
7745         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
7746         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
7747         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
7748         sh64_elf64_hash_table): New.
7749         (sh_elf64_howto_table): Introduce new relocs.
7750         (sh_elf64_info_to_howto): Accept new PIC relocs.
7751         (sh_elf64_relocate_section): Augment the scope of
7752         seen_stt_datalabel.  Support new PIC relocs.
7753         (sh_elf64_check_relocs): Support new PIC relocs.
7754         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
7755         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
7756         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
7757         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
7758         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
7759         movi_shori_putval, movi_3shori_putval,
7760         sh64_elf64_create_dynamic_sections,
7761         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
7762         sh64_elf64_size_dynamic_sections,
7763         sh64_elf64_finish_dynamic_symbol,
7764         sh64_elf64_finish_dynamic_sections): New.
7765         (elf_backend_create_dynamic-sections,
7766         bfd_elf64_bfd_link_hash_table_create,
7767         elf_backend_adjust_dynamic_symbol,
7768         elf_backend_size_dynamic_sections,
7769         elf_backend_finish_dynamic_symbol,
7770         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7771         elf_backend_plt_readonly, elf_backend_want_plt_sym,
7772         elf_backend_got_header_size, elf_backend_plt_header_size):
7773         Define.
7774         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
7775         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
7776         match official numbers and names; moved unmaching ones to the
7777         range 0xf2-0xff.
7778         * elf32-sh64.c, elf64-sh64.c: Likewise.
7779         2001-03-12  DJ Delorie  <dj@redhat.com>
7780         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
7781         sections.
7782         2001-03-12  DJ Delorie  <dj@redhat.com>
7783         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
7784         be aligned.
7785         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
7786         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
7787         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
7788         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
7789         .cranges section with SEC_SORT_ENTRIES set.
7790         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
7791         incoming sorted .cranges section.
7792         (sh64_bfd_elf_copy_private_section_data): New.
7793         (sh64_elf_final_write_processing): Only sort .cranges and modify
7794         start address if called by linker.
7795         2001-01-08  Ben Elliston  <bje@redhat.com>
7796         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
7797         Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
7798         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
7799         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
7800         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
7801         line.  Add comments before all entries.
7802         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
7803         comment.
7804         (sh_elf64_reloc): Correct head comment.
7805         (sh_elf64_relocate_section): Correct spacing.
7806         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
7807         instead call reloc_dangerous callback.
7808         <case R_SH_SHMEDIA_CODE>: New case.
7809         (sh_elf64_gc_mark_hook): Correct spacing.
7810         (sh_elf64_check_relocs): Ditto.
7811         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
7812         New case.
7813         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
7814         functions.
7815         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
7816         clarify describing comment.  Add comments before all entries.
7817         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
7818         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
7819         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
7820         Sort .cranges section in final link.  Prepare to set bit 0 on
7821         entry address.
7822         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
7823         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
7824         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
7825         .cranges section.
7826         (sh64_backend_section_from_shdr): New, to recognize
7827         SHT_SH5_CR_SORTED on incoming .cranges section.
7828         (elf_backend_section_from_shdr): Define.
7829         (sh64_elf_final_write_processing): Sort outgoing .cranges
7830         section.  (New, temporarily disabled:) Set bit 0 on entry address
7831         according to ISA type.
7832         (sh64_find_section_for_address): New.
7833         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
7834         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
7835         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
7836         bfd_malloc, not xmalloc.
7837         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
7838         global.
7839         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
7840         temporarily disabled) setting bit 0 on entry address.
7841         (elf_backend_final_write_processing): Define.
7842         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
7843         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
7844         be a proper relocation for PTA and PTB rather than a marker.
7845         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
7846         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
7847         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
7848         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
7849         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
7850         Zero src_mask.
7851         * elf64-sh64.c: Ditto.
7852         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
7853         * elf32-sh64.c: Include opcodes/sh64-opc.h
7854         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
7855         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
7856         parameters.  No unused parameters.  Caller changed.
7857         <case R_SH_PT_16>: New case.
7858         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
7859         * Makefile.in: Regenerate.
7860         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
7861         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
7862         all code sections.
7863         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7864         (sh64_elf_merge_private_data): Ditto.
7865         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
7866         to access stored section flags.
7867         (sh64_elf_final_write_processing): Return immediately unless
7868         called by linker.  Use sh64_elf_section_data (cranges) to get size
7869         of linker-generated cranges entries.
7870         (sh64_elf_copy_private_data): Add missing "return true".
7871         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7872         (sh_elf64_merge_private_data): Ditto.
7873         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
7874         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
7875         elf64-sh64.c:sh64_elf_fake_sections.
7876         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
7877         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
7878         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
7879         (sh64_elf_final_write_processing): New.
7880         (elf_backend_final_write_processing): Define.
7881         (sh64_elf_fake_sections): Get header flags from tdata field.
7882         (sh64_elf_copy_private_data): Do not call
7883         sh64_elf_copy_private_data_internal, just copy e_flags field.
7884         (sh64_elf_merge_private_data): Do not call
7885         sh64_elf_copy_private_data_internal.
7886         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
7887         Remove EF_SH64_ABI64, let ELF size make difference.
7888         Remove SH64-specific BFD section flag.
7889         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
7890         containing SHmedia through elf_section_data (asect)->tdata
7891         non-zero, not using a BFD section flag.
7892         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
7893         (sh64_elf_merge_private_data): Similar.
7894         (elf_backend_section_flags): Don't define.
7895         (sh64_elf_backend_section_flags): Delete.
7896         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
7897         not EF_SH64_ABI64.
7898         (sh_elf64_merge_private_data): Similar.
7899         * section.c (Section flags definitions): Don't define
7900         SEC_SH_ISA_SHMEDIA.
7901         (bfd-in2.h): Regenerate.
7902         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
7903         Make DataLabel references work with partial linking.
7904         * elf32-sh64.c: Fix formatting.
7905         (sh64_elf_link_output_symbol_hook): New.
7906         (elf_backend_link_output_symbol_hook): Define to
7907         sh64_elf_link_output_symbol_hook.
7908         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
7909         undefined if partial linking.  Adjust sanity check.
7910         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
7911         (elf_backend_link_output_symbol_hook): Define to
7912         sh64_elf64_link_output_symbol_hook.
7913         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
7914         undefined if partial linking.  Adjust sanity check.
7915         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
7916         Implement semantics for inter-file DataLabel references.
7917         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
7918         (sh64_elf64_add_symbol_hook): New.
7919         (sh_elf64_relocate_section): If passing an indirect symbol with
7920         st_type STT_DATALABEL on the way to a symbol with st_other
7921         STO_SH5_ISA32, do not bitor 1 to the relocation.
7922         (elf_backend_add_symbol_hook): Define to
7923         sh64_elf64_add_symbol_hook.
7924         * elf64-sh32.c: Tweak comments.
7925         (DATALABEL_SUFFIX): Define.
7926         (sh64_elf_add_symbol_hook): New.
7927         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
7928         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
7929         symbol with st_type STT_DATALABEL on the way to a symbol with
7930         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
7931         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
7932         Pass through STT_DATALABEL.
7933         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
7934         (elf_backend_get_symbol_type): Define.
7935         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
7936         (elf_backend_get_symbol_type): Define.
7937         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
7938         * elf32-sh64.c: Tweak comments.
7939         (sh64_elf_copy_private_data_internal): Add prototype.
7940         (bfd_elf32_bfd_set_private_flags): Define.
7941         (sh64_elf_copy_private_data_internal): Compare machine name, not
7942         textual BFD target name, to check whether to copy section flag
7943         SHF_SH5_ISA32.
7944         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
7945         Tweak section-contents-type-mismatch message.
7946         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
7947         Validize reloc-types.
7948         * elf64-sh64.c: New file.
7949         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
7950         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
7951         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
7952         Regenerate dependencies.
7953         * Makefile.in: Regenerate.
7954         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
7955         bfd_elf64_sh64l_vec.
7956         * configure.in: Handle bfd_elf64_sh64_vec and
7957         bfd_elf64_sh64l_vec.
7958         * configure: Regenerate.
7959         * po/POTFILES.in: Regenerate.
7960         * po/bfd.pot: Regenerate.
7961         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
7962         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
7963         anything else but EF_SH64 and EF_SH64_ABI64.
7964         (sh64_elf_merge_private_data): Emit error for anything else but
7965         EF_SH64 and EF_SH64_ABI64.
7966         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
7967         from targ_selvecs.
7968         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
7969         bfd_elf32_sh64l_vec as a temporary measure.
7970         * configure: Regenerate.
7971         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
7972         * cpu-sh.c (arch_info_struct): Include sh5 item
7973         unconditionalized.
7974         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
7975         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
7976         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
7977         * elf32-sh64.c: Tweak comments.
7978         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
7979         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
7980         (sh64_elf_copy_private_data_internal): Wrap long line.
7981         (sh64_elf_merge_private_data): Rewrite to allow objects from
7982         SH64 subsets to be linked together.
7983         (INCLUDE_SHMEDIA): Define.
7984         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
7985         Parenthesize plus-expression inside or-expression.
7986         <global symbol>: Ditto.
7987         (sh_elf_set_mach_from_flags): Remove code refusing
7988         deleted EF_SH64_32BIT_ABI flag.
7989         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
7990         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
7991         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
7992         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
7993         (sh_elf_relocate_section) <local symbol>: Or 1 in
7994         calculation of relocation if sym->st_other & STO_SH5_ISA32.
7995         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
7996         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
7997         relocation.
7998         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
7999         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8000         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8001         Regenerate dependencies.
8002         * Makefile.in: Regenerate.
8003         * archures.c: Add bfd_mach_sh5.
8004         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8005         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
8006         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8007         * configure: Regenerate.
8008         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
8009         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
8010         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
8011         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
8012         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
8013         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
8014         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
8015         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
8016         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
8017         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
8018         in item for SH5.
8019         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
8020         for SHmedia relocs.
8021         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
8022         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
8023         shmedia_prepare_reloc, goto final_link_relocate if it returns
8024         non-zero, else fail as before.
8025         (sh_elf_set_mach_from_flags): Provide function only if not defined
8026         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
8027         (sh_elf_set_private_flags): Provide function only if not defined
8028         as a macro.
8029         (sh_elf_copy_private_data): Similar.
8030         (sh_elf_merge_private_data): Similar.
8031         * section.c (SEC_SH_ISA_SHMEDIA): New.
8032         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
8033         * elf32-sh64.c: New file.
8034         * libbfd.h: Regenerate.
8035         * bfd-in2.h: Regenerate.
8036         * po/POTFILES.in: Regenerate.
8037         * po/bfd.pot: Regenerate.
8038         * bfd-in2.h: Regenerate.
8039         * libbfd.h: Regenerate.
8041 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
8043         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
8044         been included, not drag it in.
8045         * bfd-in2.h: Regenerate.
8047 2002-02-06  H.J. Lu  (hjl@gnu.org)
8049         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
8050         the mach and ISA fields if necessary.
8052 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
8054         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
8055         ARM architecture when an F_ARM_5 flag is detected, since we cannot
8056         be sure exactly which architecture this represents.
8058 2002-02-05  Nick Clifton  <nickc@redhat.com>
8060         * po/tr.po: Updated translation.
8062 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
8064         From Jimi X <jimix@watson.ibm.com>
8065         * archures (bfd_mach_ppc64): Define.
8066         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
8067         (bfd_powerpc_arch): Define.
8068         * bfd-in2.h: Regenerate.
8069         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
8070         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
8071         (bfd_powerpc_archs): Add default powerpc64 arch.
8073 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
8075         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
8076         against section syms in readonly sections.  Don't do the global
8077         sym check if we find one.
8078         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
8079         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
8080         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
8081         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
8082         (elf_s390_grok_prstatus): Add missing prototype.
8084 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
8086         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
8087         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
8088         Call bfd_get_section_by_name only once.  Initialize
8089         bpodata->n_bpo_relocs_this_section.
8090         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
8091         referring to DSOs.
8092         (bpo_reloc_request_sort_fn): Don't use difference of values as
8093         return-value.
8095 2002-02-02  David O'Brien  <obrien@FreeBSD>
8097         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
8098         version 4.5 and later the same as 5-CURRENT.
8099         * configure: Re-generate.
8101 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
8103         * config.bfd (hppa*-*-netbsd*): New target.
8105 2002-01-31  Philipp Thomas  <pthomas@suse.de>
8107         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
8108         to front of message. Unify messages with elf32-arm.h. Use
8109         commas where neccessary.
8110         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
8111         ERROR in messages. Unify messages with coff-arm.c. Correct
8112         VFP/FPA error message.
8113         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
8114         APCS-32 for translation.
8116 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
8118         Perform on-demand global register allocation from
8119         R_MMIX_BASE_PLUS_OFFSET relocs.
8120         * elf64-mmix.c (struct bpo_reloc_section_info, struct
8121         bpo_reloc_request, struct bpo_greg_section_info): New.
8122         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
8123         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
8124         _bfd_mmix_check_all_relocs,
8125         _bfd_mmix_prepare_linker_allocated_gregs,
8126         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
8127         (elf_mmix_howto_table): Correct src_mask for most relocs.
8128         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
8129         case.
8130         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
8131         case.  Fix typo in comment.  New label do_mmix_reloc.
8132         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
8133         store first object file with a base-plus-offset reloc.  Call
8134         mmix_elf_check_common_relocs for the part common with mmo.
8135         (mmix_elf_final_link): Write out linker-allocated register
8136         contents section.
8137         (elf_backend_gc_sweep_hook): Define.
8138         (bfd_elf64_bfd_relax_section): Define.
8140         * mmo.c: Don't include <ctype.h>
8141         (mmo_init): Correct init-once logic.
8143 2002-02-01  Tom Rix  <trix@redhat.com>
8145         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
8147 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
8149         * Makefile.am: Run "make dep-am"
8150         * Makefile.in: Regenerate.
8152 2002-01-31  David O'Brien  <obrien@FreeBSD>
8154         * configure.in: Recognize the differences in core files from FreeBSD
8155         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
8156         5-CURRENT.
8157         * configure: Regenerate.
8159 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
8161         * coff-or32.c: New file.
8162         * cpu-or32.c: New file.
8163         * elf32-or32.c: New file.
8164         * archures.c: Add support for or32.
8165         * targets.c: Add support for or32.
8166         * bfd-in2.h: Regenerate.
8167         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
8168         coff_write_object_contents): Add support for or32.
8169         * config.bfd: Add target.
8170         * configure.in: Add support for or32.
8171         * configure: Regenerate.
8172         * Makefile.am: Add support for or32.
8173         * Makefile.in: Regenerate.
8174         * po/SRC-POTFILES.in: Add or32 files.
8175         * po/bfd.pot: Regenerate.
8177 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
8178             Don Lindsay  <lindsayd@cisco.com>
8180         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
8181         false' with a return of a bfd_reloc_ error code.
8183 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
8185         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
8186         unexport unreferenced symbols when --export-dynamic.  Call
8187         _bfd_elf_strtab_delref when unexporting.
8189 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
8191         * bfd-in.h: Include <stdbool.h> if it is available.
8192         * bfd-in2.h: Regenerated.
8194 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
8196         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
8197         not go via the plt.
8199 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
8201         * archures.c: Tidy up formatting of embedded comments.
8202         * bfd.c: Tidy up formatting of embedded comments.
8203         * bfd-in.h: Fix formatting of comments.
8204         * reloc.c: Tidy up formatting of ordinary & embedded comments.
8205         * section.c: Tidy up formatting of embedded comments.
8206         * syms.c: Tidy up formatting of embedded comments.
8207         * targets.c: Tidy up formatting of embedded comments.
8209         * bfd-in2.h: Regenerate.
8211 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
8213         * vms-tir.c (cmd_name): New function.
8214         (tir_cmd_name): New function.
8215         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
8216         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
8217         Fix formatting.
8219         * peXXigen.c (pe_print_idata): Rearrange message to aid in
8220         translation.
8221         (pe_print_pdata): Rearrange message to aid in translation.
8223         * libbfd.c (warn_deprecated): Rearrange error message to aid in
8224         translation.
8226         * ihex.c (ihex_write_object_contents): Fix spelling typo.
8228         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
8230         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
8231         message to aid in translation.
8233         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
8234         to aid in translation.
8236         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
8238 2002-01-30  Philipp Thomas  <pthomas@suse.de>
8240         * coff-arm.c, elf32-elf.h: Unify messages.
8242 2002-01-30  Nick Clifton <nickc@redhat.com>
8244         * po/sv.po: Updated translation.
8246 2002-01-30  Philipp Thomas  <pthomas@suse.de>
8248         * dwarf2.c (read_abbrev): Use full section name in error message.
8249         (decode_line_info): Likewise.
8251         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
8252         message.
8254 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
8256         * elf64-ppc.c (func_desc_adjust): Only provide missing function
8257         descriptor symbols for undefined function code syms.  Clear
8258         ELF_LINK_NON_ELF so that they can stay weak.
8260 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
8261             Mitch Lichtenberg  <mpl@broadcom.com>
8263         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
8264         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
8265         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
8266         generation.
8267         * bfd-in2.h: Regenerate.
8269 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
8271         * elf32-mips.c: Add additional comments about HI16 relocation
8272         processing.
8273         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
8274         pc-relative relocations.  (Reverts change made on 2001-10-31.)
8275         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
8276         for pc-relative relocations.
8277         (mips_elf_calculate_relocation): Add a comment about a kludge
8278         in the R_MIPS_GNU_REL_HI16 handling.
8279         (_bfd_mips_elf_relocate_section): Implement that kludge;
8280         adjust pc-relative HI16 relocation for difference in HI16 and
8281         LO16 addresses, since it can't easily be done in
8282         mips_elf_calculate_relocation.
8284 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8286         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
8287         relocations with PC32 relocations for undefined or weak symbols.
8288         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
8289         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
8291 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
8293         * elfcore.h (elf_core_file_p): Improve comment for last change.
8295 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
8297         * configure: Regenerated.
8299 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
8301         * elfcore.h (elf_core_file_p): Set the machine architecture
8302         before processing the program headers.
8304 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
8306         * configure.in <64-bit configuration>: If using gcc, check and
8307         emit error for egcs-1.1.2.
8308         * configure: Regenerate.
8310 2002-01-26  Egor Duda  <deo@logos-m.ru>
8312         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
8313         as possible to avoid stack corruption.
8315 2002-01-26  Richard Henderson  <rth@redhat.com>
8317         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
8318         for non-allocated sections.
8320 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
8322         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
8323         prstat.pr_reg even if it is a struct.
8325 2002-01-25  Steve Ellcey <sje@cup.hp.com>
8327         * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
8329 2002-01-25  Philipp Thomas  <pthomas@suse.de>
8331         * coffgen.c (coff_print_symbol): Don't mark info message
8332         for translation.
8334 2002-01-25  Nick Clifton <nickc@redhat.com>
8336         * po/fr.po: Updated translation.
8337         * po/es.po: Updated translation.
8339 2002-01-25  Philipp Thomas  <pthomas@suse.de>
8341         * coff-alpha.c (alpha_relocate_section): Unify warning message
8342         for GP relative relocations without GP defined.
8343         * coff-mips.c (mips_relocate_section): Likewise.
8345 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
8347         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
8348         unsigned overflow when new_offset < old_offset.
8350 2002-01-24  Philipp Thomas  <pthomas@suse.de>
8352         * bfd.c (_bfd_abort): Fix typo.
8354 2002-01-23  Richard Henderson  <rth@redhat.com>
8356         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
8357         plt entries for undefweak symbols.
8359 2002-01-23  Steve Ellcey <sje@cup.hp.com>
8361         * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
8362         (bfd_elf64_ia64_hpux_big_vec): Ditto.
8363         (bfd_elf32_h8300_vec): Ditto.
8365 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
8367         * elf64-ppc.c: Remove stale part of ABI comment.
8368         (NO_OPD_RELOCS): Define.
8369         (ppc64_elf_check_relocs): Use it.
8370         (ppc64_elf_relocate_section): Here too.
8371         (build_one_stub): Don't point function syms at the stub.  Instead,
8372         hijack plt.offset.
8373         (ppc64_elf_relocate_section): Check whether REL24 relocs should
8374         really go to the stub.  Make all dynamic relocs in opd against
8375         locals.
8376         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
8377         plt.offset.
8379 2002-01-22  Richard Henderson  <rth@redhat.com>
8381         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
8383 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
8385         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
8386         TOC_BASE_OFF adjustment.
8388         * Makefile.am: Run "make dep-am".
8389         * Makefile.in: Regenerate.
8390         * po/SRC-POTFILES.in: Regenerate.
8392 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
8394         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
8395         host defines.
8397 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
8399         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
8400         Check for and emit error if sgot is NULL at this point.
8402 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
8404         * config.bfd (ia64*-*-netbsd*): New target.
8406 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
8408         * som.c (som_write_space_strings): Comment typo fix.
8410 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
8412         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
8413         is_func_descriptor fields.
8414         (link_hash_newfunc): Init them.
8415         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
8416         dot are candidates for plt entries.  When processing .opd relocs,
8417         set function descriptor strings to point inside function code
8418         string, and set new ppc_link_hash_entry fields.
8419         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
8420         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
8421         function descriptors.  It's now done in..
8422         (func_desc_adjust): New.
8423         (ppc64_elf_func_desc_adjust): New.
8424         (define elf_backend_always_size_sections): Define.
8425         (ppc64_elf_hide_symbol): New.
8426         (define elf_backend_hide_symbol): Define.
8427         (allocate_dynrelocs): Remove code looking up function descriptors
8428         as that has been done earlier.
8429         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
8430         table.
8431         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
8432         up function descriptor.
8433         (build_one_stub): Look up the function code sym.  Check for
8434         invalid plt offsets.
8435         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
8436         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
8438         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
8439         boolean param.
8440         (_bfd_elf_link_hash_hide_symbol): Likewise.
8441         * elflink.h (elf_link_add_object_symbols): Adjust call to
8442         elf_backend_hide_symbol.
8443         (elf_fix_symbol_flags): Likewise.
8444         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
8445         than bfd_alloc.
8446         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
8447         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
8448         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
8449         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
8450         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
8451         and adjust to suit.
8452         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
8453         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
8454         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
8456 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
8458         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
8459         dynamic function descriptor symbol, not the associated function
8460         symbol.
8462 2002-01-17  Eric Christopher  <echristo@redhat.com>
8464         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
8466 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
8468         * po/bfd.pot: Regenerate.
8469         * po/fr.po: Regenerate.
8471 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
8473         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
8474         Remove "Elf_Internal_Shdr *" param.
8475         (_bfd_mips_elf_section_from_bfd_section): Ditto.
8476         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
8477         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
8478         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
8479         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
8480         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
8481         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
8482         function to override special sections.  Remove hdr arg from
8483         backend call, and don't loop.
8485 2002-01-16  Eric Christopher  <echristo@redhat.com>
8487         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
8488         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
8489         relocations requiring gp0 and gp.
8491 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
8493         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
8494         EF_ARM_VFP_FLOAT.
8495         (elf32_arm_print_private_bfd_data): Likewise.
8497 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
8499         * po/tr.po: Import new version.
8501 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
8503         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
8504         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
8505         (ORI_R0_R0_0): Correct.
8507 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
8509         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
8510         when plt_not_loaded.
8511         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
8512         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
8513         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
8514         (ppc64_elf_glink_code): Delete.
8515         (PPC64_ELF_GLINK_SIZE): Delete.
8516         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
8517         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
8518         ORI_R0_R0_0): Define.
8519         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
8520         (struct ppc_link_hash_table): Add sstub and plt_overflow.
8521         (ppc64_elf_link_hash_table_create): Init them.
8522         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
8523         Don't copy to shared lib.
8524         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
8525         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
8526         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
8527         room for .stub and .glink code.
8528         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
8529         DT_PPC64_GLINK.
8530         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
8531         bfd_elf64_bfd_final_link.
8532         (bfd_elf64_bfd_final_link): Don't define.
8533         (ppc64_elf_size_stubs): New.
8534         (build_plt_stub): New.
8535         (build_one_stub): New.
8536         (ppc64_elf_build_stubs): New.
8537         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
8538         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
8539         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
8540         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
8541         case output sections not separate.  Adjust DT_RELASZ to not
8542         include plt relocs.  Set reserved got entry.  Set got and plt
8543         entry size.
8544         (elf_backend_got_header_size): Set to 8.
8545         * elf64-ppc.h: New file.
8547 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
8549         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
8550         sections, use bfd_section_list_remove.
8551         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
8552         * elflink.h (elf_link_add_object_symbols): When removing all
8553         sections, use bfd_section_list_clear.
8555 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
8557         * po/sv.po: New file: Swedish translation.
8558         * configure.in (ALL_LINGUAS): Add sv.
8559         * configure: Regenerate.
8561 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
8563         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
8564         * elf.c (merge_sections_remove_hook): New function.
8565         (_bfd_elf_merge_sections): Pass it as 3rd argument to
8566         _bfd_merge_sections.
8567         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
8568         * libbfd.h: Rebuilt.
8569         * merge.c (_bfd_merge_sections): Add remove_hook argument.
8570         Call remove_hook if a SEC_EXCLUDE section is encountered.
8572 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
8574         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
8575         (xstormy16_reloc_map): Initialise new field with correct howto
8576         table.
8577         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
8578         howto entry.
8580 2002-01-10  Michael Snyder  <msnyder@redhat.com>
8582         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
8583         (elfcore_write_pstatus): Use long instead of pid_t;
8584         * elf-bfd.h: Change prototypes to use long instead of pid_t;
8586 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
8588         * elf.c: Update copyright years.
8589         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
8590         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
8592 2002-01-08  Michael Snyder  <msnyder@redhat.com>
8594         Add capability to write corefile note sections, for gdb.
8595         * elf.c (elfcore_write_note): New function.
8596         (elfcore_write_prpsinfo): New function.
8597         (elfcore_write_prstatus): New function.
8598         (elfcore_write_pstatus): New function.
8599         (elfcore_write_prfpreg): New function.
8600         (elfcore_write_prxfpreg): New function.
8601         * elf-bfd.h: Add prototypes for above functions.
8603 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
8605         * elf.c (elf_fake_sections): Propagate errors from
8606         elf_backend_fake_section.
8608 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
8610         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
8611         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
8612         (elf32-sh-nbsd.lo): New rule.
8613         * Makefile.in: Regenerate.
8614         * config.bfd (sh*le-*-netbsdelf*): New target.
8615         (sh*-*-netbsdelf*): New target.
8616         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
8617         (bfd_elf32_shnbsd_vec): New vector.
8618         (bfd_elf32_shlnbsd_vec): New vector.
8619         * configure: Regenerate.
8620         * elf32-sh-nbsd.c: New file.
8621         * targets.c: Update copyright years.
8622         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8623         bfd_elf32_shnbsd_vec.
8625 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
8627         * coff-rs6000.c (READ20): Use bfd_scan_vma.
8629 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
8631         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
8632         of a symbol in a section that will be deleted.
8634 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
8636         * po/es.po: New file: Spanish translation.
8637         * configure.in (ALL_LINGUAS): Add es.
8638         * configure: Regenerate.
8640 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
8642         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
8643         argument so we can handle HP-UX specially.
8644         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
8645         (elfNN_hpux_backend_section_from_bfd_section): New for support
8646         of SHN_IA_64_ANSI_COMMON.
8647         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
8648         (is_unwind_section_name): Add special HP-UX support.
8649         (elfNN_ia64_section_from_shdr): Add support for more sections.
8650         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
8651         add support for more sections.
8652         (elfNN_ia64_additional_program_headers): Modify
8653         is_unwind_section_name call.
8654         (elfNN_ia64_modify_segment_map): Remove assumption that there is
8655         only one unwind section in segment.
8657 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
8659         * syms.c (_bfd_generic_make_empty_symbol): New function.
8660         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
8661         _bfd_generic_make_empty_symbol.
8662         * libbfd.h: Regenerate.
8663         * bfd-in2.h: Regenerate.
8664         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
8665         (hppabsd_core_get_symtab_upper_bound): Don't define.
8666         (hppabsd_core_get_symtab): Likewise.
8667         (hppabsd_core_print_symbol): Likewise.
8668         (hppabsd_core_get_symbol_info): Likewise.
8669         (hppabsd_core_bfd_is_local_label_name): Likewise.
8670         (hppabsd_core_get_lineno): Likewise.
8671         (hppabsd_core_find_nearest_line): Likewise.
8672         (hppabsd_core_bfd_make_debug_symbol): Likewise.
8673         (hppabsd_core_read_minisymbols): Likewise.
8674         (hppabsd_core_minisymbol_to_symbol): Likewise.
8675         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
8676         Formatting fixes.
8677         * hpux-core.c: Similarly.
8678         * irix-core.c: Similarly.
8679         * osf-core.c: Similarly.
8680         * sco5-core.c: Similarly.
8681         * binary.c (binary_make_empty_symbol): Remove function, define as
8682         _bfd_generic_make_empty_symbol.
8683         * ihex.c (ihex_make_empty_symbol): Likewise.
8684         * mmo.c (mmo_make_empty_symbol): Likewise.
8685         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
8686         * srec.c (srec_make_empty_symbol): Likewise.
8687         * versados.c (versados_make_empty_symbol): Likewise.
8688         * vms.c (_bfd_vms_make_empty_symbol): Remove.
8689         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
8690         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
8691         rather than _bfd_vms_make_empty_symbol.
8692         * vms-misc.c (new_symbol): Likewise.
8694 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
8696         * section.c (bfd_section_init): Remove unnecessary initialisations.
8697         (bfd_section_list_clear): New function.
8698         (bfd_section_list_remove, bfd_section_list_insert): New macros.
8699         (_bfd_strip_section_from_output): Use them.
8700         * coffcode.h (coff_set_alignment_hook): Likewise.
8701         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
8702         * elf64-mips.c (mips_elf64_final_link): Likewise.
8703         * elf64-mmix.c (mmix_elf_final_link): Likewise.
8704         * sunos.c (sunos_add_dynamic_symbols): Likewise.
8705         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
8706         * bfd-in2.h: Regenerate.
8708         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
8709         rather than doing our own section handling.  Clean up after errors
8710         with bfd_release and bfd_section_list_clear.  Handle unexpected
8711         flags.
8712         * aoutf1.h (sunos4_core_file_p): Likewise.
8713         * aix386-core.c (aix386_core_file_p): Likewise.
8714         * cisco-core.c (cisco_core_file_validate): Likewise.
8715         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
8716         * trad-core.c (trad_unix_core_file_p): Likewise.
8718         * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
8719         with bfd_release and bfd_section_list_clear.
8720         * hpux-core.c (hpux_core_core_file_p): Likewise.
8721         * irix-core.c (irix_core_core_file_p): Likewise.
8722         * lynx-core.c (lynx_core_file_p): Likewise.
8723         * osf-core.c (osf_core_core_file_p): Likewise.
8724         * rs6000-core.c (rs6000coff_core_p): Likewise.
8725         * sco5-core.c (sco5_core_file_p): Likewise.
8727         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
8728         sign extension adjustments without conditionals.
8730 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
8732         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
8733         CIE at .eh_frame start is removed due to no FDEs referencing it.
8735 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
8737         * config.bfd (x86_64-*-netbsd*): New target.
8738         * configure.in (x86_64-*-netbsd*): Set COREFILE
8739         to netbsd-core.lo.
8740         * configure: Regenerated.
8742 2002-01-03  Tom Rix  <trix@redhat.com>
8744         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
8745         for recent bfd_make_section_anyway change.
8747 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
8749         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8750         R_ARM_THM_PC11 reloc.
8752 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
8754         * configure.in (LINGUAS): Add ja.
8755         * configure: Regenerate.
8756         * po/ja.po: Import from translation project's web site.
8758 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
8760         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
8761         messages to ease translation into other languages.
8763 For older changes see ChangeLog-0001
8765 Local Variables:
8766 mode: change-log
8767 left-margin: 8
8768 fill-column: 74
8769 version-control: never
8770 End: