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