* aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
[external/binutils.git] / bfd / ChangeLog
1 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
2
3         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
4
5 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
6
7         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
8         entries.
9
10 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
11
12         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
13         mismatch.
14
15 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
16
17         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
18
19 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
20
21         * elf32-mips.c (mips_reloc_map): Fix typo.
22
23 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
24
25         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
26
27 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
28
29         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
30
31 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
32
33         * libxcoff.h: Use PARAMS on function declarations.
34         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
35         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
36
37         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
38         addend.
39         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
40
41 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
42
43         * coff-rs6000.c: Formatting fixes.
44         (xcoff_calculate_relocation): Use PARAMS in declaration.
45         (xcoff_complain_overflow): Likewise.
46         (xcoff_ppc_relocate_section): Use old-style function pointer call.
47         (bfd_xcoff_backend_data): Remove useless comments.
48         (rs6000coff_vec): Likewise.
49         (bfd_pmac_xcoff_backend_data): Likewise.
50         (pmac_xcoff_vec): Likewise.
51
52         * coff64-rs6000.c: Formatting fixes.
53         (xcoff64_calculate_relocation): Use PARAMS in declaration.
54         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
55         (bfd_xcoff_backend_data): Remove useless comments.
56         (rs6000coff64_vec): Likewise.
57         (bfd_xcoff_aix5_backend_data): Likewise.
58         (aix5coff64_vec): Likewise.
59
60 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
61
62         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
63         mask entries.  Use complain_overflow_dont for R_REF.
64         (xcoff_reloc_type_ba): Revert last change.
65         (xcoff_reloc_type_br): Likewise.
66         (xcoff_reloc_type_crel): Likewise.
67         (xcoff_ppc_relocate_section): Likewise.
68         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
69         (xcoff64_ppc_relocate_section): Likewise.
70         (xcoff64_howto_table): Revert some of last change to mask entries.
71         Use complain_overflow_dont for R_REF.
72
73         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
74         relocs with bitsize == 16 have size = 1.
75         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
76         (xcoff_reloc_type_br): Likewise.
77         (xcoff_reloc_type_crel): Likewise.
78         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
79         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
80         dst_mask adjustment.
81         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
82         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
83         bitsize == 16 have size = 1.
84
85 2002-08-01  Denis Chertykov  <denisc@overta.ru>
86
87         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
88         (struct misc): New field isymbuf. All free_* fields removed.
89         (symbol_value): Pass in internal syms. No need to swap syms in.
90         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
91         possibly cached info.
92         (tidyup_after_error): Removed.
93         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
94         misc. Use new field.
95         (adjust_all_relocations): Use internal syms. No need to swap syms
96         in and out.
97         (add_page_insn): Don't use removed fields of struct misc.
98
99 2002-08-01  Nick Clifton  <nickc@redhat.com>
100
101         * elf32-arm.h: Revert previous delta.
102
103 2002-08-01  Nick Clifton  <nickc@redhat.com>
104
105         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
106         * configure: Regenerate.
107
108 2002-07-31  H.J. Lu <hjl@gnu.org>
109
110         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
111         selected.
112
113 2002-07-31  H.J. Lu <hjl@gnu.org>
114
115         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
116         is selected.
117
118 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
119
120         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
121         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
122
123 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
124
125         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
126         There is no 8 byte relocation type for this architecture.
127         (do_ns32k_reloc): Use bfd_vma instead of native types.
128         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
129         returns void.
130         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
131         rely on generic code to do that.
132         * aout-ns32k.c (howto_table): Add appropriate overflow detection
133         to all table entries.
134         (_bfd_ns32k_relocate_contents): put_data returns void.
135         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
136         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
137         return void.
138
139 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
140
141         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
142         archive object is target dependant.
143
144 2002-07-31  Adam Nemet  <anemet@lnxw.com>
145
146         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
147         (THUMB_PLT_ENTRY_SIZE): New macro.
148         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
149         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
150         ARM_PLT_ENTRY_SIZE.
151         (elf32_arm_plt_entry): Likewise.
152         (elf_backend_plt_header_size): Likewise.
153         (elf32_thumb_plt0_entry): New global.
154         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
155         into .plt.thumb.
156         (elf32_thumb_plt_entry): New global.
157         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
158         Thumb entries.  Set the bottom bit of the corresponding GOT entry
159         for a Thumb PLT entry.
160         (struct elf32_arm_plt_entry_info): New structure.
161         (struct elf32_arm_link_hash_entry, plt_info): New member of this
162         type.
163         (elf32_arm_link_hash_newfunc): Initialize new member.
164         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
165         relocations against the PLT.
166         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
167         first_rel_type if this is the first time we encounter the symbol.
168         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
169         Determine if relocation needs a PLT entry.  Set first_rel_type if
170         this is the first time we encounter the symbol
171         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
172         functions as well.
173         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
174         (elf32_arm_create_dynamic_sections): New function.  Create the
175         .plt.thumb section.
176         (elf_backend_create_dynamic_sections): Call it.
177
178 2002-07-31  Nick Clifton  <nickc@redhat.com>
179
180         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
181         'alternative' in order to avoid shadowing global symbol of the
182         same name.
183         * bfd-in2.h: Regenerate.
184         * libbfd.h: Regenerate.
185         * libcoff.h: Regenerate.
186
187 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
188
189         * Makefile.am: Add n32 ABI support.
190         * Makefile.in: Regenerate.
191         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
192         bit vectors for mips*-*-linux targets as optional.
193         * configure.in: Add n32 ABI vectors.
194         * configure: Regenerate.
195         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
196         * elfn32-mips.c: New file, n32 ABI support.
197         * targets.c: Add n32 ABI vectors.
198
199 2002-07-30  Graeme Peterson  <gp@qnx.com>
200
201         * elfarmqnx-nabi.c: New file: Support for QNX.
202         * config.bfd: Add support for arm-*-nto target.
203         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
204         * configure: Regenerate.
205         * Makefile.am: Add entries for elfarmqnx-nabi.c.
206         * Makefile.in: Regenerate.
207         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
208         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
209         * elfarm-nabi.c: Do not include elf32-arm.h if
210         ELFARM_NABI_C_INCLUDED is defined.
211         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
212         
213 2002-07-30  Nick Clifton  <nickc@redhat.com>
214         
215         * po/sv.po: Updated Swedish translation.
216
217 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
218
219         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
220
221 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
222
223         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
224         * archive.c (bfd_generic_archive_p): Likewise.
225         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
226         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
227         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
228         (xcoff64_archive_p): Likewise.
229         (xcoff64_openr_next_archived_file): Likewise.
230         (xcoff64_archive_p): Clean up tdata properly on error.
231         * coffgen.c (coff_real_object_p): Likewise.
232         (coff_object_p): Release filehdr and opthdr.
233         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
234         * ieee.c (ieee_archive_p): Likewise.
235         * ihex.c (ihex_object_p): Likewise.
236         (ihex_mkobject): Always allocate tdata.
237         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
238         * srec.c (srec_mkobject): Always allocate tdata.
239         (srec_object_p): Clean up tdata properly on error.
240         (symbolsrec_object_p): Likewise.
241         * versados.c (versados_object_p): Likewise.
242         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
243         and bfd_realloc instead of realloc.
244         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
245         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
246         place of bfd_malloc, simplifying error freeing.  Free hash table too.
247         (vms_object_p): Clean up tdata on error.
248         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
249         (vms_close_and_cleanup): Adjust for bfd_alloc use.
250
251 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
252
253         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
254
255 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
256
257         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
258         flags into resulting BFD.
259
260 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
261
262         From John Reiser <jreiser@BitWagon.com>
263         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
264         tls_ldm_got.refcount.
265
266 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
267
268         * elf64-mips.c: Update TODO comment.
269         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
270         mips_elf64_gprel16_reloca): Remove prototypes.
271         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
272         (UNUSED_RELOC): Replace by EMPTY_RELOC.
273         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
274         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
275         R_MIPS_HIGHEST.
276         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
277         R_MIPS_GOT16. Remove wrong comments.
278         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
279         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
280         from elf32-mips.c.
281         (mips_elf64_hi16_reloc): Fix formatting.
282         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
283         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
284         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
285         (mips_elf64_gprel16_reloc): Make static. Add check for
286         partial_inplace.
287         (mips_elf64_gprel16_reloca): Remove.
288         (mips_elf64_literal_reloc): New function.
289         (mips_elf64_gprel32_reloc): Fix formatting.
290         (mips_elf64_shift6_reloc): Fix comment. Make static.
291         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
292         elf32-mips.c.
293         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
294         elf32-mips.c
295         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
296         specific relocations.
297         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
298         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
299         (ELF_MAXPAGESIZE): Add comment.
300
301 2002-07-25  Nick Clifton  <nickc@redhat.com>
302
303         * po/sv.po: Updated Swedish translation.
304         * po/es.po: Updated Spanish translation.
305         * po/fr.po: Updated French translation.
306
307 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
308
309         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
310         as elf_link_record_local_dynamic_symbol.
311         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
312         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
313         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
314         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
315         attempt is made to record a symbol in a discarded section, and
316         return `2' in that case.
317
318 2002-07-24  Nick Clifton  <nickc@redhat.com>
319
320         * po/sv.po: Updated Swedish translation.
321         * po/es.po: Updated Spanish translation.
322
323 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
324
325         * po/SRC-POTFILES.in: Regenerate.
326
327         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
328         immediately.  Remove code handling relocatable linking.
329         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
330         * elf32-cris.c (cris_elf_relocate_section): Likewise.
331         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
332         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
333         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
334         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
335         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
336         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
337         * elf32-v850.c (v850_elf_relocate_section): Likewise.
338         * elf32-vax.c (elf_vax_relocate_section): Likewise.
339         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
340         * elf32-avr.c (elf_backend_rela_normal): Define.
341         * elf32-cris.c: Likewise.
342         * elf32-fr30.c: Likewise.
343         * elf32-frv.c: Likewise.
344         * elf32-h8300.c: Likewise.
345         * elf32-hppa.c: Likewise.
346         * elf32-ip2k.c: Likewise.
347         * elf32-sparc.c: Likewise.
348         * elf32-v850.c: Likewise.
349         * elf32-vax.c: Likewise.
350         * elf64-hppa.c: Likewise.
351         * elf64-sparc.c: Likewise.
352         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
353         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
354         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
355         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
356         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
357         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
358         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
359         * elf-m10200.c (USE_RELA): Don't define.
360         * elf-m10300.c: Likewise.
361         * elfarm-oabi.c: Likewise.
362         * elf32-i370.c: Likewise.
363         * elf32-ip2k.c: Likewise.
364         * elf32-m68k.c: Likewise.
365         * elf32-mcore.c: Likewise.
366         * elf32-ppc.c: Likewise.
367         * elf32-s390.c: Likewise.
368         * elf32-vax.c: Likewise.
369         * elf64-ppc.c: Likewise.
370         * elf64-s390.c: Likewise.
371         * elf64-x86-64.c: Likewise.
372         * elfxx-ia64.c: Likewise.
373         * elf32-avr.c (USE_REL): Don't undef.
374         * elf32-ip2k.c: Likewise.
375
376 2002-07-23  Nick Clifton  <nickc@redhat.com>
377
378         * elf-bfd.h (struct elf_backend_data): Add new bitfield
379         'want_p_paddr_set_to_zero'.
380         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
381         to false;
382         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
383         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
384
385 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
386
387         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
388         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
389         show the Copyright string.
390         Minor formatting tidy ups.
391
392 2002-07-23  Nick Clifton  <nickc@redhat.com>
393
394         * po/fr.po: Updated French translation.
395         * po/sv.po: Updated Swedish translation.
396
397 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
398
399         * elflink.h (elf_link_input_bfd): Don't change internal symbols
400         when outputting relocs.
401
402 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
403
404         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
405         DT_PLTGOT into the dynamic section if there is a PLT.
406
407 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
408
409         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
410         elf32-mips.c.
411         (_bfd_mips_elf_write_section): Likewise.
412         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
413         (_bfd_mips_elf_write_section): Likewise.
414         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
415         (elf32_mips_write_section): Likewise.
416         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
417         (_bfd_mips_elf_write_section): Likewise.
418
419 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
420
421         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
422         PT_IA_64_UNWIND segments for a given section.
423
424 2002-07-17  H.J. Lu <hjl@gnu.org>
425
426         * Makefile.am: Fix a typo.
427         * Makefile.in: Regenerate.
428
429 2002-07-15  Denis Chertykov  <denisc@overta.ru>
430             Frank Ch. Eigler  <fche@redhat.com>
431             Ben Elliston  <bje@redhat.com>
432             Alan Lehotsky  <alehotsky@cygnus.com>
433             John Healy  <jhealy@redhat.com>
434             Graham Stott  <grahams@redhat.com>
435             Jeff Johnston  <jjohnstn@redhat.com>
436
437         * Makefile.am: Add support for ip2k.
438         * Makefile.in: Regenerate.
439         * doc/Makefile.in: Regenerate.
440         * archures.c: Add support for ip2k.
441         * config.bfd: Add support for ip2k.
442         * configure.in: Add support for ip2k.
443         * configure: Regenerate.
444         * reloc.c: Add support for ip2k.
445         * targets.c: Add support for ip2k.
446         * bfd-in2.h: Regenerate.
447         * libbfd.h: Regenerate.
448         * cpu-ip2k.c: New file.
449         * elf32-ip2k.c: New file.
450
451 2002-07-17  Ian Rickards  <irickard@arm.com>
452
453         * dwarf2.c (concat_filename): If we can't establish the directory
454         just return the filename.
455
456 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
457
458         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
459
460 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
461
462         * elflink.h: Formatting fixes, tidy prototypes.
463         (elf_link_assign_sym_version): Move common code out of loop.
464
465 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
466
467         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
468         reloc section size is zero.  Correct reloc output location.
469
470 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
471
472         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
473         the final type for the e_fsel selector when generating PA2.0W code.
474         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
475         relocations.
476
477 2002-07-14  H.J. Lu <hjl@gnu.org>
478
479         * elflink.h (elf_link_assign_sym_version): Hide the default
480         definition if there is a hidden versioned definition.
481
482 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
483
484         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
485         dynamic reference test in assertion when initializing GOT with
486         static contents.  Just assert that there are either no dynamic
487         sections, the symbol is defined in the regular objects or that the
488         symbol is undef weak.  Tweak comment.
489         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
490         only if the symbol isn't defined in the program and isn't undef
491         weak.
492         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
493         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
494         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
495         (elf_cris_discard_excess_program_dynamics): Don't consider
496         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
497
498 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
499
500         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
501         unresolved debugging relocs in dynamic applications.
502         * elf32-s390.c (elf_s390_relocate_section): Likewise.
503         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
504         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
505         * elf64-s390.c (elf_s390_relocate_section): Likewise.
506         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
507         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
508
509 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
510
511         * elf64-ppc.c (ONES): Define.
512         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
513         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
514         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
515
516         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
517         (ppc64_elf_set_private_flags): Delete.
518         (ppc64_elf_section_from_shdr): Delete.
519         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
520         (ppc64_elf_fake_sections): Delete.
521         (bfd_elf64_bfd_set_private_flags): Don't define.
522         (bfd_elf64_get_symbol_info): Likewise.
523         (elf_backend_section_from_shdr): Likewise.
524         (elf_backend_fake_sections): Likewise.
525
526 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
527
528         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
529         when not already set.
530         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
531         (elf_backend_fake_sections): Define.
532
533 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
534
535         * merge.c (_bfd_merge_section): Remove redundant output_section check.
536         Formatting.
537         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
538
539 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
540
541         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
542         NULL sym_hashes to just before use.
543         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
544         symbol with non-default visibility.
545         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
546         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
547         Ditto.
548         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
549         symbol with non-default visibility.
550         (cris_elf_check_relocs): At tests for local symbol before
551         increasing h->plt.refcount, also check for non-default
552         visibility.  Ditto when checking for local symbol to eliminate
553         pc-relative runtime relocs.
554
555 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
556
557         * elf.c: Formatting.
558         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
559         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
560         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
561         segments.
562
563 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
564             Alan Modra  <amodra@bigpond.net.au>
565
566         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
567         account the impact of relocation count overflow when computing
568         section offsets.
569         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
570         or not to apply the PE COFF reloc overflow handling.  Fix a
571         fencepost error in deciding whether or not to use that technique.
572
573 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
574
575         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
576         change type of locsyms.
577         (bfd_elf_get_elf_syms): Declare.
578         * elf.c (bfd_elf_get_elf_syms): New function.
579         (group_signature): Use bfd_elf_get_elf_syms.
580         (bfd_section_from_r_symndx): Likewise.
581         * elfcode.h (elf_slurp_symbol_table): Likewise.
582         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
583         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
584         locality of various data structures.  Properly free internal relocs.
585         (elf_bfd_final_link): Properly free internal relocs.
586         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
587         (elf_link_input_bfd): Likewise.
588         (elf_gc_mark): Likewise.  Properly free internal relocs.
589         (elf_gc_sweep): Properly free internal relocs.
590         (elf_reloc_symbol_deleted_p): No need to swap syms in.
591         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
592         internal relocs.
593         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
594         Properly free possibly cached info.
595         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
596         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
597         symbol swapping code.
598         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
599         Properly free possibly cached info.
600         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
601         (mn10300_elf_relax_delete_bytes): Likewise.
602         (mn10300_elf_symbol_address_p): Likewise.
603         (mn10300_elf_get_relocated_section_contents): Likewise.
604         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
605         (elf32_h8_relax_delete_bytes): Likewise.
606         (elf32_h8_symbol_address_p): Likewise.
607         (elf32_h8_get_relocated_section_contents): Likewise.
608         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
609         (m32r_elf_relax_delete_bytes): Likewise.
610         (m32r_elf_get_relocated_section_contents): Likewise.
611         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
612         elf_section_data to determine whether cached.
613         (sh_elf_relax_section): As above for elf-m10200.c.
614         (sh_elf_relax_delete_bytes): Likewise.
615         (sh_elf_get_relocated_section_contents): Likewise.
616         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
617         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
618         reading of local syms.
619         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
620         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
621         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
622         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
623         relocs.
624         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
625         free internal relocs and section contents.  Don't read symbols.
626         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
627         (elf32_hppa_size_stubs): Don't free local syms.
628         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
629         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
630         possibly cached info.
631         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
632         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
633         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
634         all_local_syms.
635         (get_local_syms): Delete function.
636         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
637         on exit.
638         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
639
640 2002-07-05  Jim Wilson  <wilson@redhat.com>
641
642         * syms.c (decode_section_type): New.
643         (bfd_decode_symclass): Call decode_section_type.
644
645 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
646
647         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
648         section content start.
649         Reported by Michael Schumacher <mike@hightec-rt.com>.
650
651 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
652
653         * section.c (_bfd_strip_section_from_output):  Remove unnecessary
654         link order code.  Don't actually remove the output section here;
655         Just set a flag for the linker to do so.
656         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
657         sections when setting up output section dynsyms.
658
659 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
660
661         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
662         fudge.
663         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
664         libs here instead.
665
666 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
667
668         * elf64-s390.c (create_got_section): Set .got section alignment to
669         8 bytes.
670         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
671
672 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
673
674         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
675
676 2002-07-01  Matt Thomas  <matt@3am-software.com>
677
678         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
679         to EF_VAX_*.
680
681 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
682
683         * elfxx-mips.c (ABI_64_P): Fix comment.
684         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
685         new section names for N64 ABI.
686         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
687         (mips_elf_calculate_relocation): Code formatting.
688         (mips_elf_create_dynamic_relocation): Likewise.
689         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
690         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
691         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
692         in any NewABI.
693         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
694         for NewABI.
695         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
696         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
697         here, too.
698
699 2002-07-01  Andreas Schwab  <schwab@suse.de>
700
701         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
702         R_X86_64_64 to R_X86_64_RELATIVE.
703
704 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
705
706         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
707         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
708         Run "make dep-am".
709         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
710         host_aout_vec.
711         * configure.in (vaxbsd_vec): Add.
712         * targets.c (vaxbsd_vec): Add.
713         * Makefile.in: Rebuild.
714         * configure: Rebuild.
715         * po/SRC-POTFILES.in: Rebuild.
716
717 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
718
719         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
720         examining to gc_mark_hook, rather than the bfd.
721         (elf_gc_sections): Adjust.
722         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
723         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
724         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
725         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
726         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
727         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
728         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
729         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
730         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
731         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
732         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
733         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
734         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
735         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
736         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
737         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
738         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
739         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
740         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
741         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
742         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
743         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
744         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
745         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
746         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
747         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
748         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
749         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
750         redundant local sym tests.
751         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
752         (link_hash_newfunc): Init is_entry.
753         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
754         (ppc64_elf_link_hash_table_create): Init all_local_syms.
755         (create_linkage_sections): Use bfd_make_section_anyway rather than
756         bfd_make_section.
757         (ppc64_elf_mark_entry_syms): New function.
758         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
759         up opd entry to function section map.
760         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
761         relocs that reference the opd section.
762         (edit_opd): New function.
763         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
764         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
765         (get_local_syms): Do so here.  Exit if we already have local syms.
766         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
767         read local syms on non-ELF input.
768         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
769         than duplicating it's function here.  Adjust free of internal
770         relocs to suit.
771         (ppc64_elf_relocate_section): Adjust local syms in opd section.
772         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
773         * elf32-hppa.c (elf32_hppa_size_stubs): Call
774         _bfd_elf32_link_read_relocs rather than duplicating it's function
775         here.  Adjust free of internal relocs to suit.
776
777 2002-07-01  Andreas Jaeger  <aj@suse.de>
778
779         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
780         are not allowed in shared libs code, enforce -fPIC.
781
782 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
783
784         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
785         trailing zero-sequences when there's previous left-over data.
786
787 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
788
789         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
790         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
791         and opd_rel_sec in order for starting rela section.  Check _raw_size.
792         (elf_backend_reloc_type_class): Define.
793
794 2002-06-27  Kevin Buettner <kevinb@redhat.com>
795
796         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
797         DWARF2 formats.
798
799 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
800
801         * cpu-powerpc.c: Comment on ordering of arch_info.
802         * elf32-ppc.c (ppc_elf_object_p): New function.
803         (elf_backend_object_p): Define.
804         * elf64-ppc.c (ppc64_elf_object_p): New function.
805         (elf_backend_object_p): Define.
806
807 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
808
809         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
810         * configure: Regenerate.
811
812 2002-06-25  Jason Eckhardt  <jle@rice.edu>
813
814         * dwarf2.c (decode_line_info): Check unit->addr_size
815         to read in the proper number of prologue bytes.
816
817 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
818
819         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
820         aix5coff64_vec if 64-bit bfd support has been enabled.
821         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
822         been enabled.
823
824         * targets.c (_bfd_target_vector[]): Only include
825         aix5coff64_vec if 64-bit bfd support has been enabled.
826
827 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
828
829         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
830         * elf32-hppa.c (hppa_add_stub): Likewise.
831         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
832         * elflink.h (elf_add_default_symbol): Fix comment typo.
833         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
834         (elf_link_add_object_symbols): Likewise.
835         (elf_link_assign_sym_version): Likewise.
836         * hash.c (bfd_hash_lookup): Likewise.
837         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
838         * section.c (bfd_get_unique_section_name): Likewise.
839         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
840         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
841         (assign_section_numbers): Likewise.
842         (_bfd_elfcore_make_pseudosection): Likewise.
843         (elfcore_grok_lwpstatus): Likewise.
844         (elfcore_grok_win32pstatus): Likewise.
845         (elfcore_write_note): Constify input params.  Use PTR instead of
846         void *.  Include terminating NUL in namesz.  Correct padding.
847         Support NULL "name" param.  Use memcpy instead of strcpy.
848         (elfcore_write_prpsinfo): Constify input params.
849         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
850         (elfcore_write_lwpstatus): Likewise.
851         (elfcore_write_pstatus): Likewise.
852         (elfcore_write_prfpreg): Likewise.
853         (elfcore_write_prxfpreg): Likewise.
854         * elf-bfd.h (elfcore_write_note): Update declaration.
855         (elfcore_write_prpsinfo): Likewise.
856         (elfcore_write_prstatus): Likewise.
857         (elfcore_write_pstatus): Likewise.
858         (elfcore_write_prfpreg): Likewise.
859         (elfcore_write_prxfpreg): Likewise.
860         (elfcore_write_lwpstatus): Likewise.
861
862 2002-06-25  Jason Eckhardt  <jle@rice.edu>
863
864         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
865         symbols of type stProc and stStaticProc.
866
867 2002-06-25  Nick Clifton  <nickc@redhat.com>
868
869         * ecoff.c: VArious formatting fixes.
870
871 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
872
873         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
874
875 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
876
877         * aout-adobe.c: Don't compare against "true" or "false.
878         * aout-target.h: Likewise.
879         * aoutx.h: Likewise.
880         * archive.c: Likewise.
881         * bout.c: Likewise.
882         * cache.c: Likewise.
883         * coff-a29k.c: Likewise.
884         * coff-alpha.c: Likewise.
885         * coff-i386.c: Likewise.
886         * coff-mips.c: Likewise.
887         * coff-or32.c: Likewise.
888         * coff64-rs6000.c: Likewise.
889         * coffcode.h: Likewise.
890         * coffgen.c: Likewise.
891         * cpu-ns32k.c: Likewise.
892         * ecoff.c: Likewise.
893         * ecofflink.c: Likewise.
894         * elf.c: Likewise.
895         * elf32-arm.h: Likewise.
896         * elf32-cris.c: Likewise.
897         * elf32-d30v.c: Likewise.
898         * elf32-i386.c: Likewise.
899         * elf32-mcore.c: Likewise.
900         * elf32-ppc.c: Likewise.
901         * elf32-sh.c: Likewise.
902         * elf32-sh64.c: Likewise.
903         * elf32-v850.c: Likewise.
904         * elf64-alpha.c: Likewise.
905         * elf64-sh64.c: Likewise.
906         * elfcode.h: Likewise.
907         * elfcore.h: Likewise.
908         * elflink.h: Likewise.
909         * elfxx-mips.c: Likewise.
910         * i386os9k.c: Likewise.
911         * ieee.c: Likewise.
912         * libbfd.c: Likewise.
913         * linker.c: Likewise.
914         * mmo.c: Likewise.
915         * nlm32-alpha.c: Likewise.
916         * nlm32-i386.c: Likewise.
917         * nlm32-ppc.c: Likewise.
918         * nlm32-sparc.c: Likewise.
919         * nlmcode.h: Likewise.
920         * oasys.c: Likewise.
921         * pdp11.c: Likewise.
922         * peicode.h: Likewise.
923         * reloc.c: Likewise.
924         * som.c: Likewise.
925         * srec.c: Likewise.
926         * tekhex.c: Likewise.
927         * vms.c: Likewise.
928         * xcofflink.c: Likewise.
929         * elf64-sparc.c: Edit comment to not use "== false".
930
931         * aoutf1.h: Don't use "? true : false".
932         * ecoff.c: Likewise.
933         * format.c: Likewise.
934         * ieee.c: Likewise.
935         * linker.c: Likewise.
936         * mmo.c: Likewise.
937         * oasys.c: Likewise.
938
939 2002-06-23  H.J. Lu  <hjl@gnu.org>
940
941         * elflink.h (elf_link_add_archive_symbols): For the default
942         version, check references with only one `@' first.
943
944 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
945
946         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
947         function.
948         (allocate_global_data_dlt):  Don't add millicode symbols to dynamic
949         symbol table.
950         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
951         (elf64_hppa_size_dynamic_sections): Revise to use
952         elf64_hppa_mark_milli_and_exported_functions.
953         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
954         symbols out of dynamic symbol table.
955
956 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
957
958         * Makefile.in: Regenerate.
959         * libbfd.h: Regenerate.
960         * bfd-in2.h: Regenerate.
961         * configure: Regenerate.
962         * po/SRC-POTFILES.in: Regenerate.
963
964         * elflink.h: Comment typo fixes.
965
966 2002-06-23  H.J. Lu  <hjl@gnu.org>
967
968         * elf-bfd.h (elf_link_loaded_list): New structure.
969         (elf_link_hash_table): Add "loaded".
970         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
971         * elflink.h (elf_link_check_versioned_symbol): New function.
972         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
973
974 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
975
976         * elflink.h (size_dynamic_sections): If the target does not
977         support an ELF style hash table, return true, indicating that
978         nothing needed to be done, rather than false, indicating that the
979         section's size could not be computed.
980
981 2002-06-18  Dave Brolley  <brolley@redhat.com>
982
983         From Catherine Moore, Michael Meissner, Dave Brolley:
984         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
985         * targets.c: Support bfd_elf32_frv_vec.
986         * reloc.c: Add FRV relocs.
987         * configure.in: Add support for bfd-elf32-frv-vec.
988         * config.bfd (targ_cpu): Add support for frv-*-elf.
989         * archures.c: Add frv arch and machines.
990         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
991         (ALL_MACHINES_CFILES): Add cpu-frv.c.
992         (BFD32_BACKENDS): Add elf32-frv.lo.
993         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
994         (cpu-frv.lo): New target.
995         (elf32-frv.lo): New target.
996         * cpu-frv.c: New file.
997         * elf32-frv.c: New file.
998
999 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
1000
1001         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1002         e_shnum == 0.
1003         Only read the first section header if e_shoff is non-zero.
1004         Don't consider e_shstrndx if there are no sections.
1005
1006 2002-06-17  Tom Rix <trix@redhat.com>
1007
1008         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
1009         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
1010         complain_overflow_bitfield.
1011
1012 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
1013
1014         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1015         (bfd_fdopenr): Likewise.
1016         (bfd_openstreamr): Likewise.
1017         (bfd_openw): Likewise.
1018
1019         * targets.c: Sort target vecs.
1020         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1021         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1022         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1023         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1024         * configure.in: Sort target vecs.  Add m88kmach3_vec.
1025         * configure: Regenerate.
1026
1027 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
1028
1029         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1030         bpo_reloc_no to break sort order ties, not address of items.
1031
1032 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1033
1034         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1035         Skip excluded sections in determing __gp value.
1036         (elf_hppa_final_link_relocate): Use the symbol's address in
1037         R_PARISC_FPTR64 relocations that don't need an opd entry.
1038         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1039         (elf64_hppa_finalize_dynreloc): Likewise.
1040         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1041         (elf64_hppa_finish_dynamic_symbol): Break up assert.
1042
1043 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
1044
1045         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1046         alignment for .bss, .data and .text sections so that sse and sse2
1047         code will work.
1048         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1049
1050 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
1051
1052         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1053         sh[1234]*-elf*.
1054
1055 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1056
1057         * elflink.h (elf_bfd_final_link): Improve error handling for missing
1058         dynamic sections.
1059
1060         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1061         for a symbol that has no output section.
1062         (allocate_dynrel_entries): Correct comment.
1063         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
1064         unless we want one.
1065         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1066         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
1067         with no section.  Remove unnecessary parentheses.
1068
1069 2002-06-11  Tom Rix  <trix@redhat.com>
1070
1071         * coffcode.h (coff_compute_section_file_positions): Add data
1072         section to AIX loader alignment check.
1073
1074         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
1075         alignment to 4 bytes.
1076         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1077         power accessor macro.
1078         (do_shared_object_padding): Remove invalid assertion.
1079
1080 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
1081
1082         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1083         for removed output sections.
1084
1085 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
1086
1087         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1088         htab_alloc.
1089         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1090
1091 2002-06-08  H.J. Lu <hjl@gnu.org>
1092
1093         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1094         work around a long long bug in gcc 2.96 on mips.
1095
1096 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
1097
1098         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1099         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1100         Regenerate dependency lists.
1101         * Makefile.in: Regenerate.
1102         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1103         vax1knetbsd_vec to targ_selvecs.
1104         * configure.in: Add vax1knetbsd_vec.
1105         * configure: Regenerate.
1106         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1107         * vax1knetbsd.c: New file.
1108         * vaxnetbsd.c: Update copyright years.
1109         (TARGET_PAGE_SIZE): Set to 0x1000.
1110         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1111
1112 2002-06-08  Matt Thomas  <matt@3am-software.com>
1113
1114         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1115
1116 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
1117
1118         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1119
1120 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
1121
1122         * Makefile.am: Run "make dep-am".
1123         * Makefile.in: Regenerate.
1124
1125         * armnetbsd.c: Replace CONST with const.
1126         * corefile.c: Likewise.
1127         * elf32-dlx.c: Likewise.
1128         * elf64-mips.c: Likewise.
1129         * mmo.c: Likewise.
1130         * ns32knetbsd.c: Likewise.
1131
1132         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1133         table is elf64-sparc.
1134
1135 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1136
1137         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
1138         Fix RELA addends to get not shifted in the result. Don't do special
1139         handling of R_MIPS_64 for NewABI.
1140
1141 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
1142
1143         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1144         (NAME(aout,slurp_reloc_table)): Likewise.
1145         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
1146         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
1147         (xcoff_write_archive_contents_big): Likewise.
1148         (xcoff_generate_rtinit): Likewise.
1149         (xcoff_generate_rtinit): Likewise, and check error return.
1150         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1151         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
1152         (coff_get_normalized_symtab): Likewise.
1153         (coff_make_empty_symbol): Likewise.
1154         (bfd_coff_set_symbol_class): Likewise.
1155         * cofflink.c (coff_link_add_symbols): Likewise.
1156         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
1157         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
1158         (bfd_ecoff_write_accumulated_debug): Likewise.
1159         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
1160         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
1161         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
1162         * ieee.c (do_with_relocs): Use bfd_zalloc.
1163         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
1164         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1165         (NAME(aout,slurp_reloc_table)): Likewise.
1166         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
1167         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
1168         * som.c (som_build_and_write_symbol_table): Likewise.
1169         (som_slurp_string_table): Likewise.
1170         (som_slurp_symbol_table): Likewise.
1171         (som_bfd_ar_write_symbol_stuff): Likewise.
1172         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
1173         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
1174         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
1175         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
1176         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
1177
1178 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
1179
1180         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
1181         "group" union.
1182         (elf_group_name): Update.
1183         (elf_group_id): Define.
1184         (bfd_elf_set_group_contents): Declare.
1185         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
1186         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
1187         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
1188         that sym for the signature.
1189         (_bfd_elf_compute_section_file_positions): Don't call
1190         set_group_contents for "ld -r" case.
1191         (swap_out_syms): Use bfd_zalloc.
1192         * elflink.h (elf_link_add_archive_symbols): Likewise.
1193         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1194         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
1195
1196 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
1197
1198         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
1199         relocs in opd for non-shared too.
1200
1201 2002-06-06  Jeffrey Law <law@redhat.com
1202
1203         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
1204         relocations.
1205
1206 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
1207
1208         * merge.c: Include libiberty.h.
1209         * elf-strtab.c: Include libiberty.h.
1210
1211 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
1212
1213         * peXXigen.c (pe_print_idata): Remove unused variable.
1214
1215 2002-06-06  David Heine <dlheine@tensilica.com>
1216
1217         * elf.c (assign_file_positions_for_segments): Remove unallocated
1218         sections from the section to segment mapping for PT_LOAD segments.
1219         Update comment about empty loadable segments.
1220
1221 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
1222
1223         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
1224         is within the .stabstr section.
1225
1226 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
1227
1228         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
1229         are "const PTR", not "const PTR *".
1230         (bfd_elf32_swap_symbol_in): Likewise.
1231         (bfd_elf64_swap_symbol_in): Likewise.
1232         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
1233         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1234         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1235         (elf_link_add_object_symbols): Likewise.
1236         (elf_link_record_local_dynamic_symbol): Likewise.
1237         (elf_link_input_bfd): Likewise.
1238         (elf_gc_mark): Likewise.
1239         (elf_reloc_symbol_deleted_p): Likewise.
1240         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1241         (mn10200_elf_relax_delete_bytes): Likewise.
1242         (mn10200_elf_symbol_address_p): Likewise.
1243         (mn10200_elf_get_relocated_section_contents): Likewise.
1244         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1245         (mn10300_elf_relax_section): Likewise.
1246         (mn10300_elf_relax_delete_bytes): Likewise.
1247         (mn10300_elf_symbol_address_p): Likewise.
1248         (mn10300_elf_get_relocated_section_contents): Likewise.
1249         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1250         (elf32_h8_relax_delete_bytes): Likewise.
1251         (elf32_h8_symbol_address_p): Likewise.
1252         (elf32_h8_get_relocated_section_contents): Likewise.
1253         * elf32-hppa.c (get_local_syms): Likewise.
1254         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1255         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1256         * elf32-sh.c (sh_elf_relax_section): Likewise.
1257         (sh_elf_relax_delete_bytes): Likewise.
1258         (sh_elf_get_relocated_section_contents): Likewise.
1259         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1260         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1261         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1262         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1263         * elf64-ppc.c (get_local_syms): Likewise.
1264         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1265         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1266
1267 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
1268
1269         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
1270
1271 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
1272
1273         * elf.c (group_signature): Swap in the whole symbol, and handle
1274         extracting section symbol names.
1275         (setup_group): Add comment.
1276         (set_group_contents): When called from objcopy or ld, arrange for
1277         section contents to be written.  Write group member output section
1278         indices to allow objcopy to reorganize sections.
1279         (_bfd_elf_copy_private_section_data): Copy group info.
1280
1281         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
1282         (bfd_elf32_swap_symbol_in): Update prototype.
1283         (bfd_elf64_swap_symbol_in): Likewise.
1284         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
1285         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1286         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1287         (elf_link_add_object_symbols): Likewise.
1288         (elf_link_record_local_dynamic_symbol): Likewise.
1289         (elf_link_input_bfd): Likewise.
1290         (elf_gc_mark): Likewise.
1291         (elf_reloc_symbol_deleted_p): Likewise.
1292         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1293         (mn10200_elf_relax_delete_bytes): Likewise.
1294         (mn10200_elf_symbol_address_p): Likewise.
1295         (mn10200_elf_get_relocated_section_contents): Likewise.
1296         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1297         (mn10300_elf_relax_section): Likewise.
1298         (mn10300_elf_relax_delete_bytes): Likewise.
1299         (mn10300_elf_symbol_address_p): Likewise.
1300         (mn10300_elf_get_relocated_section_contents): Likewise.
1301         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1302         (elf32_h8_relax_delete_bytes): Likewise.
1303         (elf32_h8_symbol_address_p): Likewise.
1304         (elf32_h8_get_relocated_section_contents): Likewise.
1305         * elf32-hppa.c (get_local_syms): Likewise.
1306         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1307         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1308         * elf32-sh.c (sh_elf_relax_section): Likewise.
1309         (sh_elf_relax_delete_bytes): Likewise.
1310         (sh_elf_get_relocated_section_contents): Likewise.
1311         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1312         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1313         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1314         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1315         * elf64-ppc.c (get_local_syms): Likewise.
1316         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1317         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1318         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
1319         * elf64-alpha.c (alpha_elf_size_info): Likewise.
1320         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1321         * elf64-mips.c (mips_elf64_size_info): Likewise.
1322         * elf64-s390.c (s390_elf64_size_info): Likewise.
1323         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1324
1325 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1326
1327         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
1328         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
1329         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
1330         _bfd_mips_elf_ignore_discarded_relocs.
1331         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
1332
1333 2002-06-05  H.J. Lu <hjl@gnu.org>
1334
1335         * elfxx-mips.c (mips_elf_calculate_relocation): Call
1336         _bfd_elf_rel_local_sym for STT_SECTION relocations against
1337         the SEC_MERGE section.
1338
1339 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
1340
1341         * coff-alpha.c: Update copyright date.
1342         * coff-mips.c: Likewise.
1343         * xcoff-target.h: Likewise.
1344
1345         * bfd-in.h: Remove "taken from the source" comment.
1346         * libbfd-in.h: Likewise.
1347         * libcoff-in.h: Likewise.
1348         * bfd-in2.h: Regenerate.
1349         * libbfd.h: Regenerate.
1350         * libcoff.h: Regenerate.
1351
1352         * elf.c (bfd_elf_discard_group): Return true.
1353         * elf-bfd.h (bfd_elf_discard_group): Declare.
1354         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
1355         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
1356         * bfd.c (bfd_discard_group): Define.
1357         * targets.c (struct bfd_target): Add _bfd_discard_group.
1358         (BFD_JUMP_TABLE_LINK): Here too.
1359         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
1360         * aout-adobe.c (aout_32_bfd_discard_group): Define.
1361         * aout-target.h (MY_bfd_discard_group): Define.
1362         * aout-tic30.c (MY_bfd_discard_group): Define.
1363         * binary.c (binary_bfd_discard_group): Define.
1364         * bout.c (b_out_bfd_discard_group): Define.
1365         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
1366         * coffcode.h (coff_bfd_discard_group): Define.
1367         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
1368         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
1369         * i386msdos.c (msdos_bfd_discard_group): Define.
1370         * i386os9k.c (os9k_bfd_discard_group): Define.
1371         * ieee.c (ieee_bfd_discard_group): Define.
1372         * ihex.c (ihex_bfd_discard_group): Define.
1373         * mmo.c (mmo_bfd_discard_group): Define.
1374         * nlm-target.h (nlm_bfd_discard_group): Define.
1375         * oasys.c (oasys_bfd_discard_group): Define.
1376         * ppcboot.c (ppcboot_bfd_discard_group): Define.
1377         * som.c (som_bfd_discard_group): Define.
1378         * srec.c (srec_bfd_discard_group): Define.
1379         * tekhex.c (tekhex_bfd_discard_group): Define.
1380         * versados.c (versados_bfd_discard_group): Define.
1381         * vms.c (vms_bfd_discard_group): Define.
1382         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
1383         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
1384         (aix5coff64_vec): Likewise.
1385         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
1386
1387 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
1388
1389         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
1390         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
1391         (elf32-sh64-com.lo): New dependency list.
1392         * Makefile.in: Regenerate.
1393         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
1394         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
1395         elf32-sh64-com.lo.
1396         * configure: Regenerate.
1397         * elf32-sh64.c (sh64_address_in_cranges)
1398         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
1399         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
1400         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
1401         * elf32-sh64-com.c: ...here.  New file.
1402
1403 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
1404
1405         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
1406         ATTRIBUTE_UNUSED on used params.
1407         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
1408         before calling bfd_section_from_elf_index on local syms.
1409         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1410
1411 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
1412
1413         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
1414         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
1415         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
1416         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
1417         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
1418         * Makefile.in: Regenerate.
1419         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1420         (sh64-*-netbsd*): New targets.
1421         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
1422         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
1423         * configure: Regenerate.
1424         * elf32-sh64-nbsd.c: New file.
1425         * elf64-sh64-nbsd.c: New file.
1426         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
1427         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
1428         bfd_elf64_sh64lnbsd_vec.
1429
1430 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
1431
1432         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
1433         (bfd_section_from_shdr): Likewise.  Set section name of group
1434         sections from signature.
1435         (group_signature): Split out from setup_group.  Ensure symbol table
1436         is available.
1437         (bfd_elf_discard_group): New function.
1438         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
1439         .gnu.linkonce* sections if they are members of a group.
1440         (set_group_contents): Set GRP_COMDAT flag.
1441         * section.c (bfd_discard_group): New function.
1442         * bfd-in.h (bfd_elf_discard_group): Declare.
1443         * bfd-in2.h: Regenerate.
1444         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
1445         (elf_linkonce_p): Define.
1446
1447 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
1448
1449         * elf.c (bfd_section_from_shdr): Make "name" const.
1450         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
1451         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
1452         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1453         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1454         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1455         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1456         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1457         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
1458         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1459         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1460         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1461
1462 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1463
1464         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
1465         ABI.
1466
1467 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
1468
1469         * elf32-arc.c: Fix formatting.
1470         * elf32-arm.h: Likewise.
1471         * elf32-cris.c: Likewise.
1472         * elf32-dlx.c: Likewise.
1473         * elf32-hppa.c: Likewise.
1474         * elf32-i386.c: Likewise.
1475         * elf32-i386qnx.c: Likewise.
1476         * elf32-or32.c: Likewise.
1477         * elf32-s390.c: Likewise.
1478         * elf32-sh64.c: Likewise.
1479         * elf32-vax.c: Likewise.
1480         * elf32-xstormy16.c: Likewise.
1481         * elf64-alpha.c: Likewise.
1482         * elf64-mmix.c: Likewise.
1483         * elf64-ppc.c: Likewise.
1484         * elf64-s390.c: Likewise.
1485         * elf64-sh64.c: Likewise.
1486         * elf64-x86-64.c: Likewise.
1487
1488 2002-06-02  Richard Henderson  <rth@redhat.com>
1489
1490         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
1491         null when there are no got entries for a symbol.
1492         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
1493         uninitialized variable warning.
1494
1495 2002-06-01  Richard Henderson  <rth@redhat.com>
1496
1497         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
1498         undefined symbols here.
1499         (elf64_alpha_relax_section): Do it here.  Also test for not
1500         defined in the current module.
1501         (elf64_alpha_relocate_section_r): Split out of ...
1502         (elf64_alpha_relocate_section): ... here.  Don't dereference
1503         NULL when looking up local got entries.
1504
1505 2002-06-01  Richard Henderson  <rth@redhat.com>
1506
1507         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
1508         symbols from JSR relaxation.
1509         (elf64_alpha_size_plt_section_1): New.
1510         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
1511         (elf64_alpha_size_rela_got_1): ... here.
1512         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
1513         (elf64_alpha_size_rela_got_section): ... here.
1514         (elf64_alpha_size_plt_section): New.
1515         (elf64_alpha_relax_section): Call them.
1516         (elf64_alpha_size_got_sections): Remove output_bfd arg.
1517         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
1518
1519 2002-06-01  Richard Henderson  <rth@redhat.com>
1520
1521         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
1522         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
1523         in shared libraries.  Fix DTPRELHI and TPRELHI value.
1524         (INSN_ADDQ, INSN_RDUNIQ): New.
1525         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
1526         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
1527         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
1528         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
1529         Handle GOTDTPREL and GOTTPREL relocations.
1530         (elf64_alpha_relax_gprelhilo): New.
1531         (elf64_alpha_relax_tls_get_addr): New.
1532         (elf64_alpha_relax_find_tls_segment): New.
1533         (elf64_alpha_relax_section): Handle TLS relocations.
1534         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
1535         (elf64_alpha_check_relocs): Set it.
1536
1537 2002-06-01  Richard Henderson  <rth@redhat.com>
1538
1539         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
1540
1541         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
1542         check; don't suppress dynamic relocs for non-allocated sections.
1543
1544         * elf64-alpha.c: Remove dead code.
1545
1546 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
1547
1548         * bfd-in2.h: Regenerate.
1549         * libbfd.h: Regenerate.
1550         * po/SRC-POTFILES.in: Regenerate.
1551
1552         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
1553         space for bss .plt.
1554
1555 2002-05-31  Graeme Peterson  <gp@qnx.com>
1556
1557         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
1558         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
1559         Run "make dep-am".
1560         * Makefile.in: Regenerate.
1561         * config.bfd: Add i[3456]86-*-nto-qnx* support.
1562         * configure.in: Add bfd_elf32_i386qnx_vec support.
1563         * configure: Regenerate.
1564         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
1565         is_contained_by_filepos, and copy_private_bfd_data_p.
1566         * elf.c (assign_file_positions_for_segments): Call backend
1567         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
1568         (IS_CONTAINED_BY_FILEPOS): Define.
1569         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
1570         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
1571         Fix non-K&R call to _bfd_error_handler.
1572         (_bfd_elf_copy_private_section_data): Use backend
1573         copy_private_bfd_data_p.
1574         * elf32-i386.c: Don't include elfxx-target.h when
1575         ELF32_I386_C_INCLUDED is defined.
1576         * elf32-i386qnx.c: New QNX elf backend file.
1577         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
1578         elf_backend_is_contained_by_filepos, and
1579         elf_backend_do_copy_private_bfd_data.
1580         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
1581
1582 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
1583
1584         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
1585         Move other similar defines to start of file.
1586
1587 2002-05-30  Tom Rix  <trix@redhat.com>
1588
1589         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
1590         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
1591
1592 2002-05-30  Richard Henderson  <rth@redhat.com>
1593
1594         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
1595         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
1596         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
1597         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
1598         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
1599         (struct alpha_elf_obj_tdata): Rename total_got_entries and
1600         n_local_got_entries to total_got_size and local_got_size.
1601         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
1602         (alpha_got_entry_size): New.
1603         (elf64_alpha_relax_with_lituse): Use it.
1604         (elf64_alpha_relax_without_lituse): Likewise.
1605         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
1606         (get_got_entry): New.
1607         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
1608         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
1609         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
1610         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
1611         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
1612         (elf64_alpha_calc_got_offsets): Likewise.
1613         (alpha_dynamic_entries_for_reloc): New.
1614         (elf64_alpha_calc_dynrel_sizes): Use it.
1615         (elf64_alpha_size_dynamic_sections): Likewise.
1616         (elf64_alpha_relocate_section): Handle TLS relocations.
1617         * reloc.c: Add Alpha TLS relocations.
1618         * bfd-in2.h, libbfd.h: Rebuild.
1619
1620 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1621
1622         * peXXigen.c (pe_print_idata): Remove double printed
1623         import table lines; add Bound-To comment.
1624
1625 2002-05-29  Matt Thomas  <matt@3am-software.com>
1626
1627         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
1628         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
1629         (elf32-vax.lo): New rule.
1630         * Makefile.in: Regenerate.
1631         * configure.in (bfd_elf32_vax_vec)
1632         (vaxnetbsd_vec): New vectors.
1633         * configure: Regenerate.
1634         * config.bfd (vax-*-netbsdelf*)
1635         (vax-*-netbsdaout*)
1636         (vax-*-netbsd*): New targets.
1637         * elf32-vax.c: New file.
1638         * reloc.c: Add VAX relocations.
1639         * bfd-in2.h: Regenerate.
1640         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
1641
1642 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
1643
1644         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
1645         and bfd_elf32_bigarm_vec to targ_selvecs.
1646
1647 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
1648
1649         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1650         with auto-imported symbols.
1651
1652 2002-05-29  Adam Nemet  <anemet@lnxw.com>
1653
1654         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1655         sections only record bfd.
1656         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
1657         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
1658         * bfd-in2.h: Regenerate.
1659
1660 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
1661
1662         * syms.c (_bfd_stab_section_find_nearest_line): Move
1663         declaration and initialisation of saw_line and saw_func out of
1664         for loop.
1665
1666 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
1667
1668         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
1669         (bfd_elf64_get_symbol_info): Define.
1670         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
1671
1672 2002-05-29  Andrey Volkov  <avolkov@transas.com>
1673
1674         * cpu-h8300.c: Make default h8300 machine first in machine list.
1675
1676 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
1677
1678         * config.bfd: Added DLX configuraton.
1679         * Makefile.am: Added DLX configuraton.
1680         * configure.in: Added DLX configuraton.
1681         * archures.c: Add DLX architecure.
1682         * reloc.c: Add DLX relocs.
1683         * targets.c: Added DLX target vector.
1684         * configure: Regenerate.
1685         * Makefile.in: Regenreate.
1686         * bfd-in2.h: Regenreate.
1687         * elf32-dlx.c: New file: Support DLX target.
1688         * cpu-dlx.c: New file: Support DLX target.
1689
1690 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
1691
1692         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
1693
1694         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
1695         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
1696         strings to point inside function code sym string.
1697         (func_desc_adjust): Likewise.
1698         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
1699
1700 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
1701
1702         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
1703         (elf64_x86_64_grok_psinfo): Added.
1704
1705 2002-05-24  TAMURA Kent <kent@netbsd.org>
1706
1707         * config.bfd: Add a target for i386-netbsdpe.
1708
1709 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
1710
1711         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
1712         and is_func_descriptor.
1713         (func_desc_adjust): Hide function code sym in shared libs unless
1714         there is a matching exported function descriptor sym.
1715
1716 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
1717
1718         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
1719         for symbols from SHF_TLS section.
1720         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
1721         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
1722         (map_sections_to_segments): Build PT_TLS segment if necessary.
1723         (assign_file_positions_for_segments): Likewise.
1724         (get_program_header_size): Account for PT_TLS segment.
1725         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
1726         SEC_THREAD_LOCAL sections to STT_TLS.
1727         * reloc.c: Add 386 and IA-64 TLS relocs.
1728         * section.c (SEC_THREAD_LOCAL): Define.
1729         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
1730         Remove.
1731         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
1732         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
1733         unconditionally.
1734         (struct elf_final_link_info): Add first_tls_sec.
1735         (elf_bfd_final_link): Set first_tls_sec.
1736         Compute elf_hash_table (info)->tls_segment.
1737         (elf_link_output_extsym): Handle STT_TLS symbols.
1738         (elf_link_input_bfd): Likewise.
1739         * syms.c (BSF_THREAD_LOCAL): Define.
1740         * bfd-in2.h: Rebuilt.
1741         * libbfd.h: Rebuilt.
1742         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
1743         elf_i386_mkobject, elf_i386_object_p): New functions.
1744         (elf_howto_table): Add TLS relocs.
1745         (elf_i386_reloc_type_lookup): Support TLS relocs.
1746         (elf_i386_info_to_howto_rel): Likewise.
1747         (struct elf_i386_link_hash_entry): Add tls_type.
1748         (struct elf_i386_obj_tdata): New.
1749         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
1750         New macros.
1751         (struct elf_i386_link_hash_table): Add tls_ldm_got.
1752         (link_hash_newfunc): Clear tls_type.
1753         (elf_i386_check_relocs): Support TLS relocs.
1754         (elf_i386_gc_sweep_hook): Likewise.
1755         (allocate_dynrelocs): Likewise.
1756         (elf_i386_size_dynamic_sections): Likewise.
1757         (elf_i386_relocate_section): Likewise.
1758         (elf_i386_finish_dynamic_symbol): Likewise.
1759         (bfd_elf32_mkobject, elf_backend_object_p): Define.
1760         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
1761         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
1762         want_tprel, want_dtpmod, want_dtprel.
1763         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
1764         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
1765         R_IA64_LTOFF_TPREL22.
1766         (elf_code_to_howto_index): Add TLS relocs.
1767         (elfNN_ia64_check_relocs): Support TLS relocs.
1768         (allocate_global_data_got): Account for TLS .got data.
1769         (allocate_dynrel_entries): Account for TLS dynamic relocations.
1770         (elfNN_ia64_install_value): Supprt TLS relocs.
1771         (set_got_entry): Support TLS relocs.
1772         (elfNN_ia64_relocate_section): Likewise.
1773
1774 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
1775
1776         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
1777         BLX reloc round the relocation up rather than down.
1778         * coff-arm.c (coff_arm_relocate_section): Likewise.
1779
1780 2002-05-21  H.J. Lu  (hjl@gnu.org)
1781
1782         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
1783         definition.
1784
1785 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
1786
1787         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
1788         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
1789
1790 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
1791
1792         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
1793         unresolved relocs.
1794         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
1795
1796 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1797
1798         * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
1799         non-ELF targets.
1800
1801 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1802
1803         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
1804         an error value.
1805         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1806         return with false on error.
1807         (elf_link_input_bfd): Check reloc_emitter return value.
1808
1809 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
1810
1811         * config.bfd (armeb-*-netbsdelf*): New target.
1812
1813 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
1814
1815         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1816         at the plt call stub.
1817
1818 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1819
1820         * cpu-mips.c (mips_compatible): Don't try to check machine
1821         compatibility.
1822
1823 2002-05-18  Tom Rix  <trix@redhat.com>
1824
1825         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out):  Fix C_FILE auxent.
1826
1827 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
1828
1829         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1830         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1831         we've already warned about an undefined symbol.  Report more
1832         detail on reloc errors.
1833
1834 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
1835
1836         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1837         * configure.in: Invoke AM_INSTALL_LIBBFD.
1838         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
1839         (install_libbfd): .. New target.
1840         (uninstall_libbfd): Likewise.
1841         (install-bfdlibLTLIBRARIES): Likewise.
1842         (uninstall-bfdlibLTLIBRARIES): Likewise.
1843         (bfdlibdir): New.
1844         (bfdincludedir): New.
1845         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1846         * aclocal.m4: Regenerate.
1847         * configure: Regenerate.
1848         * Makefile.in: Regenerate.
1849
1850 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
1851
1852         * hash.c (bfd_hash_lookup): Remove computation of len from inside
1853         hash loop.
1854
1855 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
1856
1857         * config.bfd: Add targets for sh64-linux (little endian and
1858         big endian).
1859
1860 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
1861
1862         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1863         is located in the same section as the import table.  Instead
1864         check, and if necessary load the section containing the thunk.
1865
1866 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
1867
1868         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
1869         bfd_bread.
1870         (xcoff64_core_file_matches_executable_p): Replace bfd_read
1871         with bfd_bread.
1872
1873 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
1874
1875         * aix5ppc-core.c: Warning fixes.
1876         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1877         * aout-target.h (MY_bfd_link_just_syms): Define.
1878         * aout-tic30.c (MY_bfd_link_just_syms): Define.
1879         * bfd.c (bfd_link_just_syms): Define.
1880         * binary.c (binary_bfd_link_just_syms): Define.
1881         * bout.c (b_out_bfd_link_just_syms): Define.
1882         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1883         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1884         * coffcode.h (coff_bfd_link_just_syms): Define.
1885         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1886         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1887         (_bfd_elf_link_just_syms): Declare.
1888         * elf.c (_bfd_elf_link_just_syms): New function.
1889         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1890         sections haven't already been discarded by the linker.
1891         * elflink.h (elf_link_add_object_symbols): Likewise for stab
1892         sections and SEC_MERGE sections.
1893         (elf_bfd_discard_info): Similarly here.
1894         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1895         * i386msdos.c (msdos_bfd_link_just_syms): Define.
1896         * i386os9k.c (os9k_bfd_link_just_syms): Define.
1897         * ieee.c (ieee_bfd_link_just_syms): Define.
1898         * ihex.c (ihex_bfd_link_just_syms): Define.
1899         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1900         (_bfd_generic_link_just_syms): Declare.
1901         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1902         * linker.c (_bfd_generic_link_just_syms): New function.
1903         * mmo.c (mmo_bfd_link_just_syms): Define.
1904         * nlm-target.h (nlm_bfd_link_just_syms): Define.
1905         * oasys.c (oasys_bfd_link_just_syms): Define.
1906         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1907         * som.c (som_bfd_link_just_syms): Define.
1908         * srec.c (srec_bfd_link_just_syms): Define.
1909         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1910         (BFD_JUMP_TABLE_LINK): And here.
1911         * tekhex.c (tekhex_bfd_link_just_syms): Define.
1912         * versados.c (versados_bfd_link_just_syms): Define.
1913         * vms.c (vms_bfd_link_just_syms): Define.
1914         * libbfd.h: Regenerate.
1915         * bfd-in2.h: Regenerate.
1916
1917 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1918
1919         * elf32-mips.c: Remove superfluous definitions copied from
1920         elfxx-mips.c.
1921         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1922         SGIish vectors to check the special case.
1923         (mips_elf_hi16_reloc): Fix comment.
1924         (mips_elf_got16_reloc): Likewise.
1925         (_bfd_mips_elf32_gprel16_reloc): Likewise.
1926         (elf_reloc_map): Code cleanup.
1927         (mips_reloc_map): Add comment.
1928         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1929         (mips_elf32_rtype_to_howto): Likewise.
1930         (mips_elf32_discard_info): Likewise.
1931         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1932         lead to IRIX compatibility now.
1933
1934 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1935
1936         * elfxx-mips.c: Call it IRIX, not Irix in comments.
1937
1938 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
1939
1940         * config.bfd (shle-*-netbsdelf*): Add target which includes
1941         sh64 support.
1942
1943 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
1944
1945         * configure.in: Revert 2002-04-07.  Instead, auto-configure
1946         HAVE_ST_C_IMPL.
1947         * configure: Regenerate.
1948         * config.in: Regenerate.
1949         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1950         or AIX_5_CORE.
1951
1952 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
1953
1954         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1955         corefiles as well.2
1956         * configure: Regenerate.
1957
1958 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
1959
1960         * Makefile.am (install-data-local): Install headers to
1961         $(exec_prefix)/include.
1962         * Makefile.in: Regenerate.
1963
1964 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
1965             Daniel Jacobowitz  <drow@mvista.com>
1966
1967         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
1968         map BFD_RELOC_RVA.
1969
1970 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
1971
1972         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1973         hppa*-*-openbsd*): New targets.
1974         * configure.in (alpha*-*-openbsd*): Set COREFILE.
1975         * configure: Regenerate.
1976
1977 2002-05-10  Tom Rix  <trix@redhat.com>
1978
1979         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
1980         xcoff64_ppc_relocate_section.
1981         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
1982         * libxcoff.h: Common xcoff_reloc_type function declaration.
1983
1984 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
1985
1986         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
1987         added in 2002-05-09 commit.
1988
1989         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
1990         don't look for stubs on all undefined syms.
1991
1992 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
1993
1994         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
1995         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
1996         pcrel_offset.
1997
1998         * elf32-i386.c (elf_howto_table): Comments.
1999         (elf_i386_relocate_section): Handle more relocs for relocatable
2000         linking and against SEC_MERGE sections.
2001
2002 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
2003
2004         * elf32-ppc.c (ppc_elf_create_got): New function.
2005         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
2006         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
2007         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2008         _bfd_elf_create_got_section.
2009
2010 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
2011
2012         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2013         * elfxx-target.h (elf_backend_rela_normal): Define.
2014         (elfNN_bed): Init rela_normal.
2015         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2016         for section symbols here if rela_normal.  Simplify abs section test.
2017         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2018         return immediately.  Remove code handling relocatable linking.
2019         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2020         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2021         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2022         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2023         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2024         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2025         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2026         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2027         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2028         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2029         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2030         * elf64-s390.c (elf_s390_relocate_section): Likewise.
2031         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2032         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2033         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2034         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2035         * elf-m10200.c (elf_backend_rela_normal): Define.
2036         * elf-m10300.c (elf_backend_rela_normal): Define.
2037         * elf32-fr30.c (elf_backend_rela_normal): Define.
2038         * elf32-i370.c (elf_backend_rela_normal): Define.
2039         * elf32-i860.c (elf_backend_rela_normal): Define.
2040         * elf32-m68k.c (elf_backend_rela_normal): Define.
2041         * elf32-mcore.c (elf_backend_rela_normal): Define.
2042         * elf32-openrisc.c (elf_backend_rela_normal): Define.
2043         * elf32-ppc.c (elf_backend_rela_normal): Define.
2044         * elf32-s390.c (elf_backend_rela_normal): Define.
2045         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2046         * elf64-ppc.c (elf_backend_rela_normal): Define.
2047         * elf64-s390.c (elf_backend_rela_normal): Define.
2048         * elf64-x86-64.c (elf_backend_rela_normal): Define.
2049         * elfxx-ia64.c (elf_backend_rela_normal): Define.
2050         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2051         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2052
2053 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
2054
2055         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2056         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2057
2058 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
2059
2060         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2061         when not relocatable.  Fix reloc_emitter call for K&R.
2062
2063 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
2064
2065         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2066         reloading local sym addend mistakenly removed in 2002-05-01 change.
2067
2068         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2069         (read_abbrevs): Change "offset" param to bfd_vma.
2070         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2071         Change "abbrev_offset" to bfd_vma.
2072         (read_indirect_string): Use correct conversion chars in error
2073         message format string, cast bfd_vma's to unsigned long.
2074         (read_abbrevs): Likewise.
2075         (read_attribute_value): Likewise.
2076         (decode_line_info): Likewise.
2077         (scan_unit_for_functions): Likewise.
2078         (parse_comp_unit): Likewise.
2079
2080 2002-05-04  Tom Rix  <trix@redhat.com>
2081
2082         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2083         (coff_swap_reloc_out): Same.
2084         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2085         (xcoff_swap_reloc_out): Same.
2086         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2087         case some 16 bit relocs. Add reloc value to output.
2088         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
2089         R_RBR. Improve names.
2090         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2091         (bfd_xcoff_backend_data): Update with new reloc swap names.
2092         (bfd_pmac_xcoff_backend_data) : Same.
2093         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2094         (xcoff64_swap_reloc_out): Same.
2095         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
2096         R_POS. Add reloc value to output.
2097         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
2098         bit R_RBR. Improve names, masks.
2099         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2100         (bfd_xcoff_backend_data): Update with new reloc swap names.
2101         (bfd_xcoff_aix5_backend_data) : Same.
2102
2103 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
2104
2105         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2106         bfd_count top_index, input_list, all_local_syms.
2107         (elf32_hppa_setup_section_lists): New function, split from
2108         elf32_hppa_size_stubs.
2109         (elf32_hppa_next_input_section): Likewise.
2110         (group_sections): Likewise.
2111         (get_local_syms): Likewise.
2112         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
2113         stubs on undefined syms too.
2114         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
2115         Only access htab elf fields when we have an elf hash table.
2116         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2117         (elf32_hppa_next_input_section): Declare.
2118
2119 2002-05-04  Bob Byrnes  <byrnes@curl.com>
2120
2121         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2122         _bfd_new_bfd.
2123
2124 2002-05-03  H.J. Lu  (hjl@gnu.org)
2125
2126         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2127         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2128         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2129         to hide a global symbol.
2130         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
2131         forced_local to true.
2132
2133 2002-05-02  Richard Henderson  <rth@redhat.com>
2134
2135         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2136         vs SHN_UNDEF to zero.
2137
2138 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
2139
2140         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
2141         16 bit reloc.
2142         <R_PPC64_SECTOFF_DS>: Likewise.
2143         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2144         SECTOFF reloc.
2145         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
2146         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2147         SECTOFF reloc.
2148
2149         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
2150         (ppc64_elf_ha_reloc): New function.
2151         (ppc64_elf_brtaken_reloc): New function.
2152         (ppc64_elf_sectoff_reloc): New function.
2153         (ppc64_elf_sectoff_ha_reloc): New function.
2154         (ppc64_elf_toc_reloc): New function.
2155         (ppc64_elf_toc_ha_reloc): New function.
2156         (ppc64_elf_toc64_reloc): New function.
2157         (ppc64_elf_unhandled_reloc): New function.
2158         (ppc64_elf_howto_raw): Use the above.
2159         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
2160         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
2161         <R_PPC64_SECTOFF_DS>: Likewise.
2162         (IS_ABSOLUTE_RELOC): Update.
2163         (struct ppc_link_hash_table): Add have_undefweak.
2164         (ppc64_elf_link_hash_table_create): Init.
2165         (func_desc_adjust): Set have_undefweak.
2166         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
2167         add the .sfpr blr when have_undefweak.
2168         (ppc64_elf_setup_section_lists): Check hash table flavour.
2169         (ppc64_elf_next_input_section): Move output_section->owner test to
2170         ppc64elf.em.
2171         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
2172         and relocatable test.  Return TOCstart and don't set elf_gp.
2173         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
2174         offset calculation.  Add assert on weak sym branch tweaks.
2175         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
2176         (ppc64_elf_toc): Declare.
2177         (ppc64_elf_next_input_section): Update.
2178
2179 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
2180
2181         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
2182         file_name.
2183
2184 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
2185
2186         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
2187         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
2188         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
2189         call branches.  Correct undefined weak destination.
2190         (ppc64_elf_func_desc_adjust): Always create at least one blr in
2191         .sfpr, and correct case where either only savef* or restf* is
2192         needed.
2193
2194         Long branch stubs, multiple stub sections.
2195         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
2196         (ppc64_elf_next_input_section): Declare.
2197         * elf64-ppc.c: Move linker-only prototypes.
2198         (STUB_SUFFIX): Define.
2199         (enum ppc_stub_type): New.
2200         (struct ppc_stub_hash_entry): New.
2201         (struct ppc_branch_hash_entry): New.
2202         (struct ppc_link_hash_entry): Add stub_cache, oh.
2203         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
2204         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
2205         Rename plt_overflow to stub_error.
2206         (ppc_stub_hash_lookup): Define.
2207         (ppc_branch_hash_lookup): Define.
2208         (stub_hash_newfunc): New function.
2209         (branch_hash_newfunc): New function.
2210         (link_hash_newfunc): Init new fields.
2211         (ppc64_elf_link_hash_table_create): Likewise.
2212         (ppc64_elf_link_hash_table_free): New function.
2213         (ppc_stub_name): New function.
2214         (ppc_get_stub_entry): New function.
2215         (ppc_add_stub): New function.
2216         (create_linkage_sections): Use bfd_make_section_anyway.  Create
2217         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
2218         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
2219         and set up for plt call stubs.  Link func and func desc syms.
2220         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
2221         (func_desc_adjust): Avoid hash lookup when func desc sym available
2222         via shortcut, and set links when processing.
2223         (ppc64_elf_hide_symbol): Likewise.
2224         (allocate_dynrelocs): Don't allocate stub section here.
2225         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
2226         Remove sstub code.
2227         (ppc_type_of_stub): New function.
2228         (build_one_stub): Delete.
2229         (ppc_build_one_stub): New function.
2230         (ppc_size_one_stub): New function.
2231         (ppc64_elf_setup_section_lists): New function.
2232         (ppc64_elf_next_input_section): New function.
2233         (group_sections): New function.
2234         (get_local_syms): New function.
2235         (ppc64_elf_size_stubs): Rewrite.
2236         (ppc64_elf_build_stubs): Rewrite.
2237         (ppc64_elf_relocate_section): Look up stub entry for REL24
2238         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
2239         branch stubs if REL14* or REL24 relocs won't reach.
2240         (bfd_elf64_bfd_link_hash_table_free): Define.
2241
2242 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
2243
2244         * bfd/config.bfd: Add support for powerpc-*-windiss.
2245
2246 2002-04-30  Tom Rix  <trix@redhat.com>
2247
2248         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
2249         symbol names into the hash table.
2250
2251 2002-04-28  Tom Rix  <trix@redhat.com>
2252
2253         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
2254         calulating relocations.
2255         (xcoff_complain_overflow) : Function table for relocation errors.
2256         (xcoff_ppc_relocate_section): Use relocation and complain function
2257         tables.
2258         (xcoff_complain_overflow_unsigned_func): New complain function.
2259         (xcoff_complain_overflow_signed_func): Same.
2260         (xcoff_complain_overflow_bitfield_func): Same.
2261         (xcoff_complain_overflow_dont_func): Same.
2262         (xcoff_reloc_type_crel): New recot function.
2263         (xcoff_reloc_type_br): Same.
2264         (xcoff_reloc_type_ba): Same.
2265         (xcoff_reloc_type_toc): Same.
2266         (xcoff_reloc_type_rel): Same.
2267         (xcoff_reloc_type_neg): Same.
2268         (xcoff_reloc_type_pos): Same.
2269         (xcoff_reloc_type_fail): Same.
2270         (xcoff_reloc_type_noop): Same.
2271         * libxcoff.h : Declare common parts for xcoff64.
2272         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
2273         and complain function tables.
2274
2275 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
2276
2277         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
2278         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
2279
2280 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
2281
2282         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
2283         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2284
2285         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
2286         same as the output before calling elf_link_input_bfd.
2287
2288         * coffcode.h (coff_compute_section_file_positions): Set
2289         section_tail after shuffling section list.
2290
2291 2002-04-24  Christian Groessler <chris@groessler.org>
2292
2293         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
2294         addresses are 23bit with a special layout, not plain 32bit
2295         values.  Prevent relocation of immediate values.
2296
2297 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
2298
2299         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
2300         MIPS-16 ASE flags are set, print something to indicate that.
2301
2302 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
2303
2304         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
2305         under which a plt call stub is used.
2306         (final_link_relocate): Similarly.
2307         (allocate_plt_static): Clear h-plabel except when plt entry is
2308         exclusively used for a plabel.
2309         (allocate_dynrelocs): Use the above to simplify plt sizing.
2310         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
2311         (elf32_hppa_link_hash_table_create): Init.
2312         (BL22_RP): Define.
2313         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
2314         (elf32_hppa_check_relocs): Set has_22bit_branch.
2315
2316         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
2317         (final_link_relocate): Likewise.
2318
2319 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
2320
2321         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
2322         search table if some FDE is DW_EH_PE_aligned encoded either.
2323         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
2324
2325 2002-04-22  Richard Smith  <richard@ex-parrot.com>
2326             Jakub Jelinek  <jakub@redhat.com>
2327
2328         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
2329         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
2330         encoded personality.
2331         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
2332         for CIE/FDE removal.
2333
2334 2002-04-20  Tom Rix  <trix@redhat.com>
2335
2336         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
2337
2338 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
2339
2340         * archures.c (bfd_lookup_arch): Move the list order comment..
2341         (struct bfd_arch_info): ..to where it belongs.
2342         * bfd-in2.h: Regenerate.
2343
2344         * archures.c (bfd_lookup_arch): Add comment on list order.
2345         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
2346         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
2347         is always at head of list.
2348
2349 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
2350
2351         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
2352         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
2353         definition of these functions for ARM_WINCE builds as they are
2354         not used.
2355         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
2356         for ARM_WINCE builds.
2357
2358 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
2359
2360         * coff-arm.c (bfd_arm_process_before_allocation):
2361
2362 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
2363
2364         * cpu-sh.c (scan_mach): Delete.
2365         (arch_info_struct): Replace scan_mach with bfd_default_scan.
2366         (bfd_sh_arch): Likewise.
2367
2368 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
2369
2370         * ihex.c (ihex_write_object_contents): Fix check for records
2371         crossing 64K boundaries.
2372
2373 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
2374
2375         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
2376         type rather than just assuming entries are ELF.
2377         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2378         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2379         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
2380         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
2381         rather than elf_link_hash_entry.
2382
2383 2002-04-15  Richard Henderson  <rth@redhat.com>
2384
2385         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
2386         n32 binaries.
2387
2388 2002-04-15  Michael Snyder  <msnyder@redhat.com>
2389
2390         * opncls.c (bfd_close): Write contents if writeable.
2391         Minor formatting tidy-ups.
2392
2393 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
2394
2395         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2396
2397 2002-04-12  Michael Snyder  <msnyder@redhat.com>
2398
2399         * bfd-in.h (bfd_get_section_lma): New access macro.
2400         Minor white-space fix-up.
2401
2402 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
2403
2404         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
2405         header pad.
2406
2407 2002-04-09  DJ Delorie  <dj@redhat.com>
2408
2409         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
2410
2411 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
2412
2413         * coffcode.h (coff_read_word): New.
2414         (coff_compute_checksum): New.
2415         (coff_apply_checksum): New.
2416         (coff_write_object_contents): Call coff_apply_checksum () to
2417         apply checksum to PE image.
2418
2419 2002-04-08  Randolph Chung  <tausq@debian.org>
2420
2421         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
2422         (elf32_hppa_final_link): Split out sorting logic to..
2423         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
2424         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
2425
2426 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
2427
2428         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
2429         pattern.
2430         * configure: Re-generate.
2431
2432 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
2433
2434         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
2435         is greater or equal to 4.3.3.
2436         * configure: Regenerate.
2437         Fix PR gdb/344.
2438
2439 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
2440
2441         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
2442         R_CRIS_32_PCREL>: Fix typo in name.
2443         (cris_elf_check_relocs): Always create .rela.got here when
2444         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
2445         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
2446         assume it's created.
2447
2448 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
2449
2450         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
2451         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
2452         define.
2453         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
2454         * bfd.c (bfd_link_hash_table_free): Define.
2455         * binary.c (binary_bfd_link_hash_table_free): Define.
2456         * bout.c (b_out_bfd_link_hash_table_free): Define.
2457         * coff-rs6000.c (rs6000coff_vec): Include
2458         _bfd_generic_link_hash_table_free.
2459         (pmac_xcoff_vec): Likewise.
2460         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2461         (aix5coff64_vec): Likewise.
2462         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
2463         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
2464         (bfd_elf32_bfd_link_hash_table_free): Define.
2465         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
2466         (bfd_elf32_bfd_link_hash_table_free): Define.
2467         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
2468         define.
2469         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
2470         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
2471         * ieee.c (ieee_bfd_link_hash_table_free): Define.
2472         * ihex.c (ihex_bfd_link_hash_table_free): Define.
2473         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
2474         (_bfd_generic_link_hash_table_free): Add prototype.
2475         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
2476         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
2477         * linker.c (_bfd_generic_link_hash_table_free): New function.
2478         * mmo.c (mmo_bfd_link_hash_table_free): Define.
2479         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
2480         * oasys.c (oasys_bfd_link_hash_table_free): Define.
2481         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
2482         * som.c (som_bfd_link_hash_table_free): Define.
2483         * srec.c (srec_bfd_link_hash_table_free): Define.
2484         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
2485         * versados.c (versados_bfd_link_hash_table_free): Define.
2486         * vms.c (vms_bfd_link_hash_table_free): New function.
2487         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
2488
2489         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
2490         instead of bfd_alloc.
2491         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2492         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
2493         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
2494         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
2495         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2496         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2497         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
2498         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
2499         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2500         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2501         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2502         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2503         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2504         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
2505         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
2506         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2507         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2508         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2509         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
2510         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
2511         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2512         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
2513         * m68klinux.c (linux_link_hash_table_create): Likewise.
2514         * sparclinux.c (linux_link_hash_table_create): Likewise.
2515         * sunos.c (sunos_link_hash_table_create): Likewise.
2516         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2517
2518         * targets.c: Add _bfd_link_hash_table_free to xvec.
2519
2520         * bfd-in2.h: Regenerate.
2521         * libbfd.h: Regenerate.
2522         * libcoff.h: Regenerate.
2523
2524 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
2525
2526         * dep-in.sed: Cope with absolute paths.
2527         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
2528         Run "make dep-am".
2529         * Makefile.in: Regenerate.
2530         * coff-arm.c: Fix copyright date.
2531         * cpu-h8300.c: Likewise.
2532         * cpu-i370.c: Likewise.
2533         * cpu-s390.c: Likewise.
2534         * cpu-mips.c: Likewise.
2535         * po/SRC-POTFILES.in: Regenerate.
2536
2537 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2538
2539         * Makefile.am: Add elfxx-mips.c to the known backends.
2540         (elf32-mips.lo): remove dependency to coff/external.h.
2541         * Makefile.in: Regenerate.
2542         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
2543         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
2544         accordingly.
2545         * configure: Regenerate.
2546         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
2547         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
2548         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
2549         MIPS specific backend functions.
2550         * elf32-mips.c: Moved most code to elfxx-mips.c.
2551         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
2552         static.
2553         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
2554         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
2555         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
2556         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
2557         interface to allow selection of the right REL or RELA howto table.
2558         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
2559         static. Let it refuse n32 objects.
2560         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
2561         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
2562         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
2563         (elf32_mips_ignore_discarded_relocs): Rename from
2564         _bfd_elf32_mips_ignore_discarded_relocs.
2565         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
2566         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
2567         (elf_mips_howto_table_rela): Remove.
2568         * elf64-mips.c: Moved most code to elfxx-mips.c.
2569         (bfd_elf64_bfd_reloc_type_lookup): Make static.
2570         (mips_elf64_rtype_to_howto): New function.
2571         (mips_elf64_object_p): Likewise.
2572         (elf64_mips_irix_compat): Likewise.
2573         * elfxx-mips.c: New file containing common code merged together from
2574         elf32-mips.c and elf64-mips.c.
2575         * elfxx-mips.h: New file containing MIPS specific prototypes from
2576         elf-bfd.h.
2577         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
2578         elf_backend_mips_rtype_to_howto.
2579
2580 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
2581
2582         * srec.c (MAXCHUNK, Chunk): Revise comments.
2583         (srec_write_record): Correct buffer size.
2584         (srec_write_header): Do without intermediate buffer.
2585         (srec_write_section): Validate Chunk.
2586         (srec_write_terminator): Pass NULL instead of dummy buffer.
2587         (srec_write_symbols): Pass file and symbol names directly to
2588         bfd_bwrite so sprintf won't overflow buffer.
2589
2590 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
2591
2592         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
2593         PC relative relocs against hidden symbols.
2594         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2595
2596 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
2597
2598         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
2599         LMAs, loop over segments until p_vaddr and p_memsz specify an
2600         extent enclosing the section.
2601
2602 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
2603
2604         * ihex.c (ihex_write_object_contents): Do not allow records to
2605         cross a 64K boundary - wrap if necessary.
2606
2607 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
2608
2609         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
2610         which caused the returned LWP ID to always be 0.
2611
2612 2002-04-01  Richard Henderson  <rth@redhat.com>
2613
2614         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2615         (elf32_sparc_relocate_section): Use it to figure out when to
2616         initialize .got entries.
2617         * elf64-sparc.c: Similarly.
2618
2619 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
2620
2621         * linker.c (link_action): Ignore duplicate warning syms.
2622         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
2623         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
2624         (elf_adjust_dynamic_symbol): Likewise.
2625         (elf_export_symbol): Likewise.
2626         (elf_link_find_version_dependencies): Likewise.
2627         (elf_link_assign_sym_version): Likewise.
2628         (elf_link_sec_merge_syms): Likewise.
2629         (elf_link_output_extsym): Likewise.
2630         (elf_gc_sweep_symbol): Likewise.
2631         (elf_gc_propagate_vtable_entries_used): Likewise.
2632         (elf_gc_smash_unused_vtentry_relocs): Likewise.
2633         (elf_gc_allocate_got_offsets): Likewise.
2634         (elf_collect_hash_codes): Likewise.
2635         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
2636         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2637         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2638         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
2639         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
2640         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
2641         (elf_cris_discard_excess_dso_dynamics): Likewise.
2642         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
2643         (mark_PIC_calls): Likewise.
2644         (allocate_plt_static): Likewise.
2645         (allocate_dynrelocs): Likewise.
2646         (readonly_dynrelocs): Likewise.
2647         * elf32-i386.c (allocate_dynrelocs): Likewise.
2648         (readonly_dynrelocs): Likewise.
2649         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2650         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2651         * elf32-mips.c (mips_elf_output_extsym): Likewise.
2652         (mips_elf_sort_hash_table_f): Likewise.
2653         (mips_elf_check_mips16_stubs): Likewise.
2654         * elf32-s390.c (allocate_dynrelocs): Likewise.
2655         (readonly_dynrelocs): Likewise.
2656         * elf32-sh.c (sh_elf_discard_copies): Likewise.
2657         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2658         (xstormy16_relax_plt_realloc): Likewise.
2659         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
2660         (elf64_alpha_output_extsym): Likewise.
2661         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
2662         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
2663         (mips_elf64_check_mips16_stubs): Likewise.
2664         (mips_elf64_output_extsym): Likewise.
2665         * elf64-ppc.c (func_desc_adjust): Likewise.
2666         (allocate_dynrelocs): Likewise.
2667         (readonly_dynrelocs): Likewise.
2668         * elf64-s390.c (allocate_dynrelocs): Likewise.
2669         (readonly_dynrelocs): Likewise.
2670         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2671         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2672         (readonly_dynrelocs): Likewise.
2673         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
2674         * aoutx.h (aout_link_write_other_symbol): Likewise.
2675         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
2676         (_bfd_coff_write_global_sym): Likewise.
2677         * i386linux.c (linux_tally_symbols): Likewise.
2678         * m68klinux.c (linux_tally_symbols): Likewise.
2679         * sparclinux.c (linux_tally_symbols): Likewise.
2680         * pdp11.c (aout_link_write_other_symbol): Likewise.
2681         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2682         * xcofflink.c (xcoff_build_ldsyms): Likewise.
2683         (xcoff_write_global_symbol): Likewise.
2684
2685         * cofflink.c (_bfd_coff_final_link): Formatting.
2686         * cpu-mips.c (mips_compatible): Make static, prototype.
2687         * elf32-i386.c (elf_i386_check_relocs): Formatting.
2688         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
2689         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
2690         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
2691         (mips_elf64_final_link): Likewise.
2692         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
2693         prototype.
2694
2695 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
2696
2697         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
2698         (SWAP_OUT_RELOC_OFFSET): Define.
2699
2700 2002-03-27  Gregory Steuck <greg@nest.cx>
2701
2702         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
2703         terminating NULL if empty symbol table.
2704         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
2705
2706 2002-03-26  H.J. Lu  (hjl@gnu.org)
2707
2708         * elflink.h (elf_link_input_bfd): Revert the last change since
2709         the gcc exception handling isn't fixed yet.
2710
2711 2002-03-26  H.J. Lu  (hjl@gnu.org)
2712
2713         * elflink.h (elf_link_input_bfd): Complain about relocations
2714         against local symbols in discarded sections.
2715
2716 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
2717
2718         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
2719
2720 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
2721
2722         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2723         section file offset for !SEC_LOAD sections.
2724
2725 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
2726
2727         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
2728         <case R_ARM_GOT>): Handle relocations to Thumb functions.
2729
2730 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
2731
2732         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
2733         Whitespace changes.
2734         * archive.c: Update copyright date.
2735         * bfd-in2.h: Regenerate.
2736         * libbfd.h: Regenerate.
2737         * Makefile.am: Run "make dep-am"
2738         * Makefile.in: Regenerate.
2739         * po/SRC-POTFILES.in: Regenerate.
2740
2741 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
2742
2743         * dwarf2.c (struct funcinfo): Move up.
2744         (lookup_address_in_function_table): New argument function_ptr.
2745         Set it.
2746         (lookup_address_in_line_table): New argument function.  If function
2747         is non-NULL, use it to handle ``addr'' before the first line note of
2748         the function.
2749         (comp_unit_find_nearest_line): Update and swap calls to
2750         lookup_address_in_function_table and lookup_address_in_line_table.
2751         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
2752         N_SLINE encountered if we see an N_FUN before any N_SLINE.
2753
2754 2002-03-20  Tom Rix  <trix@redhat.com>
2755
2756         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
2757         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
2758         * coff64-rs6000.c :  Use _bfd_xcoff_stat_arch_elt.
2759
2760 2002-03-19  Tom Rix  <trix@redhat.com>
2761
2762         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
2763         dynamic objects in archives.
2764
2765 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
2766
2767         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
2768         STT_NOTYPE symbols to STT_OBJECT.
2769
2770 2002-03-18  Jan Hubicka  <jh@suse.cz>
2771
2772         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
2773
2774 2002-03-18  Tom Rix  <trix@redhat.com>
2775
2776         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
2777         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
2778         * coff-rs6000 (do_pad) : New function for archive padding.
2779         (do_copy) : New function for object file copying in archives.
2780         (do_shared_object_padding) : New function for padding shared
2781         objects to their text section alignment in archives.
2782         (bfd_xcoff_ar_achive_set_magic) : Stub.
2783         (xcoff_write_armap_big) : Use do_copy and do_pad.
2784         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
2785         do_copy and do_pad.
2786         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
2787         bfd_xcoff_magic_number.
2788         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
2789         fop.
2790         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
2791         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
2792         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
2793         * rs6000-core.c : Update copyright date.
2794         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
2795         csectpp.
2796         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
2797         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
2798         (coff_set_flags) : Use bfd_xcoff_magic_number.
2799         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
2800         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
2801         * Makefile.am : Same.
2802         * config.bfd : Same.
2803         * targets.c : Same.
2804         * configure : Regnerate.
2805         * Makefile.in : Same.
2806         * bfd-in2.h : Same.
2807
2808 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
2809
2810         * po/fr.po: Updated version.
2811
2812 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
2813
2814         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2815         * libbfd.h: Regenerate.
2816         * archive.c (coff_write_armap): Pass on failures from
2817         bfd_write_bigendian_4byte_int.
2818
2819 2002-03-14  H.J. Lu <hjl@gnu.org>
2820
2821         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2822         error to bfd_error_nonrepresentable_section for reinit_array
2823         section in DSO.
2824
2825 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
2826
2827         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2828         OR it in rather than replacing previously selected flags.
2829
2830         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2831         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2832
2833 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
2834
2835         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
2836         (N): Use the above.
2837         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
2838         ensure reloc size matches before calling elf_link_input_bfd.
2839         Add an assert to check reloc size when counting output relocs.
2840
2841 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
2842
2843         * mmo.c (mmo_get_loc): Return NULL rather than false.
2844
2845 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
2846
2847         * po/fr.po: Updated version.
2848
2849 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
2850
2851         * archures.c (bfd_default_compatible): Test bits_per_word.
2852         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
2853         bfd_default_compatible.
2854         * cpu-i370.c (i370_compatible): Likewise.
2855         * cpu-sparc.c (sparc_compatible): Likewise.
2856         * cpu-h8300.c (compatible): Test in->arch == out->arch.
2857
2858         * elflink.h: Formatting fixes.
2859         (elf_link_output_extsym): Merge undefined and undef weak cases.
2860
2861         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2862         when word size of input matches output word size.
2863
2864 2002-03-12  Andreas Jaeger  <aj@suse.de>
2865
2866         * cpu-i386.c (i386_compatible): New.  Use it instead of
2867         bfd_default_compatible.
2868
2869 2002-03-07  H.J. Lu  (hjl@gnu.org)
2870
2871         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2872         as the type for bfd_reloc_val.
2873
2874 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2875
2876         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2877         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2878         (elf_hppa_final_link_relocate): Correct relocations for indirect
2879         references to local data through the DLT.  Fix .opd creation for
2880         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2881         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
2882         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2883         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2884         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2885         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2886         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2887
2888 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
2889
2890         * merge.c (_bfd_merge_sections): Don't segfault if there
2891         is nothing to merge due to GC.
2892
2893 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
2894
2895         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2896         symbols that have been forced local.
2897
2898         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2899         to output forced local syms for non-shared link.
2900         (elf_link_output_extsym): Tweak condition for calling backend
2901         adjust_dynamic_symbol so that previous behaviour is kept.
2902         Whitespace changes throughout file.
2903
2904 2002-03-04  H.J. Lu <hjl@gnu.org>
2905
2906         * elf.c (bfd_section_from_shdr): Handle special sections,
2907         .init_array, .fini_array and .preinit_array.
2908         (elf_fake_sections): Likewise.
2909
2910         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2911         DT entry only if the section is in output for .init_array,
2912         .fini_array and .preinit_array. Complain about .preinit_array
2913         section in DSO.
2914         (elf_bfd_final_link): Warn zero size for .init_array,
2915         .fini_array and .preinit_array sections.
2916
2917         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2918         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2919         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2920         .preinit_array.
2921
2922 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
2923
2924         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2925         * configure: Regenerate.
2926
2927 2002-03-02  Tom Rix  <trix@redhat.com>
2928
2929         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2930         symbolic equiv.
2931         * coff-rs6000.c (xcoff_howto_table): Same.
2932
2933 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
2934
2935         * elflink.h (size_dynamic_sections): If section named
2936         ".preinit_array" exists, create DT_PREINIT_ARRAY and
2937         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
2938         ".init_array" and ".fini_array".
2939         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2940         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2941         DT_FINI_ARRAY.
2942
2943 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
2944
2945         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2946         dynsyms.
2947
2948 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
2949
2950         * elf64-hppa.h: Update copyright date.
2951
2952         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2953         (ppc64_elf_relocate_section): Don't generate power4 style branch
2954         hints for *_BRTAKEN and *_BRNTAKEN relocs.
2955
2956 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
2957
2958         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2959         last patch.
2960         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2961
2962 2002-02-21  Andreas Jaeger  <aj@suse.de>
2963
2964         * elf64-x86-64.c: Major rework that introduces all recent changes
2965         to the x86-64 backend.  Get a closer match to elf32-i386.
2966         (struct elf64_x86_64_dyn_relocs): Rename from
2967         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
2968         all users.
2969         (struct elf64_x86_64_link_hash_table): Add short cuts to some
2970         sections.
2971         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2972         remove casts, initialize new hash members.
2973         (create_got_section): New.
2974         (elf64_x86_64_create_dynamic_sections): New.
2975         (elf64_x86_64_copy_indirect_symbol): New.
2976         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
2977         relocs, .got or .relgot here but do it in allocate_dynrelocs.
2978         Reference count possible .plt and .got entries.  Don't test input
2979         section SEC_READONLY here to try to avoid copy relocs, and keep
2980         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
2981         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
2982         pointer to "sreloc" section in elf_section_data. Tweak condition
2983         under which .got created.  Report files with bad relocation
2984         section names.
2985         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2986         Reference count possible .plt entries.  Don't deallocate .got and
2987         .relgot space here.
2988         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
2989         do copy reloc processing for weakdefs.  Remove redundant casts and
2990         aborts.  Delay setting of vars until needed.  Move creation of
2991         dynamic symbols and allocation of .plt and .rela.plt to
2992         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
2993         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2994         (allocate_dynrelocs): New.
2995         (readonly_dynrelocs): New.
2996         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
2997         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
2998         Zero out the dynamic allocated content space.
2999         (elf64_x86_64_discard_copies): Removed.
3000         (elf64_x86_64_relocate_section): Make use of dynamic section
3001         short-cuts.  Localise vars, and delay setting.  Better error
3002         reporting, replace BFD_ASSERT with abort.  Check
3003         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3004         regular object file and tread the weak definition as the normal
3005         one.  Don't discard relocs for undefweak or undefined symbols and
3006         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3007         relocs.
3008         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3009         symbols that have been forced local.  Use same test to decide if
3010         we can use a relative reloc for got as relocate_section.  Expand
3011         SHN_UNDEF comment.  Move expressions out of function calls.
3012         Replace BFD_ASSERT with abort.
3013         (bfd_elf64_bfd_final_link): Removed.
3014         (elf_backend_copy_indirect_symbol): Define.
3015
3016 2002-02-20  Tom Rix  <trix@redhat.com>
3017
3018         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3019         (_bfd_xcoff_reloc_type_lookup): Use it.
3020         * coff64-rs6000.c (xcoff64_howto_table): Same.
3021         (xcoff64_reloc_type_lookup): Same.
3022
3023 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
3024
3025         * osf-core.c (osf_core_vec):  OSF/1 (Digital Unix) core files are
3026         little endian.
3027
3028 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3029
3030         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3031         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3032         * bfd-in2.h: Regenerate.
3033         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3034         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3035         with "s390:64-bit".
3036         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3037         (elf_s390_reloc_type_lookup): Likewise.
3038         (elf_s390_check_relocs): Likewise.
3039         (elf_s390_gc_sweep_hook): Likewise.
3040         (elf_s390_relocate_section): Likewise.
3041         (elf_s390_object_p): Use renamed architecture define.
3042         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3043
3044 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
3045
3046         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
3047
3048 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
3049
3050         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3051         absptr -> pcrel optimization for shared libs.
3052         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3053         library cannot be converted to pcrel.
3054         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3055         relative.
3056         * elf32-i386.c (elf_i386_relocate_section): If
3057         _bfd_elf_section_offset returned -2, skip, but make sure the
3058         relocation is installed.
3059         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3060         * elf32-cris.c (cris_elf_relocate_section): Likewise.
3061         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3062         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3063         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3064         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3065         * elf32-s390.c (elf_s390_relocate_section): Likewise.
3066         * elf32-sh.c (sh_elf_relocate_section): Likewise.
3067         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3068         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3069         * elf64-s390.c (elf_s390_relocate_section): Likewise.
3070         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3071         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3072         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3073         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3074         _bfd_elf_section_offset returning -2 the same way as -1.
3075         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3076         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3077         and BFD_ASSERT.
3078         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3079
3080 2002-02-18  Tom Rix  <trix@redhat.com>
3081
3082         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3083         (bfd_xcoff_size_dynamic_sections): Same.
3084         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3085         (bfd_xcoff_size_dynamic_sections): Same.
3086         * coff-rs6000.c (xcoff_generate_rtinit): Same.
3087         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3088         * libxcoff.h (struct xcoff_backend_data_rec): Same.
3089         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3090         * bfd-in2.h: Regenerate.
3091
3092 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
3093
3094         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3095         (struct ppc_link_hash_table): Add sfpr.
3096         (ppc64_elf_link_hash_table_create): Init it.
3097         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3098         .glink out to..
3099         (create_linkage_sections): ..here.  Make .sfpr too.
3100         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3101         dynobj early.
3102         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3103         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3104         ._restf* functions, and create as needed.
3105         (func_desc_adjust): Only force_local for shared libs.
3106
3107 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
3108
3109         * configure.in: Bump version number post 2.12 branching.
3110         * configure: Regenerate.
3111
3112 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
3113
3114         * mmo.c: Correct and improve comments.
3115         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3116         zero-pad.  Use input to fill up non-empty bfd buffer.
3117         (mmo_flush_chunk): New function.
3118         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3119         changed.  Don't emit location specifier if VMA is same as
3120         *LAST_VMAP after omitting leading zero contents.  Call
3121         mmo_flush_chunk before emitting location specifier.
3122         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3123         with mmo_write_loc_chunk calls.
3124         (mmo_internal_write_section): Call mmo_flush_chunk after
3125         mmo_write_chunk.
3126         (mmo_write_symbols_and_terminator): Move :Main to first position
3127         in symbol array.  Add faked one if it does not exist if there are
3128         other symbols.  Don't add it if there are no symbols at all.  Move
3129         out test for value of :Main from symbol loop.  Rename table
3130         fakemain to maintable and variable mainsym to fakemain.
3131
3132 2002-02-15  Richard Henderson  <rth@redhat.com>
3133
3134         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3135         section with no got matches any got.  Simplify error generaion.
3136
3137 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
3138
3139         Support arbitrary length fill patterns.
3140         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
3141         (_bfd_default_link_order): Remove bfd_fill_link_order code.
3142         Call default_data_link_order.
3143         (default_fill_link_order): Delete.
3144         (default_data_link_order): New function.
3145         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
3146         of bfd_fill_link_order with bfd_data_link_order.
3147         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
3148         * elf64-mips.c (mips_elf64_final_link): Likewise.
3149
3150         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
3151         Correct value returned in "end" for "0x<non-hex>".
3152
3153 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
3154
3155         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
3156         (scan): Test against 'mach' field in info structure.
3157
3158 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
3159
3160         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
3161
3162 2002-02-14  Matt Fredette  <fredette@netbsd.org>
3163
3164         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
3165         EF_M68000.
3166
3167 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
3168
3169         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
3170         non-zero physical addresses when adjusting the LMAs of new
3171         sections.
3172
3173 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3174
3175         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
3176         from _bfd_elf_hppa_gen_reloc_type.
3177         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
3178         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
3179         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
3180         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
3181
3182 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
3183
3184         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
3185         loading its contents if there's nothing to do in it.
3186
3187 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
3188
3189         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
3190         64k boundary.
3191
3192         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
3193         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
3194         (ppc64_elf_finish_dynamic_sections): Set values for them.
3195
3196 2002-02-11  Michael Snyder  <msnyder@redhat.com>
3197
3198         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
3199         * elf.c (elfcore_grok_pstatus): Add prototype.
3200         (elfcore_grok_lwpstatus): Add prototype.
3201         (elfcore_write_lwpstatus): New function.
3202         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
3203
3204 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
3205
3206         * elf32-sh.c: Added missing prototypes.
3207         * elf32-sh64.c: Likewise.
3208         (sh_elf_align_loads): Mark unused args as such.
3209         * elf64-sh64.c: Added missing prototypes.
3210         (struct elf_sh64_link_hash_entry): Fix typo.
3211         (sh_elf64_relocate_section): Fix info argument passed to
3212         _bfd_elf_section_offset.
3213
3214 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
3215
3216         * Makefile.am: "make dep-am".
3217         * Makefile.in: Regenerate.
3218         * aclocal.m4: Regenerate.
3219         * config.in: Regenerate.
3220         * configure: Regenerate.
3221
3222 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
3223
3224         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
3225         variable warnings.
3226         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
3227         comparison warning.
3228         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
3229         cast warnings for the common case.
3230
3231 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
3232
3233         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
3234         vectors.
3235         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
3236         vectors.
3237
3238 2002-02-09  Richard Henderson  <rth@redhat.com>
3239
3240         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
3241         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
3242         (elf64_alpha_relocate_section): Likewise.
3243         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
3244         * bfd-in2.h, libbfd.h: Rebuild.
3245
3246 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
3247
3248         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
3249         that base-plus-offset reloc accounting is consistent.
3250         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
3251         up to date for undefined symbols.
3252
3253 2002-02-08  Eric Christopher  <echristo@redhat.com>
3254
3255         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3256
3257         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
3258         sections for the O32 ABI.
3259
3260 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
3261
3262         * elf32-arm.h: Fix formatting of _("...").
3263         * elf32-d10v.c: Likewise.
3264         * elf32-m68k.c: Likewise.
3265         * elf32-mips.c: Likewise.
3266
3267 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
3268
3269         * coff-or32.c: Fix compile time warning messages.
3270
3271 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
3272
3273         Contribute sh64-elf.
3274         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
3275         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
3276         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
3277         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
3278         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
3279         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
3280         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
3281         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
3282         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
3283         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
3284         New relocs.
3285         * libbfd.h, bfd-in2.h: Rebuilt.
3286         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
3287         (sh_reloc_map): Map them.
3288         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3289         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
3290         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
3291         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3292         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
3293         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
3294         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
3295         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
3296         datalabel_got_offset.
3297         (sh_elf_link_hash_newfunc): Initialize it.
3298         (sh_elf_relocate_section): Augment the scope of
3299         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
3300         GOT and GOTOFF handling to new SHmedia relocation types.  Support
3301         GOT_BIAS.
3302         (sh_elf_check_relocs): Likewise.
3303         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
3304         PLT entries using movi_shori_putval.  Support GOT_BIAS.
3305         (sh_elf_finish_dynamic_sections): Likewise.
3306         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
3307         relocation, it's now done by the caller.
3308         (GOT_BIAS): New.
3309         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
3310         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
3311         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
3312         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
3313         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
3314         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
3315         sh64_elf64_hash_table): New.
3316         (sh_elf64_howto_table): Introduce new relocs.
3317         (sh_elf64_info_to_howto): Accept new PIC relocs.
3318         (sh_elf64_relocate_section): Augment the scope of
3319         seen_stt_datalabel.  Support new PIC relocs.
3320         (sh_elf64_check_relocs): Support new PIC relocs.
3321         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
3322         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
3323         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
3324         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
3325         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
3326         movi_shori_putval, movi_3shori_putval,
3327         sh64_elf64_create_dynamic_sections,
3328         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
3329         sh64_elf64_size_dynamic_sections,
3330         sh64_elf64_finish_dynamic_symbol,
3331         sh64_elf64_finish_dynamic_sections): New.
3332         (elf_backend_create_dynamic-sections,
3333         bfd_elf64_bfd_link_hash_table_create,
3334         elf_backend_adjust_dynamic_symbol,
3335         elf_backend_size_dynamic_sections,
3336         elf_backend_finish_dynamic_symbol,
3337         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3338         elf_backend_plt_readonly, elf_backend_want_plt_sym,
3339         elf_backend_got_header_size, elf_backend_plt_header_size):
3340         Define.
3341         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
3342         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
3343         match official numbers and names; moved unmaching ones to the
3344         range 0xf2-0xff.
3345         * elf32-sh64.c, elf64-sh64.c: Likewise.
3346         2001-03-12  DJ Delorie  <dj@redhat.com>
3347         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
3348         sections.
3349         2001-03-12  DJ Delorie  <dj@redhat.com>
3350         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
3351         be aligned.
3352         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
3353         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
3354         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
3355         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
3356         .cranges section with SEC_SORT_ENTRIES set.
3357         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
3358         incoming sorted .cranges section.
3359         (sh64_bfd_elf_copy_private_section_data): New.
3360         (sh64_elf_final_write_processing): Only sort .cranges and modify
3361         start address if called by linker.
3362         2001-01-08  Ben Elliston  <bje@redhat.com>
3363         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
3364         Hans-Peter Nilsson's set bit 0 patch from       2001-01-06.
3365         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
3366         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
3367         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
3368         line.  Add comments before all entries.
3369         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
3370         comment.
3371         (sh_elf64_reloc): Correct head comment.
3372         (sh_elf64_relocate_section): Correct spacing.
3373         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
3374         instead call reloc_dangerous callback.
3375         <case R_SH_SHMEDIA_CODE>: New case.
3376         (sh_elf64_gc_mark_hook): Correct spacing.
3377         (sh_elf64_check_relocs): Ditto.
3378         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
3379         New case.
3380         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
3381         functions.
3382         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
3383         clarify describing comment.  Add comments before all entries.
3384         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
3385         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
3386         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
3387         Sort .cranges section in final link.  Prepare to set bit 0 on
3388         entry address.
3389         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
3390         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
3391         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
3392         .cranges section.
3393         (sh64_backend_section_from_shdr): New, to recognize
3394         SHT_SH5_CR_SORTED on incoming .cranges section.
3395         (elf_backend_section_from_shdr): Define.
3396         (sh64_elf_final_write_processing): Sort outgoing .cranges
3397         section.  (New, temporarily disabled:) Set bit 0 on entry address
3398         according to ISA type.
3399         (sh64_find_section_for_address): New.
3400         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
3401         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
3402         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
3403         bfd_malloc, not xmalloc.
3404         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
3405         global.
3406         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
3407         temporarily disabled) setting bit 0 on entry address.
3408         (elf_backend_final_write_processing): Define.
3409         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
3410         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
3411         be a proper relocation for PTA and PTB rather than a marker.
3412         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
3413         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
3414         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
3415         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
3416         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
3417         Zero src_mask.
3418         * elf64-sh64.c: Ditto.
3419         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
3420         * elf32-sh64.c: Include opcodes/sh64-opc.h
3421         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
3422         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
3423         parameters.  No unused parameters.  Caller changed.
3424         <case R_SH_PT_16>: New case.
3425         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
3426         * Makefile.in: Regenerate.
3427         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
3428         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
3429         all code sections.
3430         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3431         (sh64_elf_merge_private_data): Ditto.
3432         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
3433         to access stored section flags.
3434         (sh64_elf_final_write_processing): Return immediately unless
3435         called by linker.  Use sh64_elf_section_data (cranges) to get size
3436         of linker-generated cranges entries.
3437         (sh64_elf_copy_private_data): Add missing "return true".
3438         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3439         (sh_elf64_merge_private_data): Ditto.
3440         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
3441         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
3442         elf64-sh64.c:sh64_elf_fake_sections.
3443         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
3444         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
3445         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
3446         (sh64_elf_final_write_processing): New.
3447         (elf_backend_final_write_processing): Define.
3448         (sh64_elf_fake_sections): Get header flags from tdata field.
3449         (sh64_elf_copy_private_data): Do not call
3450         sh64_elf_copy_private_data_internal, just copy e_flags field.
3451         (sh64_elf_merge_private_data): Do not call
3452         sh64_elf_copy_private_data_internal.
3453         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
3454         Remove EF_SH64_ABI64, let ELF size make difference.
3455         Remove SH64-specific BFD section flag.
3456         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
3457         containing SHmedia through elf_section_data (asect)->tdata
3458         non-zero, not using a BFD section flag.
3459         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
3460         (sh64_elf_merge_private_data): Similar.
3461         (elf_backend_section_flags): Don't define.
3462         (sh64_elf_backend_section_flags): Delete.
3463         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
3464         not EF_SH64_ABI64.
3465         (sh_elf64_merge_private_data): Similar.
3466         * section.c (Section flags definitions): Don't define
3467         SEC_SH_ISA_SHMEDIA.
3468         (bfd-in2.h): Regenerate.
3469         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
3470         Make DataLabel references work with partial linking.
3471         * elf32-sh64.c: Fix formatting.
3472         (sh64_elf_link_output_symbol_hook): New.
3473         (elf_backend_link_output_symbol_hook): Define to
3474         sh64_elf_link_output_symbol_hook.
3475         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
3476         undefined if partial linking.  Adjust sanity check.
3477         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
3478         (elf_backend_link_output_symbol_hook): Define to
3479         sh64_elf64_link_output_symbol_hook.
3480         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
3481         undefined if partial linking.  Adjust sanity check.
3482         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
3483         Implement semantics for inter-file DataLabel references.
3484         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
3485         (sh64_elf64_add_symbol_hook): New.
3486         (sh_elf64_relocate_section): If passing an indirect symbol with
3487         st_type STT_DATALABEL on the way to a symbol with st_other
3488         STO_SH5_ISA32, do not bitor 1 to the relocation.
3489         (elf_backend_add_symbol_hook): Define to
3490         sh64_elf64_add_symbol_hook.
3491         * elf64-sh32.c: Tweak comments.
3492         (DATALABEL_SUFFIX): Define.
3493         (sh64_elf_add_symbol_hook): New.
3494         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
3495         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
3496         symbol with st_type STT_DATALABEL on the way to a symbol with
3497         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
3498         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
3499         Pass through STT_DATALABEL.
3500         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
3501         (elf_backend_get_symbol_type): Define.
3502         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
3503         (elf_backend_get_symbol_type): Define.
3504         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
3505         * elf32-sh64.c: Tweak comments.
3506         (sh64_elf_copy_private_data_internal): Add prototype.
3507         (bfd_elf32_bfd_set_private_flags): Define.
3508         (sh64_elf_copy_private_data_internal): Compare machine name, not
3509         textual BFD target name, to check whether to copy section flag
3510         SHF_SH5_ISA32.
3511         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
3512         Tweak section-contents-type-mismatch message.
3513         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
3514         Validize reloc-types.
3515         * elf64-sh64.c: New file.
3516         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
3517         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
3518         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
3519         Regenerate dependencies.
3520         * Makefile.in: Regenerate.
3521         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
3522         bfd_elf64_sh64l_vec.
3523         * configure.in: Handle bfd_elf64_sh64_vec and
3524         bfd_elf64_sh64l_vec.
3525         * configure: Regenerate.
3526         * po/POTFILES.in: Regenerate.
3527         * po/bfd.pot: Regenerate.
3528         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
3529         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
3530         anything else but EF_SH64 and EF_SH64_ABI64.
3531         (sh64_elf_merge_private_data): Emit error for anything else but
3532         EF_SH64 and EF_SH64_ABI64.
3533         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
3534         from targ_selvecs.
3535         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
3536         bfd_elf32_sh64l_vec as a temporary measure.
3537         * configure: Regenerate.
3538         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
3539         * cpu-sh.c (arch_info_struct): Include sh5 item
3540         unconditionalized.
3541         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
3542         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
3543         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
3544         * elf32-sh64.c: Tweak comments.
3545         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
3546         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
3547         (sh64_elf_copy_private_data_internal): Wrap long line.
3548         (sh64_elf_merge_private_data): Rewrite to allow objects from
3549         SH64 subsets to be linked together.
3550         (INCLUDE_SHMEDIA): Define.
3551         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
3552         Parenthesize plus-expression inside or-expression.
3553         <global symbol>: Ditto.
3554         (sh_elf_set_mach_from_flags): Remove code refusing
3555         deleted EF_SH64_32BIT_ABI flag.
3556         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
3557         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
3558         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
3559         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
3560         (sh_elf_relocate_section) <local symbol>: Or 1 in
3561         calculation of relocation if sym->st_other & STO_SH5_ISA32.
3562         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
3563         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
3564         relocation.
3565         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
3566         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
3567         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
3568         Regenerate dependencies.
3569         * Makefile.in: Regenerate.
3570         * archures.c: Add bfd_mach_sh5.
3571         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
3572         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
3573         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
3574         * configure: Regenerate.
3575         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
3576         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
3577         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
3578         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
3579         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
3580         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
3581         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
3582         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
3583         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
3584         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
3585         in item for SH5.
3586         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
3587         for SHmedia relocs.
3588         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
3589         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
3590         shmedia_prepare_reloc, goto final_link_relocate if it returns
3591         non-zero, else fail as before.
3592         (sh_elf_set_mach_from_flags): Provide function only if not defined
3593         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
3594         (sh_elf_set_private_flags): Provide function only if not defined
3595         as a macro.
3596         (sh_elf_copy_private_data): Similar.
3597         (sh_elf_merge_private_data): Similar.
3598         * section.c (SEC_SH_ISA_SHMEDIA): New.
3599         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
3600         * elf32-sh64.c: New file.
3601         * libbfd.h: Regenerate.
3602         * bfd-in2.h: Regenerate.
3603         * po/POTFILES.in: Regenerate.
3604         * po/bfd.pot: Regenerate.
3605         * bfd-in2.h: Regenerate.
3606         * libbfd.h: Regenerate.
3607
3608 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
3609
3610         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
3611         been included, not drag it in.
3612         * bfd-in2.h: Regenerate.
3613
3614 2002-02-06  H.J. Lu  (hjl@gnu.org)
3615
3616         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
3617         the mach and ISA fields if necessary.
3618
3619 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
3620
3621         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
3622         ARM architecture when an F_ARM_5 flag is detected, since we cannot
3623         be sure exactly which architecture this represents.
3624
3625 2002-02-05  Nick Clifton  <nickc@redhat.com>
3626
3627         * po/tr.po: Updated translation.
3628
3629 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
3630
3631         From Jimi X <jimix@watson.ibm.com>
3632         * archures (bfd_mach_ppc64): Define.
3633         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
3634         (bfd_powerpc_arch): Define.
3635         * bfd-in2.h: Regenerate.
3636         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
3637         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
3638         (bfd_powerpc_archs): Add default powerpc64 arch.
3639
3640 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
3641
3642         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
3643         against section syms in readonly sections.  Don't do the global
3644         sym check if we find one.
3645         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
3646         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
3647         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3648         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
3649         (elf_s390_grok_prstatus): Add missing prototype.
3650
3651 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
3652
3653         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3654         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3655         Call bfd_get_section_by_name only once.  Initialize
3656         bpodata->n_bpo_relocs_this_section.
3657         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3658         referring to DSOs.
3659         (bpo_reloc_request_sort_fn): Don't use difference of values as
3660         return-value.
3661
3662 2002-02-02  David O'Brien  <obrien@FreeBSD>
3663
3664         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
3665         version 4.5 and later the same as 5-CURRENT.
3666         * configure: Re-generate.
3667
3668 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
3669
3670         * config.bfd (hppa*-*-netbsd*): New target.
3671
3672 2002-01-31  Philipp Thomas  <pthomas@suse.de>
3673
3674         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
3675         to front of message. Unify messages with elf32-arm.h. Use
3676         commas where neccessary.
3677         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
3678         ERROR in messages. Unify messages with coff-arm.c. Correct
3679         VFP/FPA error message.
3680         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
3681         APCS-32 for translation.
3682
3683 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
3684
3685         Perform on-demand global register allocation from
3686         R_MMIX_BASE_PLUS_OFFSET relocs.
3687         * elf64-mmix.c (struct bpo_reloc_section_info, struct
3688         bpo_reloc_request, struct bpo_greg_section_info): New.
3689         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
3690         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
3691         _bfd_mmix_check_all_relocs,
3692         _bfd_mmix_prepare_linker_allocated_gregs,
3693         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
3694         (elf_mmix_howto_table): Correct src_mask for most relocs.
3695         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
3696         case.
3697         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
3698         case.  Fix typo in comment.  New label do_mmix_reloc.
3699         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
3700         store first object file with a base-plus-offset reloc.  Call
3701         mmix_elf_check_common_relocs for the part common with mmo.
3702         (mmix_elf_final_link): Write out linker-allocated register
3703         contents section.
3704         (elf_backend_gc_sweep_hook): Define.
3705         (bfd_elf64_bfd_relax_section): Define.
3706
3707         * mmo.c: Don't include <ctype.h>
3708         (mmo_init): Correct init-once logic.
3709
3710 2002-02-01  Tom Rix  <trix@redhat.com>
3711
3712         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
3713
3714 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
3715
3716         * Makefile.am: Run "make dep-am"
3717         * Makefile.in: Regenerate.
3718
3719 2002-01-31  David O'Brien  <obrien@FreeBSD>
3720
3721         * configure.in: Recognize the differences in core files from FreeBSD
3722         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
3723         5-CURRENT.
3724         * configure: Regenerate.
3725
3726 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
3727
3728         * coff-or32.c: New file.
3729         * cpu-or32.c: New file.
3730         * elf32-or32.c: New file.
3731         * archures.c: Add support for or32.
3732         * targets.c: Add support for or32.
3733         * bfd-in2.h: Regenerate.
3734         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3735         coff_write_object_contents): Add support for or32.
3736         * config.bfd: Add target.
3737         * configure.in: Add support for or32.
3738         * configure: Regenerate.
3739         * Makefile.am: Add support for or32.
3740         * Makefile.in: Regenerate.
3741         * po/SRC-POTFILES.in: Add or32 files.
3742         * po/bfd.pot: Regenerate.
3743
3744 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
3745             Don Lindsay  <lindsayd@cisco.com>
3746
3747         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
3748         false' with a return of a bfd_reloc_ error code.
3749
3750 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
3751
3752         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3753         unexport unreferenced symbols when --export-dynamic.  Call
3754         _bfd_elf_strtab_delref when unexporting.
3755
3756 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
3757
3758         * bfd-in.h: Include <stdbool.h> if it is available.
3759         * bfd-in2.h: Regenerated.
3760
3761 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
3762
3763         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
3764         not go via the plt.
3765
3766 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
3767
3768         * archures.c: Tidy up formatting of embedded comments.
3769         * bfd.c: Tidy up formatting of embedded comments.
3770         * bfd-in.h: Fix formatting of comments.
3771         * reloc.c: Tidy up formatting of ordinary & embedded comments.
3772         * section.c: Tidy up formatting of embedded comments.
3773         * syms.c: Tidy up formatting of embedded comments.
3774         * targets.c: Tidy up formatting of embedded comments.
3775
3776         * bfd-in2.h: Regenerate.
3777
3778 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
3779
3780         * vms-tir.c (cmd_name): New function.
3781         (tir_cmd_name): New function.
3782         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
3783         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
3784         Fix formatting.
3785
3786         * peXXigen.c (pe_print_idata): Rearrange message to aid in
3787         translation.
3788         (pe_print_pdata):  Rearrange message to aid in translation.
3789
3790         * libbfd.c (warn_deprecated): Rearrange error message to aid in
3791         translation.
3792
3793         * ihex.c (ihex_write_object_contents): Fix spelling typo.
3794
3795         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
3796
3797         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
3798         message to aid in translation.
3799
3800         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
3801         to aid in translation.
3802
3803         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
3804
3805 2002-01-30  Philipp Thomas  <pthomas@suse.de>
3806
3807         * coff-arm.c, elf32-elf.h: Unify messages.
3808
3809 2002-01-30  Nick Clifton <nickc@redhat.com>
3810
3811         * po/sv.po: Updated translation.
3812
3813 2002-01-30  Philipp Thomas  <pthomas@suse.de>
3814
3815         * dwarf2.c (read_abbrev): Use full section name in error message.
3816         (decode_line_info): Likewise.
3817
3818         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3819         message.
3820
3821 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
3822
3823         * elf64-ppc.c (func_desc_adjust): Only provide missing function
3824         descriptor symbols for undefined function code syms.  Clear
3825         ELF_LINK_NON_ELF so that they can stay weak.
3826
3827 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
3828             Mitch Lichtenberg  <mpl@broadcom.com>
3829
3830         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3831         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3832         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3833         generation.
3834         * bfd-in2.h: Regenerate.
3835
3836 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
3837
3838         * elf32-mips.c: Add additional comments about HI16 relocation
3839         processing.
3840         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3841         pc-relative relocations.  (Reverts change made on 2001-10-31.)
3842         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3843         for pc-relative relocations.
3844         (mips_elf_calculate_relocation): Add a comment about a kludge
3845         in the R_MIPS_GNU_REL_HI16 handling.
3846         (_bfd_mips_elf_relocate_section): Implement that kludge;
3847         adjust pc-relative HI16 relocation for difference in HI16 and
3848         LO16 addresses, since it can't easily be done in
3849         mips_elf_calculate_relocation.
3850
3851 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3852
3853         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3854         relocations with PC32 relocations for undefined or weak symbols.
3855         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3856         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3857
3858 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
3859
3860         * elfcore.h (elf_core_file_p): Improve comment for last change.
3861
3862 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
3863
3864         * configure: Regenerated.
3865
3866 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
3867
3868         * elfcore.h (elf_core_file_p): Set the machine architecture
3869         before processing the program headers.
3870
3871 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
3872
3873         * configure.in <64-bit configuration>: If using gcc, check and
3874         emit error for egcs-1.1.2.
3875         * configure: Regenerate.
3876
3877 2002-01-26  Egor Duda  <deo@logos-m.ru>
3878
3879         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3880         as possible to avoid stack corruption.
3881
3882 2002-01-26  Richard Henderson  <rth@redhat.com>
3883
3884         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3885         for non-allocated sections.
3886
3887 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
3888
3889         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3890         prstat.pr_reg even if it is a struct.
3891
3892 2002-01-25  Steve Ellcey <sje@cup.hp.com>
3893
3894         * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3895
3896 2002-01-25  Philipp Thomas  <pthomas@suse.de>
3897
3898         * coffgen.c (coff_print_symbol): Don't mark info message
3899         for translation.
3900
3901 2002-01-25  Nick Clifton <nickc@redhat.com>
3902
3903         * po/fr.po: Updated translation.
3904         * po/es.po: Updated translation.
3905
3906 2002-01-25  Philipp Thomas  <pthomas@suse.de>
3907
3908         * coff-alpha.c (alpha_relocate_section): Unify warning message
3909         for GP relative relocations without GP defined.
3910         * coff-mips.c (mips_relocate_section): Likewise.
3911
3912 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
3913
3914         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3915         unsigned overflow when new_offset < old_offset.
3916
3917 2002-01-24  Philipp Thomas  <pthomas@suse.de>
3918
3919         * bfd.c (_bfd_abort): Fix typo.
3920
3921 2002-01-23  Richard Henderson  <rth@redhat.com>
3922
3923         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3924         plt entries for undefweak symbols.
3925
3926 2002-01-23  Steve Ellcey <sje@cup.hp.com>
3927
3928         * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3929         DEFAULT_VECTOR.
3930         (bfd_elf64_ia64_hpux_big_vec): Ditto.
3931         (bfd_elf32_h8300_vec): Ditto.
3932
3933 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
3934
3935         * elf64-ppc.c: Remove stale part of ABI comment.
3936         (NO_OPD_RELOCS): Define.
3937         (ppc64_elf_check_relocs): Use it.
3938         (ppc64_elf_relocate_section): Here too.
3939         (build_one_stub): Don't point function syms at the stub.  Instead,
3940         hijack plt.offset.
3941         (ppc64_elf_relocate_section): Check whether REL24 relocs should
3942         really go to the stub.  Make all dynamic relocs in opd against
3943         locals.
3944         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3945         plt.offset.
3946
3947 2002-01-22  Richard Henderson  <rth@redhat.com>
3948
3949         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3950
3951 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
3952
3953         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3954         TOC_BASE_OFF adjustment.
3955
3956         * Makefile.am: Run "make dep-am".
3957         * Makefile.in: Regenerate.
3958         * po/SRC-POTFILES.in: Regenerate.
3959
3960 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3961
3962         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3963         host defines.
3964
3965 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
3966
3967         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3968         Check for and emit error if sgot is NULL at this point.
3969
3970 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
3971
3972         * config.bfd (ia64*-*-netbsd*): New target.
3973
3974 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
3975
3976         * som.c (som_write_space_strings): Comment typo fix.
3977
3978 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
3979
3980         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
3981         is_func_descriptor fields.
3982         (link_hash_newfunc): Init them.
3983         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
3984         dot are candidates for plt entries.  When processing .opd relocs,
3985         set function descriptor strings to point inside function code
3986         string, and set new ppc_link_hash_entry fields.
3987         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
3988         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
3989         function descriptors.  It's now done in..
3990         (func_desc_adjust): New.
3991         (ppc64_elf_func_desc_adjust): New.
3992         (define elf_backend_always_size_sections): Define.
3993         (ppc64_elf_hide_symbol): New.
3994         (define elf_backend_hide_symbol): Define.
3995         (allocate_dynrelocs): Remove code looking up function descriptors
3996         as that has been done earlier.
3997         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
3998         table.
3999         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
4000         up function descriptor.
4001         (build_one_stub): Look up the function code sym.  Check for
4002         invalid plt offsets.
4003         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4004         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4005
4006         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4007         boolean param.
4008         (_bfd_elf_link_hash_hide_symbol): Likewise.
4009         * elflink.h (elf_link_add_object_symbols): Adjust call to
4010         elf_backend_hide_symbol.
4011         (elf_fix_symbol_flags): Likewise.
4012         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4013         than bfd_alloc.
4014         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4015         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4016         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4017         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4018         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4019         and adjust to suit.
4020         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4021         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4022         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4023
4024 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
4025
4026         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4027         dynamic function descriptor symbol, not the associated function
4028         symbol.
4029
4030 2002-01-17  Eric Christopher  <echristo@redhat.com>
4031
4032         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4033
4034 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
4035
4036         * po/bfd.pot: Regenerate.
4037         * po/fr.po: Regenerate.
4038
4039 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
4040
4041         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4042         Remove "Elf_Internal_Shdr *" param.
4043         (_bfd_mips_elf_section_from_bfd_section): Ditto.
4044         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4045         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4046         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4047         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4048         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4049         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4050         function to override special sections.  Remove hdr arg from
4051         backend call, and don't loop.
4052
4053 2002-01-16  Eric Christopher  <echristo@redhat.com>
4054
4055         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4056         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4057         relocations requiring gp0 and gp.
4058
4059 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
4060
4061         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
4062         EF_ARM_VFP_FLOAT.
4063         (elf32_arm_print_private_bfd_data): Likewise.
4064
4065 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
4066
4067         * po/tr.po: Import new version.
4068
4069 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
4070
4071         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4072         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4073         (ORI_R0_R0_0): Correct.
4074
4075 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
4076
4077         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4078         when plt_not_loaded.
4079         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4080         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
4081         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4082         (ppc64_elf_glink_code): Delete.
4083         (PPC64_ELF_GLINK_SIZE): Delete.
4084         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4085         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4086         ORI_R0_R0_0): Define.
4087         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4088         (struct ppc_link_hash_table): Add sstub and plt_overflow.
4089         (ppc64_elf_link_hash_table_create): Init them.
4090         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4091         Don't copy to shared lib.
4092         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4093         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4094         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
4095         room for .stub and .glink code.
4096         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
4097         DT_PPC64_GLINK.
4098         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
4099         bfd_elf64_bfd_final_link.
4100         (bfd_elf64_bfd_final_link): Don't define.
4101         (ppc64_elf_size_stubs): New.
4102         (build_plt_stub): New.
4103         (build_one_stub): New.
4104         (ppc64_elf_build_stubs): New.
4105         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4106         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4107         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
4108         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4109         case output sections not separate.  Adjust DT_RELASZ to not
4110         include plt relocs.  Set reserved got entry.  Set got and plt
4111         entry size.
4112         (elf_backend_got_header_size): Set to 8.
4113         * elf64-ppc.h: New file.
4114
4115 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
4116
4117         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4118         sections, use bfd_section_list_remove.
4119         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4120         * elflink.h (elf_link_add_object_symbols): When removing all
4121         sections, use bfd_section_list_clear.
4122
4123 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
4124
4125         * po/sv.po: New file: Swedish translation.
4126         * configure.in (ALL_LINGUAS): Add sv.
4127         * configure: Regenerate.
4128
4129 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
4130
4131         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4132         * elf.c (merge_sections_remove_hook): New function.
4133         (_bfd_elf_merge_sections): Pass it as 3rd argument to
4134         _bfd_merge_sections.
4135         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4136         * libbfd.h: Rebuilt.
4137         * merge.c (_bfd_merge_sections): Add remove_hook argument.
4138         Call remove_hook if a SEC_EXCLUDE section is encountered.
4139
4140 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
4141
4142         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
4143         (xstormy16_reloc_map): Initialise new field with correct howto
4144         table.
4145         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
4146         howto entry.
4147
4148 2002-01-10  Michael Snyder  <msnyder@redhat.com>
4149
4150         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
4151         (elfcore_write_pstatus): Use long instead of pid_t;
4152         * elf-bfd.h: Change prototypes to use long instead of pid_t;
4153
4154 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
4155
4156         * elf.c: Update copyright years.
4157         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
4158         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
4159
4160 2002-01-08  Michael Snyder  <msnyder@redhat.com>
4161
4162         Add capability to write corefile note sections, for gdb.
4163         * elf.c (elfcore_write_note): New function.
4164         (elfcore_write_prpsinfo): New function.
4165         (elfcore_write_prstatus): New function.
4166         (elfcore_write_pstatus): New function.
4167         (elfcore_write_prfpreg): New function.
4168         (elfcore_write_prxfpreg): New function.
4169         * elf-bfd.h: Add prototypes for above functions.
4170
4171 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
4172
4173         * elf.c (elf_fake_sections): Propagate errors from
4174         elf_backend_fake_section.
4175
4176 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
4177
4178         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
4179         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
4180         (elf32-sh-nbsd.lo): New rule.
4181         * Makefile.in: Regenerate.
4182         * config.bfd (sh*le-*-netbsdelf*): New target.
4183         (sh*-*-netbsdelf*): New target.
4184         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
4185         (bfd_elf32_shnbsd_vec): New vector.
4186         (bfd_elf32_shlnbsd_vec): New vector.
4187         * configure: Regenerate.
4188         * elf32-sh-nbsd.c: New file.
4189         * targets.c: Update copyright years.
4190         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
4191         bfd_elf32_shnbsd_vec.
4192
4193 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
4194
4195         * coff-rs6000.c (READ20): Use bfd_scan_vma.
4196
4197 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
4198
4199         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
4200         of a symbol in a section that will be deleted.
4201
4202 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
4203
4204         * po/es.po: New file: Spanish translation.
4205         * configure.in (ALL_LINGUAS): Add es.
4206         * configure: Regenerate.
4207
4208 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
4209
4210         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4211         argument so we can handle HP-UX specially.
4212         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
4213         (elfNN_hpux_backend_section_from_bfd_section): New for support
4214         of SHN_IA_64_ANSI_COMMON.
4215         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
4216         (is_unwind_section_name): Add special HP-UX support.
4217         (elfNN_ia64_section_from_shdr): Add support for more sections.
4218         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
4219         add support for more sections.
4220         (elfNN_ia64_additional_program_headers): Modify
4221         is_unwind_section_name call.
4222         (elfNN_ia64_modify_segment_map): Remove assumption that there is
4223         only one unwind section in segment.
4224
4225 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
4226
4227         * syms.c (_bfd_generic_make_empty_symbol): New function.
4228         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
4229         _bfd_generic_make_empty_symbol.
4230         * libbfd.h: Regenerate.
4231         * bfd-in2.h: Regenerate.
4232         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
4233         (hppabsd_core_get_symtab_upper_bound): Don't define.
4234         (hppabsd_core_get_symtab): Likewise.
4235         (hppabsd_core_print_symbol): Likewise.
4236         (hppabsd_core_get_symbol_info): Likewise.
4237         (hppabsd_core_bfd_is_local_label_name): Likewise.
4238         (hppabsd_core_get_lineno): Likewise.
4239         (hppabsd_core_find_nearest_line): Likewise.
4240         (hppabsd_core_bfd_make_debug_symbol): Likewise.
4241         (hppabsd_core_read_minisymbols): Likewise.
4242         (hppabsd_core_minisymbol_to_symbol): Likewise.
4243         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
4244         Formatting fixes.
4245         * hpux-core.c: Similarly.
4246         * irix-core.c: Similarly.
4247         * osf-core.c: Similarly.
4248         * sco5-core.c: Similarly.
4249         * binary.c (binary_make_empty_symbol): Remove function, define as
4250         _bfd_generic_make_empty_symbol.
4251         * ihex.c (ihex_make_empty_symbol): Likewise.
4252         * mmo.c (mmo_make_empty_symbol): Likewise.
4253         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
4254         * srec.c (srec_make_empty_symbol): Likewise.
4255         * versados.c (versados_make_empty_symbol): Likewise.
4256         * vms.c (_bfd_vms_make_empty_symbol): Remove.
4257         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
4258         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
4259         rather than _bfd_vms_make_empty_symbol.
4260         * vms-misc.c (new_symbol): Likewise.
4261
4262 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
4263
4264         * section.c (bfd_section_init): Remove unnecessary initialisations.
4265         (bfd_section_list_clear): New function.
4266         (bfd_section_list_remove, bfd_section_list_insert): New macros.
4267         (_bfd_strip_section_from_output): Use them.
4268         * coffcode.h (coff_set_alignment_hook): Likewise.
4269         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
4270         * elf64-mips.c (mips_elf64_final_link): Likewise.
4271         * elf64-mmix.c (mmix_elf_final_link): Likewise.
4272         * sunos.c (sunos_add_dynamic_symbols): Likewise.
4273         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
4274         * bfd-in2.h: Regenerate.
4275
4276         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
4277         rather than doing our own section handling.  Clean up after errors
4278         with bfd_release and bfd_section_list_clear.  Handle unexpected
4279         flags.
4280         * aoutf1.h (sunos4_core_file_p): Likewise.
4281         * aix386-core.c (aix386_core_file_p): Likewise.
4282         * cisco-core.c (cisco_core_file_validate): Likewise.
4283         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
4284         * trad-core.c (trad_unix_core_file_p): Likewise.
4285
4286         * hppabsd-core.c (hppabsd_core_core_file_p):  Clean up after errors
4287         with bfd_release and bfd_section_list_clear.
4288         * hpux-core.c (hpux_core_core_file_p): Likewise.
4289         * irix-core.c (irix_core_core_file_p): Likewise.
4290         * lynx-core.c (lynx_core_file_p): Likewise.
4291         * osf-core.c (osf_core_core_file_p): Likewise.
4292         * rs6000-core.c (rs6000coff_core_p): Likewise.
4293         * sco5-core.c (sco5_core_file_p): Likewise.
4294
4295         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
4296         sign extension adjustments without conditionals.
4297
4298 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
4299
4300         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
4301         CIE at .eh_frame start is removed due to no FDEs referencing it.
4302
4303 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
4304
4305         * config.bfd (x86_64-*-netbsd*): New target.
4306         * configure.in (x86_64-*-netbsd*): Set COREFILE
4307         to netbsd-core.lo.
4308         * configure: Regenerated.
4309
4310 2002-01-03  Tom Rix  <trix@redhat.com>
4311
4312         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
4313         for recent bfd_make_section_anyway change.
4314
4315 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
4316
4317         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4318         R_ARM_THM_PC11 reloc.
4319
4320 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
4321
4322         * configure.in (LINGUAS): Add ja.
4323         * configure: Regenerate.
4324         * po/ja.po: Import from translation project's web site.
4325
4326 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
4327
4328         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
4329         messages to ease translation into other languages.
4330
4331 For older changes see ChangeLog-0001
4332 \f
4333 Local Variables:
4334 mode: change-log
4335 left-margin: 8
4336 fill-column: 74
4337 version-control: never
4338 End: