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