* elf64-alpha.c (elf64_alpha_section_flags): New.
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2001-09-11  Richard Henderson  <rth@redhat.com>
2
3         * elf64-alpha.c (elf64_alpha_section_flags): New.
4         (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
5
6 2001-09-11  Richard Henderson  <rth@redhat.com>
7
8         * elf64-alpha.c (elf64_alpha_relocate_section): Do not
9         apply HINT relocations against dynamic symbols.
10
11 2001-09-11  H.J. Lu  <hjl@gnu.org>
12
13         * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
14
15 2001-09-09  Richard Henderson  <rth@redhat.com>
16
17         * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
18
19         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
20         following a call to a near function.
21
22 2001-09-08  Richard Henderson  <rth@redhat.com>
23
24         * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
25         relocation errors.  Fail gp-relative relocations against
26         dynamic symbols.
27
28 2001-09-08  Alan Modra  <amodra@bigpond.net.au>
29
30         * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
31         as well as DEF_DYNAMIC in test for avoided copy relocs.
32         (allocate_plt_and_got_and_discard_relocs): Likewise.
33         * elf32-hppa.c (elf_i386_relocate_section): Likewise.
34         (allocate_plt_and_got_and_discard_relocs): Likewise.
35
36 2001-09-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
37
38         * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
39         of R_MIPS_PC16.
40
41 2001-09-06  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
42
43         * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
44         definitions.
45         (mips_elf64_howto_table_rel): Likewise.
46
47 2001-09-05  Tom Rix <trix@redhat.com>
48
49         * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
50         and syscall symbols.
51         (write_global_symbol) : Same.
52         (bfd_xcoff_export_symbol): Remove unused syscall param.
53         * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
54         bfd_xcoff_import_symbol.
55         * bfd-in.h: Same.
56         * bfd-in2.h : Regenerate.
57
58 2001-09-04  Richard Henderson  <rth@redhat.com>
59
60         * elf64-alpha.c (SKIP_HOWTO): New.
61         (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
62         Fix sizes of 16-bit mem format relocs.
63         (elf64_alpha_reloc_map): Update to match.
64         (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
65         (elf64_alpha_relax_without_lituse): Likewise.
66         (elf64_alpha_check_relocs): Handle GPREL16.
67         (elf64_alpha_relocate_section): Likewise.
68         * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
69         (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
70         * bfd-in2.h, libbfd.h: Rebuild.
71
72 2001-09-04  Jeff Law <law@redhat.com>
73
74         * elf32-h8300.c (elf32_h8_relax_section): New function.
75         (elf32_h8_relax_delete_bytes): Likewise.
76         (elf32_h8_symbol_address_p): Likewise.
77         (elf32_h8_get_relocated_section_contents): Likewise.
78         (bfd_elf32_bfd_relax_section): Define.
79         (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
80
81         * elf32-h8300.c (special): New function.
82         (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
83         all relocations.
84         (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
85         relocations.  Fix problems with the true 24bit reloc R_H8_DIR24R8.
86         Fix minor problems with 8bit and 16bit PC relative relocations.
87
88 2001-09-01  Andreas Jaeger  <aj@suse.de>
89
90         * vms-tir.c: Add missing prototypes.
91         * vms-hdr.c: Likewise.
92         * vms-gsd.c: Likewise.
93         * vms-misc.c: Likewise.
94
95 2001-08-31  H.J. Lu  <hjl@gnu.org>
96
97         * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
98         with bad relocation.
99
100 2001-08-31  Eric Christopher  <echristo@redhat.com>
101             Jason Eckhardt  <jle@redhat.com>
102
103         * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
104         mips32_4k and mips64.
105         * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
106         bfd_mach_mips64.  Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
107         * bfd/cpu-mips.c: Ditto.
108         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
109         * bfd/bfd-in2.h: Regenerate.
110
111 2001-08-31  Jakub Jelinek  <jakub@redhat.com>
112
113         * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
114         value into R_ALPHA_RELATIVE's addend.
115         (elf64_alpha_finish_dynamic_symbol): Likewise.
116
117 2001-08-31  Nick Clifton  <nickc@cambridge.redhat.com>
118
119         * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
120         recomputed addend during relocatable link if not USE_REL.
121
122         * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
123         error.
124
125 2001-08-30  H.J. Lu  <hjl@gnu.org>
126
127         * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
128         2 changes.
129         (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
130         relocations for weak definitions.
131
132 2001-08-30  H.J. Lu  <hjl@gnu.org>
133
134         * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
135         (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
136         * Makefile.in: Rebuild.
137
138 2001-08-30  H.J. Lu  <hjl@gnu.org>
139
140         * elf32-mips.c (mips_elf_calculate_relocation): Don't create
141         dynamic relocation for undefined weak symbols when creating
142         executables. Check h->root.root.type, instead of h->root.type.
143
144 2001-08-29  Joel Sherrill <joel@OARcorp.com>
145
146         * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
147         default from coff to elf.
148
149 2001-08-29  Jeff Law <law@redhat.com>
150
151         * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
152         relocations.
153         (h8_reloc_map): Similarly.
154         (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
155         Add support for PC relative relocations.
156
157         * elf32-h8300.c: Put all prototypes together.
158         (elf32_h8_info_to_howto): Parameter elf_reloc is used.
159         (elf32_h8_final_link_relocate): New function for linker.
160         (elf32_h8_relocate_section): Similarly.
161         (elf_backend_relocate_section): Define.
162
163         * cpu-h8300.c (h8300_scan, compatible): Prototype.
164         (h8300_scan): Handle architecture:machine encodings typically
165         found in linker scripts.
166         * elf.c (prep_headers): Do not try to do H8 machine recognition
167         here.
168         * elf32-h8300.c:  Add some missing prototypes.
169         (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
170         (elf32_h8_object_p): Similarly.
171
172 2001-08-29  Tom Rix <trix@redhat.com>
173
174         * xcofflink.c (xcoff_link_add_symbols):  Fix XTY_LD symbol that
175         does not follow a XTY_SD.
176
177 2001-08-29  Alan Modra  <amodra@bigpond.net.au>
178
179         * targmatch.sed: Delete case statements.
180         * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
181         aix4.3 and above.
182
183 Wed Aug 29 02:27:36 2001  J"orn Rennecke <amylaar@redhat.com>
184
185         * Makefile.am (elf32-h8300.lo): New target.
186         * config.bfd (h8300*-*-elf): New case.
187         * configure.in (bfd_elf32_h8300_vec): New case.
188         * elf.c (prep_headers): Add case for bfd_arch_h8300.
189         * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
190         (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
191         (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
192         * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
193         * elf32-h8300.c: New file.
194         * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
195
196 2001-08-28  Nick Clifton  <nickc@cambridge.redhat.com>
197
198         * sparclynx.c: Add missing prototypes.
199         * coff-mcore.c: Add missing prototypes.
200         * elf32-pj.c: Add missing prototypes.
201         * nlm32-sparc.c: Add missing prototypes.
202         * oasys.c: Add missing prototypes.
203         * pdp11.c: Add missing prototypes.
204         * pe-mips.c: Add missing prototypes.
205         * riscix.c: Add missing prototypes.
206
207 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
208
209         * elf32-i386.c: Add missing prototypes.
210         * elf32-ppc.c: Likewise.
211         * elf32-sh-lin.c: Likewise.
212         * elfarm-nabi.c: Likewise.
213
214 2001-08-27  Daniel Jacobowitz  <drow@mvista.com>
215
216         * elf32-i386.c (elf_i386_grok_prstatus): New function.
217         (elf_i386_grok_psinfo): New function.
218         (elf_backend_grok_prstatus): Define.
219         (elf_backend_grok_psinfo): Likewise.
220         * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
221         (ppc_elf_grok_psinfo): New function.
222         (elf_backend_grok_prstatus): Define.
223         (elf_backend_grok_psinfo): Likewise.
224         * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
225         (elf32_shlin_grok_psinfo): New function.
226         (elf_backend_grok_prstatus): Define.
227         (elf_backend_grok_psinfo): Likewise.
228         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
229         (elf32_arm_nabi_grok_psinfo): New function.
230         (elf_backend_grok_prstatus): Define.
231         (elf_backend_grok_psinfo): Likewise.
232
233 2001-08-27  H.J. Lu  <hjl@gnu.org>
234
235         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
236         sanity check.
237         (mips_elf_calculate_relocation): Create dynamic relocation for
238         symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
239         bit is not set.
240
241 2001-08-27  H.J. Lu  <hjl@gnu.org>
242
243         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
244         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
245         (_bfd_elf32_mips_grok_prstatus): Likewise.
246         (_bfd_elf32_mips_grok_psinfo): Likewise.
247         (_bfd_mips_elf_hide_symbol): Make it static and cast to
248         `struct mips_elf_link_hash_entry *'.
249         (_bfd_mips_elf_copy_indirect_symbol): Make it static.
250
251 2001-08-27  Nick Clifton  <nickc@cambridge.redhat.com>
252
253         * mipsbsd.c: Add missing prototypes.
254         * hp300hpux.c: Add missing prototypes.
255         * i386aout.c: Add missing prototypes.
256         * i386lynx.c: Add missing prototypes.
257         * i386mach3.c: Add missing prototypes.
258         * i386msdos.c: Add missing prototypes.
259         * i386os9k.c: Add missing prototypes.
260
261 2001-08-27  Linus Nordberg  <linus@swox.se>
262             Torbjorn Granlund  <tege@swox.com>
263             Staffan Ulfberg  <staffanu@swox.se>
264             Alan Modra  <amodra@bigpond.net.au>
265
266         * config.bfd: Add powerpc64 target.  Add powerpc64 vectors to
267         targ64_selvecs for 32 bit powerpc targets.
268         * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
269         (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
270         Run "make dep-am".
271         * Makefile.in: Regenerate.
272         * configure.in: Add elf64_powerpc vecs.
273         * configure: Regenerate.
274         * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
275         * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
276         * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
277         * elf64-ppc.c: New file.
278         * reloc.c: Add powerpc64 relocs.
279         * libbfd.h: Regenerate.
280         * bfd-in2.h: Regenerate.
281
282 2001-08-27  Andreas Schwab  <schwab@suse.de>
283
284         * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
285         reloc is against read-only section.
286         (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
287         looking up section names for DT_TEXTREL.
288         (elf32_m68k_reloc_type_class): New function.
289         (elf_backend_reloc_type_class): Define.
290
291 2001-08-27  Andreas Jaeger  <aj@suse.de>
292
293         * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
294         reloc is against read-only section.
295         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
296         looking up section names for DT_TEXTREL.
297         (elf_s390_reloc_type_class): New.
298         (elf_backend_reloc_type_class): Define.
299
300         * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
301         reloc is against read-only section.
302         (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
303         looking up section names for DT_TEXTREL.
304         (elf_s390_reloc_type_class): New.
305         (elf_backend_reloc_type_class): Define.
306
307         * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
308         is against read-only section.
309         (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
310         looking up section names for DT_TEXTREL.
311         (ppc_elf_reloc_type_class): New.
312         (elf_backend_reloc_type_class): Define.
313
314 2001-08-26  Andreas Jaeger  <aj@suse.de>
315
316         * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
317         reloc is against read-only section.
318         (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
319         looking up section names for DT_TEXTREL.
320         (elf_cris_reloc_type_class): New.
321         (elf_backend_reloc_type_class): Define.
322
323         * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
324         against read-only section.
325         (elf_backend_reloc_type_class): Define.
326         (sh_elf_reloc_type_class): New.
327         (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
328         looking up section names for DT_TEXTREL.
329
330         * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
331         reloc is against read-only section.
332         (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
333         looking up section names for DT_TEXTREL.
334         (elf32_arm_reloc_type_class): New.
335         (elf_backend_reloc_type_class): Define.
336
337 2001-08-25  Andreas Jaeger  <aj@suse.de>
338
339         * oasys.c: Add missing prototypes.
340
341         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
342         attribute for parameter.
343         * elf.c (_bfd_elf_reloc_type_class): Likewise.
344
345         * versados.c (get_4): Make static.
346         (get_10): Make static.
347         Add missing prototypes.
348         (process_esd): Fix call to versados_new_symbol.
349
350 2001-08-25  Nick Clifton  <nickc@cambridge.redhat.com>
351
352         * coff-a29k.c: Add missing prototypes.
353         * coff-apollo.c: Add missing prototypes.
354         * coff-arm.c: Add missing prototypes.
355         * coff-i860.c: Add missing prototypes.
356         * coff-rs6000.c: Add missing prototypes.
357         * coff-tic80.c: Add missing prototypes.
358         * elf-m10200.c: Add missing prototypes.
359         * elf-m10300.c: Add missing prototypes.
360         * elf32-arm.h: Add missing prototypes.
361         * elf32-d10v.c: Add missing prototypes.
362         * elf32-m32r.c: Add missing prototypes.
363         * elf32-mcore.c: Add missing prototypes.
364         * elf32-openrisc.c: Add missing prototypes.
365         * elf32-sh.c: Add missing prototypes.
366         * elf32-sparc.c: Add missing prototypes.
367         * elf32-v850.c: Add missing prototypes.
368         * elfarm-nabi.c: Add missing prototypes.
369         * elfarm-oabi.c: Add missing prototypes.
370
371 2001-08-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
372
373         * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
374         E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
375
376 2001-08-24  H.J. Lu  <hjl@gnu.org>
377
378         * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
379         hash structure.
380
381 2001-08-24  Nick Clifton  <nickc@cambridge.redhat.com>
382
383         * elf-bfd.h (elf_hash_table): Revert definition.
384         (is_elf_hash_table): New macro.
385         * elflink.h (elf_link_add_object_symbols): Test
386         is_elf_hash_table before accessing ELF only fields in hash
387         structure.
388         (elf_link_create_dynamic_sections): Fail if not using an ELF
389         hash structure.
390         (elf_add_dynamic_entry): Fail if not using an ELF hash
391         structure.
392         (elf_link_record_local_dynamic_symbol): Fail if not using an
393         ELF hash structure.
394         (size_dynamic_sections): Fail if not using an ELF hash
395         structure.
396         (elf_adjust_dynamic_symbol): Fail if not using an ELF
397         hash structure.
398         (elf_bfd_final_link): Fail if not using an ELF hash
399         structure.
400
401 2001-08-24  H.J. Lu  <hjl@gnu.org>
402
403         * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
404         table is not an ELF linker hash table.
405
406         * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
407         table type to bfd_link_elf_hash_table.
408
409         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
410         the last change.
411
412         * linker.c (_bfd_link_hash_table_init): Set the linker hash
413         table type to bfd_link_generic_hash_table.
414
415 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
416
417         * bfd.c (bfd_alt_mach_code): New function.
418         * bfd-in2.h: Rebuilt.
419
420 2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
421
422         * elf-m10300.c (mn10300_elf_relocate_section): Test the right
423         `type' field in the hash entry when deciding whether to follow a
424         link.
425
426 2001-08-24  Jakub Jelinek  <jakub@redhat.com>
427
428         * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
429         last.
430         (elf_link_sort_relocs): Adjust accordingly.
431
432         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
433         (elf64_alpha_check_relocs): Set it if section this reloc is against
434         is read-only.  Set DF_TEXTREL if a RELATIVE reloc is needed against
435         read-only section.
436         (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
437         is is against read-only section.
438         (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
439         check section names.
440         (elf64_alpha_reloc_type_class): New.
441         (elf_backend_reloc_type_class): Define.
442
443 2001-08-24  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
444
445         * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
446         by bfd_malloc().
447
448 2001-08-23  Andreas Jaeger  <aj@suse.de>
449
450         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
451         the reloc is against read-only section.
452         (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
453         of looking up section names for DT_TEXTREL.
454         (elf64_x86_64_reloc_type_class): New.
455         (elf_backend_reloc_type_class): Define.
456
457 2001-08-23  H.J. Lu  <hjl@gnu.org>
458
459         * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
460         * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
461
462         * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
463         bfd_print_symbol_vandf.
464         * coffgen.c (coff_print_symbol): Likewise.
465         * elf.c (bfd_elf_print_symbol): Likewise.
466         * ieee.c (ieee_print_symbol): Likewise.
467         * nlmcode.h (nlm_print_symbol): Likewise.
468         * oasys.c (oasys_print_symbol): Likewise.
469         * pdp11.c (NAME(aout,print_symbol)): Likewise.
470         * som.c (som_print_symbol): Likewise.
471         * srec.c (srec_print_symbol): Likewise.
472         * tekhex.c (tekhex_print_symbol): Likewise.
473         * versados.c (versados_print_symbol): Likewise.
474         * vms.c (vms_print_symbol): Likewise.
475
476         * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
477         with bfd_fprintf_vma.
478         (bfd_elf_print_symbol): Likewise.
479         * syms.c (bfd_print_symbol_vandf): Likewise.
480
481 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
482
483         * aoutf1.h (sunos_write_object_contents): Silence compile time
484         warning.
485         * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
486
487         * bout.c: Add missing function prototypes.  Fix formatting.
488         * coff-z8k.c: Add missing function prototypes.  Fix formatting.
489         * coff-w65.c: Add missing function prototypes.  Fix formatting.
490         * coff-h8500.c: Add missing function prototypes.  Fix formatting.
491         * coff-h8300.c: Add missing function prototypes.  Fix formatting.
492         * coff-tic54x.c: Add missing function prototypes.  Fix formatting.
493         * coff-tic30.c: Add missing function prototypes.  Fix formatting.
494         * coff-m68k.c: Add missing function prototypes.  Fix formatting.
495         * coff-rs6000.c: Add missing function prototypes.  Fix formatting.
496         * coff-sh.c: Add missing function prototypes.  Fix formatting.
497
498 2001-08-23  Jakub Jelinek  <jakub@redhat.com>
499
500         * elf-bfd.h (enum elf_reloc_type_class): New.
501         (struct elf_backend_data): Add elf_backend_reloc_type_class.
502         (_bfd_elf_reloc_type_class): New.
503         * elfxx-target.h (elf_backend_reloc_type_class): Define.
504         (elfNN_bed): Add elf_backend_reloc_type_class.
505         * elf.c (_bfd_elf_reloc_type_class): New.
506         * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
507         is against read-only section.
508         (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
509         looking up section names for DT_TEXTREL.
510         (elf_i386_reloc_type_class): New.
511         (elf_backend_reloc_type_class): Define.
512         * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
513         reloc is against read-only section.
514         (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
515         looking up section names for DT_TEXTREL.
516         (elf32_sparc_reloc_type_class): New.
517         (elf_backend_reloc_type_class): Define.
518         * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
519         reloc is against read-only section.
520         (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
521         looking up section names for DT_TEXTREL.
522         (sparc64_elf_reloc_type_class): New.
523         (elf_backend_reloc_type_class): Define.
524         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
525         (elfNN_ia64_hash_table_create): Clear ia64_info.
526         (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
527         section.
528         (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
529         instead of looking up section names for DT_TEXTREL.
530         (elfNN_ia64_reloc_type_class): New.
531         (elf_backend_reloc_type_class): Define.
532         * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
533         (struct elf_link_sort_rela): New.
534         (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
535         (elf_bfd_final_link): Call elf_link_sort_relocs.
536         Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
537         necessary.
538
539 2001-08-23  Nick Clifton  <nickc@cambridge.redhat.com>
540
541         * configure.in (x86-bsdi): No corefile support.
542         * configure: Regenerate.
543
544 2001-08-22  Nick Clifton  <nickc@cambridge.redhat.com>
545
546         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
547         comma.
548
549 2001-08-21  Mark Elbrecht  <snowball3@bigfoot.com>
550
551         * coff-go32.c: Make DWARF2 sections use an alignment of 0.  Set
552         the alignment of dwarf2 linkonce sections to 0.
553         * coff-sto32.c: Likewise.
554
555 2001-08-20  Andreas Jaeger  <aj@suse.de>
556
557         * coff-sparc.c: Add missing prototypes.
558         * elf32-s390.c: Likewise.
559         * elf32-i960.c: Likewise.
560         * aout-target.h: Likewise.
561
562 2001-08-20  H.J. Lu  <hjl@gnu.org>
563
564         * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
565         (elf_num_section_syms): New for num_section_syms.
566
567         * elf.c (elf_map_symbols): Set num_section_syms.
568         (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
569         the section symbol index.
570
571 2001-08-20  Nick Clifton  <nickc@cambridge.redhat.com>
572
573         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
574         select the generic has table creator.  All elf backends need elf
575         specific fields in the hash table.
576
577 2001-08-20  Alan Modra  <amodra@bigpond.net.au>
578
579         * archive.c (offsetof): Remove define.
580         * elf.c: Likewise.
581         * oasys.c: Likewise
582         * sysdep.h (offsetof): Define.
583
584 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
585
586         * bfd.c (bfd_get_gp_size): Return an unsigned int.
587         (bfd_set_gp_size): Make param unsigned.
588         * bfd-in2.h: Regenerate.
589         * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
590         than calling bfd_get_gp_size.
591         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
592         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
593
594 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
595
596         * linker.c (default_fill_link_order): Handle four byte fill value.
597
598 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
599
600         * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
601         prototype.
602         * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
603
604         * elf64-mips.c (UNUSED_RELOC): Define.
605         (mips_elf64_howto_table_rel): Use it.
606         (mips_elf64_howto_table_rela): Here too.
607         (mips_elf64_write_relocs): Fix signed/unsigned warning.
608
609         * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
610         silence warning.
611         * coffgen.c (coff_print_symbol): Fix warnings.
612         (coff_find_nearest_line): Likewise.
613         * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
614         * coff-alpha.c (alpha_convert_external_reloc): Likewise.
615         * format.c (bfd_check_format_matches): Likewise.
616         (bfd_set_format): Likewise.
617         * coff-ia64.c: Add missing prototypes.
618         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
619         signed to silence warnings.
620         (elf64_alpha_relocate_section): Likewise.
621         (elf64_alpha_find_reloc_at_ofs): Fix warnings.
622         (elf64_alpha_add_symbol_hook): Likewise.
623         (elf64_alpha_final_link): Likewise.
624         (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
625         (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
626         (elf64_alpha_size_got_sections): Likewise.
627         * elfxx-ia64.c: Add missing prototypes.
628         (elfNN_ia64_relocate_section): Fix warning.
629         (elfNN_ia64_unwind_entry_compare): Make params const.
630
631 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
632
633         * config.bfd (targ64_selvecs): New.
634         <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
635
636         * bfd-in.h (BFD_VERSION): Remove wrong comment.
637         (BFD_DEFAULT_TARGET_SIZE): New.
638         (BFD_ARCH_SIZE): Comment.
639         * configure.in (target_size): New.  Set instead of target64 in
640         selvecs case statement.  Set target64 from it.
641         (bfd_default_target_size): New.  Set from taget_size. AC_SUBST.
642         * bfd-in2.h: Regenerate.
643         * configure: Regenerate.
644
645 2001-08-17  Alan Modra  <amodra@bigpond.net.au>
646
647         * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
648         (bfd_errmsgs): Add corresponding message.
649         * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
650         finding an archive that contains different format object files.
651         Return bfd_error_wrong_object_format for this case.
652         * format.c: Formatting fixes.  s/CONST/const/.
653         (bfd_check_format_matches): Accept archives that give
654         bfd_error_wrong_object_format if no full match is found.  Tidy
655         code handling matching_vector.  Don't return a pointer to freed
656         memory in `matching'.  Handle ambiguous matches as for partial
657         archive matches.
658         * bfd-in2.h: Regenerate.
659
660 2001-08-15  Alan Modra  <amodra@bigpond.net.au>
661
662         * libieee.h (common_header_type): Add last_byte field.
663
664         * ieee.c: Add missing prototypes.  Some format fixes.
665         (struct output_buffer_struct): Move for availability to prototypes.
666         (ieee_part_after): New function.
667         (ieee_slurp_debug): Use it here.
668         (ieee_seek): Pass in ieee_data_struct rather than bfd.  Use
669         ieee_part_after to set last_byte to one past end of current part.
670         Update callers.
671         (ieee_pos): Pass in ieee_data_struct rather than bfd.
672         Update callers.
673         (parse_expression): Don't go beyond the end of the current part.
674         (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
675         (ieee_get_symtab_upper_bound, ieee_get_symtab,
676         ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
677         ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
678         ieee_set_section_contents, ieee_write_object_contents,
679         ieee_make_empty_symbol): Make static.
680         (ieee_archive_p): Correct comments regarding bfd_read.
681         (ieee_object_p): Similarly.
682         (ieee_mkobject): Move it.  Clear output_ptr_start, output_ptr,
683         output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
684         input_bfd, output_bfd, output_buffer.
685         (do_as_repeat): Write out ieee_set_current_pc_enum value as for
686         do_with_relocs, ie. as a symbol for relocatable files.
687         (ieee_vec): Add comments showing functions referenced by macros.
688
689 2001-08-14  Nick Clifton  <nickc@cambridge.redhat.com>
690
691         * aout-tic30.c: Add missing prototypes.  Fix formatting.
692         * aout-ns32k.c: Add missing prototypes.  Fix formatting.
693         * peXXigen.c: Add missining prototypes.  Fix formatting.
694         * aout-adobe.c: Add missining prototypes.  Fix formatting.
695
696 2001-08-13  Nick Clifton  <nickc@cambridge.redhat.com>
697
698         * elf32-v850.c: Add missing function prototypes.
699         Fix some formatting.
700
701         * cpu-v850.c: Add missing function prototype.
702         Fix some formatting.
703
704 2001-08-11  Nick Clifton  <nickc@cambridge.redhat.com>
705
706         * elf-bfd.h (struct elf_backend_data): Add new fields
707         'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
708         (bfd_elf_sprintf_vma): Rename function prototype to
709         '_bfd_elf_sprintf_vma'.
710         (bfd_elf_fprintf_vma): Rename function prototype to
711         '_bfd_elf_fprintf_vma'.
712         * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
713         directly, instead indirect via the elf_backend_data structure.
714         (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
715         instead indirect via the elf_backend_data structure.
716         * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
717         (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
718         * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
719         already defined.
720         (elf_backend_fprintf_vma): Initialise if not already defined.
721         (struct elf_backend_data): Initialise the
722         elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
723
724 2001-08-10  Andreas Jaeger  <aj@suse.de>
725
726         * elf64-sparc.c: Add missing prototypes.
727         * elf32-cris.c: Likewise.
728         * elf32-i370.c: Likewise.
729         * elf64-hppa.c: Likewise.
730         * elf64-s390.c: Likewise.
731
732 2001-08-10  Andreas Jaeger  <aj@suse.de>
733
734         * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
735         Add prototypes where needed.
736
737 2001-08-10  H.J. Lu  <hjl@gnu.org>
738
739         * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
740         (bfd_fprintf_vma): Likewise.
741
742 2001-08-10  H.J. Lu  <hjl@gnu.org>
743
744         * bfd.c (bfd_sprintf_vma): Don't return void.
745         (bfd_fprintf_vma): Likewise.
746
747 2001-08-10  Andreas Jaeger  <aj@suse.de>
748
749         * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
750         to build warnings.
751         * configure: Regenerate.
752
753 2001-08-10  Alan Modra  <amodra@bigpond.net.au>
754
755         * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
756         warning if not BFD64.  Add braces so emacs auto format works.
757         (bfd_elf_fprintf_vma): Likewise.
758
759         * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
760         of _xcoff_swap_ld*.
761         * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
762         param to agree with libxcoff.h.
763         (xcoff_swap_ldhdr_out): Likewise.
764         (xcoff_swap_ldsym_in): Likewise.
765         (xcoff_swap_ldsym_out): Likewise.
766         (xcoff_swap_ldrel_in): Likewise.
767         (xcoff_swap_ldrel_out): Likewise.
768         (xcoff_create_csect_from_smclas): Likewise.
769         * coff64-rs6000.c: Add missing prototypes.
770         (xcoff64_swap_ldhdr_in): Modify type of external param to agree
771         with libxcoff.h.
772         (xcoff64_swap_ldhdr_out): Likewise.
773         (xcoff64_swap_ldsym_in): Likewise.
774         (xcoff64_swap_ldsym_out): Likewise.
775         (xcoff64_swap_ldrel_in): Likewise.
776         (xcoff64_swap_ldrel_out): Likewise.
777         (xcoff64_ppc_relocate_section): Make static.
778         (xcoff64_slurp_armap): Likewise.
779         (xcoff64_archive_p): Likewise.
780         (xcoff64_openr_next_archived_file): Likewise.
781         (xcoff64_sizeof_headers): Likewise.
782         (xcoff64_is_lineno_count_overflow): Likewise.
783         (xcoff64_is_reloc_count_overflow): Likewise.
784         (xcoff64_loader_symbol_offset): Likewise.
785         (xcoff64_loader_reloc_offset): Likewise.
786         * elf64-gen.c: Add missing prototypes.
787
788 2001-08-09  H.J. Lu  <hjl@gnu.org>
789
790         * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
791         (bfd_elf_fprintf_vma): Likewise.
792
793 2001-08-09  H.J. Lu  <hjl@gnu.org>
794
795         * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
796         to ...
797         * elf-bfd.h: Here.
798         * bfd-in2.h: Regenerated.
799
800 2001-08-09  H.J. Lu  <hjl@gnu.org>
801
802         * bfd-in.h (bfd_sprintf_vma): New prototype.
803         (bfd_fprintf_vma): Likewise.
804         (bfd_elf_sprintf_vma): Likewise.
805         (bfd_elf_fprintf_vma): Likewise.
806         (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
807         * bfd-in2.h: Regenerated.
808
809         * bfd.c (bfd_sprintf_vma): New. Defined.
810         (bfd_fprintf_vma): Likewise.
811
812         * elf.c (bfd_elf_sprintf_vma): New. Defined.
813         (bfd_elf_fprintf_vma): Likewise.
814
815 2001-08-09  Alan Modra  <amodra@bigpond.net.au>
816
817         * coff-rs6000.c: Add missing prototypes.
818         (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
819         xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
820         xcoff_loader_reloc_offset): Make static.
821         * dwarf1.c: Add missing prototypes.
822         * dwarf2.c: Add missing prototypes.
823         (struct abbrev_info): Move definition.
824         (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
825         * elf.c: Add missing prototypes.
826         * elf32-gen.c: Likewise.
827         * elf32-i386.c: Likewise.
828         * elf32-ppc.c: Likewise.
829         (ppc_elf_sort_rela): Use PTR instead of "void *".
830         * elflink.h: Add missing prototypes.  Formatting fixes.
831         * merge.c: Add missing prototypes.
832         (last4_eq): Use PTR instead of "void *".
833         (last_eq): Likewise.
834         * syms.c: Add missing prototypes.
835
836 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
837
838         * bfd.c: Fix formatting.
839         * bfd-in2.h: Regenerate.
840
841 2001-08-09  Nick Clifton  <nickc@cambridge.redhat.com>
842
843         * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
844         true (this target uses REL relocations) and 'pcrel_offset' to
845         false (the PC is implied, not stored in the offset).
846
847 2001-08-08  Alan Modra  <amodra@bigpond.net.au>
848
849         1999-10-19  Linus Nordberg  <linus@swox.se>
850         * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
851         * elfxx-target.h (elf_backend_want_got_sym): Define.
852         (elfNN_bed): Add elf_backend_want_got_sym.
853         * elflink.c (_bfd_elf_create_got_section): Define
854         _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
855
856 2001-08-08  Alexandre Oliva  <aoliva@redhat.com>
857
858         * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
859         (find_rela_addend): New function.
860         (parse_comp_unit): Call it to find the abbrev offset addend.
861         (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
862         members of dwarf2_debug as debugging information is read.
863
864 2001-08-07  Nick Clifton  <nickc@cambridge.redhat.com>
865
866         * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
867         targets as well as sh-pe.
868
869 2001-08-03  Ben Harris <bjh21@netbsd.org>
870
871         * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
872         reloc from start of section when computing value for R_ARM_REL32
873         reloc.
874
875 2001-08-03  Alan Modra  <amodra@bigpond.net.au>
876
877         From  H.J. Lu  <hjl@gnu.org>
878         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
879         keep relocs for undefined syms if there are no dynamic sections in
880         executable.
881         * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
882
883 2001-08-02  Paul Sokolovsky  <paul.sokolovsky@technologist.com>
884
885         * cofflink.c (coff_link_check_ar_symbols): also search for
886         __imp__symbol as well as _symbol.
887         * linker.c (_bfd_generic_link_add_archive_symbols): also
888         search for __imp__symbol as well as _symbol.
889
890 2001-08-01  Adam Nemet  <anemet@lnxw.com>
891
892         * elf.c (elf_sort_sections): Return zero only as the last step.
893
894 2001-08-01  Nick Clifton  <nickc@cambridge.redhat.com>
895
896         * config.bfd (arm-vxworks): Change name of define from VXWORKS to
897         ARM_COFF_BUGFIX.
898         (arm-epoc-pe): Define ARM_COFF_BUGFIX.
899         coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
900         ARM_COFF_BUGFIX.
901
902 2001-07-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
903
904         * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
905         to match corresponding bfd_coff_backend data member.
906
907 2001-07-24  Alan Modra  <amodra@bigpond.net.au>
908
909         * Makefile.am: Update dependencies with "make dep-am".
910         * Makefile.in: Regenerate
911
912 2001-07-15  H.J. Lu  <hjl@gnu.org>
913
914         * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
915         (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
916         * Makefile.in: Regenerate.
917
918 2001-07-11  H.J. Lu  <hjl@gnu.org>
919
920         * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
921         flags when creating the reloc section if the ALLOC flag in the
922         source section is set.
923
924 2001-07-11  Steve Ellcey  <sje@cup.hp.com>
925
926         * reloc.c (bfd_reloc_code_type): Add IA64 relocs
927         BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
928         * bfd-in2.h: Regenerate.
929         * libbfd.h: Regenerate.
930         * elfxx-ia64.c (ia64_howto_table): Define how to handle
931         new relocations.
932         (elfNN_ia64_reloc_type_lookup): Handle new relocations.
933         (elfNN_ia64_check_relocs): Likewise.
934         (elfNN_ia64_install_value): Likewise.
935         (elfNN_ia64_relocate_section): Likewise.
936
937 2001-07-11  Jakub Jelinek  <jakub@redhat.com>
938
939         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
940         R_SPARC_UA64.
941         (elf32_sparc_check_relocs): Likewise.
942         Only create .rela section for alloced sections in shared libraries.
943         (elf32_sparc_relocate_section): Likewise.
944         Remove redundant check.
945         Optimize unaligned reloc usage.
946         * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
947         check.
948
949 2001-07-11  H.J. Lu  <hjl@gnu.org>
950
951         * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
952         ALLOC|LOAD flags as the source section for debugging sections
953         when creating the reloc section.
954
955 2001-07-05  Jim Wilson  <wilson@redhat.com>
956
957         * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
958         the section of the bigger symbol.
959
960         * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
961
962 2001-07-05  Nick Clifton  <nickc@cambridge.redhat.com>
963
964         * peicode.h (coff_swap_scnhdr_in): For sections containing
965         uninitialised data, only set their size to s_paddr if this does
966         not reset their size to zero.  MS's latest compilers will set
967         s_paddr to zero.
968
969 2001-07-04  H.J. Lu  <hjl@gnu.org>
970
971         * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
972         Handle bfd_mach_mips4400, bfd_mach_mips4600 and
973         bfd_mach_mips5000.
974
975 2001-07-03  Mark Elbrecht  <snowball3@softhome.net>
976
977         * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
978
979         * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
980         sections being discarded.
981
982 2001-06-30  Alan Modra  <amodra@bigpond.net.au>
983
984         * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
985         instead of _bfd_elfcore_section_from_phdr.
986         * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
987         * elf.c (_bfd_elfcore_section_from_phdr): Remove.
988         (_bfd_elfcore_make_pseudosection): Expedite tail-call.
989         (elfcore_grok_prstatus): Likewise.
990         (elfcore_grok_lwpstatus): Likewise.
991         (bfd_get_elf_phdr_upper_bound): Likewise.
992         (elfcore_make_note_pseudosection): Formatting.
993         (_bfd_elfcore_strndup): Formatting.
994         * elf32-mips.c (mips_elf_sym_is_global): Formatting.
995         (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
996
997 2001-06-29  Daniel Jacobowitz  <drow@mvista.com>
998
999         * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
1000         and _bfd_elfcore_strndup.
1001         (struct elf_backend_data): Add elf_backend_grok_prstatus
1002         and elf_backend_grok_psinfo.
1003         * elf.c (_bfd_elfcore_make_pseudosection): New function.
1004         (elfcore_grok_prstatus): Use it.
1005         (elfcore_make_note_pseudosection): Likewise.
1006         (elfcore_strndup):  Rename to...
1007         (_bfd_elfcore_strndup): Here, and make global.
1008         (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
1009         (elfcore_grok_note): Call elf_backend_grok_prstatus
1010         and elf_backend_grok_psinfo if available.
1011         * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
1012         (_bfd_elf32_mips_grok_psinfo): New function.
1013         (elf_backend_grok_prstatus): Define.
1014         (elf_backend_grok_psinfo): Define.
1015         * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
1016         (elf_backend_grok_psinfo): Likewise.
1017         (elfNN_bed): Include elf_backend_grok_prstatus and
1018         elf_backend_grok_psinfo.
1019
1020 2001-06-29  H.J. Lu  <hjl@gnu.org>
1021
1022         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
1023         hplink->sgot is NULL before filling GOT.  Check if hplink->splt
1024         is NULL before filling PLT.
1025
1026 2001-06-29  Alan Modra  <amodra@bigpond.net.au>
1027
1028         * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
1029
1030 2001-06-27  Alan Modra  <amodra@bigpond.net.au>
1031
1032         * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
1033         here..
1034         (elf32_hppa_adjust_dynamic_symbol): ..nor here..
1035         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
1036         after gc has run.
1037
1038         * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
1039         (IS_ABSOLUTE_RELOC): Define.
1040         (elf32_hppa_link_hash_entry): Always include reloc_entries field.
1041         (hppa_link_hash_newfunc): Always init it.
1042         (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
1043         create COPY relocs only when the reloc is in a read-only section.
1044         Instead, allocate space for a dynamic reloc to reference the
1045         library symbol directly.  Keep track of space we allocate using
1046         relocs_entries.
1047         (hppa_discard_copies): Delete, and move code to..
1048         (allocate_plt_and_got): ..here.  Rename to
1049         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
1050         relocs for non-shared link.
1051         (elf32_hppa_size_dynamic_sections): Update calls to above.
1052         (elf32_hppa_relocate_section): Write out the dynamic relocs used
1053         in lieu of COPY relocs.
1054
1055         * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
1056         here..
1057         (elf_i386_adjust_dynamic_symbol): ..nor here..
1058         (allocate_plt_and_got_and_discard_relocs): .. instead do so here
1059         after gc has run.
1060         (elf_i386_size_dynamic_sections): Fix a comment.
1061         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
1062         involved in writing reloc out.
1063
1064 2001-06-25  Alan Modra  <amodra@bigpond.net.au>
1065
1066         * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
1067         Ensure syms are dynamic if we might be emitting a reloc.
1068         (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
1069         for undefweak or undefined syms..
1070         (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
1071
1072         * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
1073         relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
1074         (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
1075         redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
1076
1077 2001-06-24  H.J. Lu  <hjl@gnu.org>
1078
1079         * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
1080         strncasecmp/strcasecmp instead of strncmp/strcmp.
1081
1082 2001-06-23  H.J. Lu  <hjl@gnu.org>
1083
1084         * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
1085         Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
1086         in the regular object file and treat the weak definition as
1087         the normal one.
1088
1089 2001-06-23  Alan Modra  <amodra@bigpond.net.au>
1090
1091         * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
1092         unresolved_reloc test to exclude cases where we use "relocation"
1093         before setting it to point into the .got.  Reinstate fudge for
1094         unresolved relocs in debugging sections.
1095
1096         * elf32-i386.c (elf_i386_relocate_section): Replace ugly
1097         complicated tests for unresolvable relocs with a simple direct
1098         scheme using "unresolved_reloc" var.
1099
1100         * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
1101         elf_i386_dyn_relocs.  Update comment.
1102         (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
1103         dyn_relocs.
1104         (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
1105         others to aborts.
1106         (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
1107         abort.
1108         (elf_i386_size_dynamic_sections): Likewise.
1109         (elf_i386_finish_dynamic_symbol): Likewise.
1110         (elf_i386_finish_dynamic_sections): Likewise.
1111         (elf_i386_relocate_section): Likewise.  Tidy R_386_GOT32 and error
1112         handling code.
1113
1114         Avoid creating COPY relocs if possible.
1115         * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
1116         which .got created.  Mark symbols used by R_386_32 and R_386_PC32
1117         relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
1118         reloc is in a read-only section.  Instead, allocate space for a
1119         dynamic reloc to reference the library symbol directly.  Keep
1120         track of space we allocate using pcrel_relocs_copied.
1121         (discard_copies): Delete, and move code to ..
1122         (allocate_plt_and_got): ..here.  Rename to
1123         allocate_plt_and_got_and_discard_relocs.  Remove unneeded dynamic
1124         relocs for non-shared link.
1125         (elf_i386_size_dynamic_sections): Update calls to above functions.
1126         (elf_i386_relocate_section): Write out the dynamic relocs.  Add
1127         more ugly logic to avoid "unresolvable relocation" error.  Use
1128         htab shortcut in place of elf_hash_table macro.
1129         (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
1130         not always be created now.
1131
1132 2001-06-20  Bo Thorsen  <bo@suse.co.uk>
1133
1134         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
1135         shared libraries.
1136
1137 2001-06-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1138
1139         * configure.host (mips64-*-linux): Reformat.
1140
1141 2001-06-21  Alan Modra  <amodra@bigpond.net.au>
1142
1143         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
1144         allocate local .got space.  Use shortcuts from hash table for .got
1145         and .plt rather than comparing section names.
1146         (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
1147         adjusting index into local_got_refcounts to document what we are
1148         really doing.
1149         (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
1150         Tidy .got and .plt error checking.
1151
1152 2001-06-20  Catherine Moore  <clm@redhat.com>
1153
1154         * elf-bfd.h (struct elf_backend_data):
1155         elf_backend_emit_relocs: New field: Function for emitting
1156         relocs.
1157         elf_backend_count_relocs: New field: Function for determining
1158         the number of relocs to be emitted.
1159         * elfxx-target.h: Provide default (NULL) values for
1160         elf_backend_emit_relocs and elf_backend_count_relocs.
1161         * elflink.h (elf_link_size_reloc_section): Make the hash table
1162         big enough to hold the relocs counted by either reloc_count or
1163         o->reloc_count.
1164         (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
1165         should be emitted, either because of a command line option
1166         stored in the info structure or because the target provides a
1167         special reloc emitting function.
1168         If the target provides a reloc counting function use it,
1169         unless performing a relocatable link or emitting all relocs.
1170         Also set the SEC_RELOC flag on any output section which will
1171         contain relocs.
1172         (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
1173         should be emitted, either because of a command line option
1174         stored in the info structure or because the target provides a
1175         special reloc emitting function.
1176         If the target provides a reloc emitting function, use it,
1177         unless performing a relocatable link or emitting all relocs.
1178
1179 2001-06-20  H.J. Lu  <hjl@gnu.org>
1180
1181         * elf32-i386.c (elf_i386_size_dynamic_sections): Always
1182         allocate local .got space.
1183
1184 2001-06-19  Andreas Jaeger  <aj@suse.de>
1185
1186         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
1187         dynamic symbols.
1188
1189 2001-06-18  Hans-Peter Nilsson  <hp@axis.com>
1190
1191         * elflink.h (struct elf_assign_sym_version_info): Remove member
1192         export_dynamic.  All users changed to use info member.
1193         NAME(bfd_elf,size_dynamic_sections)): Remove parameter
1194         export_dynamic, instead use member in parameter info.
1195         * bfd-in.h (bfd_elf32_size_dynamic_sections,
1196         bfd_elf64_size_dynamic_sections): Update prototype.
1197         * bfd-in2.h: Regenerate.
1198
1199 2001-06-18  H.J. Lu  <hjl@gnu.org>
1200
1201         * elflink.h (elf_info_failed): Add a new field, verdefs.
1202         (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
1203         elf_export_symbol.
1204         (elf_export_symbol): Check eif->verdefs to decide if a symbol
1205         should be exported.
1206
1207 2001-06-17  H.J. Lu  <hjl@gnu.org>
1208
1209         * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
1210         readonly_reloc, to record if a relocation in the .rel.dyn
1211         section is against a read-only section.
1212         (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
1213         field to false.
1214         (_bfd_mips_elf_check_relocs): Record if there is a relocation
1215         in the .rel.dyn section against a read-only section by setting
1216         DF_TEXTREL or readonly_reloc.
1217         (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
1218         it is true.
1219         (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
1220         there is a relocation in the .rel.dyn section against a
1221         read-only section.
1222         (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
1223         DF_TEXTREL is set.
1224
1225 2001-06-12  Nick Clifton  <nickc@cambridge.redhat.com>
1226
1227         * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
1228         function.  Move flagword result into parameter list.  Remove
1229         comment about setting bfd_error_handler to intercept failure
1230         results.
1231         * coffgen.c (make_a_section_from_file): Examine result of
1232         calling bfd_coff_styp_to_sec_flags and pass a failure back to
1233         caller.
1234         * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
1235         function.  Move flagword result into parameter list.
1236         * libcoff.h: Regenerate.
1237         * libecoff.h: Regenerate.
1238
1239 2001-06-13  Nick Clifton  <nickc@cambridge.redhat.com>
1240
1241         * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
1242         section is going to follow it.
1243
1244 2001-06-12  Catherine Moore  <clm@redhat.com>
1245
1246         * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
1247         with the file_align entry from elf_backend_data.
1248         (elf_gc_smash_unused_vtentry_relocs): Likewise.
1249         (elf_gc_record_vtentry): Likewise.
1250
1251 2001-06-10  Alan Modra  <amodra@bigpond.net.au>
1252
1253         * elflink.h: Whitespace changes.
1254         (elf_link_read_relocs_from_section): Use "unsigned int" iterator
1255         rather than "unsigned char".
1256         (elf_link_output_relocs): Likewise.
1257         (elf_link_input_bfd): Likewise.
1258         (elf_reloc_link_order): LIkewise.
1259         * elf.c: s/CONST/const/.  Whitespace changes.
1260         * elf32-mips.c: Formatting fix.
1261
1262         * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
1263         * Makefile.in: Regenerate.
1264         * po/Make-in: Remove trailing tab.
1265
1266 2001-06-09  Philip Blundell  <philb@gnu.org>
1267
1268         * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
1269         change.
1270         (elf32_arm_plt_entry): Likewise.
1271
1272 2001-06-08  H.J. Lu  <hjl@gnu.org>
1273
1274         * elf.c (swap_out_syms): Keep names for global section symbols.
1275
1276 2001-06-07  H.J. Lu  <hjl@gnu.org>
1277
1278         * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
1279         MIPS-based machines need it.
1280
1281 2001-06-07  H.J. Lu  <hjl@gnu.org>
1282
1283         * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
1284         for SGI only.
1285
1286         * config.bfd: Remove ecoff from Linux/mips.
1287
1288 2001-06-07  Andreas Jaeger  <aj@suse.de>
1289
1290         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
1291         assertion.
1292         (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
1293         alignment of 8 for .rela sections; handle further relocations.
1294
1295 2001-06-06  Christian Groessler <cpg@aladdin.de>
1296
1297         * coff-z8k.c: Fix formatting.
1298         Fix howtos: howto->size was always 1.
1299
1300 2001-06-05  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
1301
1302         * configure.host (mips64*-*-linux*): Define.
1303
1304 2001-06-05  Alan Modra  <amodra@bigpond.net.au>
1305
1306         * elf32-i386.c (elf_i386_discard_copies): Rename to
1307         discard_copies, and use elf_link_hash_entry arg rather than
1308         elf_i386_link_hash_entry.
1309         (elf_i386_link_hash_traverse): Delete.
1310         (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
1311         Tidy sizing of dynamic sections.
1312         (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
1313         possible .plt entries.
1314         (elf_i386_gc_sweep_hook): Likewise.
1315         (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
1316         everything with plt.refcount <= 0.
1317
1318         * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
1319         .relgot space here.
1320         (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
1321         (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
1322         .rel.plt here..
1323         (allocate_plt_and_got): ..instead do it all here.  New function.
1324         (elf_i386_size_dynamic_sections): Allocate local .got space and
1325         call allocate_plt_and_got.  No need to zap .relgot if not dynamic.
1326         (bfd_elf32_bfd_final_link): Delete.  (ie. use regular final link
1327         rather than gc variety).
1328         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1329         (elf_i386_relocate_section): Use it here and correct handling of
1330         R_386_GOT32.  Provide section and offset for "unresolvable
1331         relocation" error message.
1332         (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
1333
1334         * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
1335         sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
1336         (elf_i386_link_hash_table_create): Init them.
1337         (create_got_section): New function.
1338         (elf_i386_create_dynamic_sections): New function.
1339         (elf_backend_create_dynamic_sections): Set to above.
1340         (elf_i386_check_relocs): Use shortcuts from hash table rather than
1341         calling bfd_get_section_by_name.
1342         (elf_i386_gc_sweep_hook): Likewise.
1343         (elf_i386_adjust_dynamic_symbol): Likewise.
1344         (elf_i386_size_dynamic_sections): Likewise.
1345         (elf_i386_relocate_section): Likewise.
1346         (elf_i386_finish_dynamic_sections): Likewise.
1347
1348         * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
1349
1350 2001-06-02  H.J. Lu  <hjl@gnu.org>
1351
1352         * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
1353         and ELFOSABI_HPUX.
1354         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1355
1356 2001-06-02  H.J. Lu  <hjl@gnu.org>
1357
1358         * aout-cris.c (MACHTYPE_OK): New. Defined.
1359
1360 2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
1361
1362         * section.c (_bfd_strip_section_from_output): Handle NULL
1363         output_section.
1364
1365 2001-06-02  H.J. Lu  <hjl@gnu.org>
1366
1367         * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
1368         rs6000coff64_vec only if BFD64 is defined.
1369         (powerpc64-*-aix*): Enable only if BFD64 is defined.
1370
1371 2001-06-02  H.J. Lu  <hjl@gnu.org>
1372
1373         * coff-ia64.c (ia64coff_object_p): Rewrite with
1374         external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
1375
1376 2001-06-01  Andreas Jaeger  <aj@suse.de>
1377
1378         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
1379         relocation, small reformatting.
1380
1381 2001-05-29  Andreas Jaeger  <aj@suse.de>
1382
1383         * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
1384         (elf64_x86_64_relocate_section): Likewise.
1385
1386 2001-05-30  Alan Modra  <amodra@one.net.au>
1387
1388         * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
1389         millicode.  Don't allocate .got and .rela.got space here..
1390         (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
1391         (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
1392         .rela.plt here..
1393         (hppa_handle_PIC_calls): ..nor here..
1394         (allocate_plt_and_got): ..instead do it all here.  New function.
1395         (elf32_hppa_size_dynamic_sections): Allocate local .got space and
1396         call allocate_plt_and_got.  No need to zap .got if not dynamic.
1397         (elf32_hppa_final_link): Call regular bfd_final_link instead of
1398         gc_common_final_link.
1399         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1400         (elf32_hppa_relocate_section): Use it here.
1401         (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
1402         dynamic_sections_created.
1403         (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
1404
1405 2001-05-28  Andreas Jaeger  <aj@suse.de>
1406
1407         * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
1408         generic version since we want a hashsize of 4.
1409         (elf_backend_size_info): Likewise.
1410
1411 2001-05-28  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
1412
1413         * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
1414         a zeroing loop.
1415         (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
1416         (elf_link_input_bfd): Likewise.
1417         (elf_reloc_link_order): Likewise.
1418         (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
1419         relocations correctly.
1420
1421 2001-05-28  Nicolas Pitre <nico@cam.org>
1422
1423         * elf32-arm.h: fix PLT generation for big endian ARM
1424
1425 2001-05-28  Alan Modra  <amodra@one.net.au>
1426
1427         * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
1428         for symbols forced local that need plabels.
1429         (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
1430         .plt.rela for local syms if non-shared.
1431         (hppa_build_one_stub): Mask lsb of plt.offset.
1432         (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
1433         (clobber_millicode_symbols): Correct comment.
1434         (elf32_hppa_relocate_section): Likewise.
1435         (elf32_hppa_finish_dynamic_symbol): Likewise.
1436
1437 2001-05-28  Jeff Sturm  <jsturm@one-point.com>
1438
1439         * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
1440         * bfd-in2.h: Regenerate.
1441         * libbfd.h: Regenerate.
1442         * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
1443         and BFD_RELOC_SPARC_UA64 mapping
1444         * elf64-sparc.c: Likewise.
1445
1446 2001-05-25  H.J. Lu  <hjl@gnu.org>
1447
1448         * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
1449         (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
1450         (coff-rs6000.lo): Remove the old dependency.
1451         * Makefile.in: Rebuild.
1452
1453         * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
1454         coff-rs6000.lo.
1455
1456 2001-05-25  H.J. Lu  <hjl@gnu.org>
1457
1458         * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
1459         rs6000coff_core_file_matches_executable_p,
1460         rs6000coff_core_file_failing_command and
1461         rs6000coff_core_file_failing_signal only if AIX_CORE is
1462         defined.
1463         (pmac_xcoff_vec): Likewise.
1464         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1465
1466 2001-05-25  Timothy Wall  <twall@redhat.com>
1467
1468         * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
1469         for __GLOB_DATA_PTR on AIX5.  Clean up some relocation bugs.
1470
1471 2001-05-25  H.J. Lu  <hjl@gnu.org>
1472
1473         * bfd-in2.h: Regenerated.
1474         * libcoff.h: Likewise.
1475
1476 2001-05-25  Alan Modra  <amodra@one.net.au>
1477
1478         * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
1479         undefined millicode syms in shared libs.
1480         (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
1481         (elf32_hppa_check_relocs): Likewise.
1482         (elf32_hppa_adjust_dynamic_symbol): Likewise.
1483         (elf32_hppa_size_dynamic_sections): Likewise.
1484         (elf32_hppa_relocate_section): Likewise.
1485         (elf32_hppa_finish_dynamic_symbol): Likewise.
1486         (elf32_hppa_finish_dynamic_sections): Likewise.
1487
1488 2001-05-24  Tom Rix <trix@redhat.com>
1489
1490         * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
1491         xcoff-target.h not used to define rs6000 or ppc bfd.
1492         * Makefile.in same
1493
1494         * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
1495         to 64 bit.
1496
1497         * coff-rs6000.c : Many changes for 64 bit support.  Move common
1498         32/64 code to xcofflink.c.  Explictly define the rs6000coff_vec
1499         and pmac_xcoff_vec
1500
1501         * coff64-rs6000.c : Many changes for 64 bit support.  64 bit
1502         linker now supported.  Explictly define the rs6000coff64_vec.
1503
1504         * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
1505         (coff_print_aux) same
1506         (coff_write_object_contents) same
1507         (coff_slurp_line_table) same
1508
1509         * coffgen.c : (coff_fix_symbol_name) formatting
1510         (coff_mangle_symbols) xcoff 64 bit support
1511         (coff_write_symbol) same
1512         (coff_write_alien_symbol) same
1513         (coff_write_native_symbol) same
1514         (coff_write_symbols) same
1515         (coff_get_symbol_info) same
1516         (bfd_coff_get_syment) same
1517         (coff_print_symbol) same
1518
1519         * config.bfd : add powerpc64-*-aix* target
1520
1521         * libcoff-in.h : formatting
1522
1523         * libcoff.h : move xcoff extern declarations to libxcoff.h
1524
1525         * libxcoff.h : New file
1526
1527         * xcofflink.c : Many changes for xcoff64 support.  Move common
1528         structures to include/coff/xcoff.h.  Move specific structure to
1529         backends coff-rs6000.c and coff64-rs6000.c.   Use new backend
1530         functions, defined in libxcoff.h, to isolate 32/64 dependencies.
1531
1532         (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
1533         aix4.2+ -binitfini.
1534
1535         (xcoff_build_ldsyms) : handle special __rtinit symbol.
1536
1537 2001-05-23  Alexandre Oliva  <aoliva@redhat.com>
1538
1539         * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
1540         s/ENTIRES/ENTRIES/.
1541
1542 2001-05-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1543
1544         * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
1545         * libbfd.h: Regenerate.
1546         * bfd-in2.h: Regenerate.
1547
1548         * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
1549         * archures.c (bfd_mach_mips12000): Define.
1550         * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
1551         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
1552         support.
1553         (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
1554         * bfd-in2.h: Regenerate.
1555         * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
1556
1557 2001-05-23  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1558
1559         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
1560         elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
1561         elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
1562         that is used by GCC.
1563
1564 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
1565
1566         * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
1567         of entries in a structured section.
1568         * elf.c: Use new macro.
1569         * elf32-i386.c: Use new macro.
1570         * elf32-mips.c: Use new macro.
1571         * elf64-alpha.c: Use new macro.
1572         * elf64-sparc.c: Use new macro.
1573         * elfcode.h: Use new macro.
1574         * elflink.h: Use new macro.
1575
1576 2001-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
1577
1578         * bfdint.texi: Replace -oformat with --oformat.
1579
1580 2001-05-21  Andreas Jaeger  <aj@suse.de>
1581
1582         * dwarf2.c (decode_line_info): Fix error message.
1583         (read_abbrevs): Fix test for offset as suggested by Alan Modra and
1584         adjust error message.
1585
1586 2001-05-18  H.J. Lu  <hjl@gnu.org>
1587
1588         * elflink.h (elf_link_add_object_symbols): Revert the last
1589         change.
1590
1591 2001-05-17  Alan Modra  <amodra@one.net.au>
1592
1593         * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
1594         ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
1595         (hppa_build_one_stub): Add an assert to check plt.offset.
1596
1597 2001-05-17  H.J. Lu  <hjl@gnu.org>
1598
1599         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
1600         version definition to basename of the output filename.
1601
1602 2001-05-17  H.J. Lu  <hjl@gnu.org>
1603
1604         * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
1605         basename of the bfd filename.
1606
1607 2001-05-16  Alan Modra  <amodra@one.net.au>
1608
1609         * section.c (asection): Add linker_has_input field.
1610         (STD_SECTION): Adjust initialization to suit.
1611         * ecoff.c (bfd_debug_section): Likewise.
1612         * bfd-in2.h: Regenerate.
1613
1614 2001-05-15  Alexandre Oliva  <aoliva@redhat.com>
1615
1616         * elf-m10300.c (mn10300_elf_relax_section): Don't relax
1617         negative 32-bit operands to 16 operands when the operand is
1618         going to be zero-extended by the modified opcode.
1619
1620 2001-05-12  Peter Targett  <peter.targett@arccores.com>
1621
1622         * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
1623         name for 'arc5' core versions.
1624         (bfd_arc_arch): Make bfd_mach_arc_6 default.
1625
1626         * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
1627         architecture.
1628         (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
1629
1630 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
1631
1632         * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
1633         sections as well.
1634         (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
1635         to .gnu.linkonce.t.FOO text section.
1636
1637 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
1638
1639         * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
1640         fields, change sec into secinfo.
1641         (struct sec_merge_info): Add chain, remove last fields.
1642         (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
1643         (sec_merge_hash_lookup): If lookup could not use a string only
1644         because it has bad alignment, mark the old string for deletion.
1645         (sec_merge_add): Add secinfo argument. Don't compute entry's
1646         position, instead record the section.
1647         (sec_merge_emit): Update for the sec into secinfo change in
1648         struct sec_merge_hash_entry.
1649         (_bfd_merge_section): Only record the section for merging, defer
1650         putting strings into the hash table.
1651         (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
1652         _bfd_merge_sections): New functions.
1653         (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
1654         changes.
1655         * libbfd-in.h (_bfd_merge_sections): Add prototype.
1656         (_bfd_nolink_bfd_merge_sections): Define.
1657         * libbfd.h: Likewise.
1658         (bfd_generic_merge_sections): Add prototype.
1659         * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
1660         (struct bfd_target): Likewise.
1661         * bfd.c (bfd_merge_sections): Define.
1662         * bfd-in2.h: Rebuilt.
1663         * elf.c (_bfd_elf_merge_sections): New function.
1664         * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
1665         * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
1666         * reloc.c (bfd_generic_merge_sections): New function.
1667         * vms.c (vms_bfd_merge_sections): New function.
1668         * aout-adobe.c (aout_32_bfd_merge_sections): Define.
1669         * aout-target.h (MY_bfd_merge_sections): Define.
1670         * aout-tic30.c (MY_bfd_merge_sections): Define.
1671         * binary.c (binary_bfd_merge_sections): Define.
1672         * bout.c (b_out_bfd_merge_sections): Define.
1673         * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
1674         * coffcode.c (coff_bfd_merge_sections): Define.
1675         * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
1676         * i386msdos.c (msdos_bfd_merge_sections): Define.
1677         * i386os9k.c (os9k_bfd_merge_sections): Define.
1678         * ieee.c (ieee_bfd_merge_sections): Define.
1679         * ihex.c (ihex_bfd_merge_sections): Define.
1680         * nlm-target.h (nlm_bfd_merge_sections): Define.
1681         * oasys.c (oasys_bfd_merge_sections): Define.
1682         * ppcboot.c (ppcboot_bfd_merge_sections): Define.
1683         * som.c (som_bfd_merge_sections): Define.
1684         * srec.c (srec_bfd_merge_sections): Define.
1685         * tekhex.c (tekhex_bfd_merge_sections): Define.
1686         * versados.c (versados_bfd_merge_sections): Define.
1687         * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
1688
1689 2001-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
1690
1691         * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
1692         to be unsigned long, in order to match its use.
1693
1694 2001-05-10  H.J. Lu  <hjl@gnu.org>
1695
1696         * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
1697         indirect symbols.
1698
1699 2001-05-09  H.J. Lu  <hjl@gnu.org>
1700
1701         * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
1702         versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
1703         Remove the unused veriable `dynver'.
1704
1705 2001-05-08  Ian Lance Taylor  <ian@zembu.com>
1706
1707         * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
1708         NULL or is not COFF.
1709         (coff_i386_rtype_to_howto): Don't dump core if output section
1710         owner is not COFF.
1711
1712 2001-05-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1713
1714         * ecoff.c (bfd_debug_section): Fix initialization.
1715         * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
1716         is always a positive integer. Cast away sign mismatch.
1717         * elf32-mips.c: Fix misleading comment and typo.
1718         (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
1719         correct data type.
1720         * elflink.c: Fix typo.
1721         (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
1722         * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
1723
1724 2001-05-04  Richard Henderson  <rth@redhat.com>
1725
1726         * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
1727
1728 2001-05-04  Nick Clifton  <nickc@cambridge.redhat.com>
1729
1730         * elf32-arm.h (elf32_arm_final_link_relocate): Set
1731         EF_ARM_HASENTRY if the start address is set.
1732
1733 2001-05-03  Nick Clifton  <nickc@cambridge.redhat.com>
1734
1735         * targets.c (_bfd_target_vector_entries): Compute value based on
1736         the size of the _bfd_target_vector and not bfd_target_vector.
1737
1738 2001-05-03  H.J. Lu  <hjl@gnu.org>
1739
1740         * elfcode.h: Include "libiberty.h".
1741
1742         * elflink.h (elf_link_add_object_symbols): Set
1743         elf_dt_name (abfd) to basename of the bfd filename.
1744         (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
1745         of the bfd filename.
1746
1747 2001-05-03  Andreas Jaeger  <aj@suse.de>
1748
1749         * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
1750         (elf_generic_info_to_howto_rel): Likewise.
1751         * coff-alpha.c (reloc_nil): Likewise.
1752         (alpha_ecoff_bad_format_hook): Likewise.
1753         (alpha_adjust_reloc_out): Likewise.
1754         (alpha_bfd_reloc_type_lookup): Likewise.
1755         (alpha_convert_external_reloc): Likewise.
1756         * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
1757         (elf64_alpha_reloc_bad): Likewise.
1758         (elf64_alpha_reloc_gpdisp): Likewise.
1759         (elf64_alpha_bfd_reloc_type_lookup): Likewise.
1760         (elf64_alpha_info_to_howto): Likewise.
1761         (elf64_alpha_add_symbol_hook): Likewise.
1762         (elf64_alpha_create_got_section): Likewise.
1763         (elf64_alpha_is_local_label_name): Likewise.
1764         (elf64_alpha_merge_ind_symbols): Likewise.
1765         * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
1766         (mips_elf64_get_reloc_upper_bound): Likewise.
1767         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
1768         (nlm_alpha_get_public_offset): Likewise.
1769
1770 2001-05-02  Johan Rydberg  <jrydberg@opencores.org>
1771
1772         * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
1773         about overflow in R_OPENRISC_LO_16_IN_INSN and
1774         R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
1775
1776 2001-04-30  H.J. Lu  <hjl@gnu.org>
1777
1778         * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
1779         only for ELF_LINK_FORCED_LOCAL.
1780         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1781         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
1782         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1783
1784         * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
1785         if the symbol has hidden or internal visibility.
1786
1787 2001-04-30  Alan Modra  <amodra@one.net.au>
1788
1789         * elf32-hppa.c (final_link_relocate): Branch to .+8 for
1790         calls to undefined weak symbols.
1791
1792 2001-04-30  Andreas Jaeger  <aj@suse.de>, Andreas Schwab <schwab@suse.de>
1793
1794         * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
1795         R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
1796
1797 2001-04-27  Andreas Jaeger  <aj@suse.de>
1798
1799         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
1800         out handled entries.
1801         (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
1802         (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
1803         (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
1804         GOT32.
1805
1806 2001-04-27  Sean McNeil <sean@mcneil.com>
1807
1808         * config.bfd: Add arm-vxworks target.
1809         * coff-arm (coff_arm_relocate_section): Add in symbol value to
1810         addend (fro VXworks targets).
1811
1812 2001-04-26  H.J. Lu  <hjl@gnu.org>
1813
1814         * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
1815         valid.
1816
1817 2001-04-25  Frank Ch. Eigler  <fche@redhat.com>
1818
1819         * bfd-in.h (bfd_cache_close): Declare newly exported function.
1820         * bfd-in2.h: Regenerated.
1821
1822 2001-04-24  Jakub Jelinek  <jakub@redhat.com>
1823
1824         * merge.c (struct sec_merge_hash_entry): Add alignment field.
1825         (struct sec_merge_hash): Remove alignment_power.
1826         (sec_merge_hash_newfunc): Clear alignment.
1827         (sec_merge_hash_lookup): Pass alignment as argument.
1828         Use hashp->root.next, not hashp->next to walk the hash chain.
1829         If a string already in the hashtable does not have required
1830         alignment, create a new hashtable entry.
1831         (sec_merge_init): Remove alignment_power argument.
1832         (sec_merge_add): Add alignment argument.
1833         (sec_merge_emit): Alignment is now a per-entity thing, not per
1834         section.
1835         (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
1836         for proper alignment.
1837         Pass alignment information to sec_merge_add.
1838
1839 2001-04-24  Christian Groessler  <cpg@aladdin.de>
1840
1841         * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
1842         and R_REL16 reloc types; accept odd values for R_REL16 type
1843
1844 2001-04-24  Johan Rydberg  <jrydberg@opencores.org>
1845
1846         * cpu-openrisc.c: New file.
1847         * elf32-openrisc.c: Likewise.
1848
1849         * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
1850         (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
1851         (BFD32_BACKENDS): Add elf32-openrisc.lo.
1852         (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
1853         (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
1854         * Makefile.in: Regenerated.
1855         * config.bfd: (openrisc-*-elf): New target.
1856         * configure.in (bfd_elf32_openrisc_vec): New vector.
1857         * configure: Regenerated.
1858         * libbfd.h: Regenerated.
1859         * bfd-in2.h: Regenerated.
1860         * reloc.c: Add OpenRISC relocations.
1861         * targets.c (bfd_elf32_openrisc_vec): Declare.
1862         (bfd_target_vect): Add bfd_elf32_openrisc_vec.
1863         * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
1864         (bfd_openrisc_arch): Declare.
1865         (bfd_archures_list): Add bfd_openrisc_arch.
1866         * elf.c (prep_headers): Add bfd_arch_openrisc.
1867
1868 2001-04-23  Bo Thorsen  <bo@suse.de>
1869
1870         * elf64-x86-64.c: Add c++ vtable hack.
1871         Small whitespace and comment changes.
1872
1873 2001-04-19  Andreas Jaeger  <aj@suse.de>
1874
1875         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
1876         (elf64_x86_64_plt_entry): Likewise.
1877         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
1878         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
1879
1880 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
1881
1882         * elf32-cris.c: Tweak comments related to dynamic linking.
1883         (cris_elf_relocate_section): When not creating shared object, fill
1884         in the .got table for any symbol not in the dynamic symbol table.
1885         (elf_cris_finish_dynamic_symbol): When not creating shared object,
1886         only emit a .got.rela reloc if the symbol is in the dynamic symbol
1887         table.
1888         (cris_elf_check_relocs): Use variable r_type in all places rather
1889         than the original expression.  Add default case in switch for
1890         reloc types.
1891         (elf_cris_size_dynamic_sections): Iterate over
1892         elf_cris_discard_excess_program_dynamics when not creating shared
1893         library.
1894         (elf_cris_discard_excess_dso_dynamics): Renamed from
1895         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
1896         (elf_cris_discard_excess_program_dynamics): New.
1897
1898 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
1899
1900         * coffcode.h (coff_write_object_contents): Use
1901         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
1902
1903 2001-04-14  H.J. Lu  <hjl@gnu.org>
1904
1905         * bfd-in2.h: Regenerate.
1906
1907 2001-04-14  Jakub Jelinek <jakub@redhat.com>
1908
1909         * section.c (STD_SECTION): Add entsize.
1910
1911 2001-04-13  H.J. Lu  <hjl@gnu.org>
1912
1913         * section.c (SEC_MERGE): Define new flag for merging.
1914         (SEC_STRINGS): Likewise.
1915         (entsize): New field.
1916
1917 2001-04-13  Roger Sayle  <roger@metaphorics.com>
1918
1919         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
1920         flag on pe-i386 targets.
1921
1922 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
1923
1924         * libbfd-in.h (_bfd_merge_section): New.
1925         (_bfd_write_merged_section): New.
1926         (_bfd_merged_section_offset): New.
1927         * libbfd.h: Rebuilt.
1928         * linker.c (_bfd_generic_link_output_symbols): Handle
1929         discard_sec_merge.
1930         * aoutx.h (aout_link_write_symbols): Likewise.
1931         * pdp11.c (aout_link_write_symbols): Likewise.
1932         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
1933         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
1934         sections.
1935         (elf_link_sec_merge_syms): New.
1936         (elf_link_input_bfd): Call _bfd_merged_section_offset
1937         and _bfd_write_merged_section.
1938         Handle discard_sec_merge.
1939         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
1940         field.
1941         (struct bfd_elf_section_data): Likewise.
1942         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
1943         SEC_STRINGS section flags and entsize from their ELF counterparts.
1944         (_bfd_elf_link_hash_table_init): Initialize merge_info.
1945         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
1946         from their BFD counterparts.
1947         * merge.c: New file.
1948         * Makefile.am: Add strtab.lo.
1949         * Makefile.in: Rebuilt.
1950
1951 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
1952
1953         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
1954         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
1955
1956 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
1957
1958         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
1959         endian MIPS ELF target.
1960         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
1961         MIPS ELF target.
1962
1963         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
1964         64bit big endian MIPS ELF target.
1965         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1966         endian MIPS ELF target.
1967         * configure: Regenerated.
1968
1969         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
1970         little endian targets.
1971         (mips_elf_sym_is_global): Handle traditional targets.
1972
1973         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
1974         64bit big endian MIPS ELF target.
1975         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
1976         endian MIPS ELF target.
1977
1978         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
1979         and bfd_elf64_tradlittlemips_vec.
1980
1981 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
1982
1983         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
1984         ordinary "progbits" section.
1985
1986 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
1987
1988         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
1989         when -Bsymbolic causes a symbol to no longer need a .plt entry.
1990
1991 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
1992
1993         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
1994
1995 2001-03-30  H.J. Lu  <hjl@gnu.org>
1996
1997         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
1998         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
1999
2000 2001-03-26  H.J. Lu  <hjl@gnu.org>
2001
2002         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
2003         if there are any relocations for generic ELF.
2004         (bfd_elf32_bfd_link_add_symbols): Defined to
2005         elf32_generic_link_add_symbols.
2006         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
2007         if there are any relocations for generic ELF.
2008         (bfd_elf64_bfd_link_add_symbols): Defined to
2009         elf64_generic_link_add_symbols.
2010
2011 2001-03-23  Nick Clifton  <nickc@redhat.com>
2012
2013         * Makefile.am (BUILD_CFILES): New variable: List of C source
2014         files created in build directory.
2015         (BUILD_HFILES): New variable: List of header files created in
2016         build directory.
2017         (POTFILES): Delete.
2018         (po/POTFILES.in): Replace rule with empty entry.
2019         (po/SRC-POTFILES.in): New rule: Create a list of source files
2020         in the source directory.
2021         (po/BLD-POTFILES.in): New rule: Create a list of source files
2022         in the build directory.
2023         (MOSTLYCLEAN): Do not delete source files created in build
2024         directory.
2025         * Makefile.in: Regenerate.
2026         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
2027         into po/Makefile.
2028         * configure: Regenerate.
2029
2030         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
2031         and BLD_POTFILES.
2032         Add .. to the search path when building bfd.pot.
2033         Delete POTFILES when performing distclean.
2034         Add comment describing why distclean is broken in maintainer mode.
2035         * po/POTFILES.in: Delete.
2036         * po/SRC-POTFILES.in: New file.
2037         * po/BLD-POTFILES.in: New file.
2038         * po/bfd.pot: Regenerate.
2039
2040 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
2041
2042         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
2043         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
2044         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
2045         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
2046         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
2047         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
2048         functions.
2049         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
2050         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
2051         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
2052         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
2053         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
2054         New HOWTO members for new relocs.
2055         (cris_reloc_map): Map new relocs.
2056         (ELF_DYNAMIC_INTERPRETER): Define.
2057         (PLT_ENTRY_SIZE): Define.
2058         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
2059         elf_cris_pic_plt_entry): New, PLT templates.
2060         (struct elf_cris_pcrel_relocs_copied, struct
2061         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
2062         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
2063         (cris_final_link_relocate): Check that 16-bit GOT relocs have
2064         positive values.  Adjust PCREL relocs to be relative to location
2065         after relocation.
2066         (cris_elf_relocate_section): Handle relocations to dynamic
2067         objects.  Handle new relocations.  Call error handler when seeing
2068         non-PIC relocation for read-only sections while generating shared
2069         object.
2070         (cris_elf_check_relocs): Set reference counts for GOT and PLT
2071         entries.
2072         (bfd_elf32_bfd_link_hash_table_create,
2073         elf_backend_adjust_dynamic_symbol,
2074         elf_backend_size_dynamic_sections,
2075         elf_backend_finish_dynamic_symbol,
2076         elf_backend_finish_dynamic_sections,
2077         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
2078         elf_backend_hide_symbol, elf_backend_want_got_plt,
2079         elf_backend_plt_readonly, elf_backend_want_plt_sym,
2080         elf_backend_got_header_size, elf_backend_plt_header_size):
2081         Define.
2082
2083         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
2084         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
2085         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
2086         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
2087         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
2088         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
2089         * bfd-in2.h, libbfd.h: Regenerate.
2090
2091 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
2092
2093         (_bfd_mips_elf_relocate_section): Give a better error message when
2094         a relocation is not recognized.
2095
2096 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
2097
2098         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
2099         non-NULL before attempting to dereference.
2100
2101 2001-03-20  H.J. Lu  <hjl@gnu.org>
2102
2103         * configure.in: Remove the redundent AC_ARG_PROGRAM.
2104         * configure: Rebuild.
2105
2106 2001-03-20  Andreas Schwab  <schwab@suse.de>
2107
2108         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
2109         relocation value when resolving a reference from a debugging
2110         section.
2111
2112 2001-03-16  Scott Thomason  <SThomaso@hii.com>
2113
2114         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
2115         (xcoff64_swap_sym_out): Fix syntax errors.
2116
2117 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
2118
2119         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
2120
2121 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
2122
2123         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
2124         (hppa_link_hash_newfunc): Init it.
2125         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
2126         section appears to be non-PIC.
2127         (final_link_relocate): Likewise.
2128         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
2129         possible candidate function, and set pic_call for those that will
2130         only have a .plt entry for the PIC call stub.
2131         (hppa_handle_PIC_calls): Set maybe_pic_call.
2132
2133 2001-03-12  DJ Delorie  <dj@redhat.com>
2134
2135         * elf32-sh.c (sh_elf_relocate_section): Only relocation
2136         R_SH_DIR8WP* relocs if they're against external symbols, else
2137         they're just for relaxing.  Validate the reloc values.
2138
2139 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
2140
2141         * binary.c (bfd_external_binary_architecture): Declare.
2142         (binary_object_p): If bfd_external_binary_architecture is defined,
2143         set the architecture to this string.
2144
2145 2001-03-11  Philip Blundell  <philb@gnu.org>
2146
2147         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
2148         entries that could serve as a definition for a weak symbol.
2149
2150 2001-03-08  Nick Clifton  <nickc@redhat.com>
2151
2152         * Most files: Update copyright notices using Perl script created
2153         by Kevin Buettner <kevinb@redhat.com>.
2154
2155 2001-03-07  Nick Clifton  <nickc@redhat.com>
2156
2157         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
2158         prior patch on ! defined OLD_ARM_ABI.
2159
2160 2001-03-07  Andreas Jaeger  <aj@suse.de>
2161
2162         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
2163         some relocation values.
2164
2165 2001-03-06  Nick Clifton  <nickc@redhat.com>
2166
2167         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
2168         of offset in BLX(1) instruction.
2169         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
2170         offset in BLX(1) instruction.
2171         Fix formatting.
2172
2173 2001-03-06  Nick Clifton  <nickc@redhat.com>
2174
2175         * coff-arm.c (coff_arm_reloc_type_lookup): Add
2176         BFD_RELOC_THUMB_PCREL_BLX.
2177
2178 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
2179
2180         * archures.c (bfd_default_scan): Add Coldfire CPUs.
2181         * bfd-in2.h: Regenerate.
2182         * cpu-m68k.c: Add Coldfire CPUs for arch table.
2183         * ieee.c (ieee_write_processor): Set proper id for
2184         Coldfire CPUs.
2185
2186 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
2187
2188         * configure.in: Add s390 target.
2189         * configure: Regenerate.
2190
2191 2001-02-28  Andreas Jaeger  <aj@suse.de>
2192
2193         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
2194         to addend.
2195
2196 2001-02-28  Philip Blundell  <pb@futuretv.com>
2197
2198         * elf32-arm.h: Update mentions of renamed EF_xx constants.
2199         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
2200
2201 2001-02-27  H.J. Lu  <hjl@gnu.org>
2202
2203         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
2204         abfd->tdata.aout_data == NULL.
2205
2206 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
2207
2208         * elf32-hppa.c: Correct field selector in stub comments.
2209         (clobber_millicode_symbols): Formatting fix.
2210
2211         * configure.in: Bump version to 2.11.90.
2212         * configure: Regenerate.
2213         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
2214         (CFILES): $SOURCE_CFILES + generated C files.
2215         (POTFILES): Include $HFILES not $SOURCE_HFILES.
2216         Run "make dep-am"
2217         * Makefile.in: Regenerate.
2218         * doc/Makefile.in: This too.
2219
2220 2001-02-26  Timothy Wall  <twall@cygnus.com>
2221
2222         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
2223         comments.
2224
2225 2001-02-26  Nick Clifton <nickc@redhat.com>
2226
2227         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
2228         up, replacing multiple if statements with a switch.
2229         (handle_COMDAT): New function.
2230
2231 2001-02-26  H.J. Lu  <hjl@gnu.org>
2232
2233         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
2234         a warning for section flags we do not handle instead of
2235         aborting.
2236
2237 2001-02-26  Andreas Jaeger  <aj@suse.de>
2238
2239         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
2240
2241 2001-02-22  Timothy Wall  <twall@cygnus.com>
2242
2243         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
2244         * configure.in: Add objects for elf64_ia64_aix vectors.
2245         * configure: Regenerated.
2246         * configure.host: Recognize ia64-*-aix*.
2247         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
2248         for AIX.  AIX5 requires most relocations to be dynamic (*all*
2249         binaries are somewhat similar to shared libraries).
2250         * targets.c: Add elf64_ia64_aix vectors.
2251
2252 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
2253
2254         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
2255         C8 said "1" instead of "8".  Clarify error string for IMM22:
2256         "signed integer" instead of just "integer".
2257
2258 2001-02-20  Andreas Jaeger  <aj@suse.de>
2259
2260         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
2261         PLT entries that could serve as a definition for a weak symbol.
2262
2263 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
2264
2265         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
2266         entries that could serve as a definition for a weak symbol.
2267         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
2268
2269 2001-02-18  David O'Brien  <obrien@FreeBSD>
2270
2271         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
2272         FreeBSD/i386-CURRENT differently until I can figure out the needed
2273         corefile changes.
2274         * configure: Regenerate.
2275         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
2276         FreeBSD/PowerPC, and FreeBSD/sparc64.
2277
2278 2001-02-18  lars brinkhoff  <lars@nocrew.org>
2279
2280         * Makefile.am: Add PDP-11 a.out target.
2281         * config.bfd: Likewise.
2282         * configure.in: Likewise.
2283         * targets.c: Likewise.
2284         * archures.c: Likewise.
2285         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
2286         * libbfd.h: Add PDP-11 relocations.
2287         * reloc.c: Likewise.
2288         * cpu-pdp11.c: New file.
2289         * pdp11.c: New file.
2290
2291         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
2292         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
2293         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
2294         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
2295         (GET_MAGIC): New macro.
2296         (PUT_MAGIC): Likewise.
2297         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
2298
2299 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
2300
2301         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
2302         multiarch needs it).
2303
2304 2001-02-18  H.J. Lu  <hjl@gnu.org>
2305
2306         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
2307         index.
2308
2309 2001-02-18  Kazu Hirata  <kazu@hxi.com>
2310
2311         * vms-misc.c: Fix formatting.
2312
2313 2001-02-16  Kazu Hirata  <kazu@hxi.com>
2314
2315         * vms.c: Fix formatting.
2316
2317 2001-02-14  H.J. Lu  <hjl@gnu.org>
2318
2319         * elf.c (elf_find_function): New function.
2320         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
2321         the file name and function name.
2322
2323 2001-02-14  Nick Clifton  <nickc@redhat.com>
2324
2325         * ecoff.c (bfd_debug_section): Update to initialise new fields in
2326         asection structure.
2327
2328         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
2329         (BFD64_BACKENDS): Add pepigen.c
2330         Add rules to create peigen.c and pepigen.c from peXXigen.c.
2331
2332         * Makefile.in: Regenerate.
2333         * configure:  Regenerate.
2334         * po/POTFILES.in: Regenerate.
2335         * po/bfd.pot: Regenerate.
2336
2337 2001-02-14  H.J. Lu  <hjl@gnu.org>
2338
2339         * libcoff-in.h (pe_tdata): Add members target_subsystem and
2340         force_minimum_alignment.
2341
2342 2001-02-14  Bo Thorsen  <bo@suse.de>
2343
2344         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
2345         (elf64_86_64_size_info): Struct added to fix a problem
2346         with the hashtable string entries.
2347         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
2348         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
2349         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
2350         remove the FIXME for this.
2351         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
2352         section. Also removed the FIXME for it.
2353         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
2354         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
2355         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
2356
2357 2001-02-13  Richard Henderson  <rth@redhat.com>
2358
2359         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
2360         and not user provided.
2361
2362 2001-02-13  Kazu Hirata  <kazu@hxi.com>
2363
2364         * vms.c (vms_print_symbol): Remove unreachable code.
2365
2366         * rs6000-core.c: Fix formatting.
2367
2368 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
2369
2370         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
2371         as _bfd_XXi_only_swap_filehdr_out.
2372         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
2373         pe->force_minimum_alignment to TRUE.
2374         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
2375         PEI_TARGET_SUBSYSTEM.
2376         (pe_print_private_bfd_data): Call
2377         _bfd_XX_print_private_bfd_data_common() instead of
2378         _bfd_pe_print_private_bfd_data_common().
2379         (pe_bfd_copy_private_bfd_data): Call
2380         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
2381         _bfd_pe_bfd_copy_private_bfd_data_common().
2382         (coff_bfd_copy_private_section_data): Define as
2383         _bfd_XX_bfd_copy_private_section_data instead of
2384         _bfd_pe_bfd_copy_private_section_data.
2385         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
2386         of a _bfd_pe_get_symbol_info.
2387
2388         * peigen.c: Delete.
2389
2390         * peXXigen.c: Renamed from peigen.c.
2391         (COFF_WITH_XX): Define this macro (will get expanded into
2392         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
2393         compiled as peigen.c or pepigen.c.
2394         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
2395         define the canonical PEP structures and definitions.
2396         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
2397         effect, enforce minimum file and section alignments.  If
2398         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
2399         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
2400         so, by default, this is a no-op).
2401
2402         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
2403         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
2404         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
2405         _bfd_pefoo if it's not defined.  Use these macros to define
2406         coff swap macros.
2407
2408         * libcoff.h (pe_tdata): Add members target_subsystem and
2409         force_minimum_alignment.
2410
2411         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
2412         COFF_WITH_pep.
2413         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
2414
2415         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
2416         peigen.lo.
2417
2418         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
2419         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
2420         PEPAOUTHDR.
2421
2422         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
2423         (BFD64_BACKENDS_CFILES): Mention pepigen.c
2424         (peigen.c): Add rule to generate from peXXigen.c.
2425         (pepigen.c): Ditto.
2426         (pepigen.lo): List dependencies for pepigen.lo.
2427
2428 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
2429
2430         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
2431         $global$ referenced but not defined, set its value here.
2432
2433 2001-02-09  Bo Thorsen  <bo@suse.de>
2434
2435         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
2436         alignment to 3.
2437         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
2438         and relocation.
2439         (elf64_x86_64_relocate_section): Fix formatting.
2440         (elf64_x86_64_relocate_section): Fix addend for relocation of
2441         R_X86_64_(8|16|32|PC8|PC16|PC32).
2442
2443 2001-02-12  Jan Hubicka  <jh@suse.cz>
2444
2445         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
2446
2447 2001-02-11  H.J. Lu  <hjl@gnu.org>
2448
2449         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
2450         alignment.
2451
2452 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2453
2454         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
2455         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
2456         relocations against dynsym symbols.
2457
2458         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
2459         the R_MIPS_26 relocation.
2460         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
2461         the R_MIPS_26 relocation.
2462         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
2463         relocation.
2464         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
2465         the R_MIPS_26 relocation.
2466         (mips_elf64_howto_table_rela): Likewise.
2467
2468         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
2469         member to mark symbols that have non-CALL relocations against
2470         them.
2471         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
2472         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
2473         R_MIPS_GOT16.
2474         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
2475         non-CALL relocation against it is encountered.
2476         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
2477         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
2478         no_fn_stub is not set.
2479
2480         * elf32-mips.c (mips_elf_output_extsym): Get the output section
2481         information from the real symbol for indirect ones.
2482         Check no_fn_stub to find out if a symbol has a function stub
2483         indeed.
2484
2485 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2486
2487         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
2488         * Makefile.in: Regenerate.
2489
2490 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
2491
2492         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
2493         true if section name is an unwind table section name.
2494         (elfNN_ia64_additional_program_headers): Count each unwind section
2495         separately.
2496         (elfNN_ia64_modify_segment_map): Install one unwind program header
2497         for each unwind separate section.  Note: normally the linker
2498         script merges the unwind sections that go into a single segment,
2499         so this still generates at most one unwind program header per
2500         segment.
2501
2502         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
2503         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
2504         (elfNN_ia64_fake_sections): Mark sections with names that start
2505         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
2506         unwind section.
2507
2508         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
2509         Use it to make sh_info in unwind section point to the text section
2510         it applies to.
2511
2512 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2513
2514         * Makefile.am: Add linux target for S/390.
2515         * archures.c: Likewise.
2516         * bfd-in2.h: Likewise.
2517         * config.bfd: Likewise.
2518         * configure.in: Likewise.
2519         * elf.c: Likewise.
2520         * libbfd.h: Likewise.
2521         * targets.c: Likewise.
2522         * cpu-s390.c: New file.
2523         * elf32-s390.c: New file.
2524         * elf64-s390.c: New file.
2525
2526 2001-02-09  Nick Clifton  <nickc@redhat.com>
2527
2528         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
2529         ImageBase.  This has already been done by coff_swap_hdr_in.
2530
2531 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2532
2533         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
2534
2535 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2536
2537         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
2538         (sparc64_elf_relocate_section): Likewise.
2539
2540 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
2541
2542         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
2543         similar to R_SPARC_32.
2544         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
2545
2546 2001-02-08  H.J. Lu  <hjl@gnu.org>
2547
2548         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
2549         relocation entries for weak definitions when building DSO with
2550         -Bsymbolic.
2551
2552 2001-02-08  Richard Henderson  <rth@redhat.com>
2553
2554         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
2555         before visibility.  Locally defined protected symbols are not
2556         dynamic.
2557
2558 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
2559
2560         * config.bfd: Enable coff64 for rs6000-*.  Patch from
2561         <hzoli@austin.ibm.com>.
2562
2563 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
2564
2565         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
2566         found, do not attempt to find dwarf2 info before returning.
2567
2568 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
2569
2570         * elflink.h (is_global_symbol_definition): Rename to
2571         is_global_data_symbol_definition and have it reject function
2572         symbols.
2573         (elf_link_is_defined_archive_symbol): Use renamed function.
2574
2575 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
2576
2577         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
2578         * libbfd.h (bfd_target_vector): Likewise.
2579         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
2580         make static; create pointer reference named bfd_target_vector.
2581         (_bfd_target_vector_entries): Calculate this based on the array
2582         typed _bfd_target_vector.
2583
2584 2001-02-06  H.J. Lu  <hjl@gnu.org>
2585
2586         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
2587         internal symbols are not dynamic.
2588         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
2589
2590 2001-02-06  Nick Clifton  <nickc@redhat.com>
2591
2592         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
2593         that it will not be pulled into the list of files that make up
2594         po/POTFILES.in.
2595         * Makefile.in: Regenerate.
2596         * po/bfd.pot:  Regenerate.
2597
2598 2001-02-06  H.J. Lu  <hjl@gnu.org>
2599
2600         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
2601         checking.
2602         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
2603         external_PEI_IMAGE_hdr.
2604
2605 2001-02-06  Kazu Hirata  <kazu@hxi.com>
2606
2607         * elf-m10200.c: Fix formatting.
2608
2609 2001-02-04  Nick Clifton  <nickc@redhat.com>
2610
2611         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
2612         rel, it will be handled later on.
2613
2614 2001-02-02  Fred Fish  <fnf@ninemoons.com>
2615
2616         * Makefile.in: Fix typo.
2617
2618 2001-02-01  Kazu Hirata  <kazu@hxi.com>
2619
2620         * elf-m10300.c: Fix formatting.
2621
2622 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
2623
2624         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
2625         (elf_backend_get_symbol_type): Define.
2626         (elf64_hppa_object_p): Set architecture and machine from elf
2627         header flags.
2628
2629 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
2630
2631         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
2632         before mdebug.
2633
2634 2001-01-26  Richard Henderson  <rth@redhat.com>
2635
2636         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
2637         for non-default visibility.
2638         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
2639         delete ugly macro and replace with pretty function.
2640
2641 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
2642
2643         * coff-go32.c: Update copyright.
2644         * coff-stgo32.c: Likewise.
2645         * coff-go32.c (COFF_LONG_FILENAMES): Define.
2646         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
2647         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
2648         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2649
2650 2001-01-25  Kazu Hirata  <kazu@hxi.com>
2651
2652         * bfd-in2.h: Rebuild.
2653         * libbfd.h: Likewise.
2654
2655 2001-01-23  H.J. Lu  <hjl@gnu.org>
2656
2657         * bfd-in2.h: Rebuild.
2658
2659 2001-01-23  H.J. Lu  <hjl@gnu.org>
2660
2661         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
2662         is NULL or PRIV(vms_rec) is outside of the buffer.
2663
2664 2001-01-23  Kazu Hirata  <kazu@hxi.com>
2665
2666         * coff64-rs6000.c: Fix formatting.
2667         * coff-arm.c: Likewise.
2668         * coffgen.c: Likewise.
2669         * cofflink.c: Likewise.
2670         * coff-mcore.c: Likewise.
2671         * coff-mips.c: Likewise.
2672         * coff-pmac.c: Likewise.
2673         * coff-ppc.c: Likewise.
2674         * coff-rs6000.c: Likewise.
2675         * elf32.c: Likewise.
2676         * elf32-fr30.c: Likewise.
2677         * elf32-i370.c: Likewise.
2678         * elf32-i860.c: Likewise.
2679         * elf32-m32r.c: Likewise.
2680         * elf32-m68k.c: Likewise.
2681         * elf32-mcore.c: Likewise.
2682         * elf32-ppc.c: Likewise.
2683         * elf32-sh.c: Likewise.
2684         * elf32-v850.c: Likewise.
2685         * elf64-alpha.c: Likewise.
2686         * elf64-sparc.c: Likewise.
2687         * elflink.c: Likewise.
2688         * elflink.h: Likewise.
2689         * elf-m10200.c: Likewise.
2690         * elf-m10300.c: Likewise.
2691         * elfxx-ia64.c: Likewise.
2692
2693         * aoutx.h: Fix formatting.
2694         * bfd.c: Likewise.
2695         * bfd-in2.h: Likewise.
2696         * bfd-in.h: Likewise.
2697         * cpu-i386.c: Likewise.
2698         * cpu-m68hc11.c: Likewise.
2699         * dwarf2.c: Likewise.
2700         * elf64-x86-64.c: Likewise.
2701         * format.c: Likewise.
2702         * freebsd.h: Likewise.
2703         * hash.c: Likewise.
2704         * hp300hpux.c: Likewise.
2705         * hppabsd-core.c: Likewise.
2706         * hpux-core.c: Likewise.
2707
2708 2001-01-22  Bo Thorsen  <bo@suse.de>
2709
2710         * elf64-x86-64.c: Added PIC support for X86-64.
2711         (elf64_x86_64_link_hash_newfunc): Function added.
2712         (elf64_x86_64_link_hash_table_create): Likewise.
2713         (elf64_x86_64_check_relocs): Likewise.
2714         (elf64_x86_64_gc_mark_hook): Likewise.
2715         (elf64_x86_64_gc_sweep_hook): Likewise.
2716         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2717         (elf64_x86_64_size_dynamic_sections): Likewise.
2718         (elf64_x86_64_discard_copies): Likewise.
2719         (elf64_x86_64_finish_dynamic_symbol): Likewise.
2720         (elf64_x86_64_finish_dynamic_sections): Likewise.
2721         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
2722
2723 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2724
2725         * Makefile.am (install-data-local): Make use of $(DESTDIR).
2726         * Makefile.in: Regenerate.
2727
2728 2001-01-21  Kazu Hirata  <kazu@hxi.com>
2729
2730         * coff-a29k.c: Fix formatting.
2731
2732 2001-01-19  H.J. Lu  <hjl@gnu.org>
2733
2734         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
2735         relocation section names.
2736         (elf_i386_relocate_section): Report files with bad relocation
2737         section names and return false.
2738
2739 2001-01-17  Bo Thorsen  <bo@suse.de>
2740
2741         * targets.c: Alphabetize list of xvecs.
2742
2743 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
2744
2745         * config.bfd: Add linux target variant for elfxx-hppa.
2746         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
2747         bfd_elf64_hppa_linux_vec.
2748         * configure: Regenerate.
2749         * elf64-hppa.c: Include elf64-target.h again to support linux
2750         target variant.
2751         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
2752         * elf32-hppa.c: Include elf32-target.h again to support linux
2753         target variant.
2754         (elf32_hppa_post_process_headers): New function.
2755         (elf_backend_post_process_headers): Define.
2756         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
2757         bfd_elf32_hppa_linux_vec.
2758
2759         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
2760         and data_segment_base fields.
2761         (elf32_hppa_link_hash_table_create ): Init them.
2762         (elf32_hppa_check_relocs): Update comments.
2763         (hppa_record_segment_addr): New function.
2764         (elf32_hppa_relocate_section): Call it.
2765         (final_link_relocate): Handle R_PARISC_SEGREL32.
2766         (elf32_hppa_final_link): New function.
2767         (bfd_elf32_bfd_final_link): Define to call it.
2768         (hppa_unwind_entry_compare): New function.
2769         * cache.c (bfd_open_file): Create files in write+read mode.
2770
2771         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
2772         SEGREL32 and numerous other relocs.  Change duplicate
2773         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
2774
2775         * opncls.c (bfd_fdopenr): Add parens like the comment says around
2776         O_ACCMODE.
2777
2778         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
2779         .plt entries for DT_INIT and DT_FINI.
2780         (elf32_hppa_finish_dynamic_sections): Remove special handling of
2781         DT_INIT and DT_FINI.
2782
2783         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
2784         offsets for stub .plt access if wide mode.  Check offset in range.
2785
2786 2001-01-13  Nick Clifton  <nickc@redhat.com>
2787
2788         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
2789         line.
2790
2791         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
2792         line.
2793
2794 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
2795
2796         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
2797         * configure: Regenerate.
2798
2799 2001-01-11  Peter Targett  <peter.targett@arccores.com>
2800
2801         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
2802         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
2803         * cpu-arc.c (arch_info_struct): Add entries for variants.
2804         (bfd_arc_arch) Set default to bfd_mach_arc_5.
2805         (arc_get_mach) Don't assume machine names prefixed arc- before
2806         testing.
2807         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
2808         selections.
2809         (arc_elf_final_write_processing) Likewise.
2810         (ELF_MACHINE_CODE) Use EM_ARC.
2811
2812 2001-01-10  Nick Clifton  <nickc@redhat.com>
2813
2814         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
2815
2816 2001-01-07  Philip Blundell  <philb@gnu.org>
2817
2818         * README: Replace `bug-gnu-utils@gnu.org' with
2819         `bug-binutils@gnu.org'.
2820
2821 2001-01-04  Kazu Hirata  <kazu@hxi.com>
2822
2823         * som.c: Fix formatting.
2824
2825 2001-01-03  Kazu Hirata  <kazu@hxi.com>
2826
2827         * ecoffswap.h: Fix formatting.
2828         * elf-bfd.h: Likewise.
2829         * elfarm-nabi.c: Likewise.
2830         * elfarm-oabi.c: Likewise.
2831         * elfcode.h: Likewise.
2832         * elfcore.h: Likewise.
2833         * elflink.c: Likewise.
2834         * elflink.h: Likewise.
2835         * elfxx-ia64.c: Likewise.
2836         * elfxx-target.h: Likewise.
2837         * libbfd.c: Likewise
2838         * linker.c: Likewise.
2839         * lynx-core.c: Likewise.
2840
2841 2001-01-02  Kazu Hirata  <kazu@hxi.com>
2842
2843         * pc532-mach.c: Fix formatting.
2844         * pe-arm.c: Likewise.
2845         * pe-i386.c: Likewise.
2846         * pe-mips.c: Likewise.
2847         * pe-ppc.c: Likewise.
2848         * pe-sh.c: Likewise.
2849         * pei-mips.c: Likewise.
2850         * pei-sh.c: Likewise.
2851         * peicode.h: Likewise.
2852         * ppcboot.c: Likewise.
2853         * ptrace-core.c: Likewise.
2854
2855 2001-01-01  Kazu Hirata  <kazu@hxi.com>
2856
2857         * reloc.c: Fix formatting.
2858         * riscix.c: Likewise.
2859         * rs6000-core.c: Likewise.
2860         * xcoff-target.h: Likewise.
2861
2862 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
2863
2864         * elfcode.h (elf_object_p): Also restore the bfd mach field on
2865         error, by calling bfd_default_set_arch_mach with incoming
2866         values.
2867
2868 2000-12-26  Kazu Hirata  <kazu@hxi.com>
2869
2870         * vaxnetbsd.c: Fix formatting.
2871         * versados.c: Likewise.
2872         * vms-gsd.c: Likewise.
2873         * vms-hdr.c: Likewise.
2874         * vms-misc.c: Likewise.
2875
2876 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
2877
2878         * archive.c (coff_write_armap): Don't write more than symbol_count
2879         `archive_member_file_ptr's.
2880
2881 2000-12-25  Kazu Hirata  <kazu@hxi.com>
2882
2883         * vms-tir.c: Fix formatting.
2884
2885 2000-12-23  Kazu Hirata  <kazu@hxi.com>
2886
2887         * vms.c: Fix formatting.
2888         * vms.h: Likewise.
2889
2890 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
2891
2892         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
2893
2894         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
2895
2896         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
2897         arithmetic.
2898
2899         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
2900
2901         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
2902
2903 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
2904
2905         * libbfd.c (bfd_get_bits): Added
2906         (bfd_put_bits): Likewise
2907         * bfd-in.h: Declared the above.
2908         * bfd-in2.h: Regenerated.
2909
2910 2000-12-20  Kazu Hirata  <kazu@hxi.com>
2911
2912         * targets.c: Fix formatting.
2913         * tekhex.c: Likewise.
2914         * trad-core.c: Likewise.
2915
2916 2000-12-19  Kazu Hirata  <kazu@hxi.com>
2917
2918         * sco5-core.c: Fix formatting.
2919         * section.c: Likewise.
2920         * sparclinux.c: Likewise.
2921         * sparclynx.c: Likewise.
2922         * sparcnetbsd.c: Likewise.
2923         * srec.c: Likewise.
2924         * stabs.c: Likewise.
2925         * stab-syms.c: Likewise.
2926         * sunos.c: Likewise.
2927         * syms.c: Likewise.
2928         * sysdep.h: Likewise.
2929
2930 2000-12-18  Nick Clifton  <nickc@redhat.com>
2931
2932         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
2933         defined.
2934         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
2935         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
2936
2937 2000-12-18  Nick Clifton  <nickc@redhat.com>
2938
2939         * vms-misc.c (_bfd_vms_get_record): Add default case to
2940         file_format switch.
2941
2942 2000-12-15  Miloslav Trmac <mitr@volny.cz>
2943
2944         * elfcore.h (elf_core_file_p): Move to the start of the program
2945         headers before attempting to read them.
2946
2947 2000-12-14  Kazu Hirata  <kazu@hxi.com>
2948
2949         * peigen.c: Fix formatting.
2950         * som.c: Likewise.
2951         * som.h: Likewise.
2952
2953 2000-12-13  Kazu Hirata  <kazu@hxi.com>
2954
2955         * peigen.c: Fix formatting.
2956
2957 2000-12-12  Jim Wilson  <wilson@redhat.com>
2958
2959         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
2960
2961 2000-12-08  Mark Salter  <msalter@redhat.com>
2962
2963         * binary.c (binary_set_section_contents): Ignore sections
2964         with zero size.
2965
2966 2000-12-12  Kazu Hirata  <kazu@hxi.com>
2967
2968         * m68klinux.c: Fix formatting.
2969         * m68knetbsd.c: Likewise.
2970         * mipsbsd.c: Likewise.
2971         * netbsd-core.c: Likewise.
2972         * netbsd.h: Likewise.
2973         * newsos3.c: Likewise.
2974         * nlm32-alpha.c: Likewise.
2975         * nlm32-i386.c: Likewise.
2976         * nlm32-ppc.c: Likewise.
2977         * nlm32-sparc.c: Likewise.
2978         * nlmcode.h: Likewise.
2979         * nlmswap.h: Likewise.
2980         * nlm-target.h: Likewise.
2981         * ns32knetbsd.c: Likewise.
2982
2983 2000-12-10  Fred Fish  <fnf@be.com>
2984
2985         * elflink.h (elf_link_output_extsym): Don't complain about undefined
2986         symbols in shared objects if allow_shlib_undefined is true.
2987
2988 2000-12-12  Nick Clifton  <nickc@redhat.com>
2989
2990         * cpu-sh.c: Fix formattng.
2991         * elf.c: Fix formattng.
2992         * elf32-mips.c: Fix formattng.
2993         * elf32-sh.c: Fix formattng.
2994         * elf64-alpha.c: Fix formattng.
2995
2996 2000-12-09  Nick Clifton  <nickc@redhat.com>
2997
2998         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
2999         dwarf2_find_line_info as last parameter to invocation of
3000         _bfd_dwarf2_find_nearest_line.
3001         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
3002         dwarf2_find_line_info as last parameter to invocation of
3003         _bfd_dwarf2_find_nearest_line.
3004
3005 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
3006
3007         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
3008         (BFD_LIBS): ...to here.
3009         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
3010         (BFD_LIBS_CFILES): ...to here.
3011         * Makefile.in: Regenerate.
3012         * configure.in: Remove dwarf.lo from the elf shell variable.
3013         * configure: Regenerate.
3014         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
3015         * libcoff.h: Regenerate.
3016         * coffgen.c (coff_find_nearest_line): Call
3017         _bfd_dwarf2_find_nearest_line.
3018         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
3019         accordingly.
3020         (read_abbrevs): Likewise
3021         (decode_line_info): Likewise.
3022         (parse_comp_unit): Likewise.
3023         (comp_unit_find_nearest_line): Likewise.
3024         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
3025         * libbfd.h: Regenerate.
3026         * elf.c (_bfd_elf_find_nearest_line): Update call.
3027         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
3028         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
3029         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
3030         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
3031         (styp_to_sec_flags): Handle DWARF2 sections.
3032         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
3033         to _bfd_find_nearest_line.
3034         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
3035         call to _bfd_find_nearest_line.
3036
3037 2000-12-08  Kazu Hirata  <kazu@hxi.com>
3038
3039         * coffgen.c: Fix formatting.
3040         * elf-m10300.c: Likewise.
3041         * elf32-i386.c: Likewise.
3042         * elf32-i960.c: Likewise.
3043         * elf32-m68k.c: Likewise.
3044         * elf32-mcore.c: Likewise.
3045         * elf32-ppc.c: Likewise.
3046         * elf32-sh.c: Likewise.
3047         * elf32-sparc.c: Likewise.
3048         * elf32-v850.c: Likewise.
3049         * elf64-alpha.c: Likewise.
3050         * elf64-hppa.c: Likewise.
3051         * elf64-mips.c: Likewise.
3052         * elf64-sparc.c: Likewise.
3053
3054 2000-12-07  Kazu Hirata  <kazu@hxi.com>
3055
3056         * elf32-ppc.c: Fix formatting.
3057         * elf64-x86-64.c: Likewise.
3058
3059 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
3060
3061         From  Ralf Baechle  <ralf@gnu.org>
3062
3063         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
3064         BFDs containing no sections or empty .text, .data or .bss sections
3065         to be merged, regardless of their flags.
3066
3067 2000-12-06  Kazu Hirata  <kazu@hxi.com>
3068
3069         * elf32-m32r.c: Fix formatting.
3070         * elf32-m68hc11.c: Likewise.
3071         * elf32-m68hc12.c: Likewise.
3072         * elf32-m68k.c: Likewise.
3073         * elf32-mcore.c: Likewise.
3074         * elf32-pj.c: Likewise.
3075         * elf32-ppc.c: Likewise.
3076
3077 2000-12-05  Kazu Hirata  <kazu@hxi.com>
3078
3079         * elf32-fr30.c: Fix formatting.
3080         * elf32-hppa.c: Likewise.
3081         * elf32-i370.c: Likewise.
3082         * elf32-i386.c: Likewise.
3083         * elf32-i860.c: Likewise.
3084         * elf32-i960.c: Likewise.
3085
3086 2000-12-03  Kazu Hirata  <kazu@hxi.com>
3087
3088         * elf32-arm.h: Fix formatting.
3089         * elf32-avr.c: Likewise.
3090         * elf32-cris.c: Likewise.
3091         * elf32-d10v.c: Likewise.
3092         * elf32-d30v.c: Likewise.
3093         * elf-hppa.h: Likewise.
3094         * elf-m10200.c: Likewise.
3095         * elf-m10300.c: Likewise.
3096
3097 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
3098
3099         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
3100         bfd_mach_mips32_4k.  Update FIXME comment.
3101         * archures.c (bfd_mach_mips32): New constant.
3102         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
3103         the latter, renumber it.
3104         * bfd-in2.h (bfd_mach_mips32): New constant.
3105         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
3106         the latter, renumber it.
3107         * cpu-mips.c (I_mips32): New constant.
3108         (I_mips4K, I_mips32_4k): Rename the former to the latter.
3109         (arch_info_struct): Add bfd_mach_mips32 entry, replace
3110         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
3111         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
3112         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
3113         with E_MIPS_MACH_MIPS32_4K.
3114         (_bfd_mips_elf_final_write_processing): Replace
3115         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
3116         bfd_mach_mips32 case.
3117         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
3118         comparison with support for MIPS32.
3119         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
3120         MIPS32.
3121
3122         * aoutx.h (NAME(aout,machine_type)): Add cases for
3123         bfd_mach_mips5 and bfd_mach_mips64.
3124         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
3125         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
3126         * cpu_mips.c (I_mips5, I_mips64): New definitions.
3127         (arch_info_struct): Add entries for bfd_mach_mips5 and
3128         bfd_mach_mips64.
3129         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
3130         _bfd_mips_elf_print_private_bfd_data): Add cases for
3131         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
3132         (_bfd_mips_elf_final_write_processing): Add cases for
3133         bfd_mach_mips5 and bfd_mach_mips64.
3134
3135         * aoutx.h (NAME(aout,machine_type)): Add a
3136         bfd_mach_mips_sb1 case.
3137         * archures.c (bfd_mach_mips_sb1): New constant.
3138         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
3139         * cpu-mips.c (I_sb1): New constant.
3140         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
3141         * elf32-mips.c (elf_mips_mach): Add case for
3142         E_MIPS_MACH_SB1.
3143         (_bfd_mips_elf_final_write_processing): Add case for
3144         bfd_mach_mips_sb1.
3145
3146 2000-12-01  Joel Sherrill <joel@OARcorp.com>
3147
3148         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
3149         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
3150         (sparc*-*-rtems*): Switched from a.out to ELF.
3151
3152 2000-11-30  Jan Hubicka  <jh@suse.cz>
3153
3154         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
3155         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
3156         (elf64-x86-64.lo): Add dependencies.
3157         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
3158         bfd_mach_x86_64_intel_syntax.
3159         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
3160         * config.bfd (x86_64): Add.
3161         * configure.in: Add support for bfd_elf64_x86_64_vec.
3162         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
3163         (bfd_i386_arch, i8086_ar): Link in.
3164         * elf64-x86-64.c: New file.
3165         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
3166         * targets.c (bfd_elf64_x86_64_vec): Add.
3167         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
3168
3169 2000-11-30  Kazu Hirata  <kazu@hxi.com>
3170
3171         * xcofflink.c: Fix formatting.
3172
3173 2000-11-28  Kazu Hirata  <kazu@hxi.com>
3174
3175         * aoutx.h: Fix formatting.
3176         * bfd-in.h: Likewise.
3177         * bfd-in2.h: Likewise.
3178         * cache.c: Likewise.
3179         * cisco-core.c: Likewise.
3180         * coff64-rs6000.c: Likewise.
3181         * coffcode.h: Likewise.
3182         * coffswap.h: Likewise.
3183         * corefile.c: Likewise.
3184         * elf32-mips.c: Likewise.
3185
3186 2000-11-27  Kazu Hirata  <kazu@hxi.com>
3187
3188         * aout-adobe.c: Fix formatting.
3189         * coff64-rs6000.c: Likewise.
3190         * coffgen.c: Likewise.
3191         * cofflink.c: Likewise.
3192
3193 2000-11-27  Philip Blundell  <pb@futuretv.com>
3194
3195         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
3196         (obj_coff_strings_written): New accessor macro for above.
3197         * libcoff.h: Regenerate.
3198         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
3199         strings.
3200         * coffcode.h (coff_write_object_contents): No need to write out
3201         the string table if it's already been done.
3202
3203 2000-11-22  Philip Blundell  <pb@futuretv.com>
3204
3205         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
3206         weak undefined symbols.
3207
3208 2000-11-24  Nick Clifton  <nickc@redhat.com>
3209
3210         * archures.c (bfd_mach_arm_5TE): Define.
3211         (bfd_mach_arm+XScale): Define.
3212         * bfd-in2.h: Regenerate.
3213
3214         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
3215         BFD_RELOC_ARM_PCREL_BLX.
3216
3217         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
3218         XScale machine numbers.
3219
3220         * config.bfd (xscale-elf): Add target.
3221         (xscale-coff): Add target.
3222
3223         * cpu-arm.c: Add xscale machine name.
3224         Add v5t, v5te and XScale machine numbers.
3225
3226 2000-11-23  Kazu Hirata  <kazu@hxi.com>
3227
3228         * aix386-core.c: Fix formatting.
3229
3230 2000-11-22  Jim Wilson  <wilson@redhat.com>
3231
3232         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
3233         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
3234         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
3235         (ins_imms_scaled): Initialize sign_bit at function entry.
3236         (elf64_ia64_operands): Add missing initializers.
3237         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
3238         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
3239         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
3240         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
3241         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
3242         parameters.
3243         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
3244         and free_extsyms at function entry.
3245         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
3246         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
3247         (get_got): Delete unused local srel.
3248         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
3249         (elfNN_ia64_relocate_section): Delete unused local dynindx.
3250
3251 2000-11-21  Kazu Hirata  <kazu@hxi.com>
3252
3253         * coff-a29k.c: Fix formatting.
3254         * coff-h8500.c: Likewise.
3255         * coff-i960.c: Likewise.
3256         * coff-ppc.c: Likewise.
3257         * coff-rs6000.c: Likewise.
3258         * coff-stgo32.c: Likewise.
3259         * coff-tic54x.c: Likewise.
3260         * coff-w65.c: Likewise.
3261         * cpu-h8500.c: Likewise.
3262         * cpu-hppa.c: Likewise.
3263         * cpu-ns32k.c: Likewise.
3264         * ecoff.c: Likewise.
3265         * ecofflink.c: Likewise.
3266
3267 2000-11-21  Nick Clifton  <nickc@redhat.com>
3268
3269         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
3270         remove possibility of infinite loop.
3271
3272 2000-11-20  Kazu Hirata  <kazu@hxi.com>
3273
3274         * aix386-core.c: Fix formatting.
3275         * aout-adobe.c: Likewise.
3276         * aout-arm.c: Likewise.
3277         * aout-encap.c: Likewise.
3278         * aout-ns32k.c: Likewise.
3279         * aout-target.h: Likewise.
3280         * aout-tic30.c: Likewise.
3281         * aoutf1.h: Likewise.
3282         * aoutx.h: Likewise.
3283         * archive.c: Likewise.
3284         * bfd-in.h: Likewise.
3285         * bfd-in2.h: Likewise.
3286         * bfd.c: Likewise.
3287         * bout.c: Likewise.
3288
3289 2000-11-17  H.J. Lu  <hjl@gnu.org>
3290
3291         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
3292         pltoff entries for DT_INIT and DT_FINI.
3293         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
3294         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
3295         entries.
3296
3297 2000-11-16  Richard Henderson  <rth@redhat.com>
3298
3299         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
3300         (allocate_dynrel_entries): Likewise.
3301         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
3302         (set_pltoff_entry): Likewise.
3303         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
3304         (elfNN_ia64_reloc_type_lookup): Likewise.
3305         (elfNN_ia64_install_value): Likewise.
3306         (elfNN_ia64_relocate_section): Likewise.
3307         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
3308         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
3309
3310 2000-11-16  Kazu Hirata  <kazu@hxi.com>
3311
3312         * cpu-a29k.c: Fix formatting.
3313         * cpu-alpha.c: Likewise.
3314         * cpu-arm.c: Likewise.
3315         * cpu-avr.c: Likewise.
3316         * cpu-d10v.c: Likewise.
3317         * cpu-h8500.c: Likewise.
3318         * cpu-hppa.c: Likewise.
3319         * cpu-i370.c: Likewise.
3320         * cpu-i386.c: Likewise.
3321         * cpu-i960.c: Likewise.
3322         * cpu-ia64-opc.c: Likewise.
3323         * cpu-ia64.c: Likewise.
3324         * cpu-m32r.c: Likewise.
3325         * cpu-m68hc11.c: Likewise.
3326         * cpu-m68hc12.c: Likewise.
3327         * cpu-m68k.c: Likewise.
3328         * cpu-m88k.c: Likewise.
3329         * cpu-mips.c: Likewise.
3330         * cpu-ns32k.c: Likewise.
3331         * cpu-pj.c: Likewise.
3332         * cpu-powerpc.c: Likewise.
3333         * cpu-sh.c: Likewise.
3334         * cpu-sparc.c: Likewise.
3335         * cpu-tic54x.c: Likewise.
3336         * cpu-v850.c: Likewise.
3337         * cpu-vax.c: Likewise.
3338         * cpu-w65.c: Likewise.
3339         * cpu-we32k.c: Likewise.
3340         * cpu-z8k.c: Likewise.
3341         * dwarf1.c: Likewise.
3342         * dwarf2.c: Likewise.
3343
3344 2000-11-15  Kazu Hirata  <kazu@hxi.com>
3345
3346         * coff-arm.c: Fix formatting.
3347         * coff-ppc.c: Likewise.
3348         * coff-rs6000.c: Likewise.
3349         * coff-sh.c: Likewise.
3350         * coff-sparc.c: Likewise.
3351         * coff-tic30.c: Likewise.
3352         * coff-tic54x.c: Likewise.
3353         * coff-tic80.c: Likewise.
3354         * coff-w65.c: Likewise.
3355         * coff-we32k.c: Likewise.
3356         * coff-z8k.c: Likewise.
3357
3358 2000-11-15  Richard Henderson  <rth@redhat.com>
3359
3360         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
3361         section with the same ALLOC|LOAD flags as the source section.
3362
3363 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
3364
3365         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
3366         by STO_ALPHA constants.
3367
3368 2000-11-14  Kazu Hirata  <kazu@hxi.com>
3369
3370         * coff-pmac.c: Fix formatting.
3371         * coff-ppc.c: Likewise.
3372
3373 2000-11-13  H.J. Lu  <hjl@gnu.org>
3374
3375         * elflink.h (elf_link_add_object_symbols): Also add indirect
3376         symbols for common symbols with the default version.
3377
3378 2000-11-09  Philip Blundell  <pb@futuretv.com>
3379
3380         * section.c (STD_SECTION): Set gc_mark flag.
3381
3382 2000-11-11  Kazu Hirata  <kazu@hxi.com>
3383
3384         * coff-i960.c: Likewise.
3385         * coff-m68k.c: Likewise.
3386         * coff-m88k.c: Likewise.
3387         * coff-mcore.c: Likewise.
3388         * coff-mips.c: Likewise.
3389
3390 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
3391
3392         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
3393
3394 2000-11-10  Kazu Hirata  <kazu@hxi.com>
3395
3396         * coff-h8300.c: Fix formatting.
3397         * coff-h8500.c: Likewise.
3398         * coff-i386.c: Likewise.
3399         * coff-i860.c: Likewise.
3400         * coff-i960.c: Likewise.
3401         * coff-ia64.c: Likewise.
3402
3403 2000-11-09  Kazu Hirata  <kazu@hxi.com>
3404
3405         * archive.c: Fix formatting.
3406         * archures.c: Likewise.
3407
3408 2000-11-07  Richard Henderson  <rth@redhat.com>
3409
3410         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
3411         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
3412         * section.c (bfd_set_section_contents): Call memcpy if
3413         section->contents set and location not equal to contents plus offset.
3414
3415 2000-11-08  Kazu Hirata  <kazu@hxi.com>
3416
3417         * bfd-in.h: Fix formatting.
3418         * bfd-in2.h: Likewise.
3419         * bfd.c: Likewise.
3420         * binary.c: Likewise.
3421         * bout.c: Likewise.
3422         * coff-a29k.c: Likewise.
3423         * coff-alpha.c: Likewise.
3424         * coff-apollo.c: Likewise.
3425         * coff-aux.c: Likewise.
3426
3427 2000-11-07  Kazu Hirata  <kazu@hxi.com>
3428
3429         * aix386-core.c: Fix formatting.
3430         * aoutf1.h: Likewise.
3431         * aoutx.h: Likewise.
3432         * archures.c: Likewise.
3433         * armnetbsd.c: Likewise.
3434
3435 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
3436
3437         * coff-h8300.c (special): Adjust reloc address.
3438
3439 2000-11-06  Steve Ellcey <sje@cup.hp.com>
3440
3441         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
3442         to differentiate elf32 and elf64 on ia64.
3443         * bfd-in2.h: Regenerate.
3444         * config.bfd: Add target for "ia64*-*-hpux*".
3445         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
3446         * configure: Regenerate.
3447         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
3448         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
3449
3450         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
3451         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
3452         * Makefile.in: Regnerate.
3453         * elf64-ia64.c: Deleted.
3454         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
3455
3456 2000-11-06  Kazu Hirata  <kazu@hxi.com>
3457
3458         * aout-adobe.c: Fix formatting.
3459         * aout-arm.c: Likewise.
3460         * aout-cris.c: Likewise.
3461         * aout-encap.c: Likewise.
3462         * aout-ns32k.c: Likewise.
3463         * aout-target.h: Likewise.
3464         * aout-tic30.c: Likewise.
3465
3466 2000-11-05  Philip Blundell  <philb@gnu.org>
3467
3468         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
3469         BFDs containing no sections to be merged, regardless of their flags.
3470
3471 2000-11-04  Philip Blundell  <philb@gnu.org>
3472
3473         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
3474         if a relocation for an undefined symbol also results in an
3475         overflow.
3476
3477 2000-11-06  Christopher Faylor <cgf@cygnus.com>
3478
3479         * config.bfd: Add support for Sun Chorus.
3480
3481 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
3482
3483         * configure.in: Recognize alpha-*-freebsd*.
3484         * configure: Regenerate.
3485
3486 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
3487
3488         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
3489         (Chunk): New global variable set by a parameter in objcopy.c.
3490         (S3Forced): New global variable set by a parameter in
3491         objcopy.c.
3492         (srec_set_section_contents): If S3Forced is true, always generate
3493         S3 records.
3494         (srec_write_section): Use 'Chunk' to limit maximum length of S
3495         records.
3496
3497 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
3498
3499         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
3500         * Makefile.in: Regenerate.
3501         * bfd-in2.h: Regenerate.
3502         * po/bfd.pot: Regenerate.
3503
3504 2000-10-31  Philip Blundell  <philb@gnu.org>
3505
3506         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
3507         EF_SOFT_FLOAT if it is defined.
3508
3509 2000-10-27  Philip Blundell  <philb@gnu.org>
3510
3511         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
3512         attempts to mix PIC code with non-PIC, just mark the output as
3513         being position dependent.
3514         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
3515         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
3516         all mismatches, not just the first one.
3517
3518 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
3519
3520         * ieee.c (ieee_archive_p): Plug one of many possible
3521         memory leaks in error handling.
3522
3523 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
3524
3525         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
3526         elf32_sparc_object_p, elf32_sparc_final_write_processing):
3527         Support v8plusb.
3528         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
3529         sparc64_elf_object_p): Support v9b.
3530         * archures.c: Declare v8plusb and v9b machines.
3531         * bfd-in2.h: Ditto.
3532         * cpu-sparc.c: Ditto.
3533
3534 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
3535
3536         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
3537         of a GOT reloc.
3538
3539         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
3540         (SYMBOL_CALLS_LOCAL): New macro.
3541         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
3542         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
3543         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
3544         (ppc_elf_relocate_section): Use flag variable to determine
3545         whether the relocation refers to a local symbol.
3546         Test whether a PLTREL24 reloc will produce a reloc by looking
3547         to see whether a PLT entry was made.
3548
3549 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
3550
3551         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
3552         entries that could serve as a definition for a weak symbol.
3553
3554 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
3555
3556         From  Ralf Baechle  <ralf@gnu.org>
3557
3558         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
3559         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
3560         against local symbols.
3561         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
3562
3563 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
3564
3565         * section.c (struct sec): Add kept_section.
3566         (struct bfd_comdat_info): Remove sec, we can use above.
3567         (STD_SECTION): Add initializer.
3568         (bfd_make_section_anyway): Init here too.
3569
3570         * bfd-in2.h: Regenerate.
3571
3572         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
3573         zeroing of `flags'.
3574         (elf_link_input_bfd): Set all asection->symbol->value's here, and
3575         fudge values for discarded link-once section symbols.
3576
3577         * elf64-hppa.c: Include alloca-conf.h
3578
3579 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
3580
3581         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
3582
3583         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
3584
3585 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
3586
3587         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
3588
3589 2000-10-10  Tom Rix <trix@redhat.com>
3590
3591         * section.c (bfd_make_section_anyway): Release newsect ptr when
3592         newsect->symbol fails to alloc.  Use bfd_release instead of free.
3593
3594 2000-10-09  Richard Henderson  <rth@cygnus.com
3595
3596         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
3597         (elf64_ia64_unwind_entry_compare): New.
3598         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
3599
3600 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
3601
3602         * elflink.h (size_dynamic_sections): Don't create various tags if
3603         .dynstr is excluded from the link.  Don't set first dynsym entry
3604         if dynsymcount is zero.
3605         (elf_bfd_final_link): Don't try to swap out dynamic syms if
3606         .dynsym excluded from the link.  Don't try to write any dynamic
3607         sections excluded from the link.
3608
3609         * elf.c (swap_out_syms): Handle global section symbols.
3610
3611 2000-10-05  DJ Delorie  <dj@redhat.com>
3612
3613         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
3614         * coffcode.h (coff_set_alignment_hook): read extended reloc count
3615         (coff_write_relocs): write extended reloc count
3616         (coff_write_object_contents): account for extended relocs
3617
3618 2000-10-05  Jim Wilson  <wilson@cygnus.com>
3619
3620         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
3621         field.
3622         * elf.c (_bfd_elf_make_section_from_shdr): Call the
3623         elf_backend_section_flags function.
3624         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
3625         code.
3626         (elf64_ia64_section_flags): New function containing flag conversion
3627         code.
3628         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
3629         * elfxx-target.h (elf_backend_section_flags): Define.
3630         (elfNN_bed): Initialize elf_backend_section_flags field.
3631
3632 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
3633
3634         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
3635         _bfd_elf32_gc_record_vtable.  Correct a comment.
3636
3637 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
3638
3639         From  Ralf Baechle  <ralf@gnu.org>
3640
3641         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
3642         produces binaries with got[1] = 0x80000001 to differenciate them
3643         for the dynamic linker from the broken binaries produced by old
3644         versions.
3645
3646 2000-09-30  Petr Sorfa <petrs@sco.com>
3647
3648         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
3649         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
3650         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
3651         * configure: Regenerate.
3652
3653 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
3654
3655         Define two bfd_targets for absence and presence of leading
3656         underscore on symbols.  Make sure to only link same kind.
3657         * elf32-cris.c (cris_elf_object_p,
3658         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
3659         cris_elf_merge_private_bfd_data): New.
3660         (elf_backend_object_p, elf_backend_final_write_processing,
3661         bfd_elf32_bfd_print_private_bfd_data,
3662         bfd_elf32_bfd_merge_private_bfd_data): Define.
3663         <Target vector definition>: Include elf32-target.h twice with
3664         different macro settings:
3665         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
3666         bfd_elf32_us_cris_vec.
3667         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
3668         (elf_symbol_leading_char): First as 0, then '_'.
3669         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
3670         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
3671         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
3672         * configure: Regenerate.
3673         * targets.c: Declare bfd_elf32_us_cris_vec.
3674         * po/bfd.pot: Regenerate.
3675
3676 2000-09-29  Momchil Velikov  <velco@fadata.bg>
3677
3678         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
3679         R_ARM_THM_PC22 relocations.
3680
3681 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
3682
3683         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
3684
3685 2000-09-29  Momchil Velikov <velco@fadata.bg>
3686
3687         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
3688         is has the SEC_HAS_CONTENTS flag set.
3689
3690 2000-09-28  \81Örjan Friberg  <orjanf@axis.com>
3691             Hans-Peter Nilsson  <hp@axis.com>
3692
3693         * aout-cris.c (N_TXTADDR): Define.
3694
3695 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
3696
3697         * som.c: Include alloca-conf.h.
3698         * Makefile.am: "make dep-am"
3699         * Makefile.in: Regenerate.
3700
3701 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
3702
3703         * elf32-hppa.c (plt_stub): New.
3704         (PLT_STUB_ENTRY): Define.
3705         (elf32_hppa_link_hash_table): Change multi_subspace to packed
3706         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
3707         (elf32_hppa_link_hash_table_create): Init to suit.
3708         (elf32_hppa_check_relocs): Set has_12bit_branch and
3709         has_17bit_branch as appropriate.
3710         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
3711         non-local functions.
3712         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
3713         Add space for plt_stub as needed.
3714         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
3715         functions at plt_stub.
3716         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
3717         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
3718
3719         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
3720         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
3721         of fixed size, and if negative, disable handling of input sections
3722         before stub section.  Set up default stub group size depending
3723         on detected branch relocs.
3724         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
3725         ensure different offsets from sym_value aren't rounded to
3726         different 2k blocks.  Use lrsel and rrsel for other stubs too for
3727         consistency rather than necessity.
3728         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
3729         (final_link_relocate): Likewise.
3730         (elf32_hppa_relocate_section): Likewise.
3731
3732         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
3733         (_bfd_elf_hppa_gen_reloc_type): Generate them.
3734         (elf_hppa_final_link_relocate): Handle them.
3735         (elf_hppa_relocate_insn): Likewise.
3736         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
3737
3738 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
3739
3740         * elfcode.h (elf_object_p): Preserve and clear abfd section
3741         information.  Restore at error.
3742
3743 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
3744
3745         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
3746         is empty, make sure that its rva also 0. NT loader dislikes
3747         having otherwise.
3748
3749 2000-09-26  Steve Ellcey <sje@cup.hp.com>
3750
3751         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
3752         global by default.
3753
3754 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
3755
3756         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
3757         currently unused RELATIVE_DYNAMIC_RELOCS code.
3758         (hppa_discard_copies): Likewise.
3759         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
3760         comments.  Don't check non-code output sections for stub grouping.
3761
3762 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
3763
3764         * section.c (bfd_get_unique_section_name): Return NULL if
3765         bfd_malloc fails.
3766
3767 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3768
3769         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
3770         instruction sequence to actually work.
3771         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
3772         accordingly.
3773
3774 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
3775
3776         * elf32-sh.c (sh_elf_relocate_section): Use
3777         _bfd_final_link_relocate to apply the relocation against a section
3778         symbol, when doing relocatable links.
3779
3780 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
3781
3782         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
3783         to id_sec.
3784         (stub_hash_newfunc): Here too.
3785         (hppa_add_stub): And here.
3786         (elf32_hppa_link_hash_table): Remove stub_section_created,
3787         reloc_section_created, first_init_sec and first_fini_sec.  Add
3788         stub_group.
3789         (elf32_hppa_link_hash_table_create): Init to suit.
3790         (hppa_get_stub_entry): Add support for grouping stub sections.
3791         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
3792         section code.  Index stub vars by section->id.
3793         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
3794         exit paths.  Zap allocation of above removed vars.  Refine
3795         link-once test.
3796
3797         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
3798         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
3799         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
3800         rather than pointer to bfd_link_info.
3801         (hppa_add_stub): Likewise.
3802         (final_link_relocate): Likewise.
3803
3804 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
3805
3806         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
3807         link-once sections.
3808
3809 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
3810
3811         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
3812         ld/emulparams/shelf.sh.
3813
3814 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3815
3816         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
3817         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
3818         * bfd-in2.h: Regenerate.
3819
3820 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
3821
3822         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
3823         LITUSE relocations incorrectly if -relax is specified on the ld
3824         command line and the displacement field of the load or store
3825         instruction is non-zero. (Patch by paul.winalski@compaq.com)
3826
3827 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
3828
3829         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
3830         first_fini_sec here.
3831         (elf32_hppa_size_stubs): Instead correctly find the first .init
3832         and .fini section here.
3833
3834 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
3835
3836         * elf32-hppa.c (clobber_millicode_symbols): New function.
3837         (elf32_hppa_size_dynamic_sections): Call it.
3838
3839 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
3840
3841         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
3842         packed.  Add plabel, plt_abs packed booleans.
3843         (hppa_link_hash_newfunc): Init new fields.
3844         (PLABEL_PLT_ENTRY_SIZE): Define.
3845         (hppa_stub_name): Use size_t len vars.
3846         (hppa_add_stub): Likewise.
3847         (elf32_hppa_build_stubs): Likewise.
3848         (hppa_build_one_stub): Kill some compiler warnings.
3849         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
3850         if dynamic linking.  Munge the local plt offsets into
3851         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
3852         size_t len vars.  Add assert for plabel addend.
3853         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
3854         (elf32_hppa_hide_symbol): New function.
3855         (elf_backend_hide_symbol): Define.
3856         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
3857         with h->plabel set.  Don't make plt entries to have dynamic syms
3858         when they have been forced local.  If plt entry is used by a
3859         plabel, make it PLABEL_PLT_ENTRY_SIZE.
3860         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
3861         Set up .plt offsets for local syms.
3862         (elf32_hppa_relocate_section): Initialise plt entries for local
3863         syms.  Leave weak undefined plabels zero.  Make global plabel
3864         relocs against function symbol, and leave the addend zero.
3865         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
3866         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
3867         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
3868         relocs instead of SEGREL32 for dynamic got relocs.
3869         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
3870         (elf_backend_got_header_size): Adjust.
3871         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
3872
3873         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
3874         (hppa_type_of_stub): Use it instead of #if 0
3875         (hppa_discard_copies): Use it here too.
3876         (elf32_hppa_size_dynamic_sections): And here.
3877
3878         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
3879         (elf32_hppa_link_hash_table_create): And here.
3880         (hppa_build_one_stub): And here.  Instead keep track of stub
3881         offset using _raw_size.
3882         (elf32_hppa_size_stubs): Likewise.
3883         (elf32_hppa_build_stubs): Likewise.
3884         (hppa_size_one_stub): Likewise.  Resize reloc section too.
3885
3886         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
3887         first_fini_sec handling.  Don't search for reloc section or set
3888         hplink->reloc_section_created here.
3889         (elf32_hppa_size_stubs): Instead search for reloc sections, and
3890         set reloc_section_created here.
3891         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
3892         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
3893         and DT_FINI.
3894         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
3895
3896         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
3897         with `hplink->root.'.
3898         (elf32_hppa_check_relocs): Likewise.
3899         (elf32_hppa_gc_sweep_hook): Likewise.
3900         (elf32_hppa_adjust_dynamic_symbol): Likewise.
3901         (hppa_handle_PIC_calls): Likewise.
3902         (elf32_hppa_size_dynamic_sections): Likewise.
3903         (elf32_hppa_set_gp): Likewise.
3904         (elf32_hppa_relocate_section): Likewise.
3905         (elf32_hppa_finish_dynamic_symbol): Likewise.
3906         (elf32_hppa_finish_dynamic_sections): Likewise.
3907
3908         From  David Huggins-Daines  <dhd@linuxcare.com>
3909         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
3910         defined weak symbols in shared links.
3911         (final_link_relocate): Calls to defined weak symbols in shared
3912         objects must go via import stubs, as the target might not be known
3913         at link time.
3914
3915 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
3916
3917         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
3918         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
3919         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
3920         the original entries with EMPTY_HOWTOs, and added new ones to fill
3921         in the gap.
3922         (sh_elf_info_to_howto): Make sure the new gap isn't used.
3923         (sh_elf_relocate_section): Likewise.
3924
3925 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
3926
3927         * cpu-mips.c (arch_info_struct): Add mips:4K
3928         * bfd-in2.h (bfd_mach_mips4K): New define.
3929         * archures.c: Add bfd_mach_mips4K to comment.
3930         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
3931         E_MIPS_ARCH_2 for bfd_mach_mips4K.
3932
3933 2000-09-13  Marco Franzen <marcof@thyron.com>
3934
3935         * som.c (som_write_symbol_strings): Do not used fixed buffers,
3936         use size_t as a counter.
3937         (som_write_space_strings): Similarly.
3938
3939 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
3940
3941         * elf32-i860.c (elf32_i860_relocate_pc26): New function
3942         and prototype.
3943         (elf32_i860_relocate_section): Invoke new function from here.
3944
3945 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3946
3947         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
3948         static.
3949
3950 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3951
3952         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
3953         target section name instead of dumping core when the target symbol is
3954         undefined.
3955
3956 2000-09-09  Kazu Hirata  <kazu@hxi.com>
3957
3958         * riscix.c: Remove DEFUN.
3959
3960 2000-09-08  Nick Clifton  <nickc@redhat.com>
3961
3962         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
3963         initialise flags in output bfd if the input bfd is the default
3964         architecture with the default flags.
3965
3966 2000-09-08  Kazu Hirata  <kazu@hxi.com>
3967
3968         * archive.c: Fix formatting.
3969         * coff-arm.c: Likewise.
3970         * doc/chew.c: Likewise.
3971
3972 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
3973
3974         * section.c (bfd_get_unique_section_name): Put a dot before the
3975         numeric suffix.
3976
3977 2000-09-07  Kazu Hirata  <kazu@hxi.com>
3978
3979         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
3980         * elf.c: Fix formatting.
3981
3982 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
3983
3984         * config.bfd (sh-*-linux*): Added.
3985         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
3986         * targets.c: Declare them.
3987         * elf32-sh-lin.c: New file.
3988         * Makefile.am: Compile it.
3989         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
3990         * configure, Makefile.in: Rebuilt.
3991
3992 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
3993
3994         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
3995         pseduo-section when determining where the TOC ends.
3996
3997         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
3998         output x_tvndx as it is only two bytes wide.
3999
4000         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
4001         reloc is 26 or 32 bits wide.
4002
4003         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
4004         for relocs that don't change anything.  Also look at the full
4005         6 bits of bitsize.
4006
4007 2000-09-06  Philip Blundell  <philb@gnu.org>
4008
4009         * config.bfd (arm*-*-uclinux*): New target.
4010
4011 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
4012
4013         * configure: Rebuilt with new libtool.m4.
4014
4015 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
4016
4017         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
4018         word for variable name.
4019         * bfd-in2.h: Regenerate.
4020
4021 2000-09-05  Nick Clifton  <nickc@redhat.com>
4022
4023         * config.in: Regenerate.
4024         * libbfd.h: Regenerate.
4025         * po/bfd.pot: Regenerate.
4026         * doc/bfdint.texi: Remove CVS date string - it foils compares with
4027         local versions.
4028
4029 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
4030
4031         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
4032
4033 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
4034
4035         Shared library and PIC support.
4036         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
4037         (GOT_ENTRY_SIZE): New.
4038         (ELF_DYNAMIC_INTERPRETER): New.
4039         (STUB_SUFFIX): Define.
4040         (LONG_BRANCH_PIC_IN_SHLIB): Define.
4041         (RELATIVE_DYNAMIC_RELOCS): Define.
4042         (enum elf32_hppa_stub_type): New.
4043         (struct elf32_hppa_stub_hash_entry): Rename offset to
4044         stub_offset.  Add a number of new fields.
4045         (struct elf32_hppa_link_hash_entry): New.
4046         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
4047         global_value.
4048         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
4049         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
4050         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
4051         new fields.
4052         (hppa_link_hash_newfunc): New function.
4053         (elf32_hppa_link_hash_table_create): Use above function. Init new
4054         fields.
4055         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
4056         instead of addend, and remove sym_name from args.  Don't use
4057         symbol name for local syms, instead use sym index.
4058         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
4059         stub type rather than size.  Pass in hash and handle import stub
4060         case.  Also pass in reloc instead of offset so we can calculate
4061         PCREL22F and PCREL12F branches properly.
4062         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
4063         import and export stubs too.
4064         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
4065         import and export stub sizing.
4066         (elf32_hppa_check_relocs): New function.
4067         (elf32_hppa_adjust_dynamic_symbol): New function.
4068         (hppa_discard_copies): New function.
4069         (elf32_hppa_size_dynamic_sections): New function.
4070         (elf_backend_size_dynamic_sections): Define.
4071         (elf32_hppa_finish_dynamic_symbol): New function.
4072         (elf_backend_finish_dynamic_symbol): Define.
4073         (elf32_hppa_size_stubs): Stash params in link hash table, and move
4074         some local vars into the link hash table too.  For shared links,
4075         trundle over function syms, generating export stubs.  Handle
4076         PCREL22F branches.  Break out stub creation code from here..
4077         (hppa_add_stub): .. to here.  New function.
4078         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
4079         call the bfd linker.  Use elf_gp to record global pointer.
4080         Calculate a value from sections if $global$ is missing.
4081         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
4082         (elf32_hppa_gc_mark_hook): New function.
4083         (elf_backend_gc_mark_hook): Define.
4084         (elf32_hppa_gc_sweep_hook): New function.
4085         (elf_backend_gc_sweep_hook): Define.
4086         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
4087         Add rel to args, and remove howto, input_bfd, offset, addend,
4088         sym_name as we can recalculate these locally.  Handle calls to
4089         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
4090         handling of undefined weak syms.  Check that stubs are in range.
4091         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
4092         message on hitting a DPREL21L reloc that needs fixing.  Subtract
4093         off PC for PCREL14F.  Break out code that does a stub lookup from
4094         here..
4095         (hppa_get_stub_entry): ..to here.  New function.
4096         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
4097         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
4098         relocs, etc. etc.
4099         (elf32_hppa_finish_dynamic_sections): New function.
4100         (elf_backend_finish_dynamic_sections): Define.
4101         (elf_backend_final_write_processing) Define.
4102         (hppa_handle_PIC_calls): New function.
4103         (elf32_hppa_build_stubs): Call it.  Pass link_info to
4104         hppa_build_one_stub.
4105         (elf32_hppa_create_dynamic_sections): New function
4106         to create .plt and .got then set .plt flags correctly.
4107         (elf_backend_create_dynamic_sections): Define.
4108         (elf32_hppa_object_p): New function.
4109         (elf_backend_object_p): Define.
4110         (elf32_hppa_elf_get_symbol_type): New function.
4111         (elf_backend_get_symbol_type): Define.
4112         (elf_backend_can_gc_sections): Define.
4113         (elf_backend_want_got_plt): Define.
4114         (elf_backend_plt_alignment): Set to 2.
4115         (elf_backend_plt_readonly): Define.
4116         (elf_backend_want_plt_sym): Define.
4117         (elf_backend_got_header_size): Reserve one entry.
4118
4119         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
4120         (elf32_hppa_size_stubs): Pass in multi_subspace.
4121         (elf32_hppa_set_gp): Declare.
4122
4123         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
4124         (bfd_get_unique_section_name): New function.
4125         * bfd-in2.h: Regenerate.
4126
4127         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
4128         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
4129         comment.
4130
4131         From  David Huggins-Daines  <dhd@linuxcare.com>
4132         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
4133         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
4134         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
4135         been updated in finish_dynamic_symbol before modifying function
4136         symbol.
4137
4138         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
4139         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
4140         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
4141         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
4142         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
4143         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
4144         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
4145         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
4146
4147         From David Huggins-Daines  <dhd@linuxcare.com>
4148         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
4149         style of local labels as well.
4150
4151 2000-09-03  Philip Blundell  <philb@gnu.org>
4152
4153         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
4154         references to undefined symbols in debugging sections.
4155
4156 2000-09-02  H.J. Lu  <hjl@gnu.org>
4157
4158         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
4159         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
4160         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
4161         section.
4162
4163 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
4164
4165         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
4166         (elf32_i860_is_local_label_name): New function and prototype.
4167
4168 2000-09-02  Nick Clifton  <nickc@redhat.com>
4169
4170         * configure.in: Increase version number to 2.10.91.
4171         * configure: Regenerate.
4172         * aclocal.m4: Regenerate.
4173         * config.in: Regenerate.
4174         * po/bfd.pot: Regenerate.
4175
4176 2000-09-02  Daniel Berlin <dberlin@redhat.com>
4177
4178         * elf.c (_bfd_elf_make_section_from_shdr): Add
4179         .gnu.linkobce.wi. to the list of debug section names.
4180
4181 2000-09-02  Nick Clifton  <nickc@redhat.com>
4182
4183         * dwarf2.c (find_debug_info): New function: Locate a section
4184         containing dwarf2 debug information.
4185         (bfd_dwarf2_find_nearest_line): Find all sections containing
4186         debug information and include them in the stash.
4187
4188 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
4189
4190         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
4191         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
4192         (sh_reloc_map): Add new relocs.
4193         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
4194         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
4195         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
4196         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
4197         functions.
4198         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
4199         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
4200         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
4201         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4202         New array constants.
4203         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
4204         New variables.
4205         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
4206         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
4207         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
4208         elf_sh_plt_reloc_offset): Define.
4209         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
4210         elf_sh_link_hash_table): New structs.
4211         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
4212         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
4213         relocation types.
4214         (elf_backend_create_dynamic_sections,
4215         bfd_elf32_bfd_link_hash_table_create,
4216         elf_backend_adjust_dynamic_symbol,
4217         elf_backend_size_dynamic_sections,
4218         elf_backend_finish_dynamic_symbol,
4219         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
4220         elf_backend_plt_readonly, elf_backend_want_plt_sym,
4221         elf_backend_got_header_size, elf_backend_plt_header_size):
4222         Define.
4223         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
4224         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
4225         New relocs.
4226         * bfd-in2.h, libbfd.h: Rebuilt.
4227
4228 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
4229
4230         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
4231         change.
4232
4233 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
4234
4235         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
4236         not initialized, set them to indicate the SH1 instruction set.
4237
4238 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
4239
4240         * acinclude.m4: Include libtool and gettext macros from the
4241         top level.
4242         * aclocal.m4, configure: Rebuilt.
4243
4244 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
4245
4246         * elf.c: Eliminate references to __sparcv9 macro; replace with
4247         autoconf variables HAVE_PSINFO32_T etc.
4248         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
4249         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
4250         * config.in: Ditto.
4251         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
4252         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
4253         * aclocal.m4: Ditto.
4254         * configure: Regenerate.
4255
4256 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
4257
4258         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
4259         for any shared link, not just shared -Bsymbolic.
4260         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
4261         any shared link, and pass link info to it.
4262         (elf_i386_size_dynamic_sections): Update comment.
4263         (elf_i386_discard_copies): Modify to discard relocs for symbols
4264         that have been forced local.
4265         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
4266         that have been forced local.
4267
4268 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
4269
4270         * elflink.h (elf_link_add_object_symbols): Allow common
4271         symbols to have an alignment of 1 if explicitly requested, and
4272         not overridden by other definitions.
4273
4274 2000-08-22  Doug Kwan <dkwan@transmeta.com>
4275
4276         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
4277         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
4278
4279 2000-08-22  H.J. Lu  <hjl@gnu.org>
4280
4281         * elf-bfd.h (elf_link_hash_table): Add runpath.
4282
4283         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
4284         * bfd-in2.h: Rebuilt.
4285
4286         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
4287         "runpath" field to NULL.
4288         (bfd_elf_get_runpath_list): New function.
4289
4290         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
4291         DT_RUNPATH entries.
4292
4293 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
4294
4295         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
4296         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
4297         explicitly.  Improve validation of r_type.
4298
4299 2000-08-21  H.J. Lu  <hjl@gnu.org>
4300
4301         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
4302         dynamic allocated content space.  Add a comment to remind us that
4303         one day this ought to be fixed.
4304         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
4305         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4306         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
4307
4308 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
4309
4310         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
4311         field with the newly relocated value instead of adding it to the
4312         existing immediate field.
4313         (elf32_i860_relocate_splitn): Likewise.
4314         (elf32_i860_relocate_highadj): Likewise.
4315
4316 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
4317
4318         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
4319         was previously just a stub).
4320
4321 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
4322
4323         * elflink.c (_bfd_elf_create_got_section): Don't abort().
4324         Formatting fixes.
4325         (_bfd_elf_create_dynamic_sections): Likewise.
4326
4327 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
4328
4329         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
4330         for undefined symbols to be the beginning of the section.
4331
4332         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
4333         four extra entries at the beginning of the .rela.plt section.
4334         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
4335         section to account for the four reserved entries in the .plt section.
4336
4337 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
4338
4339         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
4340         to the list of NOPs we recognize after a branch-and-link.
4341         Use the ori NOP when one is needed.
4342
4343         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
4344         for large archives.
4345
4346 2000-08-14  Jim Wilson  <wilson@cygnus.com>
4347
4348         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
4349         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
4350         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
4351         EF_IA_64_ABSOLUTE.
4352
4353 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
4354
4355         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
4356
4357 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
4358
4359         * elf32-i860.c (elf32_i860_relocate_section): New function.
4360         (i860_final_link_relocate): New function.
4361         (elf32_i860_relocate_splitn): New function.
4362         (elf32_i860_relocate_pc16): New function.
4363         (elf32_i860_relocate_highadj): New function.
4364         (elf32_i860_howto): Minor adjustments to some relocations.
4365         (elf_info_to_howto_rel): Define.
4366         (elf_backend_relocate_section): Define.
4367
4368 2000-08-10  Nick Clifton  <nickc@cygnus.com>
4369
4370         * elf32-arm.h: Fix formatting.
4371
4372 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
4373
4374         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
4375
4376 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
4377
4378         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
4379
4380 2000-08-07  Kazu Hirata  <kazu@hxi.com>
4381
4382         * ieee.c (ieee_write_debug_part): Rewrite a comment.
4383         * elf64-ia64.c: Fix a typo.
4384
4385 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
4386
4387         * elf32-i860.c (elf32_i860_howto_table): New structure.
4388         (lookup_howto): New function.
4389         (elf32_i860_reloc_type_lookup): New function.
4390         (elf32_i860_info_to_howto_rela): New function.
4391         (elf_code_to_howto_index): New structure.
4392         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
4393         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
4394         elf32_i860_reloc_type_lookup.
4395
4396 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
4397
4398         * som.c (struct fixup_format): Constify `format'.
4399         (som_hppa_howto_table): Use SOM_HOWTO macro.
4400         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
4401         (som_bfd_reloc_type_lookup): Likewise.
4402         (compare_subspaces): Remove unused `count1', `count2'.
4403         (som_begin_writing): Remove unused `total_reloc_size'.
4404         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
4405         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
4406         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
4407         (som_find_nearest_line): Decorate unused parameter(s).
4408         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
4409         (som_bfd_link_split_section): Likewise.
4410
4411 2000-08-03  Nick Clifton  <nickc@cygnus.com>
4412
4413         * section.c: Restore backed out code.
4414         * elf.c: Restore backed out code.
4415         (copy_private_bfd_data): Fix bug preventing stipped dynamic
4416         binaries from working.
4417         * bfd-in2.h: Regenerate.
4418
4419 2000-08-03  H.J. Lu  <hjl@gnu.org>
4420
4421         * section.c: Back out the change made by Nick Clifton
4422         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
4423         binaries.
4424         * bfd-in2.h: Likewise.
4425         * elf.c: Likewise.
4426
4427 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
4428
4429         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
4430
4431 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
4432
4433         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
4434         * bfd-in2.h, libbfd.h: Regenerate.
4435
4436 2000-07-31  Nick Clifton  <nickc@cygnus.com>
4437
4438         * section.c (struct sec): Add new boolean field 'segment_mark'.
4439         (STD_SECTION): Initialise new field to zero.
4440
4441         * bfd-in2.h: Regenerate.
4442
4443         * elf.c (copy_private_bfd_data): Reorganise section to segment
4444         mapping to cope with moved sections requiring new segments,
4445         and overlapping segments.
4446         (SEGMENT_END): New macro: Return the end address of a segment.
4447         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
4448         contains a section by comparing their VMA addresses.
4449         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
4450         contains a section by comparing their LMA addresses.
4451         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
4452         section should be included in a segment.
4453         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
4454         follows another in memory.
4455         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
4456         segments overlap.
4457
4458 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
4459
4460         * cpu-i860.c: Added comments.
4461
4462         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
4463         bfd_elf32_i860_little_vec.
4464         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
4465         (ELF_MAXPAGESIZE): Changed to 4096.
4466
4467         * targets.c (bfd_elf32_i860_little_vec): Declaration of
4468         new target.
4469         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
4470
4471         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
4472         config for little endian elf32 i860.
4473         (targ_defvec): Define for the new config above
4474         as "bfd_elf32_i860_little_vec".
4475         (targ_selvecs): Define for the new config above
4476         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
4477
4478         * configure.in (bfd_elf32_i860_little_vec): Added recognition
4479         of new target vec.
4480
4481         * configure: Regenerated.
4482
4483 2000-07-27  H.J. Lu  <hjl@gnu.org>
4484
4485         * elflink.h (elf_merge_symbol): Take one more argument,
4486         dt_needed, to indicate if the symbol comes from a DT_NEEDED
4487         entry. Don't overide the existing weak definition if dt_needed
4488         is true.
4489         (elf_link_add_object_symbols): Pass dt_needed to
4490         elf_merge_symbol ().
4491
4492 2000-07-27  Nick Clifton  <nickc@cygnus.com>
4493
4494         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
4495         allocated contents.
4496
4497 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
4498
4499         * configure.host (*-*-aix*): AIX has 'long long' always.
4500
4501         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
4502         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
4503         (xcoff_write_archive_contents_big): Don't update the offset
4504         of the symbol table, xcoff_write_armap will do it.
4505
4506 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
4507
4508         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
4509         of dynobj for SGI_COMPAT checks.
4510
4511 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
4512
4513         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
4514         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
4515         * bfd-in2.h: Regenerate.
4516
4517 2000-07-21  Nick Clifton  <nickc@cygnus.com>
4518
4519         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
4520         range symbol indices in relocs and issue an error message.
4521
4522 2000-07-20  H.J. Lu  <hjl@gnu.org>
4523
4524         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
4525         info->new_dtags when setting DT_FLAGS_1. It will only be set
4526         by the new linker options. It shouldn't break anything.
4527
4528 2000-07-20  H.J. Lu  <hjl@gnu.org>
4529
4530         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
4531         only if info->new_dtags is true.
4532
4533 2000-07-20  H.J. Lu  <hjl@gnu.org>
4534
4535         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
4536         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
4537
4538 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
4539
4540         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
4541         (ALL_MACHINES_CFILES): Add cpu-cris.c.
4542         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
4543         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
4544         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
4545         * Makefile.in: Rebuild.
4546         * aclocal.m4: Rebuild.
4547         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
4548         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
4549         (bfd_cris_arch): Declare.
4550         (bfd_archures_list): Add bfd_cris_arch.
4551         * bfd-in2.h: Rebuild.
4552         * config.bfd: (cris-*-*): New target.
4553         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
4554         * configure: Rebuild.
4555         * elf.c (prep_headers): Add bfd_arch_cris.
4556         * libbfd.h: Rebuild.
4557         * libaout.h (enum machine_type): Add M_CRIS.
4558         * reloc.c: Add CRIS relocations.
4559         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
4560         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
4561         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
4562         * po/POTFILES.in, po/bfd.pot: Regenerate.
4563
4564 2000-07-19  H.J. Lu  <hjl@gnu.org>
4565
4566         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
4567         DF_TEXTREL if DT_TEXTREL is set.
4568         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4569         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
4570         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
4571         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
4572         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
4573         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
4574         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
4575         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
4576         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
4577         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
4578
4579         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
4580         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
4581         DT_RPATH is set.
4582         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
4583
4584 2000-07-19  H.J. Lu  <hjl@gnu.org>
4585
4586         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
4587         * bfd-in2.h: Rebuild.
4588
4589         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
4590         (elf_dt_soname): New.
4591
4592         * elf.c (bfd_elf_set_dt_needed_soname): New.
4593
4594         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
4595         entry if the shared object loaded by DT_NEEDED is used to
4596         resolve the reference in a regular object.
4597
4598 2000-07-19  H.J. Lu  <hjl@gnu.org>
4599
4600         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
4601         DT_DEPAUDIT and DT_AUDIT as strings.
4602
4603 2000-07-19  Nick Clifton  <nickc@cygnus.com>
4604
4605         * format.c: Fix formatting.
4606
4607 2000-07-19  H.J. Lu  <hjl@gnu.org>
4608
4609         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
4610
4611 2000-07-19  H.J. Lu  <hjl@gnu.org>
4612
4613         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
4614         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
4615         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
4616         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
4617         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
4618         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
4619         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
4620
4621 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
4622
4623         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
4624         renamed functions from here...
4625         (assign_section_numbers): Use renamed functions.
4626         (prep_headers): Use renamed functions.
4627
4628         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
4629         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
4630         * bfd-in2.h: Regenerate.
4631
4632 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
4633
4634         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
4635         parenthesis in if statement.
4636
4637 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
4638
4639         Enable the support for Traditional MIPS.
4640         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
4641         return ict_none appropriately for traditional mips targets.
4642         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
4643         (STUB_MOVE): Conditionalize for traditonal mips.
4644         (STUB_LI16): Likewise.
4645         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
4646         room for RTPROC header.
4647         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
4648         the permission for the PT_DYNAMIC as read, write and execute.
4649         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
4650         for traditonal mips.
4651         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
4652         _DYNAMIC_LINKING for traditonal mips.
4653         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
4654         in case of traditonal mips.
4655         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
4656         entry is required. For a function if PLT is not required then set the
4657         corresponding hash table entry to 0.
4658         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
4659         traditonal mips.
4660         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
4661         shared object set the value to 0.
4662         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
4663         _DYNAMIC_LINKING for traditonal mips.
4664         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
4665         for traditonal mips.
4666
4667 2000-07-15  H.J. Lu  <hjl@gnu.org>
4668
4669         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
4670
4671 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
4672
4673         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
4674         out a structure that is BFD_IN_MEMORY.
4675
4676 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
4677
4678         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
4679         bfd pointer.  Print section id instead of bfd pointer for local
4680         syms.  Prefix addend with `+' for global syms as well as local.
4681         Correct calculation of name component lengths.
4682         (elf64_hppa_check_relocs): Update call to get_dyn_name.
4683
4684         From David Huggins-Daines  <dhd@linuxcare.com>
4685         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
4686         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
4687         (elf64_hppa_modify_segment_map): Likewise.
4688
4689 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
4690
4691         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
4692         addresses to be "naturally" sign extended.  Return -1 if unknown.
4693         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
4694         * bfd-in2.h: Regenerate.
4695
4696 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
4697
4698         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
4699         and ECOF_SIGNED_64 to list ways to extract an offset.
4700         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
4701         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
4702         Update.
4703         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
4704         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
4705
4706 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
4707
4708         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
4709         bfd_get_start_address.
4710         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
4711         (elf_swap_ehdr_out): Ditto.
4712
4713 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
4714
4715         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
4716         compatibility with older binutils.
4717
4718 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
4719
4720         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
4721         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
4722
4723         From Ryan Bradetich  <rbradetich@uswest.net>
4724         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
4725         (parse_line_table): Ditto.
4726         (_bfd_dwarf1_find_nearest_line): Ditto.
4727         * syms.c (cmpindexentry): Remove extra `*' from params.
4728
4729 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
4730
4731         * elf32-mips.c (sort_dynamic_relocs): New Function.
4732         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
4733         via qsort to sort the dynamic relocations in increasing r_symndx
4734         value.
4735
4736 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
4737
4738         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
4739         ATTRIBUTE_UNUSED to unused args.
4740         (get_opd): Likewise.
4741         (get_plt): Likewise.
4742         (get_dlt): Likewise.
4743         (get_stub): Likewise.
4744         (elf64_hppa_adjust_dynamic_symbol): Likewise.
4745         (elf64_hppa_link_output_symbol_hook): Likewise.
4746         (elf64_hppa_check_relocs): Delete unused var.
4747         (elf64_hppa_size_dynamic_sections): Likewise.
4748         (elf64_hppa_finalize_opd): Likewise.
4749         (elf64_hppa_finalize_dynreloc): Likewise.
4750         (elf64_hppa_modify_segment_map): Likewise.
4751         (elf64_hppa_finish_dynamic_sections): Likewise.
4752
4753         * elf-hppa.h (elf_hppa_final_write_processing): Add
4754         ATTRIBUTE_UNUSED to unused args.
4755         (elf_hppa_final_link_relocate): Likewise.
4756         (elf_hppa_record_segment_addrs): Add paretheses.
4757         (elf_hppa_relocate_section): Constify dyn_name.
4758
4759         From  David Huggins-Daines  <dhd@linuxcare.com>
4760         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
4761         rearrange case statement so that it gets preferred to 32-bit ones.
4762
4763         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
4764         asection->id instead of address of asection structure.
4765         (elf32_hppa_size_stubs): Likewise.
4766
4767         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
4768         for .init* and .fini*.
4769
4770         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
4771         and addends used in stub names to 32 bits.
4772         (elf32_hppa_size_stubs): Likewise.
4773
4774         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
4775         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
4776         not bfd_put_64.  Fix minor comment typo and formatting.
4777
4778         Changes to create multiple linker stubs, positioned immediately
4779         before the section where they are required.
4780         * elf32-hppa.c: Don't include hppa_stubs.h.
4781         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
4782         (elf32_hppa_stub_hash_table): Delete.
4783         (elf32_hppa_link_hash_entry): Delete.
4784         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
4785         stub_hash_table, and store the struct here rather than a pointer.
4786         Delete output_symbol_count.  Add offset array.  Change
4787         global_value to a bfd_vma.
4788         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
4789         (elf32_hppa_stub_hash_traverse): Delete.
4790         (elf32_hppa_name_of_stub): Delete.
4791         (elf32_hppa_link_hash_lookup): Delete.
4792         (elf32_hppa_link_hash_traverse): Delete.
4793         (elf32_hppa_stub_hash_table_init): Delete.
4794         (elf32_hppa_size_of_stub): Pass input section and offset rather
4795         than location and calculate location here.  Don't pass name as all
4796         stubs are now the same size.
4797         (elf32_hppa_stub_hash_newfunc): Init new fields.
4798         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
4799         too.
4800         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
4801         comparing against ints.  Rewrite stub handling code.
4802         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
4803         Case enums to int before comparing against ints.  Remove
4804         bfd_reloc_dangerous case.
4805         (elf32_hppa_build_one_stub): Rewrite.
4806         (elf32_hppa_size_one_stub): New function.
4807         (elf32_hppa_build_stubs): Rewrite.
4808         (elf32_hppa_size_stubs): Pass in linker call-back functions.
4809         Rewrite stub-handling specific code.
4810
4811         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
4812
4813         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
4814
4815         * hppa_stubs.h: Delete.
4816         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
4817         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
4818         * Makefile.in: Regenerate.
4819
4820         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
4821         e_nlrsel.
4822
4823         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
4824
4825         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
4826         and section name for bfd_reloc_notsupported error message.
4827         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
4828         bfd_reloc_notsupported.
4829         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
4830
4831         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
4832         undefined weak symbols for all relocs.
4833         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
4834         offsets are relative to one past the delay slot.
4835         (elf32_hppa_size_stubs): Account for reloc addend when calculating
4836         branch destination.  Put addend into stub name too.
4837         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
4838         adjust by 8 when deciding whether a linker stub is needed.  Put
4839         addend into stub name as for above.
4840
4841         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
4842         various args and vars.
4843         (elf32_hppa_bfd_final_link_relocate): Here too.
4844         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
4845         inner block var to avoid shadowing.
4846
4847         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
4848         unsigned.
4849         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
4850         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
4851         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
4852
4853         * libhppa.h: Change practically all unsigned ints to plain ints.
4854         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
4855         prototypes.
4856
4857         From Ryan Bradetich  <rbradetich@uswest.net>
4858         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
4859         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
4860         suit above.
4861         From  David Huggins-Daines  <dhd@linuxcare.com>
4862         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
4863         to the new OP_* ones.
4864
4865         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
4866         error exit.  Bail out earlier on plabel relocs that we aren't
4867         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
4868         string, and then don't free our copy.
4869         (elf32_hppa_build_one_stub): Make insn unsigned int.
4870
4871         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
4872         available with BL, not BE and BLE.
4873
4874         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
4875         code for elf arg relocs.
4876         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
4877         argument with elf_link_hash_entry h.  Handle undefined weak
4878         symbols.  Move $global$ lookup from here...
4879         (elf32_hppa_relocate_section): ...to here.  Return correct error
4880         message for non-handled relocs.
4881         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
4882         wrong test was -0x3ffff to +0x40000.
4883
4884         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
4885         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
4886         Handle them as such.
4887         (elf_hppa_relocate_insn): Fix a typo.
4888
4889         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
4890         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
4891         assemble_17, assemble_21): Delete.
4892         Supply defines for all 64 possible opcodes.
4893         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
4894         formats.  Handle COMICLR.
4895         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
4896         -10, -16, 16, 22.
4897
4898         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
4899         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
4900         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
4901         to suit.
4902         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
4903         the local syms - did this code get deleted accidentally?  Ignore
4904         undefined and undefweak syms.
4905
4906         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
4907         block.  Use it instead of elf64_hppa_hash_table (info).
4908         (elf_hppa_final_link_relocate): Use hppa_info instead of
4909         elf64_hppa_hash_table (info).
4910
4911         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
4912         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
4913         (hppa_rebuild_insn): Mask immediate bits here instead.
4914         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
4915
4916 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
4917
4918         * section.c (struct sec): Add id field.  Tidy comment formatting.
4919         (bfd_make_section_anyway): Set id.
4920         (STD_SECTION): Init id too.
4921         Change CONST to const throughout.
4922         * archures.c (bfd_arch_info): Tidy comment.
4923         (bfd_arch_list): Change a CONST to const.
4924         * libbfd-in.h: Tidy comments and replace CONST with const.
4925         * elf-bfd.h: Likewise.
4926         * libbfd.h: Regenerate.
4927         * bfd-in2.h: Regenerate.
4928         * libcoff.h: Regenerate.
4929
4930 2000-07-07  DJ Delorie  <dj@redhat.com>
4931
4932         * archive.c (_bfd_write_archive_contents): Add an informative
4933         comment.
4934
4935 2000-07-06  Kazu Hirata  <kazu@hxi.com>
4936
4937         * srec.c: Fix formatting.
4938
4939 2000-06-05  DJ Delorie  <dj@redhat.com>
4940
4941         * MAINTAINERS: new
4942
4943 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
4944
4945         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
4946         value of PC-relative offsets.
4947
4948 2000-07-03  Jim Wilson  <wilson@cygnus.com>
4949
4950         * elf64-alpha.c (alpha_elf_size_info): New.
4951         (elf_backend_size_info): Define to alpha_elf_size_info.
4952         * elfcode.h (elf_size_info): Change hash bucket size to 4.
4953
4954 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
4955
4956         * elf32-mips.c: Include elf32-target.h again for the traditional
4957         MIPS targets.
4958
4959 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
4960
4961         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
4962         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
4963         (avr_info_to_howto_rela): Likewise.
4964         (elf32_avr_gc_mark_hook): Likewise.
4965         (elf32_avr_gc_sweep_hook): Likewise.
4966         (elf32_avr_relocate_section): Likewise.
4967
4968 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
4969
4970         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
4971         an external symbol for a non-shared, non-relocatable link.
4972
4973 2000-07-03  Nick Clifton  <nickc@redhat.com>
4974
4975         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
4976         is an external symbol.
4977         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
4978         external symbol.
4979
4980 2000-07-03  Kazu Hirata  <kazu@hxi.com>
4981
4982         * reloc16.c: Fix formatting.
4983
4984 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
4985
4986         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
4987         to add a new target for traditional mips i.e
4988         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
4989         * configure.in: Likewise.
4990         * configure: Rebuild.
4991         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
4992         bfd_target_vector.
4993         (bfd_elf32_tradlittlemips_vec): Likewise.
4994         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
4995         to see that elfNN_bed does not get redefined even if the target file
4996         is included twice for a chip. See elf32-mips.c.
4997
4998 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
4999
5000         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
5001         (CLEANFILES): Add DEPA.
5002         * Makefile.in: Regenerate.
5003
5004 2000-06-30  DJ Delorie  <dj@cygnus.com>
5005
5006         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
5007         can't assume the PE header is at 0x80.
5008
5009 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
5010
5011         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
5012
5013 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
5014
5015         * go32stub.h: Update stub.
5016
5017 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
5018
5019         * archures.c (bfd_mach_avr5): Define.
5020         * bfd-in2.h (bfd_mach_avr5): Define.
5021         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
5022         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
5023         (compatible): Update comment.  Add missing test.
5024         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
5025         for avr2 and avr4.  Simplify 8K wrap code.
5026         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
5027         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
5028
5029 2000-06-26  Kazu Hirata  <kazu@hxi.com>
5030
5031         * coff-h8300.c: Fix formatting.
5032         * cpu-h8300.c: Likewise.
5033
5034 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
5035
5036         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
5037         for local symbols whose names are unknown.
5038
5039 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
5040
5041         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
5042         find one.
5043         * Makefile.in: Regenerate.
5044         * doc/Makefile.in: Regenerate.
5045
5046 2000-06-20  H.J. Lu  <hjl@gnu.org>
5047
5048         * Makefile.am: Rebuild dependency.
5049         * Makefile.in: Rebuild.
5050
5051 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5052
5053         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
5054         (elf_backend_copy_indirect_symbol): Map to the new function.
5055
5056 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
5057
5058         * archive.c (normalize): Correct pointer comparison when checking
5059         for backslashes.
5060         (bfd_bsd_truncate_arname): Likewise.
5061         (bfd_gnu_truncate_arname): Likewise.
5062
5063 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
5064
5065         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
5066         sections elf_{text,data}_{section,symbol}.
5067         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
5068         (_bfd_mips_elf_hide_symbol): New function.
5069         (elf_backend_hide_symbol): Map to the new function.
5070         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
5071         definitions of mips_elf_{text,data}_{section,symbol}.
5072         (mips_elf_local_relocation_p): Try to find the direct symbol
5073         based on new check_forced argument.
5074         (mips_elf_calculate_relocation): Use new version of
5075         mips_elf_local_relocation_p.
5076         (mips_elf_relocate_section): Likewise.
5077         (_bfd_mips_elf_relocate_section): Likewise.
5078         (mips_elf_sort_hash_table): Only assert that have enough GOT
5079         space.
5080         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
5081         entry if the relocation based on the new external argument.
5082         (mips_elf_create_dynamic_relocation): Assert that we have a
5083         section contents allocated where we can swap out the dynamic
5084         relocations.
5085         (mips_elf_calculate_relocation): Find the real hash-table entry
5086         correctly by using h->root.root.type.  Only create a dynamic
5087         relocation entry if the symbol is defined in a shared library.
5088         Create an external GOT entry for the GOT16 relocation if the
5089         symbol was forced local.
5090         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
5091         dynamic index if the symbol was forced local.
5092
5093 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
5094
5095         * elf32-mips.c: Fix typos in comments.
5096
5097 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
5098
5099         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
5100         CORE_VERSION_1.
5101
5102 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
5103
5104         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
5105         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
5106         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
5107         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
5108         (bfd_elf32_m68hc11_vec): Likewise.
5109         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
5110         Supports 68hc11 & 68hc12  at the same time.
5111         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
5112         bfd_target_vector.
5113         (bfd_elf32_m68hc11_vec): Likewise.
5114         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
5115         * archures.c (bfd_m68hc12_arch): Define and register in global list
5116         (bfd_m68hc11_arch): Likewise.
5117         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
5118         BFD_RELOC_M68HC11_3B): Define.
5119         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
5120         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
5121
5122 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
5123
5124         * elf_bfd.h (struct elf_backend_data): Add info argument to
5125         elf_backend_hide_symbol.
5126         (_bfd_elf_link_hash_hide_symbol): Likewise.
5127         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
5128         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
5129         * elflink.h (elf_link_add_object_symbols): Likewise.
5130         (elf_link_assign_sym_version): Likewise.
5131
5132 2000-06-18  H.J. Lu  <hjl@gnu.org>
5133
5134         * coff-i386.c (coff_i386_reloc): Don't return in case of
5135         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
5136         Compensate PE relocations when linking with non-PE object
5137         files to generate a non-PE executable.
5138
5139 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
5140
5141         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
5142         GOT entries if we're doing a static link or -Bsymbolic link.
5143
5144 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
5145
5146         * elflink.h (elf_link_adjust_relocs): Check for and call backend
5147         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
5148         available.
5149         (elf_link_output_relocs): Likewise.
5150         (elf_reloc_link_order): Likewise.
5151
5152 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
5153
5154         * archures.c (enum bfd_architecture): #define constants for
5155         PowerPc and RS6000 machine numbers.
5156         * bfd-in2.h: Regenerate.
5157         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
5158         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
5159         and RS6000 machine numbers using #defined constants from
5160         archures.c.
5161         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
5162         machine numbers using #defined constants from archures.c.  Add
5163         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
5164         64-bit words in 620 entry.
5165         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
5166         RSC, and RS2.
5167         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
5168
5169 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
5170
5171         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
5172         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
5173         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
5174
5175 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
5176
5177         * bfd-in.h (bfd_family_coff): Define.
5178         * bfd-in2.h: Regenerate.
5179         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
5180         coff_find_nearest_line): Check COFFness using bfd_family_coff()
5181         instead of bfd_target_coff_flavour.
5182         * cofflink.c (_bfd_coff_final_link): Likewise.
5183         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
5184         exclude XCOFF files.
5185         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
5186         Likewise.
5187         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
5188         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
5189         * xcofflink.c (XCOFF_XVECP): Delete.
5190         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
5191         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
5192         bfd_xcoff_record_link_assignment,
5193         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
5194         check for bfd_target_xcoff_flavour.
5195
5196 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
5197
5198         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
5199         files on AIX 4.3.
5200         (read_hdr): New function.
5201         (rs6000coff_core_p): Store mstsave or __context64 struct instead
5202         of trying to extract individual registers.  Set abfd->arch_info
5203         to match the architecture that created the core file.
5204         (rs6000coff_get_section_contents): Delete.
5205         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
5206
5207 2000-06-14  H.J. Lu  <hjl@gnu.org>
5208
5209         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
5210         is NULL.
5211
5212 2000-06-13  H.J. Lu  <hjl@gnu.org>
5213
5214         * configure: Regenerate.
5215
5216 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
5217
5218         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
5219         armpei_little_vec.
5220
5221 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
5222
5223         * configure.in (VERSION): Update to show this is the CVS mainline.
5224
5225 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
5226
5227         * elf32-d10v.c: Include elf/d10v.h
5228         (enum reloc_type): Delete.
5229         * elf32-d30v.c: Include elf/d30v.h
5230         (enum reloc_type): Delete.
5231
5232         * Makefile.am: Run "make dep-am" to regenerate dependencies.
5233         * Makefile.in: Regenerate.
5234
5235         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
5236         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
5237         move HOWTOs into elf_howto_table.
5238         (R_386_standard, R_386_ext_offset): Define.
5239         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
5240         (elf_i386_reloc_type_lookup): Modify calculation of index into
5241         elf_howto_table since we've removed the padding.
5242         (elf_i386_info_to_howto_rel): Likewise.
5243         (elf_i386_relocate_section): Likewise.
5244
5245 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
5246
5247         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
5248
5249 2000-06-05  H.J. Lu  <hjl@gnu.org>
5250
5251         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
5252         an error when seeing an undefined symbol with hidden/internal
5253         attribute. It is handled in *_relocate_section ().
5254
5255 2000-06-05  H.J. Lu  <hjl@gnu.org>
5256
5257         * elflink.h (elf_fix_symbol_flags): Follow the link for the
5258         indirect symbol for the ELF_LINK_NON_ELF bit.
5259         (elf_link_output_extsym): Don't output the indirect symbol even
5260         if the ELF_LINK_NON_ELF bit is set.
5261
5262 2000-06-01  J.T. Conklin  <jtc@redback.com>
5263
5264         * config.bfd (i[3456]86-*-netbsdelf*): New target.
5265         (i[3456]86-*-netbsdaout*): New target.
5266         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
5267         (i[3456]86-*-openbsd*): Likewise.
5268
5269 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
5270
5271         * trad-core.c: From hpux-core.c, include <dirent.h> or
5272         <sys/ndir.h> when possible.
5273
5274 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
5275
5276         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
5277         definitions.  We must not assume they are sorted in the file
5278         according to their index numbers.
5279
5280 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
5281
5282         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
5283         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
5284         R_PARISC_DIR17F are for absolute branches; Handle them as such.
5285
5286 2000-05-30  Nick Clifton  <nickc@cygnus.com>
5287
5288         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
5289         80960CA, 80960MC as valid machine names.
5290
5291 2000-05-30  H.J. Lu  <hjl@gnu.org>
5292
5293         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
5294         visibility bits if the symbol is undefined. Correctly handle
5295         weak undefined symbols with hidden and internal attributes.
5296
5297         * elflink.h (elf_link_add_object_symbols): Always turn the
5298         symbol into local if it has the hidden or internal attribute.
5299
5300 2000-05-29  Philip Blundell  <philb@gnu.org>
5301
5302         * ppcboot.c:  Add packed attribute if compiling with GCC.
5303
5304 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
5305
5306         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
5307
5308 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
5309
5310         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
5311         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
5312         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
5313         a few old comments.
5314
5315 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
5316
5317         * Makefile.am: Update dependencies with "make dep-am"
5318         * Makefile.in: Regenerate.
5319
5320         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
5321         bindtextdomain): Replace defines with those from intl/libgettext.h
5322         to quieten gcc warnings.
5323
5324 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
5325
5326         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
5327
5328         * archive.c (normalize, bfd_bsd_truncate_arname,
5329         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
5330         file names with backslashes.
5331
5332         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
5333         before opening it.
5334
5335         * sysdep.h: Include filenames.h.
5336
5337 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
5338
5339         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
5340
5341 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
5342
5343         * elf64-sparc.c (sparc64_elf_relax_section): New.
5344         (sparc64_elf_relocate_section): Optimize tail call into branch always
5345         if possible.
5346         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5347         (elf32_sparc_relax_section): New.
5348
5349 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
5350
5351         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
5352         Remove unusued variables.
5353         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
5354         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
5355         previous fix, so that shared libs really don't influence targets
5356         extension mask and memory model.
5357
5358 2000-05-23  H.J. Lu  <hjl@gnu.org>
5359
5360         * elf64-alpha.c (elf64_alpha_relocate_section): Check
5361         h->root.other not h->other.
5362         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5363
5364         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
5365
5366 2000-05-23  H.J. Lu  <hjl@gnu.org>
5367
5368         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
5369         undefined symbol with the non-default visibility attributes.
5370         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
5371         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
5372         * elf32-i370.c (i370_elf_relocate_section): Likewise.
5373         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5374         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5375         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
5376         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5377         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5378         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5379         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
5380         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5381
5382 2000-05-22  Richard Henderson  <rth@cygnus.com>
5383
5384         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
5385         PCREL22, PCREL64I.  Zero size of special relocs.
5386         (elf64_ia64_reloc_type_lookup): Likewise.
5387         (USE_BRL, oor_brl, oor_ip): New.
5388         (elf64_ia64_relax_section): New.
5389         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
5390         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
5391         (elf64_ia64_relocate_section): Likewise.
5392         (bfd_elf64_bfd_relax_section): New.
5393         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
5394         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
5395         * bfd-in2.h, libbfd.h: Regenerate.
5396
5397 2000-05-22  Nick Clifton  <nickc@cygnus.com>
5398
5399         * configure.in : Add peigen.lo to MIPS PE targets.
5400         * configure: Regenerate.
5401
5402 2000-05-22  Momchil Velikov  <velco@fadata.bg>
5403
5404         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
5405         only if it is known for both input and output bfds. Separate
5406         error message strings as in some languages, it may be necessary
5407         to change more than one place in the string to change between
5408         'big' and 'little'.
5409
5410         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
5411         endianess checks, call _bfd_generic_verify_endian_match() instead.
5412
5413         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
5414
5415         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
5416
5417         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
5418         endianess before checking bfd flavours.
5419
5420 2000-05-22  H.J. Lu  <hjl@gnu.org>
5421
5422         * elflink.h (elf_link_output_extsym): Clear the visibility
5423         field for symbols not defined locally.
5424
5425 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
5426
5427         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
5428         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
5429         (hppa_rebuild_insn): Mask immediate bits here instead.
5430         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
5431
5432 2000-05-18  Momchil Velikov <velco@fadata.bg>
5433
5434         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
5435         relocs for an executable, ensure that they are virtual addresses.
5436
5437 2000-05-18  Jeffrey A Law  (law@cygnus.com)
5438
5439         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
5440
5441 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
5442             Rick Gorton             <gorton@scrugs.lkg.dec.com>
5443
5444         * elflink.h: Add emitrelocations support: when enabled, relocation
5445         information and relocation sections are put into final output
5446         executables.  If the emitrelocations flag is set, do the following:
5447         (elf_bfd_final_link): Emit relocation sections.
5448         (elf_link_input_bfd): Compute relocation section contents.
5449         (elf_gc_sections): Don't clean relocation sections.
5450
5451 2000-05-16  Catherine Moore  <clm@cygnus.com>
5452
5453         * som.c (som_decode_symclass):  Recognize weak symbols.
5454
5455 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
5456
5457         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
5458         read idata section only from dataoff.
5459         (pe_print_edata): Correctly check for valid eat_member.
5460
5461 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
5462
5463         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
5464
5465 2000-05-14  Philip Blundell  <philb@gnu.org>
5466
5467         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
5468
5469 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
5470
5471         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
5472
5473         * peigen.c (pe_print_idata): Look for .idata section and print
5474         info even if data directory has zero entries.  Read idata section
5475         starting from dataoff, and adjust all data offsets to suit.  Cast
5476         all bfd_vma vars to unsigned long before passing to fprintf.
5477         * peigen.c (pe_print_edata): Similarly, look for .edata section
5478         and print info even if data directory has zero entries.  Cast
5479         all bfd_vma vars to unsigned long before passing to fprintf.
5480
5481         From Szabolcs Szakacsits <szaka@F-Secure.com>
5482         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
5483         directory size which may be bogus.
5484         * peigen.c (pe_print_edata): Similarly.
5485
5486 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
5487
5488         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
5489         section is empty.
5490         (copy_private_bfd_data): Allow for space possibly taken up by elf
5491         headers when calculating segment physical address from lma.
5492
5493 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
5494
5495         * versados.c (versados_scan): Init stringlen and pass_2_done.
5496
5497         * trad-core.c (trad_unix_core_file_p): Return
5498         bfd_error_wrong_format rather than bfd_error_file_truncated.
5499
5500         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
5501         add_data_entry.  DataDirectory virtual address is relative.
5502         (pe_print_idata): Account for relative DataDirectory virtual
5503         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
5504         (pe_print_edata): Similarly.
5505
5506         From Szabolcs Szakacsits <szaka@F-Secure.com>
5507         * peigen.c (dir_names): Add Delay Import Directory.
5508         (pe_print_idata):  Always search for bfd section containing
5509         idata address rather than looking up section name.  Print this
5510         section name rather than .idata.
5511         (pe_print_edata): Similarly.  Also print some fields as %08lx.
5512         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
5513         Win32Version.
5514
5515 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
5516
5517         * xcoff.h: Rename to xcoff-target.h
5518         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
5519         * coff-rs6000.c: Ditto.
5520         * coff64-rs6000.c: Ditto.
5521         * coff-pmac.c: Ditto.
5522         * Makefile.in: Regenerate.
5523
5524 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
5525
5526         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
5527         Change U802TOC64MAGIC to U803XTOCMAGIC.
5528
5529 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
5530
5531         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
5532         * bfd-in.h: Prototype bfd_elf_get_arch_size.
5533         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
5534
5535 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
5536
5537         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
5538
5539 2000-05-03  Martin v. L\81öwis  <loewis@informatik.hu-berlin.de>
5540
5541         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
5542         hidden and internal symbols.
5543         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
5544         visibility.
5545         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
5546         assign a PLT or GOT entry to symbols with hidden and
5547         internal visibility.
5548
5549 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
5550
5551         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
5552         the .bss section.
5553         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5554
5555 2000-05-02  H.J. Lu  <hjl@gnu.org>
5556
5557         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
5558         ELFOSABI_SYSV.
5559
5560 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
5561
5562         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
5563         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
5564         dependencies.
5565         * Makefile.in: Regenerate.
5566
5567 2000-05-01  Jim Wilson  <wilson@cygnus.com>
5568
5569         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
5570         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
5571         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
5572         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
5573         * Makefile.in: Rebuild.
5574
5575 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
5576
5577         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
5578         doesn't work very well.
5579
5580         * elf-hppa.h (elf_hppa_internal_shdr): Define.
5581         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
5582         Set hdr->s_type to 1 if ARCH_SIZE == 32.
5583         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
5584         (elf_hppa_info_to_howto): Likewise.
5585         (elf_hppa_info_to_howto_rel): Likewise.
5586         (elf_hppa_reloc_type_lookup): Likewise.
5587         (elf_hppa_is_local_label_name): Likewise.
5588         (elf_hppa_fake_sections): Likewise.
5589         (elf_hppa_final_write_processing): Likewise.
5590         (elf_hppa_howto_table): Fully initialise all entries.
5591         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
5592         (elf_hppa_info_to_howto): Likewise.
5593         (elf_hppa_info_to_howto_rel): Likewise.
5594         (elf_hppa_reloc_type_lookup): Likewise.
5595         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
5596         elf_hppa_unmark_useless_dynamic_symbols,
5597         elf_hppa_remark_useless_dynamic_symbols,
5598         elf_hppa_record_segment_addrs, elf_hppa_final_link,
5599         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
5600         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
5601         elf32-hppa.c mess is cleaned up.
5602         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
5603         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
5604         r_field then call hppa_field_adjust inline func with variable
5605         r_field arg, instead call hppa_field_adjust with fixed arg.
5606         In case R_PARISC_PCREL22F, don't set r_field.
5607         (elf_hppa_relocate_insn): Change args and return type to unsigned
5608         int.  Call re_assemble_* funcs to do the work.
5609
5610         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
5611         sign extending.
5612
5613         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
5614         extending.
5615         (sign_extend): Mask first before sign extending.
5616         (low_sign_extend): Rewrite without condition expression.
5617         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
5618         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
5619         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
5620         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
5621         result as function return value rather than through pointer arg.
5622         Accept unsigned int args, and return unsigned int.
5623         (re_assemble_3): New.  Combines function of dis_assemble_3 with
5624         re-assembly of opcode and immediate.
5625         (re_assemble_12): Likewise.
5626         (re_assemble_16): Likewise.
5627         (re_assemble_17): Likewise.
5628         (re_assemble_21): Likewise.
5629         (re_assemble_22): Likewise.
5630         (hppa_field_adjust): Rewrite and document, paying attention to
5631         size of types and signed/unsigned issues.
5632         (get_opcode): Shift before masking.
5633         (FDLW): Rename to FLDW.
5634         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
5635         (hppa_rebuild_insn): Change args and return value to unsigned
5636         int.  Make use of re_assemble_*.  Correct case 11.
5637
5638         * dep-in.sed: Handle ../opcodes/.
5639         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
5640         elf64-hppa.h, hppa_stubs.h, xcoff.h.
5641         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
5642         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
5643         elfarm-nabi.lo dependencies outside of auto-dependency area.
5644         Regenerate dependencies.
5645         * Makefile.in: Regenerate.
5646
5647         * configure.in (TRAD_HEADER): Test non-null before
5648         AC_DEFINE_UNQUOTED.
5649         * configure: Regenerate.
5650
5651         * reloc.c: Fix mis-spelling in comment.
5652
5653 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
5654
5655         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
5656         * vms.c (vms_openr_next_archived_file): Return NULL.
5657
5658 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5659
5660         * coffcode.h Copy changes mistakenly done to libcoff.h in
5661         4/24/2000 patch.
5662
5663 2000-04-29  Andreas Jaeger  <aj@suse.de>
5664
5665         * libbfd-in.h: Correctly check GCC version.
5666         * bfd-in.h: Likewise.
5667         * libhppa.h: Likewise.
5668         * libbfd.h: Regenerate.
5669         * bfd-in2.h: Regenerate.
5670
5671 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5672
5673         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
5674         coffdu-rs6000.{lo,c}.
5675         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
5676         on xcoff.h
5677         * Makefile.in: Regenerate.
5678         * xcoff.h: New file.
5679         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
5680         * coff-rs6000.c: Move all declarations and defines that are
5681         common to the xcoff backends into xcoff.h
5682         * coff64-rs6000.c: Ditto,
5683
5684 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5685
5686         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
5687         _bfd_coff_force_symnames in strings and
5688         _bfd_coff_debug_string_prefix_length to their default values.
5689         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
5690
5691 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
5692
5693         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
5694         _bfd_coff_force_symnames in strings and
5695         _bfd_coff_debug_string_prefix_length to their default values.
5696
5697 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
5698
5699         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
5700         Check local_got_refcounts before dereferencing.
5701
5702         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
5703         before deciding we don't need R_PPC_PLT32 relocation.
5704         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
5705         dereferencing.
5706
5707         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
5708
5709         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
5710         .plt entries.
5711         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
5712         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
5713         (elf_i386_relocate_section): Allow for .plt to go missing.
5714         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
5715         can use a relative reloc for got as elf_i386_relocate_section.
5716         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
5717
5718 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
5719
5720         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
5721
5722 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
5723
5724         * Makefile.am (coff64-rs6000.lo): New rule.
5725         * Makefile.in: Regenerate.
5726         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
5727         xcoff_is_local_label_name, xcoff_rtype2howto,
5728         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
5729         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
5730         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
5731         (NO_COFF_SYMBOLS): Define.
5732         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
5733         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
5734         internally.
5735         (MINUS_ONE): New macro.
5736         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
5737         relocation.
5738         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
5739         coff_SWAP_aux_out): Map to the new functions.
5740         * coff64-rs6000.c: New file.
5741         * libcoff.h (bfd_coff_backend_data): Add new fields
5742         _bfd_coff_force_symnames_in_strings and
5743         _bfd_coff_debug_string_prefix_length.
5744         (bfd_coff_force_symnames_in_strings,
5745         bfd_coff_debug_string_prefix_length): New macros for above fields.
5746         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
5747         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
5748         of using coff_swap_sym_in directly.
5749         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
5750         (coff_set_flags) Set magic for XCOFF64.
5751         (coff_compute_section_file_positions): Add symbol name length to
5752         string section length if bfd_coff_debug_string_prefix_length is
5753         true.
5754         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
5755         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
5756         using coff_swap_lineno_in directly.
5757         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
5758         and _bfd_coff_debug_string_prefix_length fields.
5759         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
5760         symbol names into strings table when
5761         bfd_coff_force_symnames_in_strings is true.
5762         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
5763         SET_RELOC_VADDR): New macros.
5764         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
5765         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
5766         code.
5767         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
5768         changes within RS6000COFF_C specific code.
5769         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
5770         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
5771         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
5772         Extend existing hack on target name.
5773         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
5774         target name.
5775         * coff-tic54x.c (ticof): Keep up to date with new fields
5776         in bfd_coff_backend_data.
5777         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
5778         targ_selvecs to include rs6000coff64_vec for rs6000.
5779         * configure.in: Add rs6000coff64_vec case.
5780         * cpu-powerpc.c: New bfd_arch_info_type.
5781
5782 2000-04-24  Jeffrey A Law  (law@cygnus.com)
5783
5784         * config.bfd: Only disable elf32-hppa vectors, not all of the
5785         BSD and OSF configuration support.  Provide (disabled) clauses
5786         for PA64 support.
5787         * configure.in: Add clause for PA64 support.
5788         * configure: Rebuilt.
5789
5790         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
5791         (bfd_elf64_hppa_vec): Declare.
5792
5793         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
5794         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
5795         (elf64-hppa.lo): Add dependencies.
5796         * Makefile.in: Rebuilt.
5797
5798         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
5799
5800 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
5801
5802         * libhppa.h (dis_assemble_16): New function.
5803         (pa_arch): Added pa20w element.
5804
5805 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
5806
5807         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
5808         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
5809         bfd_elf64_slurp_reloc_table.
5810
5811         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
5812         definitions to get external names.
5813         (elf_write_relocs): Renamed from write_relocs and make global.
5814         (elf_slurp_reloc_table): Make global.
5815         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
5816
5817         * archive.c (hpux_uid_gid_encode): New function.
5818         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
5819         defined and the ID is greater than 99999.
5820         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
5821         special uid/gid fields into 32 bit values.
5822
5823 2000-04-21  Matthew Green  <mrg@cygnus.com>
5824
5825         * config.bfd: Add NetBSD/sparc64 support.
5826
5827 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
5828                           David Mosberger  <davidm@hpl.hp.com>
5829                           Timothy Wall <twall@cygnus.com>
5830                           Jim Wilson  <wilson@cygnus.com>
5831
5832         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
5833         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
5834         (BFD64_BACKENDS): Add elf64-ia64.lo.
5835         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
5836         (cpu-ia64.lo, elf64-ia64.lo): New rules.
5837         * Makefile.in: Rebuild.
5838         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
5839         (bfd_ia64_arch): Declare.
5840         (bfd_archures_list): Add bfd_ia64_arch.
5841         * bfd-in2.h: Rebuild.
5842         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
5843         * configure: Rebuild.
5844         * configure.host: (ia64-*-linux*): New host.
5845         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
5846         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
5847         * elf.c (prep_headers): Add bfd_arch_ia64.
5848         * libbfd.h: Rebuild.
5849         * reloc.c: Add IA-64 relocations.
5850         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
5851         Declare.
5852         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
5853         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
5854
5855 2000-04-21  Richard Henderson  <rth@cygnus.com>
5856
5857         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
5858         contents when performing a partial link.
5859         (bfd_elf_d30v_reloc_21): Likewise.
5860
5861 2000-04-20  H.J. Lu  <hjl@gnu.org>
5862
5863         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
5864         patch to symbols defined by a shared object.
5865         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
5866
5867 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
5868
5869         K&R compiler fixes.
5870         * dwarf2.c (concat_filename): Avoid string literal concatenation.
5871         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
5872
5873 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
5874
5875         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
5876         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
5877         (coff-ia64.lo): Add dependency.
5878         * Makefile.in: Regenerate.
5879         * coff-ia64.c: New file.
5880         * efi-app-ia32.c: Ditto.
5881         * efi-app-ia64.c: Ditto.
5882         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
5883         (coff_set_flags): Ditto.
5884         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
5885         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
5886         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
5887         * configure: Regenerate.
5888         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
5889         (PUT_OPTHDR_IMAGE_BASE): Ditto.
5890         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5891         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
5892         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5893         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
5894         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5895         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
5896         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5897         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
5898         (GET_PDATA_ENTRY): Ditto.
5899         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
5900         data_start.  Use above macros to read fields that are 64 bit wide for
5901         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
5902         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
5903         FileAlignment and SectionAlignment to minimum alignment if they
5904         are zero.
5905         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
5906         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
5907         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
5908         Use above macros to write fields that are 64 bit wide for
5909         COFF_WITH_PEP64.
5910         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
5911         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
5912         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
5913         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
5914         begin address, end address, and unwind info address only.  Use
5915         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
5916         print addresses.
5917         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
5918         HIGH3ADJ relocation names.
5919         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
5920         * targets.c: Declare bfd_efi_app_ia32_vec and
5921         bfd_efi_app_ia64_vec.
5922         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
5923         bfd_efi_app_ia64_vec.
5924
5925 2000-04-17  Timothy Wall  <twall@cygnus.com>
5926
5927         * bfd-in2.h: Add prototypes for tic54x load page access.
5928         * bfd-in.h: Regenerate.
5929         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
5930         in customized _set_arch_mach function.
5931         * coffcode.h (coff_set_alignment_hook): Set section load page if
5932         the appropriate macro is defined.
5933         (write_object_contents): Read section load page.
5934
5935 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
5936
5937         * elf32-hppa.h: Update copyright date.
5938
5939         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
5940         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
5941
5942         * elf32-d30v.c (MAX32): Don't use LL suffix.
5943         (MIN32): Define in terms of MAX32.
5944         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
5945
5946         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
5947         expression.
5948
5949         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
5950
5951 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
5952
5953         * dep-in.sed: Match space before file name, not after.
5954         * Makefile.am: Regenerate dependencies.
5955         * Makefile.in: Regenerate.
5956
5957         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
5958         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
5959         extend without an if statement.
5960
5961 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
5962
5963         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
5964         signed quantites.
5965         * elf32-mips.c (gprel16_with_gp): Likewise.
5966         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
5967         here using -0x40000, not (int)0xfffc0000.
5968         (elf32_hppa_size_of_stub): Likewise.
5969
5970 2000-04-11  Timothy Wall  <twall@cygnus.com>
5971
5972         * coff-tic54x.c: Now builds with all targets.
5973         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
5974         * Makefile.in: Regenerate.
5975         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
5976         unitialized variable.
5977
5978 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
5979
5980         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
5981         --enable-build-warnings option.
5982         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
5983         * Makefile.in, configure: Re-generate.
5984
5985 2000-04-07  Nick Clifton  <nickc@cygnus.com>
5986
5987         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
5988         BFD_RELOC_THUMB_PCREL_BLX.
5989
5990         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5991         R_ARM_XPC25 and R_ARM_THM_PC22.
5992
5993         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
5994         R_ARM_XPC25 and R_ARM_THM_XPC22.
5995         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
5996         R_ARM_[XPC25|THM_XPC22].
5997
5998         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
5999         elf/arm-oabi.h to elf/arm.h
6000
6001         * Makefile.am: Fix dependency for elfarm-oabi.c
6002         * Makefile.in: Regenerate.
6003
6004         * bfd-in2.h: Regenerate.
6005         * libbfd.h: Regenerate.
6006
6007 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
6008
6009         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
6010         and restore it on failure.  Release newly allocated tdata on
6011         failure.
6012
6013 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
6014
6015         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
6016         (decode_line_info): Set it.  Report error if unit->line_offset is
6017         equal to or larger than it.
6018
6019 2000-04-07  Timothy Wall  <twall@cygnus.com>
6020
6021         * targets.c: Added vecs for tic54x.
6022         * reloc.c: Added relocs for tic54x.
6023         * libbfd.h: Regenerated.
6024         * configure: Add TI COFF vecs for tic54x.
6025         * configure.in: Ditto.
6026         * config.bfd (targ_cpu): Recognize new tic54x target.
6027         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
6028         * bfd-in2.h: Add tic54x target and relocations.
6029         * Makefile.am, Makefile.in: Add tic54x target.
6030         * archures.c (bfd_archures_list): Add tic54x target.
6031         * coff-tic54x.c: New.
6032         * cpu-tic54x.c: New.
6033
6034 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
6035
6036         * elfcore.h (elf_core_file_p): call backend_object_p which
6037         thereby gets an opportunity to update the arch/machine type.
6038
6039 2000-04-06  Timothy Wall  <twall@cygnus.com>
6040
6041         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
6042         class.  Handle SEC_CLINK and SEC_BLOCK flags.
6043         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
6044         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
6045
6046 2000-04-06  Nick Clifton  <nickc@cygnus.com>
6047
6048         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
6049         EF_INTERWORK if this is an unknown EABI.
6050         (elf32_arm_merge_private_bfd_data): Check EABI version
6051         numbers.  Only check EF_xxx flags if the EABI version number
6052         is unknown.
6053         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
6054         if the EABI version number is unknown.
6055         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
6056         if the EABI version number is unknown.
6057
6058 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
6059
6060         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
6061         BFD_RELOC_SH_LOOP_END.
6062         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
6063         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
6064         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
6065         (sh_elf_reloc_loop): New function.
6066         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
6067         any more.
6068         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
6069         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
6070         * bfd-in2.h, libbfd.h: Regenerate.
6071
6072 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
6073
6074         * po/bfd.pot: Regenerate.
6075
6076         * Makefile.am: Remove extraneous mkdep comment.
6077         (MKDEP): Use gcc -MM rather than mkdep.
6078         (DEP): Quote when passing vars to sub-make.  Add warning
6079         message to end.
6080         (DEP1): Rewrite for "gcc -MM".
6081         (CLEANFILES): Add DEP2.
6082         Update dependencies.
6083         * Makefile.in: Regenerate.
6084
6085 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
6086
6087         * configure.in: Added corefile support for AIX 4.3.  In particular,
6088         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
6089         compiling rs6000-core.c.
6090         * configure: Regenerated.
6091
6092 2000-04-03  H.J. Lu  <hjl@gnu.org>
6093
6094         * cache.c (bfd_open_file): Unlink the output file only if
6095         it has non-zero size.
6096
6097 2000-04-01  Ken Block USG  <block@zk3.dec.com>
6098
6099         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
6100         relative relocations for non-loaded sections in shared objects.
6101         (elf64_alpha_check_relocs): Similarly.
6102
6103 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
6104
6105         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
6106         BFD_RELOC_16 to switch for extended relocs.
6107         (MY_swap_ext_reloc_in): New.
6108         (MY_swap_ext_reloc_out): New.
6109         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
6110         than NAME(aout,swap_ext_reloc_in) for extended relocs.
6111         (NAME(aout,squirt_out_relocs)): Similarly use
6112         MY_swap_ext_reloc_out.
6113         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
6114
6115 2000-04-03  Kazu Hirata  <kazu@hxi.com>
6116
6117         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
6118         the R_PCRWORD_B case.
6119
6120 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
6121
6122         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
6123         on some targets.
6124         * ihex.c : Ditto.
6125
6126 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
6127
6128         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
6129         HOWTO references to bfd_elf_generic_reloc, that have
6130         partial_inplace == true, now use the new function.  The function
6131         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
6132         extends its fixes to the R_M32R_{16,24,32} relocs.
6133         The new logic in m32r_elf_lo16_reloc() has been removed, and
6134         it instead calls the new routine to obtain that functionality.
6135
6136 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
6137
6138         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
6139         elf32_avr_check_relocs, avr_final_link_relocate,
6140         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
6141         elf32_avr_object_p): Add prototypes.
6142         (elf32_avr_gc_mark_hook): Add default for h->root.type.
6143         (bfd_elf_avr_final_write_processing): Make static.
6144
6145 2000-03-27  Denis Chertykov  <denisc@overta.ru>
6146
6147         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
6148         * archures.c (bfd_architecture): Add AVR architecture.
6149         (bfd_archures_list): Add reference to AVR architecture info.
6150         * elf.c (prep_headers): Handle bfd_arch_avr.
6151         * reloc.c: Add various AVR relocation enums.
6152         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
6153         list.
6154         * Makefile.am: Add support for AVR elf.
6155         * configure.in: Likewise.
6156         * config.bfd: Likewise.
6157         * Makefile.in: Regenerate.
6158         * configure: This too.
6159         * bfd-in2.h: And this.
6160         * libbfd.h: And this.
6161
6162 2000-03-24  H.J. Lu  <hjl@gnu.org>
6163
6164         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
6165         (elf64_alpha_find_reloc_at_ofs): Likewise.
6166
6167 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
6168
6169         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
6170         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
6171         allowable range used to be -2**(n-1) to 2**n-1.
6172         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
6173         "boolean overflow" with "bfd_reloc_status_type flag".
6174
6175 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
6176
6177         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
6178
6179 2000-03-14  Kazu Hirata  <kazu@hxi.com>
6180
6181         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
6182         of shrinks properly, including the last reloc.
6183
6184 2000-03-13  Kazu Hirata  <kazu@hxi.com>
6185
6186         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
6187         check for R_MOVL2.
6188
6189 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
6190
6191         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
6192         a format mismatch rather than an "error" from bfd_read such as
6193         bfd_error_file_truncated.
6194
6195 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
6196
6197         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
6198         sign-extension and big-endian compensation for
6199         R_MIPS_64 even in ld -r.
6200
6201 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
6202
6203         * elf32-mips.c (mips_elf_next_relocation): Rename from
6204         mips_elf_next_lo16_relocation, and generalize to look
6205         for any relocation type.
6206         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
6207         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
6208         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
6209         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
6210         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
6211         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
6212         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
6213         (mips_rtype_to_howto): Likewise.
6214         (mips_elf_calculate_relocation): Handle new relocs.
6215         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
6216         are paired.  The addend for R_MIPS_GNU_REL16_S2
6217         is shifted right two bits.
6218
6219 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
6220
6221         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
6222         comment, and ensure it doesn't happen again.
6223         (bfd_install_relocation): Same here.
6224         (_bfd_relocate_contents): Don't bother assigning unused signmask
6225         shift result.  Fix typos in comments.
6226         Remove trailing whitespace throughout file.
6227
6228 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
6229
6230         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
6231         * bfd-in2.h: Rebuild.
6232
6233 2000-03-06  Nick Clifton  <nickc@cygnus.com>
6234
6235         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
6236         sym_ptr_ptr fields.
6237         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
6238         (SIZEOF_ILF_STRINGS): Redefine.
6239         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
6240         relative reloc, as opposed to a section relative reloc.
6241         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
6242         not C_LABEL.
6243         Add length of symbol's prefix to string pointer.
6244         Store a pointer to the symbol in the symbol pointer table.
6245         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
6246         Initialise the symbol pointer table.
6247         Store the hint in the Hint/Name table.
6248         Make the jump reloc be symbol realtive, not section relative.
6249         Create an import symbol for imported code.
6250
6251 2000-03-06  Catherine Moore  <clm@cygnus.com>
6252
6253         * elf.c (swap_out_syms):  Check for null type_ptr.
6254
6255 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
6256
6257         * aout-target.h (MY(write_object_contents)): Remove unused
6258         and unusable "#if CHOOSE_RELOC_SIZE".
6259         * pc532-mach.c (MY(write_object_contents)): Ditto.
6260         * netbsd.h (MY(write_object_contents)): Ditto.
6261         * hp300hpux.c (MY(write_object_contents)): Ditto.
6262         * freebsd.h (MY(write_object_contents)): Ditto.
6263         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
6264
6265 2000-02-29  H.J. Lu  <hjl@gnu.org>
6266
6267         * peicode.h (jtab): Make it static.
6268
6269         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
6270         defined and COFF_IMAGE_WITH_PE is not defined.
6271         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
6272         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
6273
6274 2000-03-01  Nick Clifton  <nickc@cygnus.com>
6275
6276         * coff-arm.c (bfd_arm_process_before_allocation): Make
6277         'symndx' signed to prevent compile time warning.
6278
6279         * coff-mcore.c: Remove unused prototype for pe_object_p.
6280
6281         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
6282         functions that are not used when COFF_IMAGE_WITH_PE is
6283         defined.
6284         (struct sh_opcode): Change type of 'flags' field to unsigned
6285         long so that it can hold the USESAS flag.
6286
6287         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
6288
6289         * elf-m10300.c (mn10300_elf_relax_section): Initialise
6290         'sym_sec'.
6291
6292         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
6293         parameters.
6294         Remove unusued variables and code.
6295         (elf_backend_add_symbol_hook): Fix prototype.
6296
6297         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
6298         'srelgot'.
6299
6300         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
6301         'oldinst'.
6302
6303         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
6304         parameters.
6305         Remove unusued variables and code.
6306         (elf_backend_add_symbol_hook): Fix prototype.
6307
6308         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
6309
6310         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
6311         to unused function parameter.
6312
6313         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
6314         parameters.
6315         Use EMPTY_HOWTO to initialise empty howto slots.
6316         Remove unused variables.
6317
6318         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
6319
6320 2000-03-01  H.J. Lu  <hjl@gnu.org>
6321
6322         * aoutx.h (aout_link_input_section_std): Pass "true" to
6323         the undefined_symbol callback.
6324         (aout_link_input_section_ext): Likewise.
6325         * bout.c (get_value): Likewise.
6326         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
6327         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
6328         Likewise.
6329         (alpha_relocate_section): Likewise.
6330         * coff-arm.c (coff_arm_relocate_section): Likewise.
6331         * coff-i960.c (coff_i960_relocate_section): Likewise.
6332         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
6333         * coff-mips.c (mips_relocate_section): Likewise.
6334         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
6335         * coff-sh.c (sh_relocate_section): Likewise.
6336         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
6337         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
6338         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
6339         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
6340         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6341         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6342         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6343         * elf32-i370.c (i370_elf_relocate_section): Likewise.
6344         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6345         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6346         * elf32-sh.c (sh_elf_relocate_section): Likewise.
6347         * elf32-v850.c (v850_elf_relocate_section): Likewise.
6348         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6349         * elflink.h (elf_link_output_extsym): Likewise.
6350         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
6351         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
6352         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
6353
6354         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
6355         undefined_symbol callback when building shared library with
6356         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
6357         "true".
6358         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
6359         * elf32-i386.c (elf_i386_relocate_section): Likewise.
6360         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6361         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6362         (elf32_mips_get_relocated_section_content): Likewise.
6363         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6364         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6365         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6366         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6367
6368 2000-02-28  Nick Clifton  <nickc@cygnus.com>
6369
6370         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
6371         * Makefile.in: Regenerate.
6372
6373         * configure.in: Add support for mips and sh pe vectors.
6374         * configure: regenerate.
6375
6376         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
6377         targets.
6378
6379         * targets.c: Add mips and sh pe vectors.
6380
6381         * libpei.h (coff_final_link_postscript): Only define if not
6382         already defined.
6383
6384         * coffcode.h: Add support for WinCE magic numbers.
6385
6386         * peigen.c (pe_print_reloc): Update comment and rearrange
6387         appending of newline character.
6388
6389         * peicode.h: Add support for Image Library Format.
6390         (pe_ILF_vars): Structure containing data used by ILF code.
6391         (pe_ILF_make_a_section): New function.  Create a section based
6392         on ILF data.
6393         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
6394         ILF data.
6395         (pe_ILF_make_a_symbol): New function.  Create a symbol based
6396         on ILF data.
6397         (pe_ILF_save_relocs): New function.  Store the relocs created
6398         by pe_ILF_make_a_reloc in a section.
6399         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
6400         an ILF object.
6401         (pe_ILF_object_p): New function.  Return a bfd_target pointer
6402         for an ILF object.
6403         (pe_bfd_object_p): If an ILF object is detected call
6404         pe_ILF_object_p on it.
6405
6406         * coff-arm.c: Add support for WinCE relocs which are different
6407         from normal ARM COFF relocs.
6408         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
6409
6410         * coff-sh.c: Add support for sh-pe target.
6411         * pe-sh.c: New file.  Support code for sh-pe target.
6412         * pei-sh.c: New file.  Support code for sh-pe target.
6413
6414         * pe-mips.c: New file.  Support code for mips-pe target.
6415         * pei-mips.c: New file.  Support code for mips-pe target.
6416
6417 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
6418
6419         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
6420         architecture if the object causing the bump is dynamic.
6421         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
6422         and also don't it for memory ordering.
6423         (sparc64_elf_write_relocs): Take src_rela out of the loop.
6424
6425 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
6426
6427         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
6428         calling bfd_get_section_size_before_reloc.
6429         (decode_line_info): Likewise.
6430         (_bfd_dwarf2_find_nearest_line): Likewise.
6431
6432 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
6433
6434         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
6435         name of the libtool directory.
6436         * Makefile.in: Rebuild.
6437
6438 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
6439
6440         * som.c (SOM_HOWTO): Define.
6441         (som_hppa_howto_table): Use it.
6442
6443 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
6444
6445         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
6446
6447         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
6448
6449 2000-02-24  Catherine Moore  <clm@cygnus.com>
6450
6451         * som.c (som_misc_symbol_info):  Add field
6452         secondary_def.
6453         (som_bfd_derive_misc_symbol_info):  Initialize
6454         secondary_def.
6455         (som_build_and_write_symbol_table): Keep track
6456         of secondary_def field.
6457         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
6458         if secondary_def field is set.
6459         (som_bfd_ar_write_symbol_stuff): Initialize
6460         secondary_def.
6461
6462 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
6463
6464         * dwarf2.c (read_address): Read 16-bits addresses.
6465         (parse_comp_unit): Accept addr_size == 2.
6466
6467 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
6468
6469         * bfd-in.h: Update copyright date.
6470
6471 2000-02-23  Linas Vepstas <linas@linas.org>
6472
6473         * cpu-i370.c: New file.
6474         * elf32-i370.c:  New file.
6475         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
6476         (bfd_i370_arch): New.
6477         (bfd_archures_list): Add bfd_i370_arch.
6478         * elf.c (prep_headers): Add bfd_arch_i370.
6479         * Makefile.am: Add support for IBM 370 elf.
6480         * config.bfd: Likewise.
6481         * configure.in: Likewise.
6482         * libbfd.h (bfd_reloc_code_real_names): Likewise.
6483         * reloc.c (bfd_reloc_code_type): Likewise.
6484         * targets.c: Likewise.
6485
6486         * Makefile.in: Regenerate.
6487         * configure: Regenerate.
6488         * bfd-in2.h: Regenerate.
6489
6490 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
6491
6492         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
6493         invalid relocation types, and change them to R_386_NONE.
6494
6495 2000-02-22  H.J. Lu  <hjl@gnu.org>
6496
6497         * elflink.h (elf_link_add_object_symbols): If a version symbol is
6498         not defined, don't add a second ELF_VER_CHR.
6499
6500         * elflink.h (elf_bfd_final_link): Call output_extsym for global
6501         symbols converted to local symbols even when stripping all
6502         symbols.
6503         (elf_link_output_extsym): Process global symbols converted to
6504         local symbols even if they are being stripped.
6505
6506 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
6507
6508         * archures.c (bfd_octets_per_byte): Return unsigned int.
6509         (bfd_arch_mach_octets_per_byte): Ditto.
6510         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
6511         comparison warning.
6512         * section.c (bfd_get_section_size_before_reloc): Quell signed
6513         vs. unsigned comparison warning.
6514         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
6515         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
6516         change.  What was I thinking?
6517         * bfd-in2.h: Regenerate.
6518
6519         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
6520         (elf_gc_sections): Same here.
6521         (elf_gc_common_finalize_got_offsets): And here.
6522
6523 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
6524
6525         ELF HPPA doesn't work at present; remove it until it does.
6526         * config.bfd: Comment out setting targ_defvec to
6527         bfd_elf32_hppa_vec.
6528         * Makefile.am: Rebuild dependencies.
6529         (BFD32_BACKENDS): Remove elf32-hppa.lo.
6530         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
6531         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
6532         * Makefile.in: Rebuild.
6533         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
6534
6535 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
6536
6537         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
6538         is no bfd_free().  Revert bfd_free part of previous change.
6539
6540 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
6541
6542         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
6543         arrays.
6544         (coff_compute_section_file_positions): Use bfd_free to pair
6545         bfd_malloc.
6546         (coff_write_object_contents): Likewise.
6547
6548         * coff-rs6000.c (xcoff_howto_table_16): New variable.
6549         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
6550
6551 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
6552
6553         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
6554         (xcoff_ar_file_hdr_big): New structure.
6555         (SIZEOF_AR_FILE_HDR_BIG): New macro.
6556         (xcoff_ar_hdr_big): New structure.
6557         (SIZEOF_AR_HDR_BIG): New macro.
6558         (xcoff_big_format_p): New macro.
6559         (xcoff_ardata_big): New macro.
6560         (arch_xhdr_big): New macro.
6561         (xcoff_slurp_armap): Handle large archives.
6562         (xcoff_archive_p): Detect large archives.
6563         (xcoff_read_ar_hdr): Handle large archives.
6564         (xcoff_openr_next_archived_file): Handle large archives.
6565         (xcoff_generic_stat_arch_elt): Handle large archives.
6566         (xcoff_write_armap_old): Rename from xcoff_write_armap.
6567         (xcoff_write_armap_big): New function.
6568         (xcoff_write_armap): New function, dispatch to _old or _big.
6569         (xcoff_write_archive_contents_old): Rename from
6570         xcoff_write_archive_contents.
6571         (xcoff_write_archive_contents_big): New function.
6572         (xcoff_write_archive_contents): New function, dispatch to _old or
6573         _big.
6574
6575 2000-02-18  Richard Henderson  <rth@cygnus.com>
6576
6577         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
6578         and hide_symbol members.
6579         (elf_link_hash_copy_indirect): Remove.
6580         (elf_link_hash_hide_symbol): Remove.
6581         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
6582         and elf_backend_hide_symbol.
6583         (_bfd_elf_link_hash_copy_indirect): Declare.
6584         (_bfd_elf_link_hash_hide_symbol): Declare.
6585         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
6586         (_bfd_elf_link_hash_hide_symbol): Likewise.
6587         (_bfd_elf_link_hash_table_init): Don't init killed members.
6588         * elflink.h (elf_link_add_object_symbols): Use the bed function
6589         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
6590         (elf_link_assign_sym_version): Likewise.
6591         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
6592         (elf_backend_hide_symbol): Likewise.
6593         (elfNN_bed): Update for new members.
6594
6595 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
6596
6597         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
6598         STACK_END_ADDR): Define for new core file format.
6599         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
6600         for handling the vagaries of the various core file structures used
6601         by AIX over the years.
6602         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
6603         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
6604         core_dumpx structure.
6605
6606 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
6607
6608         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
6609         (bfd_mach_sh3_dsp): Likewise.
6610         (bfd_mach_sh4): Reinstate.
6611         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
6612         * bfd-in2.h: Regenerate.
6613         * coff-sh.c (struct sh_opcode): flags is no longer short.
6614         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
6615         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
6616         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
6617         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
6618         (sh_opcodes): No longer const.
6619         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
6620         (sh_insn_uses_reg): Check for USESAS and USESR8.
6621         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
6622         (_bfd_sh_align_load_span): Return early for SH4.
6623         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
6624         Take into account that field b of a parallel processing insn
6625         could be mistaken for a separate insn.
6626         * cpu-sh.c (arch_info_struct): New array elements for
6627         sh2, sh-dsp and sh3-dsp.
6628         Reinstate element for sh4.
6629         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
6630         (SH4_NEXT): Reinstate.
6631         (SH3_NEXT, SH3E_NEXT): Adjust.
6632         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
6633         * elf32-sh.c (sh_elf_set_private_flags): New function.
6634         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
6635         (sh_elf_merge_private_data): New function.
6636         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
6637         (bfd_elf32_bfd_copy_private_bfd_data): Define.
6638         (bfd_elf32_bfd_merge_private_bfd_data): Change to
6639         sh_elf_merge_private_data.
6640
6641 2000-02-13  Richard Henderson  <rth@cygnus.com>
6642
6643         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
6644         hide_symbol members.
6645         (elf_link_hash_copy_indirect): New.
6646         (elf_link_hash_hide_symbol): New.
6647         * elflink.h (elf_link_add_object_symbols): Break out copy from
6648         indirect new new symbol to elf.c.
6649         (elf_link_assign_sym_version): Break out privatization of
6650         non-exported symbol to elf.c.
6651         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
6652         (_bfd_elf_link_hash_hide_symbol): New.
6653         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
6654
6655 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
6656
6657         * section.c (_bfd_strip_section_from_output): Add info parameter.
6658         If it passed as non-NULL, use it to check whether any input BFD
6659         has an input section which uses this output section.  Change all
6660         callers.
6661         * bfd-in2.h: Rebuild.
6662
6663         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
6664         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
6665         1999-11-29.
6666         * bfd-in2.h: Rebuild.
6667
6668 2000-02-10  Timothy Wall  <twall@cygnus.com>
6669
6670         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
6671         allow final modifications of swapped-in symbol.
6672         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
6673         * coffcode.h (coff_write_relocs): Use macro
6674         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
6675         symbol index should be set to -1.
6676
6677 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
6678
6679         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
6680         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
6681         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
6682         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
6683         sh_insns_uses_or_sets_freg): New functions.
6684         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
6685         * (sh_insns_conflict): Use new functions and new macros to
6686         detect conflicts when two instructions both set same integer registers,
6687         both set same fp register, and both set special register.
6688
6689 2000-02-09  Timothy Wall  <twall@cygnus.com>
6690
6691         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
6692         swapping in sections, so that the swapping routines have access to
6693         the arch/mach info.
6694
6695 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
6696
6697         * coff-go32.c: Update comment. Update copyright.
6698
6699 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
6700
6701         * syms.c (bfd_decode_symclass)
6702         Two new class characters were added - 'V' and 'v'.  The
6703         meaning of 'W' is now restricted to just weak non-object
6704         symbols.  This allows differentiation between, for example,
6705         weak functions vs weak objects.  nm for example now dumps:
6706         'W' = weak global
6707         'w' = weak unresolved
6708         'V' = weak global object
6709         'v' = weak unresolved object
6710
6711         (bfd_is_undefined_symclass): New function.  Return true if the
6712         given symbol class represents and undefined/unresolved symbol.
6713
6714         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
6715         unresolved symbols.
6716
6717         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
6718
6719         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
6720         STT_ARM_16BIT flag set, but it is not attached to a data object
6721         return STT_ARM_16BIT so that it will be treated as code by the
6722         disassembler.
6723
6724 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
6725
6726         * coff-i386.c (i3coff_object_p): Remove prototype.
6727         Update copyright.
6728
6729         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
6730         to name.  Update copyright.
6731
6732         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
6733         assignment to avoid warning.  Update copyright.
6734
6735 2000-01-24  Robert Lipe  (robertl@sco.com)
6736
6737         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
6738         instead of using GNU C extension.
6739
6740 2000-01-21  Nick Clifton  <nickc@cygnus.com>
6741
6742         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
6743         amount from a bfd_in_memory structure.
6744         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
6745         structure.
6746
6747 2000-01-14  Nick Clifton  <nickc@cygnus.com>
6748
6749         * linker.c (default_indirect_link_order): oops - fix incorrectly
6750         applied patch from Tim Wall.
6751
6752 2000-01-13  Timothy Wall (twall@tiac.net>
6753
6754         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
6755         = scnhsz, filhsz, relsz, aoutsz, etc)
6756
6757         * coffswap.h: Ditto.
6758
6759 2000-01-13  Nick Clifton  <nickc@cygnus.com>
6760
6761         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
6762         interwork thumb to arm stub.
6763
6764 2000-01-13  Timothy Wall (twall@tiac.net>
6765
6766         * archures.c (bfd_octets_per_byte): New function: Return
6767         target byte size.
6768         (bfd_arch_mach_octets_per_byte): New function: Return target
6769         byte size.
6770
6771         * section.c: Distinguish between octets and bytes for usage of
6772         _cooked_size,  _raw_size, and output_offset.  Clarify
6773         description of bfd_set_section_contents.
6774
6775         * bfd-in2.h: Regenerate.
6776
6777         * coffgen.c: Indicate that the offset parameter is in bytes, not
6778         octets.
6779
6780         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
6781         where appropriate to get the octet offset when calling
6782         bfd_set_section_contents.
6783         (bfd_coff_reloc_link_order): Ditto.
6784
6785         * linker.c (bfd_generic_reloc_link_order): Ditto.
6786         (_bfd_default_link_order): Ditto.
6787
6788         * reloc.c (bfd_perform_relocation):  Distinguish between octets
6789         and bytes.  Use octets when indexing into octet data; use bytes
6790         when calculating target addresses.
6791         (bfd_install_relocation): Ditto.
6792
6793         * srec.c (srec_write_section): Ditto.
6794
6795 2000-01-13  Nick Clifton  <nickc@cygnus.com>
6796
6797         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
6798         3 to 2.  This allows 4 byte sized sections, which is necessary for
6799         dlltool to build functioning DLLs.
6800
6801 2000-01-10  Philip Blundell  <pb@futuretv.com>
6802
6803         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
6804         (arm*-*-conix*): New target.
6805
6806 2000-01-10  Egor Duda  <deo@logos-m.ru>
6807
6808         * config.bfd: Include elf32_i386 vector to target list for cygwin
6809         and mingw.
6810
6811         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
6812         * configure.in: Test for structure win32_pstatus_t in
6813         <sys/procfs.h>
6814         * configure: Regenerate.
6815
6816         * elf.c (elfcore_grok_win32pstatus): New function: process
6817         win32_pstatus_t notes in elf core file.
6818         (elfcore_grok_note): Detect win32_pstatus notes.
6819
6820 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
6821
6822         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
6823         visibility.
6824         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
6825         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
6826
6827 For older changes see ChangeLog-9899
6828 \f
6829 Local Variables:
6830 mode: change-log
6831 left-margin: 8
6832 fill-column: 74
6833 version-control: never
6834 End: