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