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