2001-04-19 Andreas Jaeger <aj@suse.de>
[external/binutils.git] / bfd / ChangeLog
1 2001-04-19  Andreas Jaeger  <aj@suse.de>
2
3         * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
4         (elf64_x86_64_plt_entry): Likewise.
5         (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
6         (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
7
8 2001-04-17  Hans-Peter Nilsson  <hp@axis.com>
9
10         * elf32-cris.c: Tweak comments related to dynamic linking.
11         (cris_elf_relocate_section): When not creating shared object, fill
12         in the .got table for any symbol not in the dynamic symbol table.
13         (elf_cris_finish_dynamic_symbol): When not creating shared object,
14         only emit a .got.rela reloc if the symbol is in the dynamic symbol
15         table.
16         (cris_elf_check_relocs): Use variable r_type in all places rather
17         than the original expression.  Add default case in switch for
18         reloc types.
19         (elf_cris_size_dynamic_sections): Iterate over
20         elf_cris_discard_excess_program_dynamics when not creating shared
21         library.
22         (elf_cris_discard_excess_dso_dynamics): Renamed from
23         elf_cris_discard_copies.  Correct typo, s/Rel/Rela/.
24         (elf_cris_discard_excess_program_dynamics): New.
25
26 2001-04-14  Mark Elbrecht  <snowball3@bigfoot.com>
27
28         * coffcode.h (coff_write_object_contents): Use
29         bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
30
31 2001-04-14  H.J. Lu  <hjl@gnu.org>
32
33         * bfd-in2.h: Regenerate.
34
35 2001-04-14  Jakub Jelinek <jakub@redhat.com>
36
37         * section.c (STD_SECTION): Add entsize.
38
39 2001-04-13  H.J. Lu  <hjl@gnu.org>
40
41         * section.c (SEC_MERGE): Define new flag for merging.
42         (SEC_STRINGS): Likewise.
43         (entsize): New field.
44
45 2001-04-13  Roger Sayle  <roger@metaphorics.com>
46
47         * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
48         flag on pe-i386 targets.
49
50 2001-04-13  Jakub Jelinek  <jakub@redhat.com>
51
52         * libbfd-in.h (_bfd_merge_section): New.
53         (_bfd_write_merged_section): New.
54         (_bfd_merged_section_offset): New.
55         * libbfd.h: Rebuilt.
56         * linker.c (_bfd_generic_link_output_symbols): Handle
57         discard_sec_merge.
58         * aoutx.h (aout_link_write_symbols): Likewise.
59         * pdp11.c (aout_link_write_symbols): Likewise.
60         * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
61         (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
62         sections.
63         (elf_link_sec_merge_syms): New.
64         (elf_link_input_bfd): Call _bfd_merged_section_offset
65         and _bfd_write_merged_section.
66         Handle discard_sec_merge.
67         * elf-bfd.h (struct elf_link_hash_table): Add merge_info
68         field.
69         (struct bfd_elf_section_data): Likewise.
70         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
71         SEC_STRINGS section flags and entsize from their ELF counterparts.
72         (_bfd_elf_link_hash_table_init): Initialize merge_info.
73         (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
74         from their BFD counterparts.
75         * merge.c: New file.
76         * Makefile.am: Add strtab.lo.
77         * Makefile.in: Rebuilt.
78
79 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
80
81         * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
82         only hide symbols marked STV_INTERNAL or STV_HIDDEN.
83
84 2001-04-05  Steven J. Hill  <sjhill@cotw.com>
85
86         * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
87         endian MIPS ELF target.
88         * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
89         MIPS ELF target.
90
91         * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
92         64bit big endian MIPS ELF target.
93         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
94         endian MIPS ELF target.
95         * configure: Regenerated.
96
97         * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
98         little endian targets.
99         (mips_elf_sym_is_global): Handle traditional targets.
100
101         * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
102         64bit big endian MIPS ELF target.
103         (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
104         endian MIPS ELF target.
105
106         * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
107         and bfd_elf64_tradlittlemips_vec.
108
109 2001-04-05  David Mosberger  <davidm@hpl.hp.com>
110
111         * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
112         ordinary "progbits" section.
113
114 2001-04-04  Alan Modra  <alan@linuxcare.com.au>
115
116         * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
117         when -Bsymbolic causes a symbol to no longer need a .plt entry.
118
119 2001-04-03  David Mosberger  <davidm@hpl.hp.com>
120
121         * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
122
123 2001-03-30  H.J. Lu  <hjl@gnu.org>
124
125         * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
126         (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
127
128 2001-03-26  H.J. Lu  <hjl@gnu.org>
129
130         * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
131         if there are any relocations for generic ELF.
132         (bfd_elf32_bfd_link_add_symbols): Defined to
133         elf32_generic_link_add_symbols.
134         * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
135         if there are any relocations for generic ELF.
136         (bfd_elf64_bfd_link_add_symbols): Defined to
137         elf64_generic_link_add_symbols.
138
139 2001-03-23  Nick Clifton  <nickc@redhat.com>
140
141         * Makefile.am (BUILD_CFILES): New variable: List of C source
142         files created in build directory.
143         (BUILD_HFILES): New variable: List of header files created in
144         build directory.
145         (POTFILES): Delete.
146         (po/POTFILES.in): Replace rule with empty entry.
147         (po/SRC-POTFILES.in): New rule: Create a list of source files
148         in the source directory.
149         (po/BLD-POTFILES.in): New rule: Create a list of source files
150         in the build directory.
151         (MOSTLYCLEAN): Do not delete source files created in build
152         directory.
153         * Makefile.in: Regenerate.
154         * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
155         into po/Makefile.
156         * configure: Regenerate.
157
158         * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
159         and BLD_POTFILES.
160         Add .. to the search path when building bfd.pot.
161         Delete POTFILES when performing distclean.
162         Add comment describing why distclean is broken in maintainer mode.
163         * po/POTFILES.in: Delete.
164         * po/SRC-POTFILES.in: New file.
165         * po/BLD-POTFILES.in: New file.
166         * po/bfd.pot: Regenerate.
167
168 2001-03-22  Hans-Peter Nilsson  <hp@axis.com>
169
170         * elf32-cris.c: Shlib and PIC support.  PCREL tweaks.
171         (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
172         elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
173         elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
174         elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
175         elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
176         functions.
177         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
178         R_CRIS_32_PCREL>: Correct comments.  Set pcrel_offset to false.
179         <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
180         R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
181         R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
182         New HOWTO members for new relocs.
183         (cris_reloc_map): Map new relocs.
184         (ELF_DYNAMIC_INTERPRETER): Define.
185         (PLT_ENTRY_SIZE): Define.
186         (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
187         elf_cris_pic_plt_entry): New, PLT templates.
188         (struct elf_cris_pcrel_relocs_copied, struct
189         elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
190         (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
191         (cris_final_link_relocate): Check that 16-bit GOT relocs have
192         positive values.  Adjust PCREL relocs to be relative to location
193         after relocation.
194         (cris_elf_relocate_section): Handle relocations to dynamic
195         objects.  Handle new relocations.  Call error handler when seeing
196         non-PIC relocation for read-only sections while generating shared
197         object.
198         (cris_elf_check_relocs): Set reference counts for GOT and PLT
199         entries.
200         (bfd_elf32_bfd_link_hash_table_create,
201         elf_backend_adjust_dynamic_symbol,
202         elf_backend_size_dynamic_sections,
203         elf_backend_finish_dynamic_symbol,
204         elf_backend_finish_dynamic_sections,
205         elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
206         elf_backend_hide_symbol, elf_backend_want_got_plt,
207         elf_backend_plt_readonly, elf_backend_want_plt_sym,
208         elf_backend_got_header_size, elf_backend_plt_header_size):
209         Define.
210
211         * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
212         BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
213         BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
214         BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
215         BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
216         BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
217         * bfd-in2.h, libbfd.h: Regenerate.
218
219 2001-03-21  Diego Novillo  <dnovillo@redhat.com>
220
221         (_bfd_mips_elf_relocate_section): Give a better error message when
222         a relocation is not recognized.
223
224 2001-03-21  Alan Modra  <alan@linuxcare.com.au>
225
226         * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
227         non-NULL before attempting to dereference.
228
229 2001-03-20  H.J. Lu  <hjl@gnu.org>
230
231         * configure.in: Remove the redundent AC_ARG_PROGRAM.
232         * configure: Rebuild.
233
234 2001-03-20  Andreas Schwab  <schwab@suse.de>
235
236         * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
237         relocation value when resolving a reference from a debugging
238         section.
239
240 2001-03-16  Scott Thomason  <SThomaso@hii.com>
241
242         * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
243         (xcoff64_swap_sym_out): Fix syntax errors.
244
245 2001-03-16  Richard Sandiford  <rsandifo@redhat.com>
246
247         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
248
249 2001-03-15  Alan Modra  <alan@linuxcare.com.au>
250
251         * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
252         (hppa_link_hash_newfunc): Init it.
253         (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
254         section appears to be non-PIC.
255         (final_link_relocate): Likewise.
256         (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
257         possible candidate function, and set pic_call for those that will
258         only have a .plt entry for the PIC call stub.
259         (hppa_handle_PIC_calls): Set maybe_pic_call.
260
261 2001-03-12  DJ Delorie  <dj@redhat.com>
262
263         * elf32-sh.c (sh_elf_relocate_section): Only relocation
264         R_SH_DIR8WP* relocs if they're against external symbols, else
265         they're just for relaxing.  Validate the reloc values.
266
267 2001-03-12  Stefan Geuken <mail@stefan-geuken.de>
268
269         * binary.c (bfd_external_binary_architecture): Declare.
270         (binary_object_p): If bfd_external_binary_architecture is defined,
271         set the architecture to this string.
272
273 2001-03-11  Philip Blundell  <philb@gnu.org>
274
275         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
276         entries that could serve as a definition for a weak symbol.
277
278 2001-03-08  Nick Clifton  <nickc@redhat.com>
279
280         * Most files: Update copyright notices using Perl script created
281         by Kevin Buettner <kevinb@redhat.com>.
282
283 2001-03-07  Nick Clifton  <nickc@redhat.com>
284
285         * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
286         prior patch on ! defined OLD_ARM_ABI.
287
288 2001-03-07  Andreas Jaeger  <aj@suse.de>
289
290         * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
291         some relocation values.
292
293 2001-03-06  Nick Clifton  <nickc@redhat.com>
294
295         * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
296         of offset in BLX(1) instruction.
297         * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
298         offset in BLX(1) instruction.
299         Fix formatting.
300
301 2001-03-06  Nick Clifton  <nickc@redhat.com>
302
303         * coff-arm.c (coff_arm_reloc_type_lookup): Add
304         BFD_RELOC_THUMB_PCREL_BLX.
305
306 2001-03-06  Igor Shevlyakov  <igor@windriver.com>
307
308         * archures.c (bfd_default_scan): Add Coldfire CPUs.
309         * bfd-in2.h: Regenerate.
310         * cpu-m68k.c: Add Coldfire CPUs for arch table.
311         * ieee.c (ieee_write_processor): Set proper id for
312         Coldfire CPUs.
313
314 2001-03-01  D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
315
316         * configure.in: Add s390 target.
317         * configure: Regenerate.
318
319 2001-02-28  Andreas Jaeger  <aj@suse.de>
320
321         * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
322         to addend.
323
324 2001-02-28  Philip Blundell  <pb@futuretv.com>
325
326         * elf32-arm.h: Update mentions of renamed EF_xx constants.
327         (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
328
329 2001-02-27  H.J. Lu  <hjl@gnu.org>
330
331         * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
332         abfd->tdata.aout_data == NULL.
333
334 2001-02-27  Alan Modra  <alan@linuxcare.com.au>
335
336         * elf32-hppa.c: Correct field selector in stub comments.
337         (clobber_millicode_symbols): Formatting fix.
338
339         * configure.in: Bump version to 2.11.90.
340         * configure: Regenerate.
341         * Makefile.am (CFILES): Rename to SOURCE_CFILES.
342         (CFILES): $SOURCE_CFILES + generated C files.
343         (POTFILES): Include $HFILES not $SOURCE_HFILES.
344         Run "make dep-am"
345         * Makefile.in: Regenerate.
346         * doc/Makefile.in: This too.
347
348 2001-02-26  Timothy Wall  <twall@cygnus.com>
349
350         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
351         comments.
352
353 2001-02-26  Nick Clifton <nickc@redhat.com>
354
355         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
356         up, replacing multiple if statements with a switch.
357         (handle_COMDAT): New function.
358
359 2001-02-26  H.J. Lu  <hjl@gnu.org>
360
361         * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
362         a warning for section flags we do not handle instead of
363         aborting.
364
365 2001-02-26  Andreas Jaeger  <aj@suse.de>
366
367         * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
368
369 2001-02-22  Timothy Wall  <twall@cygnus.com>
370
371         * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
372         * configure.in: Add objects for elf64_ia64_aix vectors.
373         * configure: Regenerated.
374         * configure.host: Recognize ia64-*-aix*.
375         * elfxx-ia64.c: Add hooks for ELF64 on AIX5.  Define new vectors
376         for AIX.  AIX5 requires most relocations to be dynamic (*all*
377         binaries are somewhat similar to shared libraries).
378         * targets.c: Add elf64_ia64_aix vectors.
379
380 2001-02-21  David Mosberger  <davidm@hpl.hp.com>
381
382         * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
383         C8 said "1" instead of "8".  Clarify error string for IMM22:
384         "signed integer" instead of just "integer".
385
386 2001-02-20  Andreas Jaeger  <aj@suse.de>
387
388         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
389         PLT entries that could serve as a definition for a weak symbol.
390
391 2001-02-19  Jakub Jelinek  <jakub@redhat.com>
392
393         * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
394         entries that could serve as a definition for a weak symbol.
395         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
396
397 2001-02-18  David O'Brien  <obrien@FreeBSD>
398
399         * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
400         FreeBSD/i386-CURRENT differently until I can figure out the needed
401         corefile changes.
402         * configure: Regenerate.
403         * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
404         FreeBSD/PowerPC, and FreeBSD/sparc64.
405
406 2001-02-18  lars brinkhoff  <lars@nocrew.org>
407
408         * Makefile.am: Add PDP-11 a.out target.
409         * config.bfd: Likewise.
410         * configure.in: Likewise.
411         * targets.c: Likewise.
412         * archures.c: Likewise.
413         * bfd-in2.h: Likewise.  Add PDP-11 relocations.
414         * libbfd.h: Add PDP-11 relocations.
415         * reloc.c: Likewise.
416         * cpu-pdp11.c: New file.
417         * pdp11.c: New file.
418
419         * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
420         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
421         (GET_SWORD) [ARCH_SIZE==16]: Likewise.
422         (PUT_WORD) [ARCH_SIZE==16]: Likewise.
423         (GET_MAGIC): New macro.
424         (PUT_MAGIC): Likewise.
425         * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
426
427 2001-02-18  Jim Kingdon  <jkingdon@engr.sgi.com>
428
429         * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
430         multiarch needs it).
431
432 2001-02-18  H.J. Lu  <hjl@gnu.org>
433
434         * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
435         index.
436
437 2001-02-18  Kazu Hirata  <kazu@hxi.com>
438
439         * vms-misc.c: Fix formatting.
440
441 2001-02-16  Kazu Hirata  <kazu@hxi.com>
442
443         * vms.c: Fix formatting.
444
445 2001-02-14  H.J. Lu  <hjl@gnu.org>
446
447         * elf.c (elf_find_function): New function.
448         (_bfd_elf_find_nearest_line): Call elf_find_function () to find
449         the file name and function name.
450
451 2001-02-14  Nick Clifton  <nickc@redhat.com>
452
453         * ecoff.c (bfd_debug_section): Update to initialise new fields in
454         asection structure.
455
456         * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
457         (BFD64_BACKENDS): Add pepigen.c
458         Add rules to create peigen.c and pepigen.c from peXXigen.c.
459
460         * Makefile.in: Regenerate.
461         * configure:  Regenerate.
462         * po/POTFILES.in: Regenerate.
463         * po/bfd.pot: Regenerate.
464
465 2001-02-14  H.J. Lu  <hjl@gnu.org>
466
467         * libcoff-in.h (pe_tdata): Add members target_subsystem and
468         force_minimum_alignment.
469
470 2001-02-14  Bo Thorsen  <bo@suse.de>
471
472         * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
473         (elf64_86_64_size_info): Struct added to fix a problem
474         with the hashtable string entries.
475         (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
476         (elf64_x86_64_size_dynamic_sections): A FIXME removed.
477         (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
478         remove the FIXME for this.
479         (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
480         section. Also removed the FIXME for it.
481         (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
482         (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
483         (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
484
485 2001-02-13  Richard Henderson  <rth@redhat.com>
486
487         * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
488         and not user provided.
489
490 2001-02-13  Kazu Hirata  <kazu@hxi.com>
491
492         * vms.c (vms_print_symbol): Remove unreachable code.
493
494         * rs6000-core.c: Fix formatting.
495
496 2001-02-13  David Mosberger  <davidm@hpl.hp.com>
497
498         * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
499         as _bfd_XXi_only_swap_filehdr_out.
500         (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
501         pe->force_minimum_alignment to TRUE.
502         (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
503         PEI_TARGET_SUBSYSTEM.
504         (pe_print_private_bfd_data): Call
505         _bfd_XX_print_private_bfd_data_common() instead of
506         _bfd_pe_print_private_bfd_data_common().
507         (pe_bfd_copy_private_bfd_data): Call
508         _bfd_XX_bfd_copy_private_bfd_data_common() instead of
509         _bfd_pe_bfd_copy_private_bfd_data_common().
510         (coff_bfd_copy_private_section_data): Define as
511         _bfd_XX_bfd_copy_private_section_data instead of
512         _bfd_pe_bfd_copy_private_section_data.
513         (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
514         of a _bfd_pe_get_symbol_info.
515
516         * peigen.c: Delete.
517
518         * peXXigen.c: Renamed from peigen.c.
519         (COFF_WITH_XX): Define this macro (will get expanded into
520         COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
521         compiled as peigen.c or pepigen.c.
522         [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
523         define the canonical PEP structures and definitions.
524         (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
525         effect, enforce minimum file and section alignments.  If
526         extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
527         pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
528         so, by default, this is a no-op).
529
530         * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
531         (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
532         _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
533         _bfd_pefoo if it's not defined.  Use these macros to define
534         coff swap macros.
535
536         * libcoff.h (pe_tdata): Add members target_subsystem and
537         force_minimum_alignment.
538
539         * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
540         COFF_WITH_pep.
541         (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
542
543         * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
544         peigen.lo.
545
546         * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
547         (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
548         PEPAOUTHDR.
549
550         * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
551         (BFD64_BACKENDS_CFILES): Mention pepigen.c
552         (peigen.c): Add rule to generate from peXXigen.c.
553         (pepigen.c): Ditto.
554         (pepigen.lo): List dependencies for pepigen.lo.
555
556 2001-02-13  Alan Modra  <alan@linuxcare.com.au>
557
558         * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$.  If
559         $global$ referenced but not defined, set its value here.
560
561 2001-02-09  Bo Thorsen  <bo@suse.de>
562
563         * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
564         alignment to 3.
565         (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
566         and relocation.
567         (elf64_x86_64_relocate_section): Fix formatting.
568         (elf64_x86_64_relocate_section): Fix addend for relocation of
569         R_X86_64_(8|16|32|PC8|PC16|PC32).
570
571 2001-02-12  Jan Hubicka  <jh@suse.cz>
572
573         * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
574
575 2001-02-11  H.J. Lu  <hjl@gnu.org>
576
577         * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
578         alignment.
579
580 2001-02-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
581
582         * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
583         from 2000-10-13.  Do not add the symbol's value for R_MIPS_REL32
584         relocations against dynsym symbols.
585
586         * elf32-mips.c (elf_mips_howto_table): Fix the comment on
587         the R_MIPS_26 relocation.
588         (mips_elf_calculate_relocation): Use (p + 4) instead of p for
589         the R_MIPS_26 relocation.
590         (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
591         relocation.
592         * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
593         the R_MIPS_26 relocation.
594         (mips_elf64_howto_table_rela): Likewise.
595
596         * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
597         member to mark symbols that have non-CALL relocations against
598         them.
599         (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
600         (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
601         R_MIPS_GOT16.
602         (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
603         non-CALL relocation against it is encountered.
604         (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
605         (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
606         no_fn_stub is not set.
607
608         * elf32-mips.c (mips_elf_output_extsym): Get the output section
609         information from the real symbol for indirect ones.
610         Check no_fn_stub to find out if a symbol has a function stub
611         indeed.
612
613 2001-02-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
614
615         * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
616         * Makefile.in: Regenerate.
617
618 2001-02-09  David Mosberger  <davidm@hpl.hp.com>
619
620         * elfxx-ia64.c (is_unwind_section_name): New function.  Returns
621         true if section name is an unwind table section name.
622         (elfNN_ia64_additional_program_headers): Count each unwind section
623         separately.
624         (elfNN_ia64_modify_segment_map): Install one unwind program header
625         for each unwind separate section.  Note: normally the linker
626         script merges the unwind sections that go into a single segment,
627         so this still generates at most one unwind program header per
628         segment.
629
630         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
631         name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
632         (elfNN_ia64_fake_sections): Mark sections with names that start
633         with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
634         unwind section.
635
636         * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
637         Use it to make sh_info in unwind section point to the text section
638         it applies to.
639
640 2001-02-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
641
642         * Makefile.am: Add linux target for S/390.
643         * archures.c: Likewise.
644         * bfd-in2.h: Likewise.
645         * config.bfd: Likewise.
646         * configure.in: Likewise.
647         * elf.c: Likewise.
648         * libbfd.h: Likewise.
649         * targets.c: Likewise.
650         * cpu-s390.c: New file.
651         * elf32-s390.c: New file.
652         * elf64-s390.c: New file.
653
654 2001-02-09  Nick Clifton  <nickc@redhat.com>
655
656         * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
657         ImageBase.  This has already been done by coff_swap_hdr_in.
658
659 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
660
661         * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
662
663 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
664
665         * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
666         (sparc64_elf_relocate_section): Likewise.
667
668 2001-02-09  Mark Kettenis  <kettenis@gnu.org>
669
670         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
671         similar to R_SPARC_32.
672         * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
673
674 2001-02-08  H.J. Lu  <hjl@gnu.org>
675
676         * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
677         relocation entries for weak definitions when building DSO with
678         -Bsymbolic.
679
680 2001-02-08  Richard Henderson  <rth@redhat.com>
681
682         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
683         before visibility.  Locally defined protected symbols are not
684         dynamic.
685
686 2001-02-08  Geoffrey Keating  <geoffk@redhat.com>
687
688         * config.bfd: Enable coff64 for rs6000-*.  Patch from
689         <hzoli@austin.ibm.com>.
690
691 2001-02-07  Mark Elbrecht  <snowball3@bigfoot.com>
692
693         * coffgen.c (coff_find_nearest_line): If stabs info is successfully
694         found, do not attempt to find dwarf2 info before returning.
695
696 2001-02-07  Jakub Jelinek  <jakub@redhat.com>
697
698         * elflink.h (is_global_symbol_definition): Rename to
699         is_global_data_symbol_definition and have it reject function
700         symbols.
701         (elf_link_is_defined_archive_symbol): Use renamed function.
702
703 2001-02-07  Todd Vierling  <tv@wasabisystems.com>
704
705         * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
706         * libbfd.h (bfd_target_vector): Likewise.
707         * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
708         make static; create pointer reference named bfd_target_vector.
709         (_bfd_target_vector_entries): Calculate this based on the array
710         typed _bfd_target_vector.
711
712 2001-02-06  H.J. Lu  <hjl@gnu.org>
713
714         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
715         internal symbols are not dynamic.
716         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
717
718 2001-02-06  Nick Clifton  <nickc@redhat.com>
719
720         * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
721         that it will not be pulled into the list of files that make up
722         po/POTFILES.in.
723         * Makefile.in: Regenerate.
724         * po/bfd.pot:  Regenerate.
725
726 2001-02-06  H.J. Lu  <hjl@gnu.org>
727
728         * peicode.h (coff_swap_filehdr_in): Remove the e_magic
729         checking.
730         (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
731         external_PEI_IMAGE_hdr.
732
733 2001-02-06  Kazu Hirata  <kazu@hxi.com>
734
735         * elf-m10200.c: Fix formatting.
736
737 2001-02-04  Nick Clifton  <nickc@redhat.com>
738
739         * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
740         rel, it will be handled later on.
741
742 2001-02-02  Fred Fish  <fnf@ninemoons.com>
743
744         * Makefile.in: Fix typo.
745
746 2001-02-01  Kazu Hirata  <kazu@hxi.com>
747
748         * elf-m10300.c: Fix formatting.
749
750 2001-01-30  Alan Modra  <alan@linuxcare.com.au>
751
752         * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
753         (elf_backend_get_symbol_type): Define.
754         (elf64_hppa_object_p): Set architecture and machine from elf
755         header flags.
756
757 2001-01-30  Curtis L. Janssen  <cljanss@ca.sandia.gov>
758
759         * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
760         before mdebug.
761
762 2001-01-26  Richard Henderson  <rth@redhat.com>
763
764         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
765         for non-default visibility.
766         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
767         delete ugly macro and replace with pretty function.
768
769 2001-01-25  Mark Elbrecht  <snowball3@bigfoot.com>
770
771         * coff-go32.c: Update copyright.
772         * coff-stgo32.c: Likewise.
773         * coff-go32.c (COFF_LONG_FILENAMES): Define.
774         * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
775         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
776         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
777
778 2001-01-25  Kazu Hirata  <kazu@hxi.com>
779
780         * bfd-in2.h: Rebuild.
781         * libbfd.h: Likewise.
782
783 2001-01-23  H.J. Lu  <hjl@gnu.org>
784
785         * bfd-in2.h: Rebuild.
786
787 2001-01-23  H.J. Lu  <hjl@gnu.org>
788
789         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
790         is NULL or PRIV(vms_rec) is outside of the buffer.
791
792 2001-01-23  Kazu Hirata  <kazu@hxi.com>
793
794         * coff64-rs6000.c: Fix formatting.
795         * coff-arm.c: Likewise.
796         * coffgen.c: Likewise.
797         * cofflink.c: Likewise.
798         * coff-mcore.c: Likewise.
799         * coff-mips.c: Likewise.
800         * coff-pmac.c: Likewise.
801         * coff-ppc.c: Likewise.
802         * coff-rs6000.c: Likewise.
803         * elf32.c: Likewise.
804         * elf32-fr30.c: Likewise.
805         * elf32-i370.c: Likewise.
806         * elf32-i860.c: Likewise.
807         * elf32-m32r.c: Likewise.
808         * elf32-m68k.c: Likewise.
809         * elf32-mcore.c: Likewise.
810         * elf32-ppc.c: Likewise.
811         * elf32-sh.c: Likewise.
812         * elf32-v850.c: Likewise.
813         * elf64-alpha.c: Likewise.
814         * elf64-sparc.c: Likewise.
815         * elflink.c: Likewise.
816         * elflink.h: Likewise.
817         * elf-m10200.c: Likewise.
818         * elf-m10300.c: Likewise.
819         * elfxx-ia64.c: Likewise.
820
821         * aoutx.h: Fix formatting.
822         * bfd.c: Likewise.
823         * bfd-in2.h: Likewise.
824         * bfd-in.h: Likewise.
825         * cpu-i386.c: Likewise.
826         * cpu-m68hc11.c: Likewise.
827         * dwarf2.c: Likewise.
828         * elf64-x86-64.c: Likewise.
829         * format.c: Likewise.
830         * freebsd.h: Likewise.
831         * hash.c: Likewise.
832         * hp300hpux.c: Likewise.
833         * hppabsd-core.c: Likewise.
834         * hpux-core.c: Likewise.
835
836 2001-01-22  Bo Thorsen  <bo@suse.de>
837
838         * elf64-x86-64.c: Added PIC support for X86-64.
839         (elf64_x86_64_link_hash_newfunc): Function added.
840         (elf64_x86_64_link_hash_table_create): Likewise.
841         (elf64_x86_64_check_relocs): Likewise.
842         (elf64_x86_64_gc_mark_hook): Likewise.
843         (elf64_x86_64_gc_sweep_hook): Likewise.
844         (elf64_x86_64_adjust_dynamic_symbol): Likewise.
845         (elf64_x86_64_size_dynamic_sections): Likewise.
846         (elf64_x86_64_discard_copies): Likewise.
847         (elf64_x86_64_finish_dynamic_symbol): Likewise.
848         (elf64_x86_64_finish_dynamic_sections): Likewise.
849         (elf64_x86_64_relocate_section): Add relocation of PIC sections.
850
851 2001-01-21  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
852
853         * Makefile.am (install-data-local): Make use of $(DESTDIR).
854         * Makefile.in: Regenerate.
855
856 2001-01-21  Kazu Hirata  <kazu@hxi.com>
857
858         * coff-a29k.c: Fix formatting.
859
860 2001-01-19  H.J. Lu  <hjl@gnu.org>
861
862         * elf32-i386.c (elf_i386_check_relocs): Report files with bad
863         relocation section names.
864         (elf_i386_relocate_section): Report files with bad relocation
865         section names and return false.
866
867 2001-01-17  Bo Thorsen  <bo@suse.de>
868
869         * targets.c: Alphabetize list of xvecs.
870
871 2001-01-14  Alan Modra  <alan@linuxcare.com.au>
872
873         * config.bfd: Add linux target variant for elfxx-hppa.
874         * configure.in: Recognize bfd_elf32_hppa_linux_vec and
875         bfd_elf64_hppa_linux_vec.
876         * configure: Regenerate.
877         * elf64-hppa.c: Include elf64-target.h again to support linux
878         target variant.
879         (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
880         * elf32-hppa.c: Include elf32-target.h again to support linux
881         target variant.
882         (elf32_hppa_post_process_headers): New function.
883         (elf_backend_post_process_headers): Define.
884         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
885         bfd_elf32_hppa_linux_vec.
886
887         * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
888         and data_segment_base fields.
889         (elf32_hppa_link_hash_table_create ): Init them.
890         (elf32_hppa_check_relocs): Update comments.
891         (hppa_record_segment_addr): New function.
892         (elf32_hppa_relocate_section): Call it.
893         (final_link_relocate): Handle R_PARISC_SEGREL32.
894         (elf32_hppa_final_link): New function.
895         (bfd_elf32_bfd_final_link): Define to call it.
896         (hppa_unwind_entry_compare): New function.
897         * cache.c (bfd_open_file): Create files in write+read mode.
898
899         * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
900         SEGREL32 and numerous other relocs.  Change duplicate
901         R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
902
903         * opncls.c (bfd_fdopenr): Add parens like the comment says around
904         O_ACCMODE.
905
906         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
907         .plt entries for DT_INIT and DT_FINI.
908         (elf32_hppa_finish_dynamic_sections): Remove special handling of
909         DT_INIT and DT_FINI.
910
911         * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
912         offsets for stub .plt access if wide mode.  Check offset in range.
913
914 2001-01-13  Nick Clifton  <nickc@redhat.com>
915
916         * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
917         line.
918
919         * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
920         line.
921
922 2001-01-12  Alan Modra  <alan@linuxcare.com.au>
923
924         * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
925         * configure: Regenerate.
926
927 2001-01-11  Peter Targett  <peter.targett@arccores.com>
928
929         * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
930         bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
931         * cpu-arc.c (arch_info_struct): Add entries for variants.
932         (bfd_arc_arch) Set default to bfd_mach_arc_5.
933         (arc_get_mach) Don't assume machine names prefixed arc- before
934         testing.
935         * elf32-arc.c (arc_elf_object_p): Set machine number based on new
936         selections.
937         (arc_elf_final_write_processing) Likewise.
938         (ELF_MACHINE_CODE) Use EM_ARC.
939
940 2001-01-10  Nick Clifton  <nickc@redhat.com>
941
942         * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
943
944 2001-01-07  Philip Blundell  <philb@gnu.org>
945
946         * README: Replace `bug-gnu-utils@gnu.org' with
947         `bug-binutils@gnu.org'.
948
949 2001-01-04  Kazu Hirata  <kazu@hxi.com>
950
951         * som.c: Fix formatting.
952
953 2001-01-03  Kazu Hirata  <kazu@hxi.com>
954
955         * ecoffswap.h: Fix formatting.
956         * elf-bfd.h: Likewise.
957         * elfarm-nabi.c: Likewise.
958         * elfarm-oabi.c: Likewise.
959         * elfcode.h: Likewise.
960         * elfcore.h: Likewise.
961         * elflink.c: Likewise.
962         * elflink.h: Likewise.
963         * elfxx-ia64.c: Likewise.
964         * elfxx-target.h: Likewise.
965         * libbfd.c: Likewise
966         * linker.c: Likewise.
967         * lynx-core.c: Likewise.
968
969 2001-01-02  Kazu Hirata  <kazu@hxi.com>
970
971         * pc532-mach.c: Fix formatting.
972         * pe-arm.c: Likewise.
973         * pe-i386.c: Likewise.
974         * pe-mips.c: Likewise.
975         * pe-ppc.c: Likewise.
976         * pe-sh.c: Likewise.
977         * pei-mips.c: Likewise.
978         * pei-sh.c: Likewise.
979         * peicode.h: Likewise.
980         * ppcboot.c: Likewise.
981         * ptrace-core.c: Likewise.
982
983 2001-01-01  Kazu Hirata  <kazu@hxi.com>
984
985         * reloc.c: Fix formatting.
986         * riscix.c: Likewise.
987         * rs6000-core.c: Likewise.
988         * xcoff-target.h: Likewise.
989
990 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
991
992         * elfcode.h (elf_object_p): Also restore the bfd mach field on
993         error, by calling bfd_default_set_arch_mach with incoming
994         values.
995
996 2000-12-26  Kazu Hirata  <kazu@hxi.com>
997
998         * vaxnetbsd.c: Fix formatting.
999         * versados.c: Likewise.
1000         * vms-gsd.c: Likewise.
1001         * vms-hdr.c: Likewise.
1002         * vms-misc.c: Likewise.
1003
1004 2000-12-25  Alexandre Oliva  <aoliva@redhat.com>
1005
1006         * archive.c (coff_write_armap): Don't write more than symbol_count
1007         `archive_member_file_ptr's.
1008
1009 2000-12-25  Kazu Hirata  <kazu@hxi.com>
1010
1011         * vms-tir.c: Fix formatting.
1012
1013 2000-12-23  Kazu Hirata  <kazu@hxi.com>
1014
1015         * vms.c: Fix formatting.
1016         * vms.h: Likewise.
1017
1018 2000-12-21  Santeri Paavolainen <santtu@ssh.com>
1019
1020         * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
1021
1022         * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
1023
1024         * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
1025         arithmetic.
1026
1027         * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
1028
1029         * coffcode.h (styp_to_sec_flags): Add empty statement after label.
1030
1031 2000-12-21  Richard Sandiford  <rsandifo@redhat.com>
1032
1033         * libbfd.c (bfd_get_bits): Added
1034         (bfd_put_bits): Likewise
1035         * bfd-in.h: Declared the above.
1036         * bfd-in2.h: Regenerated.
1037
1038 2000-12-20  Kazu Hirata  <kazu@hxi.com>
1039
1040         * targets.c: Fix formatting.
1041         * tekhex.c: Likewise.
1042         * trad-core.c: Likewise.
1043
1044 2000-12-19  Kazu Hirata  <kazu@hxi.com>
1045
1046         * sco5-core.c: Fix formatting.
1047         * section.c: Likewise.
1048         * sparclinux.c: Likewise.
1049         * sparclynx.c: Likewise.
1050         * sparcnetbsd.c: Likewise.
1051         * srec.c: Likewise.
1052         * stabs.c: Likewise.
1053         * stab-syms.c: Likewise.
1054         * sunos.c: Likewise.
1055         * syms.c: Likewise.
1056         * sysdep.h: Likewise.
1057
1058 2000-12-18  Nick Clifton  <nickc@redhat.com>
1059
1060         * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
1061         defined.
1062         * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
1063         * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
1064
1065 2000-12-18  Nick Clifton  <nickc@redhat.com>
1066
1067         * vms-misc.c (_bfd_vms_get_record): Add default case to
1068         file_format switch.
1069
1070 2000-12-15  Miloslav Trmac <mitr@volny.cz>
1071
1072         * elfcore.h (elf_core_file_p): Move to the start of the program
1073         headers before attempting to read them.
1074
1075 2000-12-14  Kazu Hirata  <kazu@hxi.com>
1076
1077         * peigen.c: Fix formatting.
1078         * som.c: Likewise.
1079         * som.h: Likewise.
1080
1081 2000-12-13  Kazu Hirata  <kazu@hxi.com>
1082
1083         * peigen.c: Fix formatting.
1084
1085 2000-12-12  Jim Wilson  <wilson@redhat.com>
1086
1087         *  elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
1088
1089 2000-12-08  Mark Salter  <msalter@redhat.com>
1090
1091         * binary.c (binary_set_section_contents): Ignore sections
1092         with zero size.
1093
1094 2000-12-12  Kazu Hirata  <kazu@hxi.com>
1095
1096         * m68klinux.c: Fix formatting.
1097         * m68knetbsd.c: Likewise.
1098         * mipsbsd.c: Likewise.
1099         * netbsd-core.c: Likewise.
1100         * netbsd.h: Likewise.
1101         * newsos3.c: Likewise.
1102         * nlm32-alpha.c: Likewise.
1103         * nlm32-i386.c: Likewise.
1104         * nlm32-ppc.c: Likewise.
1105         * nlm32-sparc.c: Likewise.
1106         * nlmcode.h: Likewise.
1107         * nlmswap.h: Likewise.
1108         * nlm-target.h: Likewise.
1109         * ns32knetbsd.c: Likewise.
1110
1111 2000-12-10  Fred Fish  <fnf@be.com>
1112
1113         * elflink.h (elf_link_output_extsym): Don't complain about undefined
1114         symbols in shared objects if allow_shlib_undefined is true.
1115
1116 2000-12-12  Nick Clifton  <nickc@redhat.com>
1117
1118         * cpu-sh.c: Fix formattng.
1119         * elf.c: Fix formattng.
1120         * elf32-mips.c: Fix formattng.
1121         * elf32-sh.c: Fix formattng.
1122         * elf64-alpha.c: Fix formattng.
1123
1124 2000-12-09  Nick Clifton  <nickc@redhat.com>
1125
1126         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
1127         dwarf2_find_line_info as last parameter to invocation of
1128         _bfd_dwarf2_find_nearest_line.
1129         * elf32-arm.h (elf32_arm_find_nearest_line): Pass
1130         dwarf2_find_line_info as last parameter to invocation of
1131         _bfd_dwarf2_find_nearest_line.
1132
1133 2000-12-08  Mark Elbrecht  <snowball3@bigfoot.com>
1134
1135         * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
1136         (BFD_LIBS): ...to here.
1137         (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
1138         (BFD_LIBS_CFILES): ...to here.
1139         * Makefile.in: Regenerate.
1140         * configure.in: Remove dwarf.lo from the elf shell variable.
1141         * configure: Regenerate.
1142         * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
1143         * libcoff.h: Regenerate.
1144         * coffgen.c (coff_find_nearest_line): Call
1145         _bfd_dwarf2_find_nearest_line.
1146         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
1147         accordingly.
1148         (read_abbrevs): Likewise
1149         (decode_line_info): Likewise.
1150         (parse_comp_unit): Likewise.
1151         (comp_unit_find_nearest_line): Likewise.
1152         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
1153         * libbfd.h: Regenerate.
1154         * elf.c (_bfd_elf_find_nearest_line): Update call.
1155         * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
1156         * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
1157         * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
1158         (sec_to_styp_flags): Use them. Handle DWARF2 sections.
1159         (styp_to_sec_flags): Handle DWARF2 sections.
1160         * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
1161         to _bfd_find_nearest_line.
1162         * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
1163         call to _bfd_find_nearest_line.
1164
1165 2000-12-08  Kazu Hirata  <kazu@hxi.com>
1166
1167         * coffgen.c: Fix formatting.
1168         * elf-m10300.c: Likewise.
1169         * elf32-i386.c: Likewise.
1170         * elf32-i960.c: Likewise.
1171         * elf32-m68k.c: Likewise.
1172         * elf32-mcore.c: Likewise.
1173         * elf32-ppc.c: Likewise.
1174         * elf32-sh.c: Likewise.
1175         * elf32-sparc.c: Likewise.
1176         * elf32-v850.c: Likewise.
1177         * elf64-alpha.c: Likewise.
1178         * elf64-hppa.c: Likewise.
1179         * elf64-mips.c: Likewise.
1180         * elf64-sparc.c: Likewise.
1181
1182 2000-12-07  Kazu Hirata  <kazu@hxi.com>
1183
1184         * elf32-ppc.c: Fix formatting.
1185         * elf64-x86-64.c: Likewise.
1186
1187 2000-12-06  Ulf Carlsson  <ulfc@engr.sgi.com>
1188
1189         From  Ralf Baechle  <ralf@gnu.org>
1190
1191         * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
1192         BFDs containing no sections or empty .text, .data or .bss sections
1193         to be merged, regardless of their flags.
1194
1195 2000-12-06  Kazu Hirata  <kazu@hxi.com>
1196
1197         * elf32-m32r.c: Fix formatting.
1198         * elf32-m68hc11.c: Likewise.
1199         * elf32-m68hc12.c: Likewise.
1200         * elf32-m68k.c: Likewise.
1201         * elf32-mcore.c: Likewise.
1202         * elf32-pj.c: Likewise.
1203         * elf32-ppc.c: Likewise.
1204
1205 2000-12-05  Kazu Hirata  <kazu@hxi.com>
1206
1207         * elf32-fr30.c: Fix formatting.
1208         * elf32-hppa.c: Likewise.
1209         * elf32-i370.c: Likewise.
1210         * elf32-i386.c: Likewise.
1211         * elf32-i860.c: Likewise.
1212         * elf32-i960.c: Likewise.
1213
1214 2000-12-03  Kazu Hirata  <kazu@hxi.com>
1215
1216         * elf32-arm.h: Fix formatting.
1217         * elf32-avr.c: Likewise.
1218         * elf32-cris.c: Likewise.
1219         * elf32-d10v.c: Likewise.
1220         * elf32-d30v.c: Likewise.
1221         * elf-hppa.h: Likewise.
1222         * elf-m10200.c: Likewise.
1223         * elf-m10300.c: Likewise.
1224
1225 2000-12-01  Chris Demetriou  <cgd@sibyte.com>
1226
1227         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
1228         bfd_mach_mips32_4k.  Update FIXME comment.
1229         * archures.c (bfd_mach_mips32): New constant.
1230         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
1231         the latter, renumber it.
1232         * bfd-in2.h (bfd_mach_mips32): New constant.
1233         (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
1234         the latter, renumber it.
1235         * cpu-mips.c (I_mips32): New constant.
1236         (I_mips4K, I_mips32_4k): Rename the former to the latter.
1237         (arch_info_struct): Add bfd_mach_mips32 entry, replace
1238         bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
1239         * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
1240         (elf_mips_mach): Likewise.  Also, replace E_MIPS_MACH_MIPS32
1241         with E_MIPS_MACH_MIPS32_4K.
1242         (_bfd_mips_elf_final_write_processing): Replace
1243         bfd_mach_mips4K with bfd_mach_mips32_4k case, add
1244         bfd_mach_mips32 case.
1245         (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
1246         comparison with support for MIPS32.
1247         (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
1248         MIPS32.
1249
1250         * aoutx.h (NAME(aout,machine_type)): Add cases for
1251         bfd_mach_mips5 and bfd_mach_mips64.
1252         * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
1253         * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
1254         * cpu_mips.c (I_mips5, I_mips64): New definitions.
1255         (arch_info_struct): Add entries for bfd_mach_mips5 and
1256         bfd_mach_mips64.
1257         * elf32-mips.c (elf_mips_isa, elf_mips_mach,
1258         _bfd_mips_elf_print_private_bfd_data): Add cases for
1259         E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
1260         (_bfd_mips_elf_final_write_processing): Add cases for
1261         bfd_mach_mips5 and bfd_mach_mips64.
1262
1263         * aoutx.h (NAME(aout,machine_type)): Add a
1264         bfd_mach_mips_sb1 case.
1265         * archures.c (bfd_mach_mips_sb1): New constant.
1266         * bfd-in2.h (bfd_mach_mips_sb1): New constant.
1267         * cpu-mips.c (I_sb1): New constant.
1268         (arch_info_struct): Add entry for bfd_mach_mips_sb1.
1269         * elf32-mips.c (elf_mips_mach): Add case for
1270         E_MIPS_MACH_SB1.
1271         (_bfd_mips_elf_final_write_processing): Add case for
1272         bfd_mach_mips_sb1.
1273
1274 2000-12-01  Joel Sherrill <joel@OARcorp.com>
1275
1276         * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
1277         (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
1278         (sparc*-*-rtems*): Switched from a.out to ELF.
1279
1280 2000-11-30  Jan Hubicka  <jh@suse.cz>
1281
1282         * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
1283         BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
1284         (elf64-x86-64.lo): Add dependencies.
1285         * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
1286         bfd_mach_x86_64_intel_syntax.
1287         * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
1288         * config.bfd (x86_64): Add.
1289         * configure.in: Add support for bfd_elf64_x86_64_vec.
1290         * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
1291         (bfd_i386_arch, i8086_ar): Link in.
1292         * elf64-x86-64.c: New file.
1293         * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
1294         * targets.c (bfd_elf64_x86_64_vec): Add.
1295         (bfd_target_vect): Add bfd_elf64_x86_64_vec.
1296
1297 2000-11-30  Kazu Hirata  <kazu@hxi.com>
1298
1299         * xcofflink.c: Fix formatting.
1300
1301 2000-11-28  Kazu Hirata  <kazu@hxi.com>
1302
1303         * aoutx.h: Fix formatting.
1304         * bfd-in.h: Likewise.
1305         * bfd-in2.h: Likewise.
1306         * cache.c: Likewise.
1307         * cisco-core.c: Likewise.
1308         * coff64-rs6000.c: Likewise.
1309         * coffcode.h: Likewise.
1310         * coffswap.h: Likewise.
1311         * corefile.c: Likewise.
1312         * elf32-mips.c: Likewise.
1313
1314 2000-11-27  Kazu Hirata  <kazu@hxi.com>
1315
1316         * aout-adobe.c: Fix formatting.
1317         * coff64-rs6000.c: Likewise.
1318         * coffgen.c: Likewise.
1319         * cofflink.c: Likewise.
1320
1321 2000-11-27  Philip Blundell  <pb@futuretv.com>
1322
1323         * libcoff-in.h (coff_tdata): Add `strings_written' flag.
1324         (obj_coff_strings_written): New accessor macro for above.
1325         * libcoff.h: Regenerate.
1326         * cofflink.c (_bfd_coff_final_link): Say that we wrote the
1327         strings.
1328         * coffcode.h (coff_write_object_contents): No need to write out
1329         the string table if it's already been done.
1330
1331 2000-11-22  Philip Blundell  <pb@futuretv.com>
1332
1333         * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
1334         weak undefined symbols.
1335
1336 2000-11-24  Nick Clifton  <nickc@redhat.com>
1337
1338         * archures.c (bfd_mach_arm_5TE): Define.
1339         (bfd_mach_arm+XScale): Define.
1340         * bfd-in2.h: Regenerate.
1341
1342         * coff-arm.c (coff_arm_reloc_type_lookup): Accept
1343         BFD_RELOC_ARM_PCREL_BLX.
1344
1345         * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
1346         XScale machine numbers.
1347
1348         * config.bfd (xscale-elf): Add target.
1349         (xscale-coff): Add target.
1350
1351         * cpu-arm.c: Add xscale machine name.
1352         Add v5t, v5te and XScale machine numbers.
1353
1354 2000-11-23  Kazu Hirata  <kazu@hxi.com>
1355
1356         * aix386-core.c: Fix formatting.
1357
1358 2000-11-22  Jim Wilson  <wilson@redhat.com>
1359
1360         * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
1361         (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
1362         * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
1363         (ins_imms_scaled): Initialize sign_bit at function entry.
1364         (elf64_ia64_operands): Add missing initializers.
1365         * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
1366         elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
1367         elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
1368         elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
1369         elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
1370         parameters.
1371         (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
1372         and free_extsyms at function entry.
1373         (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
1374         (elfNN_ia64_create_dynamic_sections): Delete unused local h.
1375         (get_got): Delete unused local srel.
1376         (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
1377         (elfNN_ia64_relocate_section): Delete unused local dynindx.
1378
1379 2000-11-21  Kazu Hirata  <kazu@hxi.com>
1380
1381         * coff-a29k.c: Fix formatting.
1382         * coff-h8500.c: Likewise.
1383         * coff-i960.c: Likewise.
1384         * coff-ppc.c: Likewise.
1385         * coff-rs6000.c: Likewise.
1386         * coff-stgo32.c: Likewise.
1387         * coff-tic54x.c: Likewise.
1388         * coff-w65.c: Likewise.
1389         * cpu-h8500.c: Likewise.
1390         * cpu-hppa.c: Likewise.
1391         * cpu-ns32k.c: Likewise.
1392         * ecoff.c: Likewise.
1393         * ecofflink.c: Likewise.
1394
1395 2000-11-21  Nick Clifton  <nickc@redhat.com>
1396
1397         * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
1398         remove possibility of infinite loop.
1399
1400 2000-11-20  Kazu Hirata  <kazu@hxi.com>
1401
1402         * aix386-core.c: Fix formatting.
1403         * aout-adobe.c: Likewise.
1404         * aout-arm.c: Likewise.
1405         * aout-encap.c: Likewise.
1406         * aout-ns32k.c: Likewise.
1407         * aout-target.h: Likewise.
1408         * aout-tic30.c: Likewise.
1409         * aoutf1.h: Likewise.
1410         * aoutx.h: Likewise.
1411         * archive.c: Likewise.
1412         * bfd-in.h: Likewise.
1413         * bfd-in2.h: Likewise.
1414         * bfd.c: Likewise.
1415         * bout.c: Likewise.
1416
1417 2000-11-17  H.J. Lu  <hjl@gnu.org>
1418
1419         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
1420         pltoff entries for DT_INIT and DT_FINI.
1421         (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
1422         (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
1423         entries.
1424
1425 2000-11-16  Richard Henderson  <rth@redhat.com>
1426
1427         * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
1428         (allocate_dynrel_entries): Likewise.
1429         (elfNN_ia64_relocate_section): Likewise.  Set REL addends correctly.
1430         (set_pltoff_entry): Likewise.
1431         (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
1432         (elfNN_ia64_reloc_type_lookup): Likewise.
1433         (elfNN_ia64_install_value): Likewise.
1434         (elfNN_ia64_relocate_section): Likewise.
1435         * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
1436         (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
1437
1438 2000-11-16  Kazu Hirata  <kazu@hxi.com>
1439
1440         * cpu-a29k.c: Fix formatting.
1441         * cpu-alpha.c: Likewise.
1442         * cpu-arm.c: Likewise.
1443         * cpu-avr.c: Likewise.
1444         * cpu-d10v.c: Likewise.
1445         * cpu-h8500.c: Likewise.
1446         * cpu-hppa.c: Likewise.
1447         * cpu-i370.c: Likewise.
1448         * cpu-i386.c: Likewise.
1449         * cpu-i960.c: Likewise.
1450         * cpu-ia64-opc.c: Likewise.
1451         * cpu-ia64.c: Likewise.
1452         * cpu-m32r.c: Likewise.
1453         * cpu-m68hc11.c: Likewise.
1454         * cpu-m68hc12.c: Likewise.
1455         * cpu-m68k.c: Likewise.
1456         * cpu-m88k.c: Likewise.
1457         * cpu-mips.c: Likewise.
1458         * cpu-ns32k.c: Likewise.
1459         * cpu-pj.c: Likewise.
1460         * cpu-powerpc.c: Likewise.
1461         * cpu-sh.c: Likewise.
1462         * cpu-sparc.c: Likewise.
1463         * cpu-tic54x.c: Likewise.
1464         * cpu-v850.c: Likewise.
1465         * cpu-vax.c: Likewise.
1466         * cpu-w65.c: Likewise.
1467         * cpu-we32k.c: Likewise.
1468         * cpu-z8k.c: Likewise.
1469         * dwarf1.c: Likewise.
1470         * dwarf2.c: Likewise.
1471
1472 2000-11-15  Kazu Hirata  <kazu@hxi.com>
1473
1474         * coff-arm.c: Fix formatting.
1475         * coff-ppc.c: Likewise.
1476         * coff-rs6000.c: Likewise.
1477         * coff-sh.c: Likewise.
1478         * coff-sparc.c: Likewise.
1479         * coff-tic30.c: Likewise.
1480         * coff-tic54x.c: Likewise.
1481         * coff-tic80.c: Likewise.
1482         * coff-w65.c: Likewise.
1483         * coff-we32k.c: Likewise.
1484         * coff-z8k.c: Likewise.
1485
1486 2000-11-15  Richard Henderson  <rth@redhat.com>
1487
1488         * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
1489         section with the same ALLOC|LOAD flags as the source section.
1490
1491 2000-11-14  Jakub Jelinek  <jakub@redhat.com>
1492
1493         * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
1494         by STO_ALPHA constants.
1495
1496 2000-11-14  Kazu Hirata  <kazu@hxi.com>
1497
1498         * coff-pmac.c: Fix formatting.
1499         * coff-ppc.c: Likewise.
1500
1501 2000-11-13  H.J. Lu  <hjl@gnu.org>
1502
1503         * elflink.h (elf_link_add_object_symbols): Also add indirect
1504         symbols for common symbols with the default version.
1505
1506 2000-11-09  Philip Blundell  <pb@futuretv.com>
1507
1508         * section.c (STD_SECTION): Set gc_mark flag.
1509
1510 2000-11-11  Kazu Hirata  <kazu@hxi.com>
1511
1512         * coff-i960.c: Likewise.
1513         * coff-m68k.c: Likewise.
1514         * coff-m88k.c: Likewise.
1515         * coff-mcore.c: Likewise.
1516         * coff-mips.c: Likewise.
1517
1518 2000-11-11  Bernd Schmidt  <bernds@cygnus.co.uk>
1519
1520         * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
1521
1522 2000-11-10  Kazu Hirata  <kazu@hxi.com>
1523
1524         * coff-h8300.c: Fix formatting.
1525         * coff-h8500.c: Likewise.
1526         * coff-i386.c: Likewise.
1527         * coff-i860.c: Likewise.
1528         * coff-i960.c: Likewise.
1529         * coff-ia64.c: Likewise.
1530
1531 2000-11-09  Kazu Hirata  <kazu@hxi.com>
1532
1533         * archive.c: Fix formatting.
1534         * archures.c: Likewise.
1535
1536 2000-11-07  Richard Henderson  <rth@redhat.com>
1537
1538         * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
1539         Set it before bfd_elf64_bfd_final_link call.  Use it after the call.
1540         * section.c (bfd_set_section_contents): Call memcpy if
1541         section->contents set and location not equal to contents plus offset.
1542
1543 2000-11-08  Kazu Hirata  <kazu@hxi.com>
1544
1545         * bfd-in.h: Fix formatting.
1546         * bfd-in2.h: Likewise.
1547         * bfd.c: Likewise.
1548         * binary.c: Likewise.
1549         * bout.c: Likewise.
1550         * coff-a29k.c: Likewise.
1551         * coff-alpha.c: Likewise.
1552         * coff-apollo.c: Likewise.
1553         * coff-aux.c: Likewise.
1554
1555 2000-11-07  Kazu Hirata  <kazu@hxi.com>
1556
1557         * aix386-core.c: Fix formatting.
1558         * aoutf1.h: Likewise.
1559         * aoutx.h: Likewise.
1560         * archures.c: Likewise.
1561         * armnetbsd.c: Likewise.
1562
1563 2000-11-07  Alan Modra  <alan@linuxcare.com.au>
1564
1565         * coff-h8300.c (special): Adjust reloc address.
1566
1567 2000-11-06  Steve Ellcey <sje@cup.hp.com>
1568
1569         * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
1570         to differentiate elf32 and elf64 on ia64.
1571         * bfd-in2.h: Regenerate.
1572         * config.bfd: Add target for "ia64*-*-hpux*".
1573         * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
1574         * configure: Regenerate.
1575         * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
1576         * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
1577
1578         * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
1579         from elfxx-ia64.c.  Add depenency rules for making elf32-ia64.lo.
1580         * Makefile.in: Regnerate.
1581         * elf64-ia64.c: Deleted.
1582         * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
1583
1584 2000-11-06  Kazu Hirata  <kazu@hxi.com>
1585
1586         * aout-adobe.c: Fix formatting.
1587         * aout-arm.c: Likewise.
1588         * aout-cris.c: Likewise.
1589         * aout-encap.c: Likewise.
1590         * aout-ns32k.c: Likewise.
1591         * aout-target.h: Likewise.
1592         * aout-tic30.c: Likewise.
1593
1594 2000-11-05  Philip Blundell  <philb@gnu.org>
1595
1596         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
1597         BFDs containing no sections to be merged, regardless of their flags.
1598
1599 2000-11-04  Philip Blundell  <philb@gnu.org>
1600
1601         * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
1602         if a relocation for an undefined symbol also results in an
1603         overflow.
1604
1605 2000-11-06  Christopher Faylor <cgf@cygnus.com>
1606
1607         * config.bfd: Add support for Sun Chorus.
1608
1609 2000-11-05  David O'Brien  <obrien@FreeBSD.org>
1610
1611         * configure.in: Recognize alpha-*-freebsd*.
1612         * configure: Regenerate.
1613
1614 2000-11-02  Luciano Gemme <ishitawa@yahoo.com>
1615
1616         * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
1617         (Chunk): New global variable set by a parameter in objcopy.c.
1618         (S3Forced): New global variable set by a parameter in
1619         objcopy.c.
1620         (srec_set_section_contents): If S3Forced is true, always generate
1621         S3 records.
1622         (srec_write_section): Use 'Chunk' to limit maximum length of S
1623         records.
1624
1625 2000-11-02  Per Lundberg  <plundis@chaosdev.org>
1626
1627         * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
1628         * Makefile.in: Regenerate.
1629         * bfd-in2.h: Regenerate.
1630         * po/bfd.pot: Regenerate.
1631
1632 2000-10-31  Philip Blundell  <philb@gnu.org>
1633
1634         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
1635         EF_SOFT_FLOAT if it is defined.
1636
1637 2000-10-27  Philip Blundell  <philb@gnu.org>
1638
1639         * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
1640         attempts to mix PIC code with non-PIC, just mark the output as
1641         being position dependent.
1642         (elf32_arm_merge_private_bfd_data): Likewise.  Print an error
1643         message for EF_SOFT_FLOAT mismatches.  Display diagnostics for
1644         all mismatches, not just the first one.
1645
1646 2000-10-25  Chris Demetriou  <cgd@sibyte.com>
1647
1648         * ieee.c (ieee_archive_p): Plug one of many possible
1649         memory leaks in error handling.
1650
1651 2000-10-20  Jakub Jelinek  <jakub@redhat.com>
1652
1653         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
1654         elf32_sparc_object_p, elf32_sparc_final_write_processing):
1655         Support v8plusb.
1656         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
1657         sparc64_elf_object_p): Support v9b.
1658         * archures.c: Declare v8plusb and v9b machines.
1659         * bfd-in2.h: Ditto.
1660         * cpu-sparc.c: Ditto.
1661
1662 2000-10-16  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
1663
1664         * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
1665         of a GOT reloc.
1666
1667         * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
1668         (SYMBOL_CALLS_LOCAL): New macro.
1669         (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1670         (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
1671         (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1672         (ppc_elf_relocate_section): Use flag variable to determine
1673         whether the relocation refers to a local symbol.
1674         Test whether a PLTREL24 reloc will produce a reloc by looking
1675         to see whether a PLT entry was made.
1676
1677 2000-10-14  Geoffrey Keating  <geoffk@shoggoth.cygnus.com>
1678
1679         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
1680         entries that could serve as a definition for a weak symbol.
1681
1682 2000-10-13  Ulf Carlsson  <ulfc@engr.sgi.com>
1683
1684         From  Ralf Baechle  <ralf@gnu.org>
1685
1686         * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
1687         local_p.  Add symbol value only for non-R_MIPS_REL32 relocations
1688         against local symbols.
1689         (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
1690
1691 2000-10-12  Alan Modra  <alan@linuxcare.com.au>
1692
1693         * section.c (struct sec): Add kept_section.
1694         (struct bfd_comdat_info): Remove sec, we can use above.
1695         (STD_SECTION): Add initializer.
1696         (bfd_make_section_anyway): Init here too.
1697
1698         * bfd-in2.h: Regenerate.
1699
1700         * elflink.h (elf_link_add_object_symbols): Remove unnecessary
1701         zeroing of `flags'.
1702         (elf_link_input_bfd): Set all asection->symbol->value's here, and
1703         fudge values for discarded link-once section symbols.
1704
1705         * elf64-hppa.c: Include alloca-conf.h
1706
1707 2000-10-11  Alan Modra  <alan@linuxcare.com.au>
1708
1709         * elf.c (swap_out_syms): Revert 2000-10-07 changes.
1710
1711         * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
1712
1713 2000-10-10  Alan Modra  <alan@linuxcare.com.au>
1714
1715         * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
1716
1717 2000-10-10  Tom Rix <trix@redhat.com>
1718
1719         * section.c (bfd_make_section_anyway): Release newsect ptr when
1720         newsect->symbol fails to alloc.  Use bfd_release instead of free.
1721
1722 2000-10-09  Richard Henderson  <rth@cygnus.com
1723
1724         * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
1725         (elf64_ia64_unwind_entry_compare): New.
1726         (elf64_ia64_final_link): Sort the .IA_64.unwind section.
1727
1728 2000-10-07  Alan Modra  <alan@linuxcare.com.au>
1729
1730         * elflink.h (size_dynamic_sections): Don't create various tags if
1731         .dynstr is excluded from the link.  Don't set first dynsym entry
1732         if dynsymcount is zero.
1733         (elf_bfd_final_link): Don't try to swap out dynamic syms if
1734         .dynsym excluded from the link.  Don't try to write any dynamic
1735         sections excluded from the link.
1736
1737         * elf.c (swap_out_syms): Handle global section symbols.
1738
1739 2000-10-05  DJ Delorie  <dj@redhat.com>
1740
1741         * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
1742         * coffcode.h (coff_set_alignment_hook): read extended reloc count
1743         (coff_write_relocs): write extended reloc count
1744         (coff_write_object_contents): account for extended relocs
1745
1746 2000-10-05  Jim Wilson  <wilson@cygnus.com>
1747
1748         * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
1749         field.
1750         * elf.c (_bfd_elf_make_section_from_shdr): Call the
1751         elf_backend_section_flags function.
1752         * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
1753         code.
1754         (elf64_ia64_section_flags): New function containing flag conversion
1755         code.
1756         (elf_backend_section_flags): Define to elf64_ia64_section_flags.
1757         * elfxx-target.h (elf_backend_section_flags): Define.
1758         (elfNN_bed): Initialize elf_backend_section_flags field.
1759
1760 2000-10-02  Alan Modra  <alan@linuxcare.com.au>
1761
1762         * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
1763         _bfd_elf32_gc_record_vtable.  Correct a comment.
1764
1765 2000-10-01  Ulf Carlsson  <ulfc@engr.sgi.com>
1766
1767         From  Ralf Baechle  <ralf@gnu.org>
1768
1769         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
1770         produces binaries with got[1] = 0x80000001 to differenciate them
1771         for the dynamic linker from the broken binaries produced by old
1772         versions.
1773
1774 2000-09-30  Petr Sorfa <petrs@sco.com>
1775
1776         * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
1777         (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
1778         * configure.in: Add check for pxstatus_t and lwpxstatus_t.
1779         * configure: Regenerate.
1780
1781 2000-09-27  Hans-Peter Nilsson  <hp@axis.com>
1782
1783         Define two bfd_targets for absence and presence of leading
1784         underscore on symbols.  Make sure to only link same kind.
1785         * elf32-cris.c (cris_elf_object_p,
1786         cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
1787         cris_elf_merge_private_bfd_data): New.
1788         (elf_backend_object_p, elf_backend_final_write_processing,
1789         bfd_elf32_bfd_print_private_bfd_data,
1790         bfd_elf32_bfd_merge_private_bfd_data): Define.
1791         <Target vector definition>: Include elf32-target.h twice with
1792         different macro settings:
1793         (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
1794         bfd_elf32_us_cris_vec.
1795         (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
1796         (elf_symbol_leading_char): First as 0, then '_'.
1797         (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
1798         * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
1799         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
1800         * configure: Regenerate.
1801         * targets.c: Declare bfd_elf32_us_cris_vec.
1802         * po/bfd.pot: Regenerate.
1803
1804 2000-09-29  Momchil Velikov  <velco@fadata.bg>
1805
1806         * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
1807         R_ARM_THM_PC22 relocations.
1808
1809 2000-09-29  NIIBE Yutaka <gniibe@chroot.org>
1810
1811         * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
1812
1813 2000-09-29  Momchil Velikov <velco@fadata.bg>
1814
1815         * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
1816         is has the SEC_HAS_CONTENTS flag set.
1817
1818 2000-09-28  Ã–rjan Friberg  <orjanf@axis.com>
1819             Hans-Peter Nilsson  <hp@axis.com>
1820
1821         * aout-cris.c (N_TXTADDR): Define.
1822
1823 2000-09-28  John David Anglin <dave@hiauly1.hia.nrc.ca>
1824
1825         * som.c: Include alloca-conf.h.
1826         * Makefile.am: "make dep-am"
1827         * Makefile.in: Regenerate.
1828
1829 2000-09-27  Alan Modra  <alan@linuxcare.com.au>
1830
1831         * elf32-hppa.c (plt_stub): New.
1832         (PLT_STUB_ENTRY): Define.
1833         (elf32_hppa_link_hash_table): Change multi_subspace to packed
1834         boolean.  Add need_plt_stub, has_12bit_branch and has_17bit_branch.
1835         (elf32_hppa_link_hash_table_create): Init to suit.
1836         (elf32_hppa_check_relocs): Set has_12bit_branch and
1837         has_17bit_branch as appropriate.
1838         (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
1839         non-local functions.
1840         (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
1841         Add space for plt_stub as needed.
1842         (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
1843         functions at plt_stub.
1844         (elf32_hppa_finish_dynamic_sections): Write plt_stub.
1845         (elf32_hppa_create_dynamic_sections): Leave .plt executable.
1846
1847         * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
1848         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.  Use it instead
1849         of fixed size, and if negative, disable handling of input sections
1850         before stub section.  Set up default stub group size depending
1851         on detected branch relocs.
1852         (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
1853         ensure different offsets from sym_value aren't rounded to
1854         different 2k blocks.  Use lrsel and rrsel for other stubs too for
1855         consistency rather than necessity.
1856         (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
1857         (final_link_relocate): Likewise.
1858         (elf32_hppa_relocate_section): Likewise.
1859
1860         * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
1861         (_bfd_elf_hppa_gen_reloc_type): Generate them.
1862         (elf_hppa_final_link_relocate): Handle them.
1863         (elf_hppa_relocate_insn): Likewise.
1864         (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
1865
1866 2000-09-26  Hans-Peter Nilsson  <hp@axis.com>
1867
1868         * elfcode.h (elf_object_p): Preserve and clear abfd section
1869         information.  Restore at error.
1870
1871 2000-09-26  Paul Sokolovsky  <Paul.Sokolovsky@technologist.com>
1872
1873         * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
1874         is empty, make sure that its rva also 0. NT loader dislikes
1875         having otherwise.
1876
1877 2000-09-26  Steve Ellcey <sje@cup.hp.com>
1878
1879         * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
1880         global by default.
1881
1882 2000-09-21  Alan Modra  <alan@linuxcare.com.au>
1883
1884         * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
1885         currently unused RELATIVE_DYNAMIC_RELOCS code.
1886         (hppa_discard_copies): Likewise.
1887         (elf32_hppa_size_stubs): Size `input_list' array correctly.  Correct
1888         comments.  Don't check non-code output sections for stub grouping.
1889
1890 2000-09-20  Alan Modra  <alan@linuxcare.com.au>
1891
1892         * section.c (bfd_get_unique_section_name): Return NULL if
1893         bfd_malloc fails.
1894
1895 2000-09-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1896
1897         * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
1898         instruction sequence to actually work.
1899         (elf_m68k_finish_dynamic_sections): Change the patch-in offset
1900         accordingly.
1901
1902 2000-09-18  Alexandre Oliva  <aoliva@redhat.com>
1903
1904         * elf32-sh.c (sh_elf_relocate_section): Use
1905         _bfd_final_link_relocate to apply the relocation against a section
1906         symbol, when doing relocatable links.
1907
1908 2000-09-18  Alan Modra  <alan@linuxcare.com.au>
1909
1910         * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
1911         to id_sec.
1912         (stub_hash_newfunc): Here too.
1913         (hppa_add_stub): And here.
1914         (elf32_hppa_link_hash_table): Remove stub_section_created,
1915         reloc_section_created, first_init_sec and first_fini_sec.  Add
1916         stub_group.
1917         (elf32_hppa_link_hash_table_create): Init to suit.
1918         (hppa_get_stub_entry): Add support for grouping stub sections.
1919         (hppa_add_stub): Likewise.  Remove sec_count param and init/fini
1920         section code.  Index stub vars by section->id.
1921         (elf32_hppa_size_stubs): Likewise.  Remove duplicated function
1922         exit paths.  Zap allocation of above removed vars.  Refine
1923         link-once test.
1924
1925         * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
1926         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
1927         (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
1928         rather than pointer to bfd_link_info.
1929         (hppa_add_stub): Likewise.
1930         (final_link_relocate): Likewise.
1931
1932 2000-09-17  David Huggins-Daines  <dhd@linuxcare.com>
1933
1934         (elf32_hppa_size_stubs): Don't try to build stubs for discarded
1935         link-once sections.
1936
1937 2000-09-16  Alexandre Oliva  <aoliva@redhat.com>
1938
1939         * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
1940         ld/emulparams/shelf.sh.
1941
1942 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
1943
1944         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
1945         * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
1946         * bfd-in2.h: Regenerate.
1947
1948 2000-09-15  Kenneth Block  <Kenneth.Block@compaq.com>
1949
1950         * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
1951         LITUSE relocations incorrectly if -relax is specified on the ld
1952         command line and the displacement field of the load or store
1953         instruction is non-zero. (Patch by paul.winalski@compaq.com)
1954
1955 2000-09-15  Alan Modra  <alan@linuxcare.com.au>
1956
1957         * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
1958         first_fini_sec here.
1959         (elf32_hppa_size_stubs): Instead correctly find the first .init
1960         and .fini section here.
1961
1962 2000-09-15  David Huggins-Daines  <dhd@linuxcare.com>
1963
1964         * elf32-hppa.c (clobber_millicode_symbols): New function.
1965         (elf32_hppa_size_dynamic_sections): Call it.
1966
1967 2000-09-14  Alan Modra  <alan@linuxcare.com.au>
1968
1969         * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
1970         packed.  Add plabel, plt_abs packed booleans.
1971         (hppa_link_hash_newfunc): Init new fields.
1972         (PLABEL_PLT_ENTRY_SIZE): Define.
1973         (hppa_stub_name): Use size_t len vars.
1974         (hppa_add_stub): Likewise.
1975         (elf32_hppa_build_stubs): Likewise.
1976         (hppa_build_one_stub): Kill some compiler warnings.
1977         (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
1978         if dynamic linking.  Munge the local plt offsets into
1979         local_got_refcounts.  Set h->plabel for all global PLABELs.  Use
1980         size_t len vars.  Add assert for plabel addend.
1981         (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
1982         (elf32_hppa_hide_symbol): New function.
1983         (elf_backend_hide_symbol): Define.
1984         (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
1985         with h->plabel set.  Don't make plt entries to have dynamic syms
1986         when they have been forced local.  If plt entry is used by a
1987         plabel, make it PLABEL_PLT_ENTRY_SIZE.
1988         (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
1989         Set up .plt offsets for local syms.
1990         (elf32_hppa_relocate_section): Initialise plt entries for local
1991         syms.  Leave weak undefined plabels zero.  Make global plabel
1992         relocs against function symbol, and leave the addend zero.
1993         Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
1994         (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
1995         non-dynamic syms.  Init extra plt for plabels.  Use *ABS* DIR32
1996         relocs instead of SEGREL32 for dynamic got relocs.
1997         (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
1998         (elf_backend_got_header_size): Adjust.
1999         (elf32_hppa_set_gp): Calculate an "ideal" LTP.
2000
2001         * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
2002         (hppa_type_of_stub): Use it instead of #if 0
2003         (hppa_discard_copies): Use it here too.
2004         (elf32_hppa_size_dynamic_sections): And here.
2005
2006         * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
2007         (elf32_hppa_link_hash_table_create): And here.
2008         (hppa_build_one_stub): And here.  Instead keep track of stub
2009         offset using _raw_size.
2010         (elf32_hppa_size_stubs): Likewise.
2011         (elf32_hppa_build_stubs): Likewise.
2012         (hppa_size_one_stub): Likewise.  Resize reloc section too.
2013
2014         * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
2015         first_fini_sec handling.  Don't search for reloc section or set
2016         hplink->reloc_section_created here.
2017         (elf32_hppa_size_stubs): Instead search for reloc sections, and
2018         set reloc_section_created here.
2019         (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
2020         (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
2021         and DT_FINI.
2022         (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
2023
2024         * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
2025         with `hplink->root.'.
2026         (elf32_hppa_check_relocs): Likewise.
2027         (elf32_hppa_gc_sweep_hook): Likewise.
2028         (elf32_hppa_adjust_dynamic_symbol): Likewise.
2029         (hppa_handle_PIC_calls): Likewise.
2030         (elf32_hppa_size_dynamic_sections): Likewise.
2031         (elf32_hppa_set_gp): Likewise.
2032         (elf32_hppa_relocate_section): Likewise.
2033         (elf32_hppa_finish_dynamic_symbol): Likewise.
2034         (elf32_hppa_finish_dynamic_sections): Likewise.
2035
2036         From  David Huggins-Daines  <dhd@linuxcare.com>
2037         * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
2038         defined weak symbols in shared links.
2039         (final_link_relocate): Calls to defined weak symbols in shared
2040         objects must go via import stubs, as the target might not be known
2041         at link time.
2042
2043 2000-09-14  Alexandre Oliva  <aoliva@redhat.com>
2044
2045         * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
2046         R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
2047         R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167.  Replaced
2048         the original entries with EMPTY_HOWTOs, and added new ones to fill
2049         in the gap.
2050         (sh_elf_info_to_howto): Make sure the new gap isn't used.
2051         (sh_elf_relocate_section): Likewise.
2052
2053 2000-09-13  Anders Norlander  <anorland@acc.umu.se>
2054
2055         * cpu-mips.c (arch_info_struct): Add mips:4K
2056         * bfd-in2.h (bfd_mach_mips4K): New define.
2057         * archures.c: Add bfd_mach_mips4K to comment.
2058         * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
2059         E_MIPS_ARCH_2 for bfd_mach_mips4K.
2060
2061 2000-09-13  Marco Franzen <marcof@thyron.com>
2062
2063         * som.c (som_write_symbol_strings): Do not used fixed buffers,
2064         use size_t as a counter.
2065         (som_write_space_strings): Similarly.
2066
2067 2000-09-12  Jason Eckhardt  <jle@cygnus.com>
2068
2069         * elf32-i860.c (elf32_i860_relocate_pc26): New function
2070         and prototype.
2071         (elf32_i860_relocate_section): Invoke new function from here.
2072
2073 2000-09-11  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2074
2075         * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
2076         static.
2077
2078 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2079
2080         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
2081         target section name instead of dumping core when the target symbol is
2082         undefined.
2083
2084 2000-09-09  Kazu Hirata  <kazu@hxi.com>
2085
2086         * riscix.c: Remove DEFUN.
2087
2088 2000-09-08  Nick Clifton  <nickc@redhat.com>
2089
2090         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
2091         initialise flags in output bfd if the input bfd is the default
2092         architecture with the default flags.
2093
2094 2000-09-08  Kazu Hirata  <kazu@hxi.com>
2095
2096         * archive.c: Fix formatting.
2097         * coff-arm.c: Likewise.
2098         * doc/chew.c: Likewise.
2099
2100 2000-09-08  Alan Modra  <alan@linuxcare.com.au>
2101
2102         * section.c (bfd_get_unique_section_name): Put a dot before the
2103         numeric suffix.
2104
2105 2000-09-07  Kazu Hirata  <kazu@hxi.com>
2106
2107         * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
2108         * elf.c: Fix formatting.
2109
2110 2000-09-07  Alexandre Oliva  <aoliva@redhat.com>
2111
2112         * config.bfd (sh-*-linux*): Added.
2113         * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
2114         * targets.c: Declare them.
2115         * elf32-sh-lin.c: New file.
2116         * Makefile.am: Compile it.
2117         * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
2118         * configure, Makefile.in: Rebuilt.
2119
2120 2000-09-06  Geoffrey Keating  <geoffk@cygnus.com>
2121
2122         * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
2123         pseduo-section when determining where the TOC ends.
2124
2125         * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
2126         output x_tvndx as it is only two bytes wide.
2127
2128         * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
2129         reloc is 26 or 32 bits wide.
2130
2131         * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
2132         for relocs that don't change anything.  Also look at the full
2133         6 bits of bitsize.
2134
2135 2000-09-06  Philip Blundell  <philb@gnu.org>
2136
2137         * config.bfd (arm*-*-uclinux*): New target.
2138
2139 2000-09-06  Alexandre Oliva  <aoliva@redhat.com>
2140
2141         * configure: Rebuilt with new libtool.m4.
2142
2143 2000-09-06  Alan Modra  <alan@linuxcare.com.au>
2144
2145         * section.c (bfd_get_unique_section_name): Avoid c++ reserved
2146         word for variable name.
2147         * bfd-in2.h: Regenerate.
2148
2149 2000-09-05  Nick Clifton  <nickc@redhat.com>
2150
2151         * config.in: Regenerate.
2152         * libbfd.h: Regenerate.
2153         * po/bfd.pot: Regenerate.
2154         * doc/bfdint.texi: Remove CVS date string - it foils compares with
2155         local versions.
2156
2157 2000-09-05  Steven Johnson  <sbjohnson@ozemail.com.au>
2158
2159         * cpu-powerpc.c  (arch_info_struct): Added MPC860 Family entry.
2160
2161 2000-09-05  Alan Modra  <alan@linuxcare.com.au>
2162
2163         Shared library and PIC support.
2164         * elf32-hppa.c (PLT_ENTRY_SIZE): New.
2165         (GOT_ENTRY_SIZE): New.
2166         (ELF_DYNAMIC_INTERPRETER): New.
2167         (STUB_SUFFIX): Define.
2168         (LONG_BRANCH_PIC_IN_SHLIB): Define.
2169         (RELATIVE_DYNAMIC_RELOCS): Define.
2170         (enum elf32_hppa_stub_type): New.
2171         (struct elf32_hppa_stub_hash_entry): Rename offset to
2172         stub_offset.  Add a number of new fields.
2173         (struct elf32_hppa_link_hash_entry): New.
2174         (struct elf32_hppa_link_hash_table): Add numerous fields.  Remove
2175         global_value.
2176         (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
2177         (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
2178         (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc.  Init
2179         new fields.
2180         (hppa_link_hash_newfunc): New function.
2181         (elf32_hppa_link_hash_table_create): Use above function. Init new
2182         fields.
2183         (elf32_hppa_stub_name): Rename to hppa_stub_name.  Pass in reloc
2184         instead of addend, and remove sym_name from args.  Don't use
2185         symbol name for local syms, instead use sym index.
2186         (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
2187         stub type rather than size.  Pass in hash and handle import stub
2188         case.  Also pass in reloc instead of offset so we can calculate
2189         PCREL22F and PCREL12F branches properly.
2190         (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub.  Build
2191         import and export stubs too.
2192         (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub.  Handle
2193         import and export stub sizing.
2194         (elf32_hppa_check_relocs): New function.
2195         (elf32_hppa_adjust_dynamic_symbol): New function.
2196         (hppa_discard_copies): New function.
2197         (elf32_hppa_size_dynamic_sections): New function.
2198         (elf_backend_size_dynamic_sections): Define.
2199         (elf32_hppa_finish_dynamic_symbol): New function.
2200         (elf_backend_finish_dynamic_symbol): Define.
2201         (elf32_hppa_size_stubs): Stash params in link hash table, and move
2202         some local vars into the link hash table too.  For shared links,
2203         trundle over function syms, generating export stubs.  Handle
2204         PCREL22F branches.  Break out stub creation code from here..
2205         (hppa_add_stub): .. to here.  New function.
2206         (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
2207         call the bfd linker.  Use elf_gp to record global pointer.
2208         Calculate a value from sections if $global$ is missing.
2209         (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
2210         (elf32_hppa_gc_mark_hook): New function.
2211         (elf_backend_gc_mark_hook): Define.
2212         (elf32_hppa_gc_sweep_hook): New function.
2213         (elf_backend_gc_sweep_hook): Define.
2214         (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
2215         Add rel to args, and remove howto, input_bfd, offset, addend,
2216         sym_name as we can recalculate these locally.  Handle calls to
2217         dynamic objects, extra PIC relocs, PCREL22F branches.  Change
2218         handling of undefined weak syms.  Check that stubs are in range.
2219         Only look for import stubs on PCREL17F and PCREL22F relocs.  Add
2220         message on hitting a DPREL21L reloc that needs fixing.  Subtract
2221         off PC for PCREL14F.  Break out code that does a stub lookup from
2222         here..
2223         (hppa_get_stub_entry): ..to here.  New function.
2224         (elf32_hppa_relocate_insn): Merge into final_link_relocate.
2225         (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
2226         relocs, etc. etc.
2227         (elf32_hppa_finish_dynamic_sections): New function.
2228         (elf_backend_finish_dynamic_sections): Define.
2229         (elf_backend_final_write_processing) Define.
2230         (hppa_handle_PIC_calls): New function.
2231         (elf32_hppa_build_stubs): Call it.  Pass link_info to
2232         hppa_build_one_stub.
2233         (elf32_hppa_create_dynamic_sections): New function
2234         to create .plt and .got then set .plt flags correctly.
2235         (elf_backend_create_dynamic_sections): Define.
2236         (elf32_hppa_object_p): New function.
2237         (elf_backend_object_p): Define.
2238         (elf32_hppa_elf_get_symbol_type): New function.
2239         (elf_backend_get_symbol_type): Define.
2240         (elf_backend_can_gc_sections): Define.
2241         (elf_backend_want_got_plt): Define.
2242         (elf_backend_plt_alignment): Set to 2.
2243         (elf_backend_plt_readonly): Define.
2244         (elf_backend_want_plt_sym): Define.
2245         (elf_backend_got_header_size): Reserve one entry.
2246
2247         * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
2248         (elf32_hppa_size_stubs): Pass in multi_subspace.
2249         (elf32_hppa_set_gp): Declare.
2250
2251         * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
2252         (bfd_get_unique_section_name): New function.
2253         * bfd-in2.h: Regenerate.
2254
2255         * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
2256         (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
2257         comment.
2258
2259         From  David Huggins-Daines  <dhd@linuxcare.com>
2260         * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
2261         (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
2262         (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
2263         been updated in finish_dynamic_symbol before modifying function
2264         symbol.
2265
2266         * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
2267         eight entries.  Replace NULL with bfd_elf_generic_reloc.  Add
2268         R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
2269         (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*.  Add some
2270         comments.  Handle format == 12 for R_HPPA_PCREL_CALL.
2271         (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
2272         (elf_hppa_relocate_insn): Likewise.  Reformat some comments.
2273         (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
2274
2275         From David Huggins-Daines  <dhd@linuxcare.com>
2276         * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
2277         style of local labels as well.
2278
2279 2000-09-03  Philip Blundell  <philb@gnu.org>
2280
2281         * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
2282         references to undefined symbols in debugging sections.
2283
2284 2000-09-02  H.J. Lu  <hjl@gnu.org>
2285
2286         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
2287         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
2288         BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
2289         section.
2290
2291 2000-09-02  Jason Eckhardt  <jle@cygnus.com>
2292
2293         * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
2294         (elf32_i860_is_local_label_name): New function and prototype.
2295
2296 2000-09-02  Nick Clifton  <nickc@redhat.com>
2297
2298         * configure.in: Increase version number to 2.10.91.
2299         * configure: Regenerate.
2300         * aclocal.m4: Regenerate.
2301         * config.in: Regenerate.
2302         * po/bfd.pot: Regenerate.
2303
2304 2000-09-02  Daniel Berlin <dberlin@redhat.com>
2305
2306         * elf.c (_bfd_elf_make_section_from_shdr): Add
2307         .gnu.linkobce.wi. to the list of debug section names.
2308
2309 2000-09-02  Nick Clifton  <nickc@redhat.com>
2310
2311         * dwarf2.c (find_debug_info): New function: Locate a section
2312         containing dwarf2 debug information.
2313         (bfd_dwarf2_find_nearest_line): Find all sections containing
2314         debug information and include them in the stash.
2315
2316 2000-09-01  Niibe Yutaka  <gniibe@m17n.org>, Kaz Kojima  <kkojima@rr.iij4u.or.jp>, Alexandre Oliva  <aoliva@redhat.com>
2317
2318         * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
2319         R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
2320         (sh_reloc_map): Add new relocs.
2321         (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
2322         sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
2323         sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
2324         sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
2325         functions.
2326         (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
2327         (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2328         elf_sh_plt_entry_be, elf_sh_plt_entry_le,
2329         elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2330         New array constants.
2331         (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
2332         New variables.
2333         (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2334         elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
2335         elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
2336         elf_sh_plt_reloc_offset): Define.
2337         (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
2338         elf_sh_link_hash_table): New structs.
2339         (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
2340         (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
2341         relocation types.
2342         (elf_backend_create_dynamic_sections,
2343         bfd_elf32_bfd_link_hash_table_create,
2344         elf_backend_adjust_dynamic_symbol,
2345         elf_backend_size_dynamic_sections,
2346         elf_backend_finish_dynamic_symbol,
2347         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2348         elf_backend_plt_readonly, elf_backend_want_plt_sym,
2349         elf_backend_got_header_size, elf_backend_plt_header_size):
2350         Define.
2351         * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
2352         BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
2353         New relocs.
2354         * bfd-in2.h, libbfd.h: Rebuilt.
2355
2356 2000-09-01  Alan Modra  <alan@linuxcare.com.au>
2357
2358         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
2359         change.
2360
2361 2000-08-31  J"orn Rennecke <amylaar@cygnus.co.uk>
2362
2363         * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
2364         not initialized, set them to indicate the SH1 instruction set.
2365
2366 2000-08-31  Alexandre Oliva  <aoliva@redhat.com>
2367
2368         * acinclude.m4: Include libtool and gettext macros from the
2369         top level.
2370         * aclocal.m4, configure: Rebuilt.
2371
2372 2000-08-29  Michael Snyder  <msnyder@seadog.cygnus.com>
2373
2374         * elf.c: Eliminate references to __sparcv9 macro; replace with
2375         autoconf variables HAVE_PSINFO32_T etc.
2376         * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
2377         HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
2378         * config.in: Ditto.
2379         * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
2380         detect the above typedefs.  (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
2381         * aclocal.m4: Ditto.
2382         * configure: Regenerate.
2383
2384 2000-08-27  Alan Modra  <alan@linuxcare.com.au>
2385
2386         * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
2387         for any shared link, not just shared -Bsymbolic.
2388         (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
2389         any shared link, and pass link info to it.
2390         (elf_i386_size_dynamic_sections): Update comment.
2391         (elf_i386_discard_copies): Modify to discard relocs for symbols
2392         that have been forced local.
2393         (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
2394         that have been forced local.
2395
2396 2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
2397
2398         * elflink.h (elf_link_add_object_symbols): Allow common
2399         symbols to have an alignment of 1 if explicitly requested, and
2400         not overridden by other definitions.
2401
2402 2000-08-22  Doug Kwan <dkwan@transmeta.com>
2403
2404         * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
2405         * coffcode.h (coff_set_flags): Add detection of w65 architecture.
2406
2407 2000-08-22  H.J. Lu  <hjl@gnu.org>
2408
2409         * elf-bfd.h (elf_link_hash_table): Add runpath.
2410
2411         * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
2412         * bfd-in2.h: Rebuilt.
2413
2414         * elf.c (_bfd_elf_link_hash_table_init): Initialize the
2415         "runpath" field to NULL.
2416         (bfd_elf_get_runpath_list): New function.
2417
2418         * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
2419         DT_RUNPATH entries.
2420
2421 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
2422
2423         * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
2424         R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
2425         explicitly.  Improve validation of r_type.
2426
2427 2000-08-21  H.J. Lu  <hjl@gnu.org>
2428
2429         * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
2430         dynamic allocated content space.  Add a comment to remind us that
2431         one day this ought to be fixed.
2432         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2433         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2434         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2435
2436 2000-08-21  Jason Eckhardt  <jle@cygnus.com>
2437
2438         * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
2439         field with the newly relocated value instead of adding it to the
2440         existing immediate field.
2441         (elf32_i860_relocate_splitn): Likewise.
2442         (elf32_i860_relocate_highadj): Likewise.
2443
2444 2000-08-16  Jason Eckhardt  <jle@cygnus.com>
2445
2446         * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
2447         was previously just a stub).
2448
2449 2000-08-16  Alexandre Oliva  <aoliva@redhat.com>
2450
2451         * elflink.c (_bfd_elf_create_got_section): Don't abort().
2452         Formatting fixes.
2453         (_bfd_elf_create_dynamic_sections): Likewise.
2454
2455 2000-08-16  Andrew Macleod  <amacleod@cygnus.com>
2456
2457         * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
2458         for undefined symbols to be the beginning of the section.
2459
2460         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
2461         four extra entries at the beginning of the .rela.plt section.
2462         (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
2463         section to account for the four reserved entries in the .plt section.
2464
2465 2000-08-15  Geoffrey Keating  <geoffk@cygnus.com>
2466
2467         * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
2468         to the list of NOPs we recognize after a branch-and-link.
2469         Use the ori NOP when one is needed.
2470
2471         * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
2472         for large archives.
2473
2474 2000-08-14  Jim Wilson  <wilson@cygnus.com>
2475
2476         * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
2477         EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
2478         (elf64_ia64_print_private_bfd_data): Likewise.  Also handle
2479         EF_IA_64_ABSOLUTE.
2480
2481 2000-08-11  Alexandre Oliva  <aoliva@redhat.com>
2482
2483         * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
2484
2485 2000-08-10  Jason Eckhardt  <jle@cygnus.com>
2486
2487         * elf32-i860.c (elf32_i860_relocate_section): New function.
2488         (i860_final_link_relocate): New function.
2489         (elf32_i860_relocate_splitn): New function.
2490         (elf32_i860_relocate_pc16): New function.
2491         (elf32_i860_relocate_highadj): New function.
2492         (elf32_i860_howto): Minor adjustments to some relocations.
2493         (elf_info_to_howto_rel): Define.
2494         (elf_backend_relocate_section): Define.
2495
2496 2000-08-10  Nick Clifton  <nickc@cygnus.com>
2497
2498         * elf32-arm.h: Fix formatting.
2499
2500 2000-08-10  Bernd Schmidt  <bernds@cygnus.co.uk>
2501
2502         * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
2503
2504 2000-08-08  Jason Eckhardt  <jle@cygnus.com>
2505
2506         * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
2507
2508 2000-08-07  Kazu Hirata  <kazu@hxi.com>
2509
2510         * ieee.c (ieee_write_debug_part): Rewrite a comment.
2511         * elf64-ia64.c: Fix a typo.
2512
2513 2000-08-05  Jason Eckhardt  <jle@cygnus.com>
2514
2515         * elf32-i860.c (elf32_i860_howto_table): New structure.
2516         (lookup_howto): New function.
2517         (elf32_i860_reloc_type_lookup): New function.
2518         (elf32_i860_info_to_howto_rela): New function.
2519         (elf_code_to_howto_index): New structure.
2520         (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
2521         (bfd_elf32_bfd_reloc_type_lookup): Re-define as
2522         elf32_i860_reloc_type_lookup.
2523
2524 2000-08-04  Rodney Brown  <RodneyBrown@pmsc.com>
2525
2526         * som.c (struct fixup_format): Constify `format'.
2527         (som_hppa_howto_table): Use SOM_HOWTO macro.
2528         (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
2529         (som_bfd_reloc_type_lookup): Likewise.
2530         (compare_subspaces): Remove unused `count1', `count2'.
2531         (som_begin_writing): Remove unused `total_reloc_size'.
2532         (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
2533         (som_print_symbol, som_bfd_is_local_label_name): Likewise.
2534         (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
2535         (som_find_nearest_line): Decorate unused parameter(s).
2536         (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
2537         (som_bfd_link_split_section): Likewise.
2538
2539 2000-08-03  Nick Clifton  <nickc@cygnus.com>
2540
2541         * section.c: Restore backed out code.
2542         * elf.c: Restore backed out code.
2543         (copy_private_bfd_data): Fix bug preventing stipped dynamic
2544         binaries from working.
2545         * bfd-in2.h: Regenerate.
2546
2547 2000-08-03  H.J. Lu  <hjl@gnu.org>
2548
2549         * section.c: Back out the change made by Nick Clifton
2550         <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
2551         binaries.
2552         * bfd-in2.h: Likewise.
2553         * elf.c: Likewise.
2554
2555 2000-08-03  Alexandre Oliva  <aoliva@redhat.com>
2556
2557         * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
2558
2559 2000-07-31  Jason Eckhardt  <jle@cygnus.com>
2560
2561         * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
2562         * bfd-in2.h, libbfd.h: Regenerate.
2563
2564 2000-07-31  Nick Clifton  <nickc@cygnus.com>
2565
2566         * section.c (struct sec): Add new boolean field 'segment_mark'.
2567         (STD_SECTION): Initialise new field to zero.
2568
2569         * bfd-in2.h: Regenerate.
2570
2571         * elf.c (copy_private_bfd_data): Reorganise section to segment
2572         mapping to cope with moved sections requiring new segments,
2573         and overlapping segments.
2574         (SEGMENT_END): New macro: Return the end address of a segment.
2575         (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
2576         contains a section by comparing their VMA addresses.
2577         (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
2578         contains a section by comparing their LMA addresses.
2579         (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
2580         section should be included in a segment.
2581         (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
2582         follows another in memory.
2583         (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
2584         segments overlap.
2585
2586 2000-07-22  Jason Eckhardt  <jle@cygnus.com>
2587
2588         * cpu-i860.c: Added comments.
2589
2590         * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
2591         bfd_elf32_i860_little_vec.
2592         (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
2593         (ELF_MAXPAGESIZE): Changed to 4096.
2594
2595         * targets.c (bfd_elf32_i860_little_vec): Declaration of
2596         new target.
2597         (bfd_target_vector): Added bfd_elf32_i860_little_vec.
2598
2599         * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
2600         config for little endian elf32 i860.
2601         (targ_defvec): Define for the new config above
2602         as "bfd_elf32_i860_little_vec".
2603         (targ_selvecs): Define for the new config above
2604         as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
2605
2606         * configure.in (bfd_elf32_i860_little_vec): Added recognition
2607         of new target vec.
2608
2609         * configure: Regenerated.
2610
2611 2000-07-27  H.J. Lu  <hjl@gnu.org>
2612
2613         * elflink.h (elf_merge_symbol): Take one more argument,
2614         dt_needed, to indicate if the symbol comes from a DT_NEEDED
2615         entry. Don't overide the existing weak definition if dt_needed
2616         is true.
2617         (elf_link_add_object_symbols): Pass dt_needed to
2618         elf_merge_symbol ().
2619
2620 2000-07-27  Nick Clifton  <nickc@cygnus.com>
2621
2622         * elflink.h (elf_link_size_reloc_section): Zeroes the section's
2623         allocated contents.
2624
2625 2000-07-25  Geoffrey Keating  <geoffk@cygnus.com>
2626
2627         * configure.host (*-*-aix*): AIX has 'long long' always.
2628
2629         * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
2630         (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
2631         (xcoff_write_archive_contents_big): Don't update the offset
2632         of the symbol table, xcoff_write_armap will do it.
2633
2634 2000-07-23  Ulf Carlsson  <ulfc@engr.sgi.com>
2635
2636         * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
2637         of dynobj for SGI_COMPAT checks.
2638
2639 2000-07-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
2640
2641         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
2642         * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
2643         * bfd-in2.h: Regenerate.
2644
2645 2000-07-21  Nick Clifton  <nickc@cygnus.com>
2646
2647         * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
2648         range symbol indices in relocs and issue an error message.
2649
2650 2000-07-20  H.J. Lu  <hjl@gnu.org>
2651
2652         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
2653         info->new_dtags when setting DT_FLAGS_1. It will only be set
2654         by the new linker options. It shouldn't break anything.
2655
2656 2000-07-20  H.J. Lu  <hjl@gnu.org>
2657
2658         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
2659         only if info->new_dtags is true.
2660
2661 2000-07-20  H.J. Lu  <hjl@gnu.org>
2662
2663         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
2664         DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
2665
2666 2000-07-20  Hans-Peter Nilsson  <hp@axis.com>
2667
2668         * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
2669         (ALL_MACHINES_CFILES): Add cpu-cris.c.
2670         (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
2671         (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
2672         (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
2673         * Makefile.in: Rebuild.
2674         * aclocal.m4: Rebuild.
2675         * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
2676         * archures.c (enum bfd_architecture): Add bfd_arch_cris.
2677         (bfd_cris_arch): Declare.
2678         (bfd_archures_list): Add bfd_cris_arch.
2679         * bfd-in2.h: Rebuild.
2680         * config.bfd: (cris-*-*): New target.
2681         * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
2682         * configure: Rebuild.
2683         * elf.c (prep_headers): Add bfd_arch_cris.
2684         * libbfd.h: Rebuild.
2685         * libaout.h (enum machine_type): Add M_CRIS.
2686         * reloc.c: Add CRIS relocations.
2687         * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
2688         (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
2689         * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
2690         * po/POTFILES.in, po/bfd.pot: Regenerate.
2691
2692 2000-07-19  H.J. Lu  <hjl@gnu.org>
2693
2694         * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
2695         DF_TEXTREL if DT_TEXTREL is set.
2696         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2697         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
2698         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
2699         * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
2700         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2701         * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
2702         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
2703         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
2704         * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
2705         * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
2706
2707         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
2708         set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
2709         DT_RPATH is set.
2710         Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
2711
2712 2000-07-19  H.J. Lu  <hjl@gnu.org>
2713
2714         * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
2715         * bfd-in2.h: Rebuild.
2716
2717         * elf-bfd.h (elf_obj_tdata): Add dt_soname.
2718         (elf_dt_soname): New.
2719
2720         * elf.c (bfd_elf_set_dt_needed_soname): New.
2721
2722         * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
2723         entry if the shared object loaded by DT_NEEDED is used to
2724         resolve the reference in a regular object.
2725
2726 2000-07-19  H.J. Lu  <hjl@gnu.org>
2727
2728         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
2729         DT_DEPAUDIT and DT_AUDIT as strings.
2730
2731 2000-07-19  Nick Clifton  <nickc@cygnus.com>
2732
2733         * format.c: Fix formatting.
2734
2735 2000-07-19  H.J. Lu  <hjl@gnu.org>
2736
2737         * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
2738
2739 2000-07-19  H.J. Lu  <hjl@gnu.org>
2740
2741         * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
2742         DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
2743         DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
2744         DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
2745         DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
2746         DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
2747         DT_FLAGS_1, DT_USED and DT_CHECKSUM.
2748
2749 2000-07-18  Andrew Cagney  <cagney@b1.cygnus.com>
2750
2751         * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
2752         renamed functions from here...
2753         (assign_section_numbers): Use renamed functions.
2754         (prep_headers): Use renamed functions.
2755
2756         * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
2757         * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
2758         * bfd-in2.h: Regenerate.
2759
2760 2000-07-18  Ulf Carlsson  <ulfc@engr.sgi.com>
2761
2762         * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
2763         parenthesis in if statement.
2764
2765 2000-07-17  Koundinya K  <kk@ddeorg.soft.net>
2766
2767         Enable the support for Traditional MIPS.
2768         * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
2769         return ict_none appropriately for traditional mips targets.
2770         (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
2771         (STUB_MOVE): Conditionalize for traditonal mips.
2772         (STUB_LI16): Likewise.
2773         (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
2774         room for RTPROC header.
2775         (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
2776         the permission for the PT_DYNAMIC as read, write and execute.
2777         (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
2778         for traditonal mips.
2779         (_bfd_mips_elf_create_dynamic_sections): Add the symbol
2780         _DYNAMIC_LINKING for traditonal mips.
2781         (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
2782         in case of traditonal mips.
2783         (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
2784         entry is required. For a function if PLT is not required then set the
2785         corresponding hash table entry to 0.
2786         (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
2787         traditonal mips.
2788         (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
2789         shared object set the value to 0.
2790         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
2791         _DYNAMIC_LINKING for traditonal mips.
2792         (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
2793         for traditonal mips.
2794
2795 2000-07-15  H.J. Lu  <hjl@gnu.org>
2796
2797         * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
2798
2799 2000-07-12  Charles Wilson  <cwilson@ece.gatech.edu>
2800
2801         * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
2802         out a structure that is BFD_IN_MEMORY.
2803
2804 2000-07-11  Alan Modra  <alan@linuxcare.com.au>
2805
2806         * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
2807         bfd pointer.  Print section id instead of bfd pointer for local
2808         syms.  Prefix addend with `+' for global syms as well as local.
2809         Correct calculation of name component lengths.
2810         (elf64_hppa_check_relocs): Update call to get_dyn_name.
2811
2812         From David Huggins-Daines  <dhd@linuxcare.com>
2813         * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
2814         * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
2815         (elf64_hppa_modify_segment_map): Likewise.
2816
2817 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2818
2819         * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
2820         addresses to be "naturally" sign extended.  Return -1 if unknown.
2821         * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
2822         * bfd-in2.h: Regenerate.
2823
2824 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2825
2826         * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
2827         and ECOF_SIGNED_64 to list ways to extract an offset.
2828         (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
2829         ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
2830         Update.
2831         * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
2832         * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
2833
2834 2000-07-11  Andrew Cagney  <cagney@b1.cygnus.com>
2835
2836         * elfcode.h (elf_object_p): Use bfd_set_start_address and not
2837         bfd_get_start_address.
2838         (elf_swap_ehdr_in): Sign extend e_entry when applicable.
2839         (elf_swap_ehdr_out): Ditto.
2840
2841 2000-07-10  Alexander Aganichev  <AAganichev@hypercom.com>
2842
2843         * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
2844         compatibility with older binutils.
2845
2846 2000-07-10  Alan Modra  <alan@linuxcare.com.au>
2847
2848         * section.c (bfd_make_section_anyway): Start section_id at 0x10.
2849         (STD_SECTION): Avoid negative ids, instead use 0 to 3.
2850
2851         From Ryan Bradetich  <rbradetich@uswest.net>
2852         * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
2853         (parse_line_table): Ditto.
2854         (_bfd_dwarf1_find_nearest_line): Ditto.
2855         * syms.c (cmpindexentry): Remove extra `*' from params.
2856
2857 2000-07-09  Koundinya K  <kk@ddeorg.soft.net>
2858
2859         * elf32-mips.c (sort_dynamic_relocs): New Function.
2860         (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
2861         via qsort to sort the dynamic relocations in increasing r_symndx
2862         value.
2863
2864 2000-07-09  Alan Modra  <alan@linuxcare.com.au>
2865
2866         * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
2867         ATTRIBUTE_UNUSED to unused args.
2868         (get_opd): Likewise.
2869         (get_plt): Likewise.
2870         (get_dlt): Likewise.
2871         (get_stub): Likewise.
2872         (elf64_hppa_adjust_dynamic_symbol): Likewise.
2873         (elf64_hppa_link_output_symbol_hook): Likewise.
2874         (elf64_hppa_check_relocs): Delete unused var.
2875         (elf64_hppa_size_dynamic_sections): Likewise.
2876         (elf64_hppa_finalize_opd): Likewise.
2877         (elf64_hppa_finalize_dynreloc): Likewise.
2878         (elf64_hppa_modify_segment_map): Likewise.
2879         (elf64_hppa_finish_dynamic_sections): Likewise.
2880
2881         * elf-hppa.h (elf_hppa_final_write_processing): Add
2882         ATTRIBUTE_UNUSED to unused args.
2883         (elf_hppa_final_link_relocate): Likewise.
2884         (elf_hppa_record_segment_addrs): Add paretheses.
2885         (elf_hppa_relocate_section): Constify dyn_name.
2886
2887         From  David Huggins-Daines  <dhd@linuxcare.com>
2888         * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
2889         rearrange case statement so that it gets preferred to 32-bit ones.
2890
2891         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
2892         asection->id instead of address of asection structure.
2893         (elf32_hppa_size_stubs): Likewise.
2894
2895         * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
2896         for .init* and .fini*.
2897
2898         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
2899         and addends used in stub names to 32 bits.
2900         (elf32_hppa_size_stubs): Likewise.
2901
2902         * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
2903         twice for R_PARISC_GPREL64.  Use bfd_put_32 for R_PARISC_PCREL32,
2904         not bfd_put_64.  Fix minor comment typo and formatting.
2905
2906         Changes to create multiple linker stubs, positioned immediately
2907         before the section where they are required.
2908         * elf32-hppa.c: Don't include hppa_stubs.h.
2909         (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
2910         (elf32_hppa_stub_hash_table): Delete.
2911         (elf32_hppa_link_hash_entry): Delete.
2912         (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
2913         stub_hash_table, and store the struct here rather than a pointer.
2914         Delete output_symbol_count.  Add offset array.  Change
2915         global_value to a bfd_vma.
2916         (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
2917         (elf32_hppa_stub_hash_traverse): Delete.
2918         (elf32_hppa_name_of_stub): Delete.
2919         (elf32_hppa_link_hash_lookup): Delete.
2920         (elf32_hppa_link_hash_traverse): Delete.
2921         (elf32_hppa_stub_hash_table_init): Delete.
2922         (elf32_hppa_size_of_stub): Pass input section and offset rather
2923         than location and calculate location here.  Don't pass name as all
2924         stubs are now the same size.
2925         (elf32_hppa_stub_hash_newfunc): Init new fields.
2926         (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
2927         too.
2928         (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
2929         comparing against ints.  Rewrite stub handling code.
2930         (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
2931         Case enums to int before comparing against ints.  Remove
2932         bfd_reloc_dangerous case.
2933         (elf32_hppa_build_one_stub): Rewrite.
2934         (elf32_hppa_size_one_stub): New function.
2935         (elf32_hppa_build_stubs): Rewrite.
2936         (elf32_hppa_size_stubs): Pass in linker call-back functions.
2937         Rewrite stub-handling specific code.
2938
2939         * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
2940
2941         * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
2942
2943         * hppa_stubs.h: Delete.
2944         * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
2945         (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
2946         * Makefile.in: Regenerate.
2947
2948         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
2949         e_nlrsel.
2950
2951         * libhppa.h (hppa_field_adjust): Correct e_nsel case.
2952
2953         * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
2954         and section name for bfd_reloc_notsupported error message.
2955         (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
2956         bfd_reloc_notsupported.
2957         (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
2958
2959         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
2960         undefined weak symbols for all relocs.
2961         (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
2962         offsets are relative to one past the delay slot.
2963         (elf32_hppa_size_stubs): Account for reloc addend when calculating
2964         branch destination.  Put addend into stub name too.
2965         (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
2966         adjust by 8 when deciding whether a linker stub is needed.  Put
2967         addend into stub name as for above.
2968
2969         * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
2970         various args and vars.
2971         (elf32_hppa_bfd_final_link_relocate): Here too.
2972         (elf32_hppa_size_stubs): Rename index -> indx.  Use e_indx for
2973         inner block var to avoid shadowing.
2974
2975         * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type):  Make `field' arg
2976         unsigned.
2977         * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
2978         * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
2979         (elf_hppa_fake_sections): Rename local var to avoid shadowing.
2980
2981         * libhppa.h: Change practically all unsigned ints to plain ints.
2982         Remove tests on gcc version.  Instead use ATTRIBUTE_UNUSED for
2983         prototypes.
2984
2985         From Ryan Bradetich  <rbradetich@uswest.net>
2986         * libhppa.h (hppa_opcode_type): New enum to replace #define's.
2987         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
2988         suit above.
2989         From  David Huggins-Daines  <dhd@linuxcare.com>
2990         * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
2991         to the new OP_* ones.
2992
2993         * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
2994         error exit.  Bail out earlier on plabel relocs that we aren't
2995         interested in.  Don't tell elf32_hppa_stub_hash_lookup to copy
2996         string, and then don't free our copy.
2997         (elf32_hppa_build_one_stub): Make insn unsigned int.
2998
2999         * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
3000         available with BL, not BE and BLE.
3001
3002         * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
3003         code for elf arg relocs.
3004         (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
3005         argument with elf_link_hash_entry h.  Handle undefined weak
3006         symbols.  Move $global$ lookup from here...
3007         (elf32_hppa_relocate_section): ...to here.  Return correct error
3008         message for non-handled relocs.
3009         (elf32_hppa_size_of_stub): Correctly test branch range.  Previous
3010         wrong test was -0x3ffff to +0x40000.
3011
3012         * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
3013         R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
3014         Handle them as such.
3015         (elf_hppa_relocate_insn): Fix a typo.
3016
3017         * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
3018         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3019         assemble_17, assemble_21): Delete.
3020         Supply defines for all 64 possible opcodes.
3021         (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
3022         formats.  Handle COMICLR.
3023         (hppa_rebuild_insn): Delete bfd argument.  Handle formats 10, -11,
3024         -10, -16, 16, 22.
3025
3026         * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
3027         (elf32_hppa_bfd_final_link_relocate): Major rewrite.
3028         (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
3029         to suit.
3030         (elf32_hppa_size_stubs): Don't free stub_name twice.  Read in all
3031         the local syms - did this code get deleted accidentally?  Ignore
3032         undefined and undefweak syms.
3033
3034         * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
3035         block.  Use it instead of elf64_hppa_hash_table (info).
3036         (elf_hppa_final_link_relocate): Use hppa_info instead of
3037         elf64_hppa_hash_table (info).
3038
3039         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3040         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3041         (hppa_rebuild_insn): Mask immediate bits here instead.
3042         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3043
3044 2000-07-08  Alan Modra  <alan@linuxcare.com.au>
3045
3046         * section.c (struct sec): Add id field.  Tidy comment formatting.
3047         (bfd_make_section_anyway): Set id.
3048         (STD_SECTION): Init id too.
3049         Change CONST to const throughout.
3050         * archures.c (bfd_arch_info): Tidy comment.
3051         (bfd_arch_list): Change a CONST to const.
3052         * libbfd-in.h: Tidy comments and replace CONST with const.
3053         * elf-bfd.h: Likewise.
3054         * libbfd.h: Regenerate.
3055         * bfd-in2.h: Regenerate.
3056         * libcoff.h: Regenerate.
3057
3058 2000-07-07  DJ Delorie  <dj@redhat.com>
3059
3060         * archive.c (_bfd_write_archive_contents): Add an informative
3061         comment.
3062
3063 2000-07-06  Kazu Hirata  <kazu@hxi.com>
3064
3065         * srec.c: Fix formatting.
3066
3067 2000-06-05  DJ Delorie  <dj@redhat.com>
3068
3069         * MAINTAINERS: new
3070
3071 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
3072
3073         * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
3074         value of PC-relative offsets.
3075
3076 2000-07-03  Jim Wilson  <wilson@cygnus.com>
3077
3078         * elf64-alpha.c (alpha_elf_size_info): New.
3079         (elf_backend_size_info): Define to alpha_elf_size_info.
3080         * elfcode.h (elf_size_info): Change hash bucket size to 4.
3081
3082 2000-07-03  Ulf Carlsson  <ulfc@engr.sgi.com>
3083
3084         * elf32-mips.c: Include elf32-target.h again for the traditional
3085         MIPS targets.
3086
3087 2000-07-03  Marek Michalkiewicz  <marekm@linux.org.pl>
3088
3089         * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
3090         Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
3091         (avr_info_to_howto_rela): Likewise.
3092         (elf32_avr_gc_mark_hook): Likewise.
3093         (elf32_avr_gc_sweep_hook): Likewise.
3094         (elf32_avr_relocate_section): Likewise.
3095
3096 2000-07-03  Mark Elbrecht  <snowball3@bigfoot.com>
3097
3098         * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
3099         an external symbol for a non-shared, non-relocatable link.
3100
3101 2000-07-03  Nick Clifton  <nickc@redhat.com>
3102
3103         * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
3104         is an external symbol.
3105         (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
3106         external symbol.
3107
3108 2000-07-03  Kazu Hirata  <kazu@hxi.com>
3109
3110         * reloc16.c: Fix formatting.
3111
3112 2000-07-01  Koundinya K  <kk@ddeorg.soft.net>
3113
3114         * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
3115         to add a new target for traditional mips i.e
3116         bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
3117         * configure.in: Likewise.
3118         * configure: Rebuild.
3119         * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
3120         bfd_target_vector.
3121         (bfd_elf32_tradlittlemips_vec): Likewise.
3122         * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
3123         to see that elfNN_bed does not get redefined even if the target file
3124         is included twice for a chip. See elf32-mips.c.
3125
3126 2000-07-01  Alan Modra  <alan@linuxcare.com.au>
3127
3128         * Makefile.am (DEP): Fix 2000-06-22.  grep after running dep.sed
3129         (CLEANFILES): Add DEPA.
3130         * Makefile.in: Regenerate.
3131
3132 2000-06-30  DJ Delorie  <dj@cygnus.com>
3133
3134         * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
3135         can't assume the PE header is at 0x80.
3136
3137 2000-06-29  Mark Elbrecht  <snowball3@bigfoot.com>
3138
3139         * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
3140
3141 2000-06-28  Mark Elbrecht  <snowball3@bigfoot.com>
3142
3143         * go32stub.h: Update stub.
3144
3145 2000-06-26  Marek Michalkiewicz  <marekm@linux.org.pl>
3146
3147         * archures.c (bfd_mach_avr5): Define.
3148         * bfd-in2.h (bfd_mach_avr5): Define.
3149         * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
3150         bfd_mach_avr5, add bfd_mach_avr4.  Update comments.
3151         (compatible): Update comment.  Add missing test.
3152         * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
3153         for avr2 and avr4.  Simplify 8K wrap code.
3154         (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
3155         (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
3156
3157 2000-06-26  Kazu Hirata  <kazu@hxi.com>
3158
3159         * coff-h8300.c: Fix formatting.
3160         * cpu-h8300.c: Likewise.
3161
3162 2000-06-24  Alexandre Oliva  <aoliva@redhat.com>
3163
3164         * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
3165         for local symbols whose names are unknown.
3166
3167 2000-06-22  Alan Modra  <alan@linuxcare.com.au>
3168
3169         * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
3170         find one.
3171         * Makefile.in: Regenerate.
3172         * doc/Makefile.in: Regenerate.
3173
3174 2000-06-20  H.J. Lu  <hjl@gnu.org>
3175
3176         * Makefile.am: Rebuild dependency.
3177         * Makefile.in: Rebuild.
3178
3179 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3180
3181         * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
3182         (elf_backend_copy_indirect_symbol): Map to the new function.
3183
3184 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
3185
3186         * archive.c (normalize): Correct pointer comparison when checking
3187         for backslashes.
3188         (bfd_bsd_truncate_arname): Likewise.
3189         (bfd_gnu_truncate_arname): Likewise.
3190
3191 2000-06-20  Ulf Carlsson  <ulfc@engr.sgi.com>
3192
3193         * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
3194         sections elf_{text,data}_{section,symbol}.
3195         * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
3196         (_bfd_mips_elf_hide_symbol): New function.
3197         (elf_backend_hide_symbol): Map to the new function.
3198         (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
3199         definitions of mips_elf_{text,data}_{section,symbol}.
3200         (mips_elf_local_relocation_p): Try to find the direct symbol
3201         based on new check_forced argument.
3202         (mips_elf_calculate_relocation): Use new version of
3203         mips_elf_local_relocation_p.
3204         (mips_elf_relocate_section): Likewise.
3205         (_bfd_mips_elf_relocate_section): Likewise.
3206         (mips_elf_sort_hash_table): Only assert that have enough GOT
3207         space.
3208         (mips_elf_got16_entry): Match all 32 bits to the existing GOT
3209         entry if the relocation based on the new external argument.
3210         (mips_elf_create_dynamic_relocation): Assert that we have a
3211         section contents allocated where we can swap out the dynamic
3212         relocations.
3213         (mips_elf_calculate_relocation): Find the real hash-table entry
3214         correctly by using h->root.root.type.  Only create a dynamic
3215         relocation entry if the symbol is defined in a shared library.
3216         Create an external GOT entry for the GOT16 relocation if the
3217         symbol was forced local.
3218         (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
3219         dynamic index if the symbol was forced local.
3220
3221 2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3222
3223         * elf32-mips.c: Fix typos in comments.
3224
3225 2000-06-19  Mark Kettenis  <kettenis@gnu.org>
3226
3227         * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
3228         CORE_VERSION_1.
3229
3230 2000-06-18  Stephane Carrez  <stcarrez@worldnet.fr>
3231
3232         * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
3233         * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
3234         BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
3235         * configure.in (bfd_elf32_m68hc12_vec): Recognize.
3236         (bfd_elf32_m68hc11_vec): Likewise.
3237         * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
3238         Supports 68hc11 & 68hc12  at the same time.
3239         * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
3240         bfd_target_vector.
3241         (bfd_elf32_m68hc11_vec): Likewise.
3242         * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
3243         * archures.c (bfd_m68hc12_arch): Define and register in global list
3244         (bfd_m68hc11_arch): Likewise.
3245         * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
3246         BFD_RELOC_M68HC11_3B): Define.
3247         * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
3248         * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
3249
3250 2000-06-18  Ulf Carlsson  <ulfc@engr.sgi.com>
3251
3252         * elf_bfd.h (struct elf_backend_data): Add info argument to
3253         elf_backend_hide_symbol.
3254         (_bfd_elf_link_hash_hide_symbol): Likewise.
3255         * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
3256         * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
3257         * elflink.h (elf_link_add_object_symbols): Likewise.
3258         (elf_link_assign_sym_version): Likewise.
3259
3260 2000-06-18  H.J. Lu  <hjl@gnu.org>
3261
3262         * coff-i386.c (coff_i386_reloc): Don't return in case of
3263         output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
3264         Compensate PE relocations when linking with non-PE object
3265         files to generate a non-PE executable.
3266
3267 2000-06-17  Ulf Carlsson  <ulfc@engr.sgi.com>
3268
3269         * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
3270         GOT entries if we're doing a static link or -Bsymbolic link.
3271
3272 2000-06-15  Ulf Carlsson  <ulfc@engr.sgi.com>
3273
3274         * elflink.h (elf_link_adjust_relocs): Check for and call backend
3275         specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
3276         available.
3277         (elf_link_output_relocs): Likewise.
3278         (elf_reloc_link_order): Likewise.
3279
3280 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
3281
3282         * archures.c (enum bfd_architecture): #define constants for
3283         PowerPc and RS6000 machine numbers.
3284         * bfd-in2.h: Regenerate.
3285         * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
3286         to bfd_arch_powerpc instead of bfd_arch_rs6000.  Refer to PowerPc
3287         and RS6000 machine numbers using #defined constants from
3288         archures.c.
3289         * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
3290         machine numbers using #defined constants from archures.c.  Add
3291         entries for EC603e, 630, A35, RS64II, RS64III, 7400.  Specify
3292         64-bit words in 620 entry.
3293         * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
3294         RSC, and RS2.
3295         (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
3296
3297 2000-06-16  Nicholas Duffek  <nsd@cygnus.com>
3298
3299         * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
3300         * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
3301         * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
3302
3303 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
3304
3305         * bfd-in.h (bfd_family_coff): Define.
3306         * bfd-in2.h: Regenerate.
3307         * coffgen.c (coff_count_linenumbers, coff_symbol_from,
3308         coff_find_nearest_line): Check COFFness using bfd_family_coff()
3309         instead of bfd_target_coff_flavour.
3310         * cofflink.c (_bfd_coff_final_link): Likewise.
3311         * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
3312         exclude XCOFF files.
3313         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3314         Likewise.
3315         * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
3316         * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
3317         * xcofflink.c (XCOFF_XVECP): Delete.
3318         (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
3319         bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
3320         bfd_xcoff_record_link_assignment,
3321         bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
3322         check for bfd_target_xcoff_flavour.
3323
3324 2000-06-16  Nicholas Duffek  <nsd@redhat.com>
3325
3326         * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
3327         files on AIX 4.3.
3328         (read_hdr): New function.
3329         (rs6000coff_core_p): Store mstsave or __context64 struct instead
3330         of trying to extract individual registers.  Set abfd->arch_info
3331         to match the architecture that created the core file.
3332         (rs6000coff_get_section_contents): Delete.
3333         * xcoff-target.h (rs6000coff_get_section_contents): Delete.
3334
3335 2000-06-14  H.J. Lu  <hjl@gnu.org>
3336
3337         * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
3338         is NULL.
3339
3340 2000-06-13  H.J. Lu  <hjl@gnu.org>
3341
3342         * configure: Regenerate.
3343
3344 2000-06-13  J"orn Rennecke <amylaar@cygnus.co.uk>
3345
3346         * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
3347         armpei_little_vec.
3348
3349 2000-06-08  David O'Brien  <obrien@FreeBSD.org>
3350
3351         * configure.in (VERSION): Update to show this is the CVS mainline.
3352
3353 2000-06-07  Alan Modra  <alan@linuxcare.com.au>
3354
3355         * elf32-d10v.c: Include elf/d10v.h
3356         (enum reloc_type): Delete.
3357         * elf32-d30v.c: Include elf/d30v.h
3358         (enum reloc_type): Delete.
3359
3360         * Makefile.am: Run "make dep-am" to regenerate dependencies.
3361         * Makefile.in: Regenerate.
3362
3363         * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
3364         (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
3365         move HOWTOs into elf_howto_table.
3366         (R_386_standard, R_386_ext_offset): Define.
3367         (R_386_ext, R_386_vt_offset, R_386_vt): Define.
3368         (elf_i386_reloc_type_lookup): Modify calculation of index into
3369         elf_howto_table since we've removed the padding.
3370         (elf_i386_info_to_howto_rel): Likewise.
3371         (elf_i386_relocate_section): Likewise.
3372
3373 2000-06-06  Michael Snyder  <msnyder@seadog.cygnus.com>
3374
3375         * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
3376
3377 2000-06-05  H.J. Lu  <hjl@gnu.org>
3378
3379         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
3380         an error when seeing an undefined symbol with hidden/internal
3381         attribute. It is handled in *_relocate_section ().
3382
3383 2000-06-05  H.J. Lu  <hjl@gnu.org>
3384
3385         * elflink.h (elf_fix_symbol_flags): Follow the link for the
3386         indirect symbol for the ELF_LINK_NON_ELF bit.
3387         (elf_link_output_extsym): Don't output the indirect symbol even
3388         if the ELF_LINK_NON_ELF bit is set.
3389
3390 2000-06-01  J.T. Conklin  <jtc@redback.com>
3391
3392         * config.bfd (i[3456]86-*-netbsdelf*): New target.
3393         (i[3456]86-*-netbsdaout*): New target.
3394         (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
3395         (i[3456]86-*-openbsd*): Likewise.
3396
3397 2000-05-30  Andrew Cagney  <cagney@b1.cygnus.com>
3398
3399         * trad-core.c: From hpux-core.c, include <dirent.h> or
3400         <sys/ndir.h> when possible.
3401
3402 2000-05-31  Ulrich Drepper  <drepper@redhat.com>
3403
3404         * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
3405         definitions.  We must not assume they are sorted in the file
3406         according to their index numbers.
3407
3408 2000-05-31  Alan Modra  <alan@linuxcare.com.au>
3409
3410         * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
3411         selector for R_PARISC_PCREL17R.  R_PARISC_DIR17R and
3412         R_PARISC_DIR17F are for absolute branches; Handle them as such.
3413
3414 2000-05-30  Nick Clifton  <nickc@cygnus.com>
3415
3416         * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
3417         80960CA, 80960MC as valid machine names.
3418
3419 2000-05-30  H.J. Lu  <hjl@gnu.org>
3420
3421         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
3422         visibility bits if the symbol is undefined. Correctly handle
3423         weak undefined symbols with hidden and internal attributes.
3424
3425         * elflink.h (elf_link_add_object_symbols): Always turn the
3426         symbol into local if it has the hidden or internal attribute.
3427
3428 2000-05-29  Philip Blundell  <philb@gnu.org>
3429
3430         * ppcboot.c:  Add packed attribute if compiling with GCC.
3431
3432 2000-05-29  Anatoly Vorobey  <mellon@pobox.com>
3433
3434         * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
3435
3436 2000-05-26  Michael Snyder  <msnyder@seadog.cygnus.com>
3437
3438         * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
3439         elfcore_grok_psinfo): Add code to allow debugging a 32-bit
3440         corefile on a 64-bit (Sparc Solaris) host.  Also clean up
3441         a few old comments.
3442
3443 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
3444
3445         * Makefile.am: Update dependencies with "make dep-am"
3446         * Makefile.in: Regenerate.
3447
3448         * sysdep.h (gettext, dgettext, dcgettext, textdomain,
3449         bindtextdomain): Replace defines with those from intl/libgettext.h
3450         to quieten gcc warnings.
3451
3452 2000-05-26  Eli Zaretskii  <eliz@is.elta.co.il>
3453
3454         * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
3455
3456         * archive.c (normalize, bfd_bsd_truncate_arname,
3457         bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
3458         file names with backslashes.
3459
3460         * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
3461         before opening it.
3462
3463         * sysdep.h: Include filenames.h.
3464
3465 2000-05-26  Alan Modra  <alan@linuxcare.com.au>
3466
3467         * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
3468
3469 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
3470
3471         * elf64-sparc.c (sparc64_elf_relax_section): New.
3472         (sparc64_elf_relocate_section): Optimize tail call into branch always
3473         if possible.
3474         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3475         (elf32_sparc_relax_section): New.
3476
3477 2000-05-26  Jakub Jelinek  <jakub@redhat.com>
3478
3479         * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
3480         Remove unusued variables.
3481         (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
3482         (sparc64_elf_merge_private_bfd_data): Fix shared library case from
3483         previous fix, so that shared libs really don't influence targets
3484         extension mask and memory model.
3485
3486 2000-05-23  H.J. Lu  <hjl@gnu.org>
3487
3488         * elf64-alpha.c (elf64_alpha_relocate_section): Check
3489         h->root.other not h->other.
3490         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3491
3492         * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
3493
3494 2000-05-23  H.J. Lu  <hjl@gnu.org>
3495
3496         * elf32-i386.c (elf_i386_relocate_section): Don't allow the
3497         undefined symbol with the non-default visibility attributes.
3498         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3499         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3500         * elf32-i370.c (i370_elf_relocate_section): Likewise.
3501         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3502         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3503         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
3504         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3505         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3506         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3507         * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
3508         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3509
3510 2000-05-22  Richard Henderson  <rth@cygnus.com>
3511
3512         * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
3513         PCREL22, PCREL64I.  Zero size of special relocs.
3514         (elf64_ia64_reloc_type_lookup): Likewise.
3515         (USE_BRL, oor_brl, oor_ip): New.
3516         (elf64_ia64_relax_section): New.
3517         (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
3518         (elf64_ia64_install_value): Likewise, plus PCREL21BI.
3519         (elf64_ia64_relocate_section): Likewise.
3520         (bfd_elf64_bfd_relax_section): New.
3521         * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
3522         (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
3523         * bfd-in2.h, libbfd.h: Regenerate.
3524
3525 2000-05-22  Nick Clifton  <nickc@cygnus.com>
3526
3527         * configure.in : Add peigen.lo to MIPS PE targets.
3528         * configure: Regenerate.
3529
3530 2000-05-22  Momchil Velikov  <velco@fadata.bg>
3531
3532         * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
3533         only if it is known for both input and output bfds. Separate
3534         error message strings as in some languages, it may be necessary
3535         to change more than one place in the string to change between
3536         'big' and 'little'.
3537
3538         * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
3539         endianess checks, call _bfd_generic_verify_endian_match() instead.
3540
3541         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
3542
3543         * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
3544
3545         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
3546         endianess before checking bfd flavours.
3547
3548 2000-05-22  H.J. Lu  <hjl@gnu.org>
3549
3550         * elflink.h (elf_link_output_extsym): Clear the visibility
3551         field for symbols not defined locally.
3552
3553 2000-05-18  Alan Modra  <alan@linuxcare.com.au>
3554
3555         * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
3556         re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
3557         (hppa_rebuild_insn): Mask immediate bits here instead.
3558         * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
3559
3560 2000-05-18  Momchil Velikov <velco@fadata.bg>
3561
3562         * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
3563         relocs for an executable, ensure that they are virtual addresses.
3564
3565 2000-05-18  Jeffrey A Law  (law@cygnus.com)
3566
3567         * config.bfd (hppa*64*-*-hpux11*): New target triplet.
3568
3569 2000-05-17  S. Bharadwaj Yadavalli  <sby@scrugs.lkg.dec.com>
3570             Rick Gorton             <gorton@scrugs.lkg.dec.com>
3571
3572         * elflink.h: Add emitrelocations support: when enabled, relocation
3573         information and relocation sections are put into final output
3574         executables.  If the emitrelocations flag is set, do the following:
3575         (elf_bfd_final_link): Emit relocation sections.
3576         (elf_link_input_bfd): Compute relocation section contents.
3577         (elf_gc_sections): Don't clean relocation sections.
3578
3579 2000-05-16  Catherine Moore  <clm@cygnus.com>
3580
3581         * som.c (som_decode_symclass):  Recognize weak symbols.
3582
3583 2000-05-16  Szabolcs Szakacsits <szaka@F-Secure.com>
3584
3585         * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
3586         read idata section only from dataoff.
3587         (pe_print_edata): Correctly check for valid eat_member.
3588
3589 2000-05-16  J"orn Rennecke <amylaar@cygnus.co.uk>
3590
3591         * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
3592
3593 2000-05-14  Philip Blundell  <philb@gnu.org>
3594
3595         * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
3596
3597 2000-05-12  Alan Modra  <alan@linuxcare.com.au>
3598
3599         * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
3600
3601         * peigen.c (pe_print_idata): Look for .idata section and print
3602         info even if data directory has zero entries.  Read idata section
3603         starting from dataoff, and adjust all data offsets to suit.  Cast
3604         all bfd_vma vars to unsigned long before passing to fprintf.
3605         * peigen.c (pe_print_edata): Similarly, look for .edata section
3606         and print info even if data directory has zero entries.  Cast
3607         all bfd_vma vars to unsigned long before passing to fprintf.
3608
3609         From Szabolcs Szakacsits <szaka@F-Secure.com>
3610         * peigen.c (pe_print_idata): Use bfd_section_size rather than data
3611         directory size which may be bogus.
3612         * peigen.c (pe_print_edata): Similarly.
3613
3614 2000-05-09  Alan Modra  <alan@linuxcare.com.au>
3615
3616         * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
3617         section is empty.
3618         (copy_private_bfd_data): Allow for space possibly taken up by elf
3619         headers when calculating segment physical address from lma.
3620
3621 2000-05-08  Alan Modra  <alan@linuxcare.com.au>
3622
3623         * versados.c (versados_scan): Init stringlen and pass_2_done.
3624
3625         * trad-core.c (trad_unix_core_file_p): Return
3626         bfd_error_wrong_format rather than bfd_error_file_truncated.
3627
3628         * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
3629         add_data_entry.  DataDirectory virtual address is relative.
3630         (pe_print_idata): Account for relative DataDirectory virtual
3631         addresses.  Don't trash datasize inside POWERPC_LE_PE code.
3632         (pe_print_edata): Similarly.
3633
3634         From Szabolcs Szakacsits <szaka@F-Secure.com>
3635         * peigen.c (dir_names): Add Delay Import Directory.
3636         (pe_print_idata):  Always search for bfd section containing
3637         idata address rather than looking up section name.  Print this
3638         section name rather than .idata.
3639         (pe_print_edata): Similarly.  Also print some fields as %08lx.
3640         (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
3641         Win32Version.
3642
3643 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
3644
3645         * xcoff.h: Rename to xcoff-target.h
3646         * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
3647         * coff-rs6000.c: Ditto.
3648         * coff64-rs6000.c: Ditto.
3649         * coff-pmac.c: Ditto.
3650         * Makefile.in: Regenerate.
3651
3652 2000-05-05  Clinton Popetz  <cpopetz@cygnus.com>
3653
3654         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
3655         Change U802TOC64MAGIC to U803XTOCMAGIC.
3656
3657 2000-05-04  Michael Snyder  <msnyder@seadog.cygnus.com>
3658
3659         * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
3660         * bfd-in.h: Prototype bfd_elf_get_arch_size.
3661         * bfd-in2.h: Prototype bfd_elf_get_arch_size.
3662
3663 2000-05-04  Alan Modra  <alan@linuxcare.com.au>
3664
3665         * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
3666
3667 2000-05-03  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3668
3669         * elflink.h (elf_link_add_object_symbols): Reset dynindx for
3670         hidden and internal symbols.
3671         (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
3672         visibility.
3673         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
3674         assign a PLT or GOT entry to symbols with hidden and
3675         internal visibility.
3676
3677 2000-05-03  Mark Elbrecht  <snowball3@bigfoot.com>
3678
3679         * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
3680         the .bss section.
3681         * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3682
3683 2000-05-02  H.J. Lu  <hjl@gnu.org>
3684
3685         * elf.c (prep_headers): Use ELFOSABI_NONE instead of
3686         ELFOSABI_SYSV.
3687
3688 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
3689
3690         * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
3691         * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo.  Regenerate
3692         dependencies.
3693         * Makefile.in: Regenerate.
3694
3695 2000-05-01  Jim Wilson  <wilson@cygnus.com>
3696
3697         * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
3698         (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
3699         (BFD64_BACKENDS): Delete coff-ia64.lo.  Add efi-app-ia64.lo.
3700         (BFD64_BACKENDS_CFILES): Delete coff-ia64.c.  Add efi-app-ia64.c.
3701         * Makefile.in: Rebuild.
3702
3703 2000-05-02  Alan Modra  <alan@linuxcare.com.au>
3704
3705         * config.bfd: Re-enable elf32-hppa.  It now compiles, even if it
3706         doesn't work very well.
3707
3708         * elf-hppa.h (elf_hppa_internal_shdr): Define.
3709         (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
3710         Set hdr->s_type to 1 if ARCH_SIZE == 32.
3711         (_bfd_elf_hppa_gen_reloc_type): Add prototype.
3712         (elf_hppa_info_to_howto): Likewise.
3713         (elf_hppa_info_to_howto_rel): Likewise.
3714         (elf_hppa_reloc_type_lookup): Likewise.
3715         (elf_hppa_is_local_label_name): Likewise.
3716         (elf_hppa_fake_sections): Likewise.
3717         (elf_hppa_final_write_processing): Likewise.
3718         (elf_hppa_howto_table): Fully initialise all entries.
3719         (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
3720         (elf_hppa_info_to_howto): Likewise.
3721         (elf_hppa_info_to_howto_rel): Likewise.
3722         (elf_hppa_reloc_type_lookup): Likewise.
3723         (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
3724         elf_hppa_unmark_useless_dynamic_symbols,
3725         elf_hppa_remark_useless_dynamic_symbols,
3726         elf_hppa_record_segment_addrs, elf_hppa_final_link,
3727         elf_hppa_relocate_section, elf_hppa_final_link_relocate,
3728         elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
3729         elf32-hppa.c mess is cleaned up.
3730         (elf_hppa_final_link_relocate): Make insn and r_type unsigned
3731         int.  Delete r_field.  In case R_PARISC_PCREL21L, don't set
3732         r_field then call hppa_field_adjust inline func with variable
3733         r_field arg, instead call hppa_field_adjust with fixed arg.
3734         In case R_PARISC_PCREL22F, don't set r_field.
3735         (elf_hppa_relocate_insn): Change args and return type to unsigned
3736         int.  Call re_assemble_* funcs to do the work.
3737
3738         * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
3739         sign extending.
3740
3741         * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
3742         extending.
3743         (sign_extend): Mask first before sign extending.
3744         (low_sign_extend): Rewrite without condition expression.
3745         (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
3746         dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
3747         (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
3748         assemble_17, assemble_21, sign_unext, low_sign_unext): Return
3749         result as function return value rather than through pointer arg.
3750         Accept unsigned int args, and return unsigned int.
3751         (re_assemble_3): New.  Combines function of dis_assemble_3 with
3752         re-assembly of opcode and immediate.
3753         (re_assemble_12): Likewise.
3754         (re_assemble_16): Likewise.
3755         (re_assemble_17): Likewise.
3756         (re_assemble_21): Likewise.
3757         (re_assemble_22): Likewise.
3758         (hppa_field_adjust): Rewrite and document, paying attention to
3759         size of types and signed/unsigned issues.
3760         (get_opcode): Shift before masking.
3761         (FDLW): Rename to FLDW.
3762         (bfd_hppa_insn2fmt): Change arg to unsigned int.  Delete fmt.
3763         (hppa_rebuild_insn): Change args and return value to unsigned
3764         int.  Make use of re_assemble_*.  Correct case 11.
3765
3766         * dep-in.sed: Handle ../opcodes/.
3767         * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
3768         elf64-hppa.h, hppa_stubs.h, xcoff.h.
3769         (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
3770         Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
3771         elfarm-nabi.lo dependencies outside of auto-dependency area.
3772         Regenerate dependencies.
3773         * Makefile.in: Regenerate.
3774
3775         * configure.in (TRAD_HEADER): Test non-null before
3776         AC_DEFINE_UNQUOTED.
3777         * configure: Regenerate.
3778
3779         * reloc.c: Fix mis-spelling in comment.
3780
3781 2000-05-01  Alan Modra  <alan@linuxcare.com.au>
3782
3783         * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
3784         * vms.c (vms_openr_next_archived_file): Return NULL.
3785
3786 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3787
3788         * coffcode.h Copy changes mistakenly done to libcoff.h in
3789         4/24/2000 patch.
3790
3791 2000-04-29  Andreas Jaeger  <aj@suse.de>
3792
3793         * libbfd-in.h: Correctly check GCC version.
3794         * bfd-in.h: Likewise.
3795         * libhppa.h: Likewise.
3796         * libbfd.h: Regenerate.
3797         * bfd-in2.h: Regenerate.
3798
3799 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3800
3801         * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
3802         coffdu-rs6000.{lo,c}.
3803         (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
3804         on xcoff.h
3805         * Makefile.in: Regenerate.
3806         * xcoff.h: New file.
3807         * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
3808         * coff-rs6000.c: Move all declarations and defines that are
3809         common to the xcoff backends into xcoff.h
3810         * coff64-rs6000.c: Ditto,
3811
3812 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3813
3814         * coff-mips.c (mips_ecoff_backend_data):  Add initialization of
3815         _bfd_coff_force_symnames in strings and
3816         _bfd_coff_debug_string_prefix_length to their default values.
3817         * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
3818
3819 2000-04-28  Clinton Popetz  <cpopetz@cygnus.com>
3820
3821         * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
3822         _bfd_coff_force_symnames in strings and
3823         _bfd_coff_debug_string_prefix_length to their default values.
3824
3825 2000-04-27  Alan Modra  <alan@linuxcare.com.au>
3826
3827         * elf32-m68k.c (elf_m68k_gc_sweep_hook):  Return if dynobj NULL.
3828         Check local_got_refcounts before dereferencing.
3829
3830         * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
3831         before deciding we don't need R_PPC_PLT32 relocation.
3832         (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
3833         dereferencing.
3834
3835         * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
3836
3837         * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
3838         .plt entries.
3839         (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
3840         (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
3841         (elf_i386_relocate_section): Allow for .plt to go missing.
3842         (elf_i386_finish_dynamic_symbol): Use same test to decide if we
3843         can use a relative reloc for got as elf_i386_relocate_section.
3844         (bfd_elf32_bfd_final_link): Define to use gc form of final link.
3845
3846 2000-04-26  Clinton Popetz  <cpopetz@cygnus.com>
3847
3848         * config.bfd: Remove extraneous bfd_powerpc_64_arch.
3849
3850 2000-04-24  Clinton Popetz  <cpopetz@cygnus.com>
3851
3852         * Makefile.am (coff64-rs6000.lo): New rule.
3853         * Makefile.in: Regenerate.
3854         * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
3855         xcoff_is_local_label_name, xcoff_rtype2howto,
3856         xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
3857         xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
3858         xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
3859         (NO_COFF_SYMBOLS): Define.
3860         (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
3861         xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
3862         internally.
3863         (MINUS_ONE): New macro.
3864         (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
3865         relocation.
3866         (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
3867         coff_SWAP_aux_out): Map to the new functions.
3868         * coff64-rs6000.c: New file.
3869         * libcoff.h (bfd_coff_backend_data): Add new fields
3870         _bfd_coff_force_symnames_in_strings and
3871         _bfd_coff_debug_string_prefix_length.
3872         (bfd_coff_force_symnames_in_strings,
3873         bfd_coff_debug_string_prefix_length): New macros for above fields.
3874         * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
3875         Set machine to 620 for XCOFF64.  Use bfd_coff_swap_sym_in instead
3876         of using coff_swap_sym_in directly.
3877         (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
3878         (coff_set_flags) Set magic for XCOFF64.
3879         (coff_compute_section_file_positions): Add symbol name length to
3880         string section length if bfd_coff_debug_string_prefix_length is
3881         true.
3882         (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
3883         (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
3884         using coff_swap_lineno_in directly.
3885         (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
3886         and _bfd_coff_debug_string_prefix_length fields.
3887         * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
3888         symbol names into strings table when
3889         bfd_coff_force_symnames_in_strings is true.
3890         * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
3891         SET_RELOC_VADDR): New macros.
3892         (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
3893         (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
3894         code.
3895         (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
3896         changes within RS6000COFF_C specific code.
3897         (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
3898         MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
3899         * reloc.c (bfd_perform_relocation, bfd_install_relocation):
3900         Extend existing hack on target name.
3901         * xcofflink.c (XCOFF_XVECP): Extend existing hack on
3902         target name.
3903         * coff-tic54x.c (ticof): Keep up to date with new fields
3904         in bfd_coff_backend_data.
3905         * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
3906         targ_selvecs to include rs6000coff64_vec for rs6000.
3907         * configure.in: Add rs6000coff64_vec case.
3908         * cpu-powerpc.c: New bfd_arch_info_type.
3909
3910 2000-04-24  Jeffrey A Law  (law@cygnus.com)
3911
3912         * config.bfd: Only disable elf32-hppa vectors, not all of the
3913         BSD and OSF configuration support.  Provide (disabled) clauses
3914         for PA64 support.
3915         * configure.in: Add clause for PA64 support.
3916         * configure: Rebuilt.
3917
3918         * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
3919         (bfd_elf64_hppa_vec): Declare.
3920
3921         * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
3922         (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
3923         (elf64-hppa.lo): Add dependencies.
3924         * Makefile.in: Rebuilt.
3925
3926         * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
3927
3928 2000-04-24  Jason Eckhardt  <jle@cygnus.com>
3929
3930         * libhppa.h (dis_assemble_16): New function.
3931         (pa_arch): Added pa20w element.
3932
3933 2000-04-24  Ulrich Drepper  <drepper@cygnus.com>
3934
3935         * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
3936         bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
3937         bfd_elf64_slurp_reloc_table.
3938
3939         * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
3940         definitions to get external names.
3941         (elf_write_relocs): Renamed from write_relocs and make global.
3942         (elf_slurp_reloc_table): Make global.
3943         (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
3944
3945         * archive.c (hpux_uid_gid_encode): New function.
3946         (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
3947         defined and the ID is greater than 99999.
3948         (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
3949         special uid/gid fields into 32 bit values.
3950
3951 2000-04-21  Matthew Green  <mrg@cygnus.com>
3952
3953         * config.bfd: Add NetBSD/sparc64 support.
3954
3955 Fri Apr 21 13:20:53 2000  Richard Henderson  <rth@cygnus.com>
3956                           David Mosberger  <davidm@hpl.hp.com>
3957                           Timothy Wall <twall@cygnus.com>
3958                           Jim Wilson  <wilson@cygnus.com>
3959
3960         * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
3961         (ALL_MACHINES_CFILES): Add cpu-ia64.c.
3962         (BFD64_BACKENDS): Add elf64-ia64.lo.
3963         (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
3964         (cpu-ia64.lo, elf64-ia64.lo): New rules.
3965         * Makefile.in: Rebuild.
3966         * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
3967         (bfd_ia64_arch): Declare.
3968         (bfd_archures_list): Add bfd_ia64_arch.
3969         * bfd-in2.h: Rebuild.
3970         * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
3971         * configure: Rebuild.
3972         * configure.host: (ia64-*-linux*): New host.
3973         * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
3974         bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
3975         * elf.c (prep_headers): Add bfd_arch_ia64.
3976         * libbfd.h: Rebuild.
3977         * reloc.c: Add IA-64 relocations.
3978         * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
3979         Declare.
3980         (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
3981         * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
3982
3983 2000-04-21  Richard Henderson  <rth@cygnus.com>
3984
3985         * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
3986         contents when performing a partial link.
3987         (bfd_elf_d30v_reloc_21): Likewise.
3988
3989 2000-04-20  H.J. Lu  <hjl@gnu.org>
3990
3991         * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
3992         patch to symbols defined by a shared object.
3993         * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
3994
3995 2000-04-19  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
3996
3997         K&R compiler fixes.
3998         * dwarf2.c (concat_filename): Avoid string literal concatenation.
3999         * ieee.c (ieee_get_symtab): Don't initialise union in struct.
4000
4001 Mon Apr 17 19:14:36 2000  David Mosberger  <davidm@hpl.hp.com>
4002
4003         * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
4004         (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
4005         (coff-ia64.lo): Add dependency.
4006         * Makefile.in: Regenerate.
4007         * coff-ia64.c: New file.
4008         * efi-app-ia32.c: Ditto.
4009         * efi-app-ia64.c: Ditto.
4010         * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
4011         (coff_set_flags): Ditto.
4012         (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
4013         * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
4014         * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
4015         * configure: Regenerate.
4016         * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
4017         (PUT_OPTHDR_IMAGE_BASE): Ditto.
4018         (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4019         (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
4020         (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4021         (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
4022         (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4023         (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
4024         (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4025         (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
4026         (GET_PDATA_ENTRY): Ditto.
4027         * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
4028         data_start.  Use above macros to read fields that are 64 bit wide for
4029         COFF_WITH_PEP64.  Don't truncate entry and text_start to 32 bits.
4030         (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
4031         FileAlignment and SectionAlignment to minimum alignment if they
4032         are zero.
4033         (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
4034         Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
4035         (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
4036         Use above macros to write fields that are 64 bit wide for
4037         COFF_WITH_PEP64.
4038         (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
4039         5*4 otherwise.  This should be right for IA-32 and IA-64, but may
4040         be wrong for platforms.  Use PDATA_ROW_SIZE instead of hardcoded
4041         value of 20 bytes.  Modify printing for COFF_WITH_PEP64 to print
4042         begin address, end address, and unwind info address only.  Use
4043         GET_PDATA_ENTRY() to read .pdata entries.  Use fprintf_vma() to
4044         print addresses.
4045         (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
4046         HIGH3ADJ relocation names.
4047         (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
4048         * targets.c: Declare bfd_efi_app_ia32_vec and
4049         bfd_efi_app_ia64_vec.
4050         (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
4051         bfd_efi_app_ia64_vec.
4052
4053 2000-04-17  Timothy Wall  <twall@cygnus.com>
4054
4055         * bfd-in2.h: Add prototypes for tic54x load page access.
4056         * bfd-in.h: Regenerate.
4057         * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
4058         in customized _set_arch_mach function.
4059         * coffcode.h (coff_set_alignment_hook): Set section load page if
4060         the appropriate macro is defined.
4061         (write_object_contents): Read section load page.
4062
4063 2000-04-13  Alan Modra  <alan@linuxcare.com.au>
4064
4065         * elf32-hppa.h: Update copyright date.
4066
4067         * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
4068         * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
4069
4070         * elf32-d30v.c (MAX32): Don't use LL suffix.
4071         (MIN32): Define in terms of MAX32.
4072         (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
4073
4074         * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
4075         expression.
4076
4077         * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
4078
4079 2000-04-12  Alan Modra  <alan@linuxcare.com.au>
4080
4081         * dep-in.sed: Match space before file name, not after.
4082         * Makefile.am: Regenerate dependencies.
4083         * Makefile.in: Regenerate.
4084
4085         * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
4086         case, allow address wrap-around stupidly removed 2000-03-17.  Sign
4087         extend without an if statement.
4088
4089 2000-04-11  Alan Modra  <alan@linuxcare.com.au>
4090
4091         * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
4092         signed quantites.
4093         * elf32-mips.c (gprel16_with_gp): Likewise.
4094         * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
4095         here using -0x40000, not (int)0xfffc0000.
4096         (elf32_hppa_size_of_stub): Likewise.
4097
4098 2000-04-11  Timothy Wall  <twall@cygnus.com>
4099
4100         * coff-tic54x.c: Now builds with all targets.
4101         * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
4102         * Makefile.in: Regenerate.
4103         * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
4104         unitialized variable.
4105
4106 Fri Apr  7 15:56:57 2000  Andrew Cagney  <cagney@b1.cygnus.com>
4107
4108         * configure.in (WARN_CFLAGS): Set to -W -Wall by default.  Add
4109         --enable-build-warnings option.
4110         * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
4111         * Makefile.in, configure: Re-generate.
4112
4113 2000-04-07  Nick Clifton  <nickc@cygnus.com>
4114
4115         * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
4116         BFD_RELOC_THUMB_PCREL_BLX.
4117
4118         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4119         R_ARM_XPC25 and R_ARM_THM_PC22.
4120
4121         * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
4122         R_ARM_XPC25 and R_ARM_THM_XPC22.
4123         (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
4124         R_ARM_[XPC25|THM_XPC22].
4125
4126         * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
4127         elf/arm-oabi.h to elf/arm.h
4128
4129         * Makefile.am: Fix dependency for elfarm-oabi.c
4130         * Makefile.in: Regenerate.
4131
4132         * bfd-in2.h: Regenerate.
4133         * libbfd.h: Regenerate.
4134
4135 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
4136
4137         * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
4138         and restore it on failure.  Release newly allocated tdata on
4139         failure.
4140
4141 Fri Apr  7 11:33:47 2000  Jim Wilson  <wilson@cygnus.com>
4142
4143         * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
4144         (decode_line_info): Set it.  Report error if unit->line_offset is
4145         equal to or larger than it.
4146
4147 2000-04-07  Timothy Wall  <twall@cygnus.com>
4148
4149         * targets.c: Added vecs for tic54x.
4150         * reloc.c: Added relocs for tic54x.
4151         * libbfd.h: Regenerated.
4152         * configure: Add TI COFF vecs for tic54x.
4153         * configure.in: Ditto.
4154         * config.bfd (targ_cpu): Recognize new tic54x target.
4155         * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
4156         * bfd-in2.h: Add tic54x target and relocations.
4157         * Makefile.am, Makefile.in: Add tic54x target.
4158         * archures.c (bfd_archures_list): Add tic54x target.
4159         * coff-tic54x.c: New.
4160         * cpu-tic54x.c: New.
4161
4162 2000-04-06  Michael Snyder  <msnyder@seadog.cygnus.com>
4163
4164         * elfcore.h (elf_core_file_p): call backend_object_p which
4165         thereby gets an opportunity to update the arch/machine type.
4166
4167 2000-04-06  Timothy Wall  <twall@cygnus.com>
4168
4169         * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
4170         class.  Handle SEC_CLINK and SEC_BLOCK flags.
4171         * section.c: Add SEC_CLINK and SEC_BLOCK flags.
4172         * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
4173
4174 2000-04-06  Nick Clifton  <nickc@cygnus.com>
4175
4176         * elf32-arm.h (elf32_arm_set_private_flags): Only check for
4177         EF_INTERWORK if this is an unknown EABI.
4178         (elf32_arm_merge_private_bfd_data): Check EABI version
4179         numbers.  Only check EF_xxx flags if the EABI version number
4180         is unknown.
4181         (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
4182         if the EABI version number is unknown.
4183         (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
4184         if the EABI version number is unknown.
4185
4186 Wed Apr  5 22:04:20 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
4187
4188         * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
4189         BFD_RELOC_SH_LOOP_END.
4190         * elf32-sh.c (sh_elf_howto_tab): Change special_func to
4191         sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
4192         Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
4193         (sh_elf_reloc_loop): New function.
4194         (sh_elf_reloc): No need to test for always-to-be-ignored relocs
4195         any more.
4196         (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
4197         (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
4198         * bfd-in2.h, libbfd.h: Regenerate.
4199
4200 2000-04-04  Alan Modra  <alan@linuxcare.com.au>
4201
4202         * po/bfd.pot: Regenerate.
4203
4204         * Makefile.am: Remove extraneous mkdep comment.
4205         (MKDEP): Use gcc -MM rather than mkdep.
4206         (DEP): Quote when passing vars to sub-make.  Add warning
4207         message to end.
4208         (DEP1): Rewrite for "gcc -MM".
4209         (CLEANFILES): Add DEP2.
4210         Update dependencies.
4211         * Makefile.in: Regenerate.
4212
4213 2000-04-03  Kevin Buettner  <kevinb@redhat.com>
4214
4215         * configure.in: Added corefile support for AIX 4.3.  In particular,
4216         AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
4217         compiling rs6000-core.c.
4218         * configure: Regenerated.
4219
4220 2000-04-03  H.J. Lu  <hjl@gnu.org>
4221
4222         * cache.c (bfd_open_file): Unlink the output file only if
4223         it has non-zero size.
4224
4225 2000-04-01  Ken Block USG  <block@zk3.dec.com>
4226
4227         * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
4228         relative relocations for non-loaded sections in shared objects.
4229         (elf64_alpha_check_relocs): Similarly.
4230
4231 Mon Apr  3 13:37:15 2000  Hans-Peter Nilsson  <hp@axis.com>
4232
4233         * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
4234         BFD_RELOC_16 to switch for extended relocs.
4235         (MY_swap_ext_reloc_in): New.
4236         (MY_swap_ext_reloc_out): New.
4237         (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
4238         than NAME(aout,swap_ext_reloc_in) for extended relocs.
4239         (NAME(aout,squirt_out_relocs)): Similarly use
4240         MY_swap_ext_reloc_out.
4241         (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
4242
4243 2000-04-03  Kazu Hirata  <kazu@hxi.com>
4244
4245         * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
4246         the R_PCRWORD_B case.
4247
4248 2000-03-31  Thomas de Lellis  <tdel@wrs.com>
4249
4250         * srec.c : Set CHUNK size to 16 bytes to prevent download failures
4251         on some targets.
4252         * ihex.c : Ditto.
4253
4254 Wed Mar 30 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
4255
4256         * elf32-m32r.c (m32r_elf_generic_reloc): new function.  All
4257         HOWTO references to bfd_elf_generic_reloc, that have
4258         partial_inplace == true, now use the new function.  The function
4259         is based on the recent rewrite of m32r_elf_lo16_reloc(), and
4260         extends its fixes to the R_M32R_{16,24,32} relocs.
4261         The new logic in m32r_elf_lo16_reloc() has been removed, and
4262         it instead calls the new routine to obtain that functionality.
4263
4264 2000-03-27  Alan Modra  <alan@linuxcare.com.au>
4265
4266         * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
4267         elf32_avr_check_relocs, avr_final_link_relocate,
4268         elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
4269         elf32_avr_object_p): Add prototypes.
4270         (elf32_avr_gc_mark_hook): Add default for h->root.type.
4271         (bfd_elf_avr_final_write_processing): Make static.
4272
4273 2000-03-27  Denis Chertykov  <denisc@overta.ru>
4274
4275         * cpu-avr.c: New file.  BFD support routines for AVR architecture.
4276         * archures.c (bfd_architecture): Add AVR architecture.
4277         (bfd_archures_list): Add reference to AVR architecture info.
4278         * elf.c (prep_headers): Handle bfd_arch_avr.
4279         * reloc.c: Add various AVR relocation enums.
4280         * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
4281         list.
4282         * Makefile.am: Add support for AVR elf.
4283         * configure.in: Likewise.
4284         * config.bfd: Likewise.
4285         * Makefile.in: Regenerate.
4286         * configure: This too.
4287         * bfd-in2.h: And this.
4288         * libbfd.h: And this.
4289
4290 2000-03-24  H.J. Lu  <hjl@gnu.org>
4291
4292         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
4293         (elf64_alpha_find_reloc_at_ofs): Likewise.
4294
4295 2000-03-17  Alan Modra  <alan@linuxcare.com.au>
4296
4297         * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
4298         flag an overflow if the bitfield is outside -2**n to 2**n-1.  The
4299         allowable range used to be -2**(n-1) to 2**n-1.
4300         * reloc.c (_bfd_relocate_contents): Same here.  Also replace
4301         "boolean overflow" with "bfd_reloc_status_type flag".
4302
4303 2000-03-14  Doug Evans  <dje@casey.transmeta.com>
4304
4305         * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
4306
4307 2000-03-14  Kazu Hirata  <kazu@hxi.com>
4308
4309         * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
4310         of shrinks properly, including the last reloc.
4311
4312 2000-03-13  Kazu Hirata  <kazu@hxi.com>
4313
4314         * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
4315         check for R_MOVL2.
4316
4317 2000-03-11  Alan Modra  <alan@linuxcare.com.au>
4318
4319         * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
4320         a format mismatch rather than an "error" from bfd_read such as
4321         bfd_error_file_truncated.
4322
4323 2000-03-10  Geoff Keating  <geoffk@cygnus.com>
4324
4325         * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
4326         sign-extension and big-endian compensation for
4327         R_MIPS_64 even in ld -r.
4328
4329 2000-03-10  Geoffrey Keating  <geoffk@cygnus.com>
4330
4331         * elf32-mips.c (mips_elf_next_relocation): Rename from
4332         mips_elf_next_lo16_relocation, and generalize to look
4333         for any relocation type.
4334         (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
4335         (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
4336         (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
4337         (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
4338         (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
4339         (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
4340         (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
4341         (mips_rtype_to_howto): Likewise.
4342         (mips_elf_calculate_relocation): Handle new relocs.
4343         (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
4344         are paired.  The addend for R_MIPS_GNU_REL16_S2
4345         is shifted right two bits.
4346
4347 2000-03-10  Alan Modra  <alan@linuxcare.com.au>
4348
4349         * reloc.c (bfd_perform_relocation): Undo emacs formatting of
4350         comment, and ensure it doesn't happen again.
4351         (bfd_install_relocation): Same here.
4352         (_bfd_relocate_contents): Don't bother assigning unused signmask
4353         shift result.  Fix typos in comments.
4354         Remove trailing whitespace throughout file.
4355
4356 2000-03-07  Doug Evans  <dje@casey.transmeta.com>
4357
4358         * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
4359         * bfd-in2.h: Rebuild.
4360
4361 2000-03-06  Nick Clifton  <nickc@cygnus.com>
4362
4363         * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
4364         sym_ptr_ptr fields.
4365         (SIZEOF_ILF_SYM_PTR_TABLE): Define.
4366         (SIZEOF_ILF_STRINGS): Redefine.
4367         (pe_ILF_make_a_symbol-reloc): New function.  Creates a symbol
4368         relative reloc, as opposed to a section relative reloc.
4369         (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
4370         not C_LABEL.
4371         Add length of symbol's prefix to string pointer.
4372         Store a pointer to the symbol in the symbol pointer table.
4373         (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
4374         Initialise the symbol pointer table.
4375         Store the hint in the Hint/Name table.
4376         Make the jump reloc be symbol realtive, not section relative.
4377         Create an import symbol for imported code.
4378
4379 2000-03-06  Catherine Moore  <clm@cygnus.com>
4380
4381         * elf.c (swap_out_syms):  Check for null type_ptr.
4382
4383 2000-03-01  Hans-Peter Nilsson  <hp@axis.com>
4384
4385         * aout-target.h (MY(write_object_contents)): Remove unused
4386         and unusable "#if CHOOSE_RELOC_SIZE".
4387         * pc532-mach.c (MY(write_object_contents)): Ditto.
4388         * netbsd.h (MY(write_object_contents)): Ditto.
4389         * hp300hpux.c (MY(write_object_contents)): Ditto.
4390         * freebsd.h (MY(write_object_contents)): Ditto.
4391         * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
4392
4393 2000-02-29  H.J. Lu  <hjl@gnu.org>
4394
4395         * peicode.h (jtab): Make it static.
4396
4397         * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
4398         defined and COFF_IMAGE_WITH_PE is not defined.
4399         (_bfd_sh_align_load_span): Defined as sh_align_load_span if
4400         COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
4401
4402 2000-03-01  Nick Clifton  <nickc@cygnus.com>
4403
4404         * coff-arm.c (bfd_arm_process_before_allocation): Make
4405         'symndx' signed to prevent compile time warning.
4406
4407         * coff-mcore.c: Remove unused prototype for pe_object_p.
4408
4409         * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
4410         functions that are not used when COFF_IMAGE_WITH_PE is
4411         defined.
4412         (struct sh_opcode): Change type of 'flags' field to unsigned
4413         long so that it can hold the USESAS flag.
4414
4415         * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
4416
4417         * elf-m10300.c (mn10300_elf_relax_section): Initialise
4418         'sym_sec'.
4419
4420         * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
4421         parameters.
4422         Remove unusued variables and code.
4423         (elf_backend_add_symbol_hook): Fix prototype.
4424
4425         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
4426         'srelgot'.
4427
4428         * elf32-mcore.c (mcore_elf_relocate_section): Initialise
4429         'oldinst'.
4430
4431         * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
4432         parameters.
4433         Remove unusued variables and code.
4434         (elf_backend_add_symbol_hook): Fix prototype.
4435
4436         * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
4437
4438         * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
4439         to unused function parameter.
4440
4441         * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
4442         parameters.
4443         Use EMPTY_HOWTO to initialise empty howto slots.
4444         Remove unused variables.
4445
4446         * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
4447
4448 2000-03-01  H.J. Lu  <hjl@gnu.org>
4449
4450         * aoutx.h (aout_link_input_section_std): Pass "true" to
4451         the undefined_symbol callback.
4452         (aout_link_input_section_ext): Likewise.
4453         * bout.c (get_value): Likewise.
4454         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4455         * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
4456         Likewise.
4457         (alpha_relocate_section): Likewise.
4458         * coff-arm.c (coff_arm_relocate_section): Likewise.
4459         * coff-i960.c (coff_i960_relocate_section): Likewise.
4460         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4461         * coff-mips.c (mips_relocate_section): Likewise.
4462         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4463         * coff-sh.c (sh_relocate_section): Likewise.
4464         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4465         * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
4466         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4467         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4468         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4469         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4470         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4471         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4472         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4473         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4474         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4475         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4476         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4477         * elflink.h (elf_link_output_extsym): Likewise.
4478         * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
4479         * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
4480         * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
4481
4482         * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
4483         undefined_symbol callback when building shared library with
4484         -Bsymbolic and undefined symbols are allowed. Otherwise, pass
4485         "true".
4486         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4487         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4488         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4489         * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
4490         (elf32_mips_get_relocated_section_content): Likewise.
4491         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4492         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4493         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4494         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4495
4496 2000-02-28  Nick Clifton  <nickc@cygnus.com>
4497
4498         * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
4499         * Makefile.in: Regenerate.
4500
4501         * configure.in: Add support for mips and sh pe vectors.
4502         * configure: regenerate.
4503
4504         * config.bfd: Add support for arm-wince, mips-pe and sh-pe
4505         targets.
4506
4507         * targets.c: Add mips and sh pe vectors.
4508
4509         * libpei.h (coff_final_link_postscript): Only define if not
4510         already defined.
4511
4512         * coffcode.h: Add support for WinCE magic numbers.
4513
4514         * peigen.c (pe_print_reloc): Update comment and rearrange
4515         appending of newline character.
4516
4517         * peicode.h: Add support for Image Library Format.
4518         (pe_ILF_vars): Structure containing data used by ILF code.
4519         (pe_ILF_make_a_section): New function.  Create a section based
4520         on ILF data.
4521         (pe_ILF_make_a_reloc): New function.  Create a reloc based on
4522         ILF data.
4523         (pe_ILF_make_a_symbol): New function.  Create a symbol based
4524         on ILF data.
4525         (pe_ILF_save_relocs): New function.  Store the relocs created
4526         by pe_ILF_make_a_reloc in a section.
4527         (pe_ILF_build_a_bfd): New function.  Create a BFD describing
4528         an ILF object.
4529         (pe_ILF_object_p): New function.  Return a bfd_target pointer
4530         for an ILF object.
4531         (pe_bfd_object_p): If an ILF object is detected call
4532         pe_ILF_object_p on it.
4533
4534         * coff-arm.c: Add support for WinCE relocs which are different
4535         from normal ARM COFF relocs.
4536         * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
4537
4538         * coff-sh.c: Add support for sh-pe target.
4539         * pe-sh.c: New file.  Support code for sh-pe target.
4540         * pei-sh.c: New file.  Support code for sh-pe target.
4541
4542         * pe-mips.c: New file.  Support code for mips-pe target.
4543         * pei-mips.c: New file.  Support code for mips-pe target.
4544
4545 2000-02-27  Jakub Jelinek  <jakub@redhat.com>
4546
4547         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
4548         architecture if the object causing the bump is dynamic.
4549         * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
4550         and also don't it for memory ordering.
4551         (sparc64_elf_write_relocs): Take src_rela out of the loop.
4552
4553 2000-02-27  Ian Lance Taylor  <ian@zembu.com>
4554
4555         * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
4556         calling bfd_get_section_size_before_reloc.
4557         (decode_line_info): Likewise.
4558         (_bfd_dwarf2_find_nearest_line): Likewise.
4559
4560 2000-02-27  Eli Zaretskii  <eliz@is.elta.co.il>
4561
4562         * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
4563         name of the libtool directory.
4564         * Makefile.in: Rebuild.
4565
4566 Fri Feb 25 18:39:26 2000  Rodney Brown (RodneyBrown@pmsc.com)
4567
4568         * som.c (SOM_HOWTO): Define.
4569         (som_hppa_howto_table): Use it.
4570
4571 2000-02-25  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
4572
4573         * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
4574
4575         * config.bfd: Enable 64 bit support for Solaris7+/sparc.
4576
4577 2000-02-24  Catherine Moore  <clm@cygnus.com>
4578
4579         * som.c (som_misc_symbol_info):  Add field
4580         secondary_def.
4581         (som_bfd_derive_misc_symbol_info):  Initialize
4582         secondary_def.
4583         (som_build_and_write_symbol_table): Keep track
4584         of secondary_def field.
4585         (som_slurp_symbol_table): Set BSF_WEAK symbol flag
4586         if secondary_def field is set.
4587         (som_bfd_ar_write_symbol_stuff): Initialize
4588         secondary_def.
4589
4590 2000-02-23  Stephane Carrez  <stcarrez@worldnet.fr>
4591
4592         * dwarf2.c (read_address): Read 16-bits addresses.
4593         (parse_comp_unit): Accept addr_size == 2.
4594
4595 2000-02-23  Alan Modra  <alan@spri.levels.unisa.edu.au>
4596
4597         * bfd-in.h: Update copyright date.
4598
4599 2000-02-23  Linas Vepstas <linas@linas.org>
4600
4601         * cpu-i370.c: New file.
4602         * elf32-i370.c:  New file.
4603         * archures.c (enum bfd_architecture): Add bfd_arch_i370.
4604         (bfd_i370_arch): New.
4605         (bfd_archures_list): Add bfd_i370_arch.
4606         * elf.c (prep_headers): Add bfd_arch_i370.
4607         * Makefile.am: Add support for IBM 370 elf.
4608         * config.bfd: Likewise.
4609         * configure.in: Likewise.
4610         * libbfd.h (bfd_reloc_code_real_names): Likewise.
4611         * reloc.c (bfd_reloc_code_type): Likewise.
4612         * targets.c: Likewise.
4613
4614         * Makefile.in: Regenerate.
4615         * configure: Regenerate.
4616         * bfd-in2.h: Regenerate.
4617
4618 2000-02-22  Ian Lance Taylor  <ian@zembu.com>
4619
4620         * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
4621         invalid relocation types, and change them to R_386_NONE.
4622
4623 2000-02-22  H.J. Lu  <hjl@gnu.org>
4624
4625         * elflink.h (elf_link_add_object_symbols): If a version symbol is
4626         not defined, don't add a second ELF_VER_CHR.
4627
4628         * elflink.h (elf_bfd_final_link): Call output_extsym for global
4629         symbols converted to local symbols even when stripping all
4630         symbols.
4631         (elf_link_output_extsym): Process global symbols converted to
4632         local symbols even if they are being stripped.
4633
4634 2000-02-21  Alan Modra  <alan@spri.levels.unisa.edu.au>
4635
4636         * archures.c (bfd_octets_per_byte): Return unsigned int.
4637         (bfd_arch_mach_octets_per_byte): Ditto.
4638         * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
4639         comparison warning.
4640         * section.c (bfd_get_section_size_before_reloc): Quell signed
4641         vs. unsigned comparison warning.
4642         (bfd_get_section_size_after_reloc): Same here.  Fix parentheses too.
4643         * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
4644         change.  What was I thinking?
4645         * bfd-in2.h: Regenerate.
4646
4647         * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
4648         (elf_gc_sections): Same here.
4649         (elf_gc_common_finalize_got_offsets): And here.
4650
4651 2000-02-21  Ian Lance Taylor  <ian@zembu.com>
4652
4653         ELF HPPA doesn't work at present; remove it until it does.
4654         * config.bfd: Comment out setting targ_defvec to
4655         bfd_elf32_hppa_vec.
4656         * Makefile.am: Rebuild dependencies.
4657         (BFD32_BACKENDS): Remove elf32-hppa.lo.
4658         (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
4659         (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
4660         * Makefile.in: Rebuild.
4661         * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
4662
4663 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
4664
4665         * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
4666         is no bfd_free().  Revert bfd_free part of previous change.
4667
4668 2000-02-18  Geoff Keating  <geoffk@cygnus.com>
4669
4670         * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
4671         arrays.
4672         (coff_compute_section_file_positions): Use bfd_free to pair
4673         bfd_malloc.
4674         (coff_write_object_contents): Likewise.
4675
4676         * coff-rs6000.c (xcoff_howto_table_16): New variable.
4677         (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
4678
4679 2000-02-18  Ulrich Drepper  <drepper@cygnus.com>
4680
4681         * coff-rs6000.c (XCOFFARMAGBIG): New macro.
4682         (xcoff_ar_file_hdr_big): New structure.
4683         (SIZEOF_AR_FILE_HDR_BIG): New macro.
4684         (xcoff_ar_hdr_big): New structure.
4685         (SIZEOF_AR_HDR_BIG): New macro.
4686         (xcoff_big_format_p): New macro.
4687         (xcoff_ardata_big): New macro.
4688         (arch_xhdr_big): New macro.
4689         (xcoff_slurp_armap): Handle large archives.
4690         (xcoff_archive_p): Detect large archives.
4691         (xcoff_read_ar_hdr): Handle large archives.
4692         (xcoff_openr_next_archived_file): Handle large archives.
4693         (xcoff_generic_stat_arch_elt): Handle large archives.
4694         (xcoff_write_armap_old): Rename from xcoff_write_armap.
4695         (xcoff_write_armap_big): New function.
4696         (xcoff_write_armap): New function, dispatch to _old or _big.
4697         (xcoff_write_archive_contents_old): Rename from
4698         xcoff_write_archive_contents.
4699         (xcoff_write_archive_contents_big): New function.
4700         (xcoff_write_archive_contents): New function, dispatch to _old or
4701         _big.
4702
4703 2000-02-18  Richard Henderson  <rth@cygnus.com>
4704
4705         * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
4706         and hide_symbol members.
4707         (elf_link_hash_copy_indirect): Remove.
4708         (elf_link_hash_hide_symbol): Remove.
4709         (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
4710         and elf_backend_hide_symbol.
4711         (_bfd_elf_link_hash_copy_indirect): Declare.
4712         (_bfd_elf_link_hash_hide_symbol): Declare.
4713         * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
4714         (_bfd_elf_link_hash_hide_symbol): Likewise.
4715         (_bfd_elf_link_hash_table_init): Don't init killed members.
4716         * elflink.h (elf_link_add_object_symbols): Use the bed function
4717         pointers not elf_link_hash_{copy_indirect,hide_symbol}.
4718         (elf_link_assign_sym_version): Likewise.
4719         * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
4720         (elf_backend_hide_symbol): Likewise.
4721         (elfNN_bed): Update for new members.
4722
4723 2000-02-17  Kevin Buettner  <kevinb@redhat.com>
4724
4725         * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
4726         STACK_END_ADDR): Define for new core file format.
4727         (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
4728         for handling the vagaries of the various core file structures used
4729         by AIX over the years.
4730         (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
4731         Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
4732         core_dumpx structure.
4733
4734 Thu Feb 17 00:04:48 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
4735
4736         * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
4737         (bfd_mach_sh3_dsp): Likewise.
4738         (bfd_mach_sh4): Reinstate.
4739         (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
4740         * bfd-in2.h: Regenerate.
4741         * coff-sh.c (struct sh_opcode): flags is no longer short.
4742         (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
4743         (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
4744         (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
4745         (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
4746         (sh_opcodes): No longer const.
4747         (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
4748         (sh_insn_uses_reg): Check for USESAS and USESR8.
4749         (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
4750         (_bfd_sh_align_load_span): Return early for SH4.
4751         Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
4752         Take into account that field b of a parallel processing insn
4753         could be mistaken for a separate insn.
4754         * cpu-sh.c (arch_info_struct): New array elements for
4755         sh2, sh-dsp and sh3-dsp.
4756         Reinstate element for sh4.
4757         (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
4758         (SH4_NEXT): Reinstate.
4759         (SH3_NEXT, SH3E_NEXT): Adjust.
4760         * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
4761         * elf32-sh.c (sh_elf_set_private_flags): New function.
4762         (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
4763         (sh_elf_merge_private_data): New function.
4764         (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
4765         (bfd_elf32_bfd_copy_private_bfd_data): Define.
4766         (bfd_elf32_bfd_merge_private_bfd_data): Change to
4767         sh_elf_merge_private_data.
4768
4769 2000-02-13  Richard Henderson  <rth@cygnus.com>
4770
4771         * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
4772         hide_symbol members.
4773         (elf_link_hash_copy_indirect): New.
4774         (elf_link_hash_hide_symbol): New.
4775         * elflink.h (elf_link_add_object_symbols): Break out copy from
4776         indirect new new symbol to elf.c.
4777         (elf_link_assign_sym_version): Break out privatization of
4778         non-exported symbol to elf.c.
4779         * elf.c (_bfd_elf_link_hash_copy_indirect): New.
4780         (_bfd_elf_link_hash_hide_symbol): New.
4781         (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
4782
4783 2000-02-13  Ian Lance Taylor  <ian@zembu.com>
4784
4785         * section.c (_bfd_strip_section_from_output): Add info parameter.
4786         If it passed as non-NULL, use it to check whether any input BFD
4787         has an input section which uses this output section.  Change all
4788         callers.
4789         * bfd-in2.h: Rebuild.
4790
4791         * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
4792         bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
4793         1999-11-29.
4794         * bfd-in2.h: Rebuild.
4795
4796 2000-02-10  Timothy Wall  <twall@cygnus.com>
4797
4798         * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
4799         allow final modifications of swapped-in symbol.
4800         (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
4801         * coffcode.h (coff_write_relocs): Use macro
4802         SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
4803         symbol index should be set to -1.
4804
4805 Thu Feb 10 20:07:50 GMT 2000  Toshiyasu Morita (toshi.morita@sega.com)
4806
4807         * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
4808         USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
4809         * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
4810         * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
4811         sh_insns_uses_or_sets_freg): New functions.
4812         * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
4813         * (sh_insns_conflict): Use new functions and new macros to
4814         detect conflicts when two instructions both set same integer registers,
4815         both set same fp register, and both set special register.
4816
4817 2000-02-09  Timothy Wall  <twall@cygnus.com>
4818
4819         * coffgen.c (coff_real_object_p): Set arch/mach info prior to
4820         swapping in sections, so that the swapping routines have access to
4821         the arch/mach info.
4822
4823 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
4824
4825         * coff-go32.c: Update comment. Update copyright.
4826
4827 2000-01-27  Thomas de Lellis  <tdel@windriver.com>
4828
4829         * syms.c (bfd_decode_symclass)
4830         Two new class characters were added - 'V' and 'v'.  The
4831         meaning of 'W' is now restricted to just weak non-object
4832         symbols.  This allows differentiation between, for example,
4833         weak functions vs weak objects.  nm for example now dumps:
4834         'W' = weak global
4835         'w' = weak unresolved
4836         'V' = weak global object
4837         'v' = weak unresolved object
4838
4839         (bfd_is_undefined_symclass): New function.  Return true if the
4840         given symbol class represents and undefined/unresolved symbol.
4841
4842         (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
4843         unresolved symbols.
4844
4845         * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
4846
4847         * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
4848         STT_ARM_16BIT flag set, but it is not attached to a data object
4849         return STT_ARM_16BIT so that it will be treated as code by the
4850         disassembler.
4851
4852 2000-01-27  Alan Modra  <alan@spri.levels.unisa.edu.au>
4853
4854         * coff-i386.c (i3coff_object_p): Remove prototype.
4855         Update copyright.
4856
4857         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
4858         to name.  Update copyright.
4859
4860         * trad-core.c (trad_unix_core_file_p): Cast core_regsec
4861         assignment to avoid warning.  Update copyright.
4862
4863 2000-01-24  Robert Lipe  (robertl@sco.com)
4864
4865         * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
4866         instead of using GNU C extension.
4867
4868 2000-01-21  Nick Clifton  <nickc@cygnus.com>
4869
4870         * libbfd.c (bfd_read): Do not attempt to get a negativly sized
4871         amount from a bfd_in_memory structure.
4872         (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
4873         structure.
4874
4875 2000-01-14  Nick Clifton  <nickc@cygnus.com>
4876
4877         * linker.c (default_indirect_link_order): oops - fix incorrectly
4878         applied patch from Tim Wall.
4879
4880 2000-01-13  Timothy Wall (twall@tiac.net>
4881
4882         * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
4883         = scnhsz, filhsz, relsz, aoutsz, etc)
4884
4885         * coffswap.h: Ditto.
4886
4887 2000-01-13  Nick Clifton  <nickc@cygnus.com>
4888
4889         * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
4890         interwork thumb to arm stub.
4891
4892 2000-01-13  Timothy Wall (twall@tiac.net>
4893
4894         * archures.c (bfd_octets_per_byte): New function: Return
4895         target byte size.
4896         (bfd_arch_mach_octets_per_byte): New function: Return target
4897         byte size.
4898
4899         * section.c: Distinguish between octets and bytes for usage of
4900         _cooked_size,  _raw_size, and output_offset.  Clarify
4901         description of bfd_set_section_contents.
4902
4903         * bfd-in2.h: Regenerate.
4904
4905         * coffgen.c: Indicate that the offset parameter is in bytes, not
4906         octets.
4907
4908         * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
4909         where appropriate to get the octet offset when calling
4910         bfd_set_section_contents.
4911         (bfd_coff_reloc_link_order): Ditto.
4912
4913         * linker.c (bfd_generic_reloc_link_order): Ditto.
4914         (_bfd_default_link_order): Ditto.
4915
4916         * reloc.c (bfd_perform_relocation):  Distinguish between octets
4917         and bytes.  Use octets when indexing into octet data; use bytes
4918         when calculating target addresses.
4919         (bfd_install_relocation): Ditto.
4920
4921         * srec.c (srec_write_section): Ditto.
4922
4923 2000-01-13  Nick Clifton  <nickc@cygnus.com>
4924
4925         * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
4926         3 to 2.  This allows 4 byte sized sections, which is necessary for
4927         dlltool to build functioning DLLs.
4928
4929 2000-01-10  Philip Blundell  <pb@futuretv.com>
4930
4931         * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
4932         (arm*-*-conix*): New target.
4933
4934 2000-01-10  Egor Duda  <deo@logos-m.ru>
4935
4936         * config.bfd: Include elf32_i386 vector to target list for cygwin
4937         and mingw.
4938
4939         * config.in: Undefine HAVE_WIN32_PSTATUS_T.
4940         * configure.in: Test for structure win32_pstatus_t in
4941         <sys/procfs.h>
4942         * configure: Regenerate.
4943
4944         * elf.c (elfcore_grok_win32pstatus): New function: process
4945         win32_pstatus_t notes in elf core file.
4946         (elfcore_grok_note): Detect win32_pstatus notes.
4947
4948 2000-01-03  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
4949
4950         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
4951         visibility.
4952         * elflink.h (elf_link_add_object_symbols): Combine visibilities.
4953         * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
4954
4955 For older changes see ChangeLog-9899
4956 \f
4957 Local Variables:
4958 mode: change-log
4959 left-margin: 8
4960 fill-column: 74
4961 version-control: never
4962 End: