diff -upr --new-file binutils-2.9.5.0.24/ChangeLog.linux binutils-2.9.5.0.27/ChangeLog.linux --- binutils-2.9.5.0.24/ChangeLog.linux Thu Jan 13 13:42:07 2000 +++ binutils-2.9.5.0.27/ChangeLog.linux Wed Feb 2 10:55:07 2000 @@ -1,3 +1,12 @@ +Tue Feb 1 13:54:25 2000 H.J. Lu + + * binutils.spec.in: Enable i386-linuxaout and i386-coff for + IA32. + +Fri Jan 21 09:26:33 2000 H.J. Lu + + * binutils.spec.in: Update from RedHat 6.2. + Thu Jan 13 13:42:01 2000 H.J. Lu * binutils.spec.in: Change the tarfile from .bz2 to .gz. diff -upr --new-file binutils-2.9.5.0.24/bfd/ChangeLog binutils-2.9.5.0.27/bfd/ChangeLog --- binutils-2.9.5.0.24/bfd/ChangeLog Thu Jan 13 11:35:36 2000 +++ binutils-2.9.5.0.27/bfd/ChangeLog Fri Jan 28 08:32:50 2000 @@ -1,3 +1,105 @@ +2000-01-27 Thomas de Lellis + + * syms.c (bfd_decode_symclass) + Two new class characters were added - 'V' and 'v'. The + meaning of 'W' is now restricted to just weak non-object + symbols. This allows differentiation between, for example, + weak functions vs weak objects. nm for example now dumps: + 'W' = weak global + 'w' = weak unresolved + 'V' = weak global object + 'v' = weak unresolved object + + (bfd_is_undefined_symclass): New function. Return true if the + given symbol class represents and undefined/unresolved symbol. + + (bfd_symbol_info): Use bfd_is_undefined_symclass to check for + unresolved symbols. + + * bfd-in2.h: Add prototype for bfd_is_undefined_symbol(). + + * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the + STT_ARM_16BIT flag set, but it is not attached to a data object + return STT_ARM_16BIT so that it will be treated as code by the + disassembler. + +2000-01-27 Alan Modra + + * coff-i386.c (i3coff_object_p): Remove prototype. + Update copyright. + + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const + to name. Update copyright. + + * trad-core.c (trad_unix_core_file_p): Cast core_regsec + assignment to avoid warning. Update copyright. + +2000-01-24 Robert Lipe (robertl@sco.com) + + * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc + instead of using GNU C extension. + +2000-01-21 Nick Clifton + + * libbfd.c (bfd_read): Do not attempt to get a negativly sized + amount from a bfd_in_memory structure. + (bfd_seek): Do not allow seeks past the end of a bfd_in_memory + structure. + +2000-01-14 Nick Clifton + + * linker.c (default_indirect_link_order): oops - fix incorrectly + applied patch from Tim Wall. + +2000-01-13 Timothy Wall (twall@tiac.net> + + * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx + = scnhsz, filhsz, relsz, aoutsz, etc) + + * coffswap.h: Ditto. + +2000-01-13 Nick Clifton + + * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to + interwork thumb to arm stub. + +2000-01-13 Timothy Wall (twall@tiac.net> + + * archures.c (bfd_octets_per_byte): New function: Return + target byte size. + (bfd_arch_mach_octets_per_byte): New function: Return target + byte size. + + * section.c: Distinguish between octets and bytes for usage of + _cooked_size, _raw_size, and output_offset. Clarify + description of bfd_set_section_contents. + + * bfd-in2.h: Regenerate. + + * coffgen.c: Indicate that the offset parameter is in bytes, not + octets. + + * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte + where appropriate to get the octet offset when calling + bfd_set_section_contents. + (bfd_coff_reloc_link_order): Ditto. + + * linker.c (bfd_generic_reloc_link_order): Ditto. + (_bfd_default_link_order): Ditto. + + * reloc.c (bfd_perform_relocation): Distinguish between octets + and bytes. Use octets when indexing into octet data; use bytes + when calculating target addresses. + (bfd_install_relocation): Ditto. + + * srec.c (srec_write_section): Ditto. + +2000-01-13 Nick Clifton + + * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from + 3 to 2. This allows 4 byte sized sections, which is necessary for + dlltool to build funcitoning DLLs. + 2000-01-10 Philip Blundell * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu. diff -upr --new-file binutils-2.9.5.0.24/bfd/ChangeLog.linux binutils-2.9.5.0.27/bfd/ChangeLog.linux --- binutils-2.9.5.0.24/bfd/ChangeLog.linux Thu Jan 13 13:30:19 2000 +++ binutils-2.9.5.0.27/bfd/ChangeLog.linux Mon Feb 7 20:32:40 2000 @@ -1,3 +1,30 @@ +2000-02-07 Ian Lance Taylor + + * section.c (_bfd_strip_section_from_output): Also take + "info". + * bfd-in2.h: Regenerated. + + * elf32-i386.c (elf_i386_size_dynamic_sections): Also pass + "info". + * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise. + * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise. + * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise. + * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise. + * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise. + * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise. + * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise. + * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Likewise. + + +1999-10-29 Jakub Jelinek + + * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump + architecture if the object causing the bump is dynamic. + * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Ditto, + neither do it for memory ordering. + (sparc64_elf_write_relocs): Fix relocation when OLO10 comes + into play. + Thu Jan 13 13:29:40 2000 H.J. Lu * configure.in (AC_OUTPUT): Add ../binutils.spec. diff -upr --new-file binutils-2.9.5.0.24/bfd/archures.c binutils-2.9.5.0.27/bfd/archures.c --- binutils-2.9.5.0.24/bfd/archures.c Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.27/bfd/archures.c Fri Jan 21 13:08:25 2000 @@ -900,9 +900,59 @@ bfd_printable_arch_mach (arch, machine) enum bfd_architecture arch; unsigned long machine; { - const bfd_arch_info_type *ap = bfd_lookup_arch (arch, machine); + const bfd_arch_info_type * ap = bfd_lookup_arch (arch, machine); if (ap) return ap->printable_name; return "UNKNOWN!"; } + +/* +FUNCTION + bfd_octets_per_byte + +SYNOPSIS + int bfd_octets_per_byte(bfd *abfd); + +DESCRIPTION + Return the number of octets (8-bit quantities) per target byte + (minimum addressable unit). In most cases, this will be one, but some + DSP targets have 16, 32, or even 48 bits per byte. + +*/ + +int +bfd_octets_per_byte (abfd) + bfd * abfd; +{ + return bfd_arch_mach_octets_per_byte (bfd_get_arch (abfd), + bfd_get_mach (abfd)); +} + +/* +FUNCTION + bfd_arch_mach_octets_per_byte + +SYNOPSIS + int bfd_arch_mach_octets_per_byte(enum bfd_architecture arch, + unsigned long machine); + +DESCRIPTION + See bfd_octets_per_byte. + + This routine is provided for those cases where a bfd * is not + available +*/ + +int +bfd_arch_mach_octets_per_byte (arch, mach) + enum bfd_architecture arch; + unsigned long mach; +{ + const bfd_arch_info_type * ap = bfd_lookup_arch (arch, mach); + + if (ap) + return ap->bits_per_byte / 8; + return 1; +} + diff -upr --new-file binutils-2.9.5.0.24/bfd/bfd-in2.h binutils-2.9.5.0.27/bfd/bfd-in2.h --- binutils-2.9.5.0.24/bfd/bfd-in2.h Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.27/bfd/bfd-in2.h Mon Feb 7 20:32:40 2000 @@ -1066,22 +1066,25 @@ typedef struct sec bfd_vma lma; - /* The size of the section in bytes, as it will be output. - contains a value even if the section has no contents (e.g., the - size of <<.bss>>). This will be filled in after relocation */ + /* The size of the section in octets, as it will be output. + Contains a value even if the section has no contents (e.g., the + size of <<.bss>>). This will be filled in after relocation. */ bfd_size_type _cooked_size; - /* The original size on disk of the section, in bytes. Normally this + /* The original size on disk of the section, in octets. Normally this value is the same as the size, but if some relaxing has been done, then this value will be bigger. */ bfd_size_type _raw_size; /* If this section is going to be output, then this value is the - offset into the output section of the first byte in the input - section. E.g., if this was going to start at the 100th byte in - the output section, this value would be 100. */ + offset in *bytes* into the output section of the first byte in the + input section (byte ==> smallest addressable unit on the + target). In most cases, if this was going to start at the + 100th octet (8-bit quantity) in the output section, this value + would be 100. However, if the target byte size is 16 bits + (bfd_octets_per_byte is "2"), this value would be 50. */ bfd_vma output_offset; @@ -1251,7 +1254,7 @@ bfd_copy_private_section_data PARAMS ((b (ibfd, isection, obfd, osection)) void _bfd_strip_section_from_output - PARAMS ((asection *section)); + PARAMS ((struct bfd_link_info *info, asection *section)); enum bfd_architecture { @@ -1447,6 +1450,13 @@ const char * bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine)); +int +bfd_octets_per_byte PARAMS ((bfd *abfd)); + +int +bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch, + unsigned long machine)); + typedef enum bfd_reloc_status { /* No errors detected */ @@ -2426,6 +2436,9 @@ bfd_print_symbol_vandf PARAMS ((PTR file BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size)) int bfd_decode_symclass PARAMS ((asymbol *symbol)); + +boolean +bfd_is_undefined_symclass PARAMS ((int symclass)); void bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret)); diff -upr --new-file binutils-2.9.5.0.24/bfd/coff-i386.c binutils-2.9.5.0.27/bfd/coff-i386.c --- binutils-2.9.5.0.24/bfd/coff-i386.c Thu Jan 13 11:35:37 2000 +++ binutils-2.9.5.0.27/bfd/coff-i386.c Fri Jan 28 08:32:55 2000 @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -45,7 +45,6 @@ static reloc_howto_type *coff_i386_rtype bfd_vma *)); static reloc_howto_type *coff_i386_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); -static const bfd_target *i3coff_object_p PARAMS ((bfd *)); #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) /* The page size is a guess based on ELF. */ diff -upr --new-file binutils-2.9.5.0.24/bfd/coff-mcore.c binutils-2.9.5.0.27/bfd/coff-mcore.c --- binutils-2.9.5.0.24/bfd/coff-mcore.c Thu Jan 13 11:35:37 2000 +++ binutils-2.9.5.0.27/bfd/coff-mcore.c Thu Jan 20 19:06:03 2000 @@ -1,4 +1,4 @@ -/* BFD back-end for Motorolla MCore COFF/PE +/* BFD back-end for Motorola MCore COFF/PE Copyright (C) 1999 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -64,7 +64,7 @@ static const bfd_target * pe_o #define TOC_SECTION_NAME ".private.toc" /* The main body of code is in coffcode.h. */ -#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3) +#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 2 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value from smaller values. Start with zero, widen, *then* decrement. */ diff -upr --new-file binutils-2.9.5.0.24/bfd/coffcode.h binutils-2.9.5.0.27/bfd/coffcode.h --- binutils-2.9.5.0.24/bfd/coffcode.h Wed Sep 22 14:50:07 1999 +++ binutils-2.9.5.0.27/bfd/coffcode.h Fri Jan 28 08:32:58 2000 @@ -763,7 +763,7 @@ styp_to_sec_flags (abfd, hdr, name, sect char *target_name; esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd); - esymend = esym + obj_raw_syment_count (abfd) * SYMESZ; + esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd); while (esym < esymend) { @@ -852,7 +852,7 @@ styp_to_sec_flags (abfd, hdr, name, sect /* This is the section symbol. */ - bfd_coff_swap_aux_in (abfd, (PTR) (esym + SYMESZ), + bfd_coff_swap_aux_in (abfd, (PTR) (esym + bfd_coff_symesz (abfd)), isym.n_type, isym.n_sclass, 0, isym.n_numaux, (PTR) &aux); @@ -940,7 +940,7 @@ styp_to_sec_flags (abfd, hdr, name, sect symname + (TARGET_UNDERSCORE ? 1 : 0)) != 0) { /* Not the name we're looking for */ - esym += (isym.n_numaux + 1) * SYMESZ; + esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); continue; } /* Fall through. */ @@ -960,7 +960,7 @@ styp_to_sec_flags (abfd, hdr, name, sect if (section->comdat == NULL) abort (); section->comdat->symbol = - (esym - esymstart) / SYMESZ; + (esym - esymstart) / bfd_coff_symesz (abfd); newname = bfd_alloc (abfd, strlen (symname) + 1); if (newname == NULL) @@ -975,7 +975,7 @@ styp_to_sec_flags (abfd, hdr, name, sect } } - esym += (isym.n_numaux + 1) * SYMESZ; + esym += (isym.n_numaux + 1) * bfd_coff_symesz (abfd); } breakloop: } @@ -1362,7 +1362,7 @@ coff_bad_format_hook (abfd, filehdr) */ #if defined(M88) || defined(I960) - if (internal_f->f_opthdr != 0 && AOUTSZ != internal_f->f_opthdr) + if (internal_f->f_opthdr != 0 && bfd_coff_aoutsz (abfd) != internal_f->f_opthdr) return false; #endif @@ -1672,9 +1672,9 @@ coff_mkobject_hook (abfd, filehdr, aouth coff->local_n_btshft = N_BTSHFT; coff->local_n_tmask = N_TMASK; coff->local_n_tshift = N_TSHIFT; - coff->local_symesz = SYMESZ; - coff->local_auxesz = AUXESZ; - coff->local_linesz = LINESZ; + coff->local_symesz = bfd_coff_symesz (abfd); + coff->local_auxesz = bfd_coff_auxesz (abfd); + coff->local_linesz = bfd_coff_linesz (abfd); coff->timestamp = internal_f->f_timdat; @@ -1685,7 +1685,7 @@ coff_mkobject_hook (abfd, filehdr, aouth #ifdef RS6000COFF_C if ((internal_f->f_flags & F_SHROBJ) != 0) abfd->flags |= DYNAMIC; - if (aouthdr != NULL && internal_f->f_opthdr >= AOUTSZ) + if (aouthdr != NULL && internal_f->f_opthdr >= bfd_coff_aoutsz (abfd)) { struct internal_aouthdr *internal_a = (struct internal_aouthdr *) aouthdr; @@ -1880,11 +1880,11 @@ coff_set_arch_mach_hook (abfd, filehdr) cputype = 0; else { - bfd_byte buf[SYMESZ]; + bfd_byte buf[bfd_coff_symesz (abfd)]; struct internal_syment sym; if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0 - || bfd_read (buf, 1, SYMESZ, abfd) != SYMESZ) + || bfd_read (buf, 1, bfd_coff_symesz (abfd), abfd) != bfd_coff_symesz (abfd)) return false; coff_swap_sym_in (abfd, (PTR) buf, (PTR) &sym); if (sym.n_sclass == C_FILE) @@ -2293,7 +2293,8 @@ coff_write_relocs (abfd, first_undef) n.r_type = q->howto->type; #endif coff_swap_reloc_out (abfd, &n, &dst); - if (bfd_write ((PTR) & dst, 1, RELSZ, abfd) != RELSZ) + if (bfd_write ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd) + != bfd_coff_relsz (abfd)) return false; } @@ -2613,7 +2614,7 @@ coff_compute_section_file_positions (abf { asection *current; asection *previous = (asection *) NULL; - file_ptr sofar = FILHSZ; + file_ptr sofar = bfd_coff_filhsz (abfd); boolean align_adjust; #ifdef ALIGN_SECTIONS_IN_FILE file_ptr old_sofar; @@ -2680,22 +2681,22 @@ coff_compute_section_file_positions (abf } if (abfd->flags & EXEC_P) - sofar += AOUTSZ; + sofar += bfd_coff_aoutsz (abfd); #ifdef RS6000COFF_C else if (xcoff_data (abfd)->full_aouthdr) - sofar += AOUTSZ; + sofar += bfd_coff_aoutsz (abfd); else sofar += SMALL_AOUTSZ; #endif - sofar += abfd->section_count * SCNHSZ; + sofar += abfd->section_count * bfd_coff_scnhsz (abfd); #ifdef RS6000COFF_C /* XCOFF handles overflows in the reloc and line number count fields by allocating a new section header to hold the correct counts. */ for (current = abfd->sections; current != NULL; current = current->next) if (current->reloc_count >= 0xffff || current->lineno_count >= 0xffff) - sofar += SCNHSZ; + sofar += bfd_coff_scnhsz (abfd); #endif #ifdef COFF_IMAGE_WITH_PE @@ -3015,7 +3016,7 @@ coff_write_object_contents (abfd) /* Make a pass through the symbol table to count line number entries and put them into the correct asections */ - lnno_size = coff_count_linenumbers (abfd) * LINESZ; + lnno_size = coff_count_linenumbers (abfd) * bfd_coff_linesz (abfd); if (abfd->output_has_begun == false) { @@ -3029,7 +3030,7 @@ coff_write_object_contents (abfd) for (current = abfd->sections; current != NULL; current = current->next) - reloc_size += current->reloc_count * RELSZ; + reloc_size += current->reloc_count * bfd_coff_relsz (abfd); lineno_base = reloc_base + reloc_size; sym_base = lineno_base + lnno_size; @@ -3042,7 +3043,7 @@ coff_write_object_contents (abfd) { current->line_filepos = lineno_base; current->moving_line_filepos = lineno_base; - lineno_base += current->lineno_count * LINESZ; + lineno_base += current->lineno_count * bfd_coff_linesz (abfd); } else { @@ -3051,7 +3052,7 @@ coff_write_object_contents (abfd) if (current->reloc_count) { current->rel_filepos = reloc_base; - reloc_base += current->reloc_count * RELSZ; + reloc_base += current->reloc_count * bfd_coff_relsz (abfd); } else { @@ -3063,13 +3064,13 @@ coff_write_object_contents (abfd) internal_f.f_nscns = 0; if ((abfd->flags & EXEC_P) != 0) - scn_base = FILHSZ + AOUTSZ; + scn_base = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd); else { - scn_base = FILHSZ; + scn_base = bfd_coff_filhsz (abfd); #ifdef RS6000COFF_C if (xcoff_data (abfd)->full_aouthdr) - scn_base += AOUTSZ; + scn_base += bfd_coff_aoutsz (abfd); else scn_base += SMALL_AOUTSZ; #endif @@ -3214,7 +3215,8 @@ coff_write_object_contents (abfd) { SCNHDR buff; if (coff_swap_scnhdr_out (abfd, §ion, &buff) == 0 - || bfd_write ((PTR) (&buff), 1, SCNHSZ, abfd) != SCNHSZ) + || bfd_write ((PTR) (&buff), 1, bfd_coff_scnhsz (abfd), abfd) + != bfd_coff_scnhsz (abfd)) return false; } @@ -3335,7 +3337,8 @@ coff_write_object_contents (abfd) scnhdr.s_nlnno = current->target_index; scnhdr.s_flags = STYP_OVRFLO; if (coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0 - || bfd_write ((PTR) &buff, 1, SCNHSZ, abfd) != SCNHSZ) + || bfd_write ((PTR) &buff, 1, bfd_coff_scnhsz (abfd), abfd) + != bfd_coff_scnhsz (abfd)) return false; } } @@ -3356,13 +3359,13 @@ coff_write_object_contents (abfd) internal_f.f_flags = 0; if (abfd->flags & EXEC_P) - internal_f.f_opthdr = AOUTSZ; + internal_f.f_opthdr = bfd_coff_aoutsz (abfd); else { internal_f.f_opthdr = 0; #ifdef RS6000COFF_C if (xcoff_data (abfd)->full_aouthdr) - internal_f.f_opthdr = AOUTSZ; + internal_f.f_opthdr = bfd_coff_aoutsz (abfd); else internal_f.f_opthdr = SMALL_AOUTSZ; #endif @@ -3677,19 +3680,41 @@ coff_write_object_contents (abfd) /* now write them */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) return false; + { - char buff[FILHSZ]; + char * buff; + bfd_size_type amount; + + buff = bfd_malloc (bfd_coff_filhsz (abfd)); + if (buff == NULL) + return false; + coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff); - if (bfd_write ((PTR) buff, 1, FILHSZ, abfd) != FILHSZ) + amount = bfd_write ((PTR) buff, 1, bfd_coff_filhsz (abfd), abfd); + + free (buff); + + if (amount != bfd_coff_filhsz (abfd)) return false; } + if (abfd->flags & EXEC_P) { /* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR. include/coff/pe.h sets AOUTSZ == sizeof(PEAOUTHDR)) */ - char buff[AOUTSZ]; + char * buff; + bfd_size_type amount; + + buff = bfd_malloc (bfd_coff_aoutsz (abfd)); + if (buff == NULL) + return false; + coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff); - if (bfd_write ((PTR) buff, 1, AOUTSZ, abfd) != AOUTSZ) + amount = bfd_write ((PTR) buff, 1, bfd_coff_aoutsz (abfd), abfd); + + free (buff); + + if (amount != bfd_coff_aoutsz (abfd)) return false; } #ifdef RS6000COFF_C @@ -3701,7 +3726,7 @@ coff_write_object_contents (abfd) /* XCOFF seems to always write at least a small a.out header. */ coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) &buff); if (xcoff_data (abfd)->full_aouthdr) - size = AOUTSZ; + size = bfd_coff_aoutsz (abfd); else size = SMALL_AOUTSZ; if (bfd_write ((PTR) &buff, 1, size, abfd) != size) @@ -3860,7 +3885,7 @@ coff_slurp_line_table (abfd, asect) native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, SEEK_SET, - (size_t) (LINESZ * + (size_t) (bfd_coff_linesz (abfd) * asect->lineno_count)); lineno_cache = (alent *) bfd_alloc (abfd, (size_t) ((asect->lineno_count + 1) * sizeof (alent))); @@ -4179,7 +4204,7 @@ coff_slurp_symbol_table (abfd) for (sec = abfd->sections; sec != NULL; sec = sec->next) if (sec->line_filepos <= (file_ptr) src->u.syment.n_value && ((file_ptr) (sec->line_filepos - + sec->lineno_count * LINESZ) + + sec->lineno_count * bfd_coff_linesz (abfd)) > (file_ptr) src->u.syment.n_value)) break; if (sec == NULL) @@ -4189,7 +4214,7 @@ coff_slurp_symbol_table (abfd) dst->symbol.section = sec; dst->symbol.value = ((src->u.syment.n_value - sec->line_filepos) - / LINESZ); + / bfd_coff_linesz (abfd)); src->fix_line = 1; } } @@ -4471,7 +4496,7 @@ coff_slurp_reloc_table (abfd, asect, sym (RELOC *) buy_and_read (abfd, asect->rel_filepos, SEEK_SET, - (size_t) (RELSZ * + (size_t) (bfd_coff_relsz (abfd) * asect->reloc_count)); reloc_cache = (arelent *) bfd_alloc (abfd, (size_t) (asect->reloc_count * sizeof (arelent))); diff -upr --new-file binutils-2.9.5.0.24/bfd/coffgen.c binutils-2.9.5.0.27/bfd/coffgen.c --- binutils-2.9.5.0.24/bfd/coffgen.c Wed Sep 22 15:12:48 1999 +++ binutils-2.9.5.0.27/bfd/coffgen.c Fri Jan 21 13:08:25 2000 @@ -2136,10 +2136,9 @@ _bfd_coff_is_local_label_name (abfd, nam return name[0] == '.' && name[1] == 'L'; } -/* Provided a BFD, a section and an offset into the section, calculate - and return the name of the source file and the line nearest to the - wanted location. */ - +/* Provided a BFD, a section and an offset (in bytes, not octets) into the + section, calculate and return the name of the source file and the line + nearest to the wanted location. */ /*ARGSUSED*/ boolean coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr, diff -upr --new-file binutils-2.9.5.0.24/bfd/cofflink.c binutils-2.9.5.0.27/bfd/cofflink.c --- binutils-2.9.5.0.24/bfd/cofflink.c Mon Sep 13 09:36:43 1999 +++ binutils-2.9.5.0.27/bfd/cofflink.c Thu Jan 20 19:06:05 2000 @@ -2425,7 +2425,10 @@ _bfd_coff_link_input_bfd (finfo, input_b if (secdata == NULL || secdata->stab_info == NULL) { if (! bfd_set_section_contents (output_bfd, o->output_section, - contents, o->output_offset, + contents, + (file_ptr) + (o->output_offset * + bfd_octets_per_byte (output_bfd)), (o->_cooked_size != 0 ? o->_cooked_size : o->_raw_size))) @@ -2737,7 +2740,9 @@ _bfd_coff_reloc_link_order (output_bfd, break; } ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf, - (file_ptr) link_order->offset, size); + (file_ptr) + (link_order->offset * + bfd_octets_per_byte (output_bfd)), size); free (buf); if (! ok) return false; diff -upr --new-file binutils-2.9.5.0.24/bfd/coffswap.h binutils-2.9.5.0.27/bfd/coffswap.h --- binutils-2.9.5.0.24/bfd/coffswap.h Mon Sep 13 09:36:43 1999 +++ binutils-2.9.5.0.27/bfd/coffswap.h Thu Jan 20 19:06:05 2000 @@ -261,7 +261,7 @@ coff_swap_reloc_out (abfd, src, dst) SWAP_OUT_RELOC_EXTRA(abfd,reloc_src, reloc_dst); #endif - return RELSZ; + return bfd_coff_relsz (abfd); } #endif /* NO_COFF_RELOCS */ @@ -321,7 +321,7 @@ coff_swap_filehdr_out (abfd, in, out) #ifdef COFF_ADJUST_FILEHDR_OUT_POST COFF_ADJUST_FILEHDR_OUT_POST (abfd, in, out); #endif - return FILHSZ; + return bfd_coff_filhsz (abfd); } @@ -845,7 +845,7 @@ coff_swap_scnhdr_out (abfd, in, out) { struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *)in; SCNHDR *scnhdr_ext = (SCNHDR *)out; - unsigned int ret = SCNHSZ; + unsigned int ret = bfd_coff_scnhsz (abfd); #ifdef COFF_ADJUST_SCNHDR_OUT_PRE COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out); diff -upr --new-file binutils-2.9.5.0.24/bfd/configure binutils-2.9.5.0.27/bfd/configure --- binutils-2.9.5.0.24/bfd/configure Thu Jan 13 13:30:19 2000 +++ binutils-2.9.5.0.27/bfd/configure Mon Feb 7 20:32:40 2000 @@ -1,45 +1,40 @@ #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using Autoconf version 2.14.1 -# Copyright (C) 1992, 93, 94, 95, 96, 98, 1999 Free Software Foundation, Inc. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: -ac_arg_with_help= -ac_arg_enable_help= -ac_arg_var_help= +ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: -ac_arg_var_help="$ac_arg_var_help - CFLAGS Extra flags for the C compiler" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-shared[=PKGS] build shared libraries [default=no]" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-static[=PKGS] build static libraries [default=yes]" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" -ac_arg_with_help="$ac_arg_with_help +ac_help="$ac_help --with-gnu-ld assume the C compiler uses GNU ld [default=no]" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --disable-libtool-lock force libtool not to do file locking" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-targets alternative target configurations" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" -ac_arg_with_help="$ac_arg_with_help +ac_help="$ac_help --with-mmap try using mmap for BFD input files if available" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" -ac_arg_var_help="$ac_arg_var_help - CFLAGS Extra flags for the C compiler" -ac_arg_enable_help="$ac_arg_enable_help +ac_help="$ac_help --disable-nls do not use Native Language Support" -ac_arg_with_help="$ac_arg_with_help +ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" # Initialize some variables set by options. @@ -58,6 +53,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -81,10 +77,7 @@ subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. -: ${ac_max_here_lines=12} -# Sed expression to map a string onto a valid sh and CPP variable names. -ac_tr_sh='sed -e y%*+%pp%;s%[^a-zA-Z0-9_]%_%g' -ac_tr_cpp='sed -e y%*abcdefghijklmnopqrstuvwxyz%PABCDEFGHIJKLMNOPQRSTUVWXYZ%;s%[^A-Z0-9_]%_%g' +ac_max_here_lines=12 ac_prev= for ac_option @@ -130,23 +123,23 @@ do datadir="$ac_optarg" ;; -disable-* | --disable-*) - ac_feature=`echo "$ac_option"|sed -e 's/-*disable-//'` + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. - if test -n "`echo "$ac_feature"| sed 's/[-a-zA-Z0-9_]//g'`"; then + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) - ac_feature=`echo "$ac_option"|sed -e 's/-*enable-//' -e 's/=.*//'` + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. - if test -n "`echo "$ac_feature"| sed 's/[-_a-zA-Z0-9]//g'`"; then + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; @@ -167,24 +160,16 @@ do -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. - cat << \EOF -`configure' configures software source code packages to adapt to many kinds -of systems. - -Usage: configure [OPTION]... [VAR=VALUE]... [HOST] - -To safely assign special values to environment variables (e.g., CC, -CFLAGS...), give to `configure' the definition as VAR=VALUE. - -Defaults for the options are specified in brackets. - + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure - Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] @@ -205,20 +190,16 @@ Directory and file names: --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] - -Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names - EOF - cat << \EOF + cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] - Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] @@ -227,12 +208,9 @@ Features and packages: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF - test -n "$ac_arg_enable_help" && echo " ---enable options recognized:$ac_arg_enable_help" - test -n "$ac_arg_with_help" && echo " ---with options recognized:$ac_arg_with_help" - test -n "$ac_arg_var_help" && echo " -Some of the influent environment variables:$ac_arg_var_help" + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi exit 0 ;; -host | --host | --hos | --ho) @@ -361,6 +339,11 @@ Some of the influent environment variabl -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -382,26 +365,26 @@ Some of the influent environment variabl verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.14.1" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) - ac_package=`echo "$ac_option"|sed -e 's/-*with-//' -e 's/=.*//'` + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. - if test -n "`echo "$ac_package"| sed 's/[-_a-zA-Z0-9]//g'`"; then + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) - ac_package=`echo "$ac_option"|sed -e 's/-*without-//'` + ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. - if test -n "`echo "$ac_package"| sed 's/[-a-zA-Z0-9_]//g'`"; then + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` @@ -428,17 +411,8 @@ Some of the influent environment variabl -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; - *=*) - ac_envvar=`echo $ac_option|sed -e 's/=.*//'` - # Reject names that are not valid shell variable names. - if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then - { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; } - fi - eval "${ac_envvar}='$ac_optarg'" - export $ac_envvar ;; - *) - if test -n "`echo "$ac_option"| sed 's/[-a-z0-9.]//g'`"; then + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then @@ -451,7 +425,7 @@ Some of the influent environment variabl done if test -n "$ac_prev"; then - { echo "configure: error: missing argument to --\`echo $ac_prev | sed 's/_/-/g'\`" 1>&2; exit 1; } + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -477,7 +451,7 @@ running configure, to aid debugging if c " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. -# Also quote any args containing shell meta-characters. +# Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do @@ -487,7 +461,6 @@ do -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) - ac_arg=`echo "$ac_arg"|sed "s/'/'\\\\\\\\''/g"` ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac @@ -517,7 +490,7 @@ if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 - ac_confdir=`echo "$ac_prog"|sed 's%/[^/][^/]*$%%'` + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then @@ -528,20 +501,24 @@ else fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then - { echo "configure: error: cannot find sources in $ac_confdir or .." 1>&2; exit 1; } + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else - { echo "configure: error: cannot find sources in $srcdir" 1>&2; exit 1; } + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -552,7 +529,7 @@ done if test -r "$cache_file"; then echo "loading cache $cache_file" - test -f "$cache_file" && . $cache_file + . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -591,139 +568,14 @@ for ac_dir in $srcdir $srcdir/.. $srcdir ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - - -echo $ac_n "checking host system type... $ac_c" 1>&6 -echo "configure:610: checking host system type" 1>&5 -if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then - -# Make sure we can run config.sub. - if $ac_config_sub sun4 >/dev/null 2>&1; then : - else { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; } - fi - - ac_cv_host_alias=$host - case "$ac_cv_host_alias" in - NONE) - case $nonopt in - NONE) - if ac_cv_host_alias=`$ac_config_guess`; then : - else { echo "configure: error: cannot guess host type; you must specify one" 1>&2; exit 1; } - fi ;; - *) ac_cv_host_alias=$nonopt ;; - esac ;; - esac - - ac_cv_host=`$ac_config_sub $ac_cv_host_alias` - ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -else - echo $ac_n "(cached) $ac_c" 1>&6 -fi - -echo "$ac_t""$ac_cv_host" 1>&6 - -host=$ac_cv_host -host_alias=$ac_cv_host_alias -host_cpu=$ac_cv_host_cpu -host_vendor=$ac_cv_host_vendor -host_os=$ac_cv_host_os - - - - - -echo $ac_n "checking target system type... $ac_c" 1>&6 -echo "configure:651: checking target system type" 1>&5 -if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then - -# Make sure we can run config.sub. - if $ac_config_sub sun4 >/dev/null 2>&1; then : - else { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; } - fi - - ac_cv_target_alias=$target - case "$ac_cv_target_alias" in - NONE) - case $nonopt in - NONE) - ac_cv_target_alias=$host_alias ;; - - *) ac_cv_target_alias=$nonopt ;; - esac ;; - esac - - ac_cv_target=`$ac_config_sub $ac_cv_target_alias` - ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -else - echo $ac_n "(cached) $ac_c" 1>&6 + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi - -echo "$ac_t""$ac_cv_target" 1>&6 - -target=$ac_cv_target -target_alias=$ac_cv_target_alias -target_cpu=$ac_cv_target_cpu -target_vendor=$ac_cv_target_vendor -target_os=$ac_cv_target_os - - - - - -echo $ac_n "checking build system type... $ac_c" 1>&6 -echo "configure:691: checking build system type" 1>&5 -if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then - -# Make sure we can run config.sub. - if $ac_config_sub sun4 >/dev/null 2>&1; then : - else { echo "configure: error: cannot run $ac_config_sub" 1>&2; exit 1; } - fi - - ac_cv_build_alias=$build - case "$ac_cv_build_alias" in - NONE) - case $nonopt in - NONE) - ac_cv_build_alias=$host_alias ;; - - *) ac_cv_build_alias=$nonopt ;; - esac ;; - esac - - ac_cv_build=`$ac_config_sub $ac_cv_build_alias` - ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` -else - echo $ac_n "(cached) $ac_c" 1>&6 -fi - -echo "$ac_t""$ac_cv_build" 1>&6 - -build=$ac_cv_build -build_alias=$ac_cv_build_alias -build_cpu=$ac_cv_build_cpu -build_vendor=$ac_cv_build_vendor -build_os=$ac_cv_build_os - - - +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Do some error checking and defaulting for the host and target type. @@ -747,21 +599,78 @@ NONE---*---* | *---NONE---* | *---*---NO esac +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:609: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:630: checking target system type" >&5 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:648: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- -case "${CFLAGS+set} $ac_configure_args" in - *" CFLAGS="* );; - "set "*) ac_configure_args="CFLAGS='$CFLAGS' $ac_configure_args";; -esac - - # Extract the first word of "gcc", so it can be a program name with args. +# Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:764: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_CC+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:673: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -786,12 +695,12 @@ else echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:794: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_CC+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:703: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -835,14 +744,14 @@ else echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - for ac_prog in cl -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:845: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_CC+set}" = set; then + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:754: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -853,7 +762,7 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" + ac_cv_prog_CC="cl" break fi done @@ -866,18 +775,14 @@ if test -n "$CC"; then else echo "$ac_t""no" 1>&6 fi - -test -n "$CC" && break -done - - fi + ;; + esac fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi - -test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ac_c" 1>&6 -echo "configure:881: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" 1>&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:786: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -888,12 +793,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 892 "configure" +#line 797 "configure" #include "confdefs.h" -int main(){return(0);} +main(){return(0);} EOF -if { (eval echo configure:897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -918,14 +823,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ac_c" 1>&6 -echo "configure:923: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" 1>&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:828: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 -echo "configure:928: checking whether we are using GNU C" 1>&5 -if test "${ac_cv_prog_gcc+set}" = set; then +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:833: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi + echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then @@ -950,9 +856,9 @@ fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g... $ac_c" 1>&6 -echo "configure:955: checking whether ${CC-cc} accepts -g" 1>&5 -if test "${ac_cv_prog_cc_g+set}" = set; then +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:861: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -964,6 +870,7 @@ fi rm -f conftest* fi + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" @@ -981,8 +888,8 @@ else fi fi -echo $ac_n "checking for POSIXized ISC... $ac_c" 1>&6 -echo "configure:986: checking for POSIXized ISC" 1>&5 +echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 +echo "configure:893: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -1014,10 +921,10 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6 -echo "configure:1019: checking for a BSD compatible install" 1>&5 +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:926: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -1035,10 +942,6 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : - elif test $ac_prog = install && - grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -1067,12 +970,12 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -echo $ac_n "checking whether build environment is sane... $ac_c" 1>&6 -echo "configure:1076: checking whether build environment is sane" 1>&5 +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:979: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -1120,18 +1023,18 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},;$program_transform_name" + program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," -echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}... $ac_c" 1>&6 -echo "configure:1133: checking whether ${MAKE-make} sets \${MAKE}" 1>&5 +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:1036: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF @@ -1158,7 +1061,7 @@ fi PACKAGE=bfd -VERSION=2.9.5.0.24 +VERSION=2.9.5.0.27 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -1174,8 +1077,8 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` -echo $ac_n "checking for working aclocal... $ac_c" 1>&6 -echo "configure:1179: checking for working aclocal" 1>&5 +echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +echo "configure:1082: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1187,8 +1090,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working autoconf... $ac_c" 1>&6 -echo "configure:1192: checking for working autoconf" 1>&5 +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:1095: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1200,8 +1103,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working automake... $ac_c" 1>&6 -echo "configure:1205: checking for working automake" 1>&5 +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:1108: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1213,8 +1116,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working autoheader... $ac_c" 1>&6 -echo "configure:1218: checking for working autoheader" 1>&5 +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:1121: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1226,8 +1129,8 @@ else echo "$ac_t""missing" 1>&6 fi -echo $ac_n "checking for working makeinfo... $ac_c" 1>&6 -echo "configure:1231: checking for working makeinfo" 1>&5 +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:1134: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1249,9 +1152,9 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1254: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_AR+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1157: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then @@ -1281,9 +1184,9 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1286: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_RANLIB+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1189: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1310,12 +1213,12 @@ fi if test -z "$ac_cv_prog_RANLIB"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "ranlib", so it can be a program name with args. +if test -n "$ac_tool_prefix"; then + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1318: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_RANLIB+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1221: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1341,9 +1244,9 @@ else echo "$ac_t""no" 1>&6 fi - else - RANLIB=":" - fi +else + RANLIB=":" +fi fi @@ -1419,9 +1322,9 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1424: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_RANLIB+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1327: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then @@ -1458,8 +1361,8 @@ fi ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. - echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 -echo "configure:1463: checking for ld used by GCC" 1>&5 + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +echo "configure:1366: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1482,13 +1385,13 @@ echo "configure:1463: checking for ld us ;; esac elif test "$with_gnu_ld" = yes; then - echo $ac_n "checking for GNU ld... $ac_c" 1>&6 -echo "configure:1487: checking for GNU ld" 1>&5 + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:1390: checking for GNU ld" >&5 else - echo $ac_n "checking for non-GNU ld... $ac_c" 1>&6 -echo "configure:1490: checking for non-GNU ld" 1>&5 + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1393: checking for non-GNU ld" >&5 fi -if test "${ac_cv_path_LD+set}" = set; then +if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -z "$LD"; then @@ -1521,9 +1424,9 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } -echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 -echo "configure:1526: checking if the linker ($LD) is GNU ld" 1>&5 -if test "${ac_cv_prog_gnu_ld+set}" = set; then +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1429: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. @@ -1533,12 +1436,13 @@ else ac_cv_prog_gnu_ld=no fi fi + echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 -echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 -echo "configure:1541: checking for BSD-compatible nm" 1>&5 -if test "${ac_cv_path_NM+set}" = set; then +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:1445: checking for BSD-compatible nm" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$NM"; then @@ -1574,9 +1478,9 @@ echo "$ac_t""$NM" 1>&6 # Check for command to grab the raw symbol name followed by C symbol from nm. -echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 -echo "configure:1579: checking command to parse $NM output" 1>&5 -if test "${ac_cv_sys_global_symbol_pipe+set}" = set; then +echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 +echo "configure:1483: checking command to parse $NM output" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # These are sane defaults that work on at least a few old systems. @@ -1638,11 +1542,11 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func;return 0;} EOF - if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1646: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1550: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then @@ -1694,7 +1598,7 @@ EOF ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo configure:1602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 @@ -1739,9 +1643,9 @@ if test -z "$ac_cv_sys_global_symbol_pip fi echo "$ac_t""$ac_result" 1>&6 -echo $ac_n "checking for _ prefix in compiled symbols... $ac_c" 1>&6 -echo "configure:1744: checking for _ prefix in compiled symbols" 1>&5 -if test "${ac_cv_sys_symbol_underscore+set}" = set; then +echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 +echo "configure:1648: checking for _ prefix in compiled symbols" >&5 +if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_sys_symbol_underscore=no @@ -1749,10 +1653,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1756: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1660: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -1777,9 +1681,9 @@ fi echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} -echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 -echo "configure:1782: checking whether ln -s works" 1>&5 -if test "${ac_cv_prog_LN_S+set}" = set; then +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1686: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftestdata @@ -1814,8 +1718,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1818 "configure"' > conftest.$ac_ext - if { (eval echo configure:1819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1722 "configure"' > conftest.$ac_ext + if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1835,20 +1739,20 @@ case "$host" in # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - echo $ac_n "checking whether the C compiler needs -belf... $ac_c" 1>&6 -echo "configure:1840: checking whether the C compiler needs -belf" 1>&5 -if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 +echo "configure:1744: checking whether the C compiler needs -belf" >&5 +if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1859,6 +1763,7 @@ else fi rm -f conftest* fi + echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -1869,9 +1774,9 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 *-*-cygwin*) # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1874: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_DLLTOOL+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1779: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1898,12 +1803,12 @@ fi if test -z "$ac_cv_prog_DLLTOOL"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "dlltool", so it can be a program name with args. +if test -n "$ac_tool_prefix"; then + # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1906: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_DLLTOOL+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1811: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$DLLTOOL"; then @@ -1929,16 +1834,16 @@ else echo "$ac_t""no" 1>&6 fi - else - DLLTOOL="false" - fi +else + DLLTOOL="false" +fi fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1941: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_AS+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1846: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1965,12 +1870,12 @@ fi if test -z "$ac_cv_prog_AS"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "as", so it can be a program name with args. +if test -n "$ac_tool_prefix"; then + # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:1973: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_AS+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1878: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AS"; then @@ -1996,9 +1901,9 @@ else echo "$ac_t""no" 1>&6 fi - else - AS="false" - fi +else + AS="false" +fi fi @@ -2082,7 +1987,7 @@ $libtool_flags --no-verify $ac_aux_dir/l # Reload cache, that may have been modified by ltconfig if test -r "$cache_file"; then echo "loading cache $cache_file" - test -f "$cache_file" && . $cache_file + . $cache_file else echo "creating cache $cache_file" > $cache_file @@ -2160,17 +2065,17 @@ EOF_SED rm -f conftestsed fi test "$program_prefix" != NONE && - program_transform_name="s,^,${program_prefix},;$program_transform_name" + program_transform_name="s,^,${program_prefix},; $program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$\$,${program_suffix},;$program_transform_name" + program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," -echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles... $ac_c" 1>&6 -echo "configure:2174: checking whether to enable maintainer-specific portions of Makefiles" 1>&5 +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:2079: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -2192,13 +2097,13 @@ fi MAINT=$MAINTAINER_MODE_TRUE -echo $ac_n "checking for Cygwin environment... $ac_c" 1>&6 -echo "configure:2197: checking for Cygwin environment" 1>&5 -if test "${ac_cv_cygwin+set}" = set; then +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:2102: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -2219,24 +2124,26 @@ else ac_cv_cygwin=no fi rm -f conftest* +rm -f conftest* fi + echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes -echo $ac_n "checking for mingw32 environment... $ac_c" 1>&6 -echo "configure:2228: checking for mingw32 environment" 1>&5 -if test "${ac_cv_mingw32+set}" = set; then +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:2135: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -2246,55 +2153,29 @@ else ac_cv_mingw32=no fi rm -f conftest* +rm -f conftest* fi + echo "$ac_t""$ac_cv_mingw32" 1>&6 MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes -echo $ac_n "checking for EMX OS/2 environment... $ac_c" 1>&6 -echo "configure:2255: checking for EMX OS/2 environment" 1>&5 -if test "${ac_cv_emxos2+set}" = set; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then - rm -rf conftest* - ac_cv_emxos2=yes -else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - ac_cv_emxos2=no -fi -rm -f conftest* -fi -echo "$ac_t""$ac_cv_emxos2" 1>&6 -EMXOS2= -test "$ac_cv_emxos2" = yes && EMXOS2=yes - -echo $ac_n "checking for executable suffix... $ac_c" 1>&6 -echo "configure:2285: checking for executable suffix" 1>&5 -if test "${ac_cv_exeext+set}" = set; then +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:2166: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ac_cv_exeext=.exe else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.C | *.o | *.obj | *.xcoff) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -2317,16 +2198,11 @@ target64=false # host stuff: -case "${CFLAGS+set} $ac_configure_args" in - *" CFLAGS="* );; - "set "*) ac_configure_args="CFLAGS='$CFLAGS' $ac_configure_args";; -esac - - # Extract the first word of "gcc", so it can be a program name with args. +# Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:2329: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_CC+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2205: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2351,12 +2227,12 @@ else echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:2359: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_CC+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2235: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2400,14 +2276,14 @@ else echo "$ac_t""no" 1>&6 fi - if test -z "$CC"; then - for ac_prog in cl -do -# Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:2410: checking for $ac_word" 1>&5 -if test "${ac_cv_prog_CC+set}" = set; then + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2286: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then @@ -2418,7 +2294,7 @@ else for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_CC="$ac_prog" + ac_cv_prog_CC="cl" break fi done @@ -2431,18 +2307,14 @@ if test -n "$CC"; then else echo "$ac_t""no" 1>&6 fi - -test -n "$CC" && break -done - - fi + ;; + esac fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi - -test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } - -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works... $ac_c" 1>&6 -echo "configure:2446: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" 1>&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:2318: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2453,12 +2325,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2457 "configure" +#line 2329 "configure" #include "confdefs.h" -int main(){return(0);} +main(){return(0);} EOF -if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2483,14 +2355,14 @@ echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi -echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler... $ac_c" 1>&6 -echo "configure:2488: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" 1>&5 +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:2360: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross -echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 -echo "configure:2493: checking whether we are using GNU C" 1>&5 -if test "${ac_cv_prog_gcc+set}" = set; then +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:2365: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi + echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then @@ -2515,9 +2388,9 @@ fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= -echo $ac_n "checking whether ${CC-cc} accepts -g... $ac_c" 1>&6 -echo "configure:2520: checking whether ${CC-cc} accepts -g" 1>&5 -if test "${ac_cv_prog_cc_g+set}" = set; then +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:2393: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c @@ -2529,6 +2402,7 @@ fi rm -f conftest* fi + echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then CFLAGS="$ac_save_CFLAGS" @@ -2548,14 +2422,14 @@ fi ALL_LINGUAS= -echo $ac_n "checking how to run the C preprocessor... $ac_c" 1>&6 -echo "configure:2553: checking how to run the C preprocessor" 1>&5 +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:2427: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then -if test "${ac_cv_prog_CPP+set}" = set; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get @@ -2564,13 +2438,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2581,13 +2455,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2598,13 +2472,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2628,13 +2502,13 @@ else fi echo "$ac_t""$CPP" 1>&6 -echo $ac_n "checking for ANSI C header files... $ac_c" 1>&6 -echo "configure:2633: checking for ANSI C header files" 1>&5 -if test "${ac_cv_header_stdc+set}" = set; then +echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:2507: checking for ANSI C header files" >&5 +if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2642,7 +2516,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2659,7 +2533,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2677,7 +2551,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2698,25 +2572,18 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < -#if ((' ' & 0x0FF) == 0x020) #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -#define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -#define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2730,6 +2597,7 @@ fi fi fi + echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF @@ -2738,19 +2606,19 @@ EOF fi -echo $ac_n "checking for working const... $ac_c" 1>&6 -echo "configure:2743: checking for working const" 1>&5 -if test "${ac_cv_c_const+set}" = set; then +echo $ac_n "checking for working const""... $ac_c" 1>&6 +echo "configure:2611: checking for working const" >&5 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2804,6 +2672,7 @@ else fi rm -f conftest* fi + echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF @@ -2812,22 +2681,22 @@ EOF fi -echo $ac_n "checking for inline... $ac_c" 1>&6 -echo "configure:2817: checking for inline" 1>&5 -if test "${ac_cv_c_inline+set}" = set; then +echo $ac_n "checking for inline""... $ac_c" 1>&6 +echo "configure:2686: checking for inline" >&5 +if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2838,6 +2707,7 @@ rm -f conftest* done fi + echo "$ac_t""$ac_cv_c_inline" 1>&6 case "$ac_cv_c_inline" in inline | yes) ;; @@ -2851,21 +2721,19 @@ EOF ;; esac -echo $ac_n "checking for off_t... $ac_c" 1>&6 -echo "configure:2856: checking for off_t" 1>&5 -if test "${ac_cv_type_off_t+set}" = set; then +echo $ac_n "checking for off_t""... $ac_c" 1>&6 +echo "configure:2726: checking for off_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #if STDC_HEADERS -# include -# include +#include +#include #endif - EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -2879,30 +2747,26 @@ rm -f conftest* fi echo "$ac_t""$ac_cv_type_off_t" 1>&6 -if test $ac_cv_type_off_t = yes; then - : -else - cat >> confdefs.h <> confdefs.h <<\EOF #define off_t long EOF fi -echo $ac_n "checking for size_t... $ac_c" 1>&6 -echo "configure:2893: checking for size_t" 1>&5 -if test "${ac_cv_type_size_t+set}" = set; then +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +echo "configure:2759: checking for size_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #if STDC_HEADERS -# include -# include +#include +#include #endif - EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then @@ -2916,10 +2780,8 @@ rm -f conftest* fi echo "$ac_t""$ac_cv_type_size_t" 1>&6 -if test $ac_cv_type_size_t = yes; then - : -else - cat >> confdefs.h <> confdefs.h <<\EOF #define size_t unsigned EOF @@ -2927,45 +2789,46 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -echo $ac_n "checking for working alloca.h... $ac_c" 1>&6 -echo "configure:2932: checking for working alloca.h" 1>&5 -if test "${ac_cv_working_alloca_h+set}" = set; then +echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 +echo "configure:2794: checking for working alloca.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_working_alloca_h=yes + ac_cv_header_alloca_h=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_working_alloca_h=no + ac_cv_header_alloca_h=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_working_alloca_h" 1>&6 -if test $ac_cv_working_alloca_h = yes; then + +echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 +if test $ac_cv_header_alloca_h = yes; then cat >> confdefs.h <<\EOF #define HAVE_ALLOCA_H 1 EOF fi -echo $ac_n "checking for alloca... $ac_c" 1>&6 -echo "configure:2964: checking for alloca" 1>&5 -if test "${ac_cv_func_alloca_works+set}" = set; then +echo $ac_n "checking for alloca""... $ac_c" 1>&6 +echo "configure:2827: checking for alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3004,6 +2867,7 @@ else fi rm -f conftest* fi + echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 if test $ac_cv_func_alloca_works = yes; then cat >> confdefs.h <<\EOF @@ -3023,13 +2887,13 @@ if test $ac_cv_func_alloca_works = no; t EOF -echo $ac_n "checking whether alloca needs Cray hooks... $ac_c" 1>&6 -echo "configure:3028: checking whether alloca needs Cray hooks" 1>&5 -if test "${ac_cv_os_cray+set}" = set; then +echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 +echo "configure:2892: checking whether alloca needs Cray hooks" >&5 +if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do - ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:3058: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:2922: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 cat >> confdefs.h <&6 fi done fi -echo $ac_n "checking stack direction for C alloca... $ac_c" 1>&6 -echo "configure:3111: checking stack direction for C alloca" 1>&5 -if test "${ac_cv_c_stack_direction+set}" = set; then +echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 +echo "configure:2977: checking stack direction for C alloca" >&5 +if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3147,6 +3013,7 @@ rm -fr conftest* fi fi + echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 cat >> confdefs.h <&6 -echo "configure:3162: checking for $ac_header" 1>&5 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3029: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "$ac_ac_Header=yes" + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_Header=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getpagesize do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:3199: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3068: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done -echo $ac_n "checking for working mmap... $ac_c" 1>&6 -echo "configure:3249: checking for working mmap" 1>&5 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:3121: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3406,6 +3278,7 @@ rm -fr conftest* fi fi + echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF @@ -3415,55 +3288,57 @@ EOF fi - for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \ + for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ unistd.h values.h sys/param.h do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo $ac_n "checking for $ac_header... $ac_c" 1>&6 -echo "configure:3424: checking for $ac_header" 1>&5 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:3297: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "$ac_ac_Header=yes" + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_Header=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ __argz_count __argz_stringify __argz_next do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:3462: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3337: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done @@ -3511,14 +3389,13 @@ done if test "${ac_cv_func_stpcpy+set}" != "set"; then for ac_func in stpcpy do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:3517: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3394: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done @@ -3571,20 +3451,20 @@ EOF fi if test $ac_cv_header_locale_h = yes; then - echo $ac_n "checking for LC_MESSAGES... $ac_c" 1>&6 -echo "configure:3576: checking for LC_MESSAGES" 1>&5 -if test "${am_cv_val_LC_MESSAGES+set}" = set; then + echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 +echo "configure:3456: checking for LC_MESSAGES" >&5 +if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -3595,6 +3475,7 @@ else fi rm -f conftest* fi + echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 if test $am_cv_val_LC_MESSAGES = yes; then cat >> confdefs.h <<\EOF @@ -3603,8 +3484,8 @@ EOF fi fi - echo $ac_n "checking whether NLS is requested... $ac_c" 1>&6 -echo "configure:3608: checking whether NLS is requested" 1>&5 + echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 +echo "configure:3489: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -3623,8 +3504,8 @@ fi #define ENABLE_NLS 1 EOF - echo $ac_n "checking whether included gettext is requested... $ac_c" 1>&6 -echo "configure:3628: checking whether included gettext is requested" 1>&5 + echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 +echo "configure:3509: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -3641,47 +3522,48 @@ fi nls_cv_header_libgt= CATOBJEXT=NONE - echo $ac_n "checking for libintl.h... $ac_c" 1>&6 -echo "configure:3646: checking for libintl.h" 1>&5 -if test "${ac_cv_header_libintl_h+set}" = set; then + ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 +echo "configure:3528: checking for libintl.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - ac_cv_header_libintl_h=yes + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_header_libintl_h=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_header_libintl_h" 1>&6 -if test $ac_cv_header_libintl_h = yes; then - echo $ac_n "checking for gettext in libc... $ac_c" 1>&6 -echo "configure:3673: checking for gettext in libc" 1>&5 -if test "${gt_cv_func_gettext_libc+set}" = set; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 +echo "configure:3555: checking for gettext in libc" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -3692,18 +3574,20 @@ else fi rm -f conftest* fi + echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 if test "$gt_cv_func_gettext_libc" != "yes"; then - echo $ac_n "checking for bindtextdomain in -lintl... $ac_c" 1>&6 -echo "configure:3700: checking for bindtextdomain in -lintl" 1>&5 -if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then + echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 +echo "configure:3583: checking for bindtextdomain in -lintl" >&5 +ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_lib_intl_bindtextdomain=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_lib_intl_bindtextdomain=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" + fi -echo "$ac_t""$ac_cv_lib_intl_bindtextdomain" 1>&6 -if test $ac_cv_lib_intl_bindtextdomain = yes; then - echo $ac_n "checking for gettext in libintl... $ac_c" 1>&6 -echo "configure:3733: checking for gettext in libintl" 1>&5 -if test "${gt_cv_func_gettext_libintl+set}" = set; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 +echo "configure:3618: checking for gettext in libintl" >&5 +if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -3752,7 +3637,10 @@ else fi rm -f conftest* fi + echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 +else + echo "$ac_t""no" 1>&6 fi fi @@ -3765,9 +3653,9 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:3770: checking for $ac_word" 1>&5 -if test "${ac_cv_path_MSGFMT+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3658: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3799,14 +3687,13 @@ fi if test "$MSGFMT" != "no"; then for ac_func in dcgettext do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:3805: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3692: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:3857: checking for $ac_word" 1>&5 -if test "${ac_cv_path_GMSGFMT+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3747: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in - /* | ?:/*) + /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_word"; then + if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi @@ -3885,9 +3778,9 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:3890: checking for $ac_word" 1>&5 -if test "${ac_cv_path_XGETTEXT+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3783: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -3918,7 +3811,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -3942,6 +3835,8 @@ rm -f conftest* fi fi +else + echo "$ac_t""no" 1>&6 fi @@ -3955,9 +3850,9 @@ fi INTLOBJS="\$(GETTOBJS)" # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:3960: checking for $ac_word" 1>&5 -if test "${ac_cv_path_MSGFMT+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3855: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$MSGFMT" in @@ -3989,21 +3884,24 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:3994: checking for $ac_word" 1>&5 -if test "${ac_cv_path_GMSGFMT+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3889: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GMSGFMT" in - /* | ?:/*) + /*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. + ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" - for ac_dir in $ac_dummy; do + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_word"; then + if test -f $ac_dir/$ac_word; then ac_cv_path_GMSGFMT="$ac_dir/$ac_word" break fi @@ -4022,9 +3920,9 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -echo $ac_n "checking for $ac_word... $ac_c" 1>&6 -echo "configure:4027: checking for $ac_word" 1>&5 -if test "${ac_cv_path_XGETTEXT+set}" = set; then +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:3925: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$XGETTEXT" in @@ -4112,8 +4010,8 @@ fi if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else - echo $ac_n "checking for catalogs to be installed... $ac_c" 1>&6 -echo "configure:4117: checking for catalogs to be installed" 1>&5 + echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 +echo "configure:4015: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4139,36 +4037,38 @@ echo "configure:4117: checking for catal if test -f $srcdir/po2tbl.sed.in; then if test "$CATOBJEXT" = ".cat"; then - echo $ac_n "checking for linux/version.h... $ac_c" 1>&6 -echo "configure:4144: checking for linux/version.h" 1>&5 -if test "${ac_cv_header_linux_version_h+set}" = set; then + ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 +echo "configure:4043: checking for linux/version.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - ac_cv_header_linux_version_h=yes + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_header_linux_version_h=no + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""$ac_cv_header_linux_version_h" 1>&6 -if test $ac_cv_header_linux_version_h = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 msgformat=linux else - msgformat=xopen + echo "$ac_t""no" 1>&6 +msgformat=xopen fi @@ -4226,10 +4126,10 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install... $ac_c" 1>&6 -echo "configure:4231: checking for a BSD compatible install" 1>&5 +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:4131: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -4247,10 +4147,6 @@ else grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : - elif test $ac_prog = install && - grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 @@ -4279,7 +4175,7 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -4313,9 +4209,9 @@ fi if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else - echo $ac_n "checking for build system executable suffix... $ac_c" 1>&6 -echo "configure:4318: checking for build system executable suffix" 1>&5 -if test "${bfd_cv_build_exeext+set}" = set; then + echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 +echo "configure:4214: checking for build system executable suffix" >&5 +if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else rm -f conftest* @@ -4331,93 +4227,100 @@ else rm -f conftest* test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no fi + echo "$ac_t""$bfd_cv_build_exeext" 1>&6 EXEEXT_FOR_BUILD="" test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} fi -for ac_header in stddef.h string.h strings.h stdlib.h time.h unistd.h +for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo $ac_n "checking for $ac_header... $ac_c" 1>&6 -echo "configure:4345: checking for $ac_header" 1>&5 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4242: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "$ac_ac_Header=yes" + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_Header=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done -for ac_header in fcntl.h sys/file.h sys/time.h +for ac_hdr in fcntl.h sys/file.h sys/time.h do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo $ac_n "checking for $ac_header... $ac_c" 1>&6 -echo "configure:4382: checking for $ac_header" 1>&5 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4282: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "$ac_ac_Header=yes" + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_Header=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done -echo $ac_n "checking whether time.h and sys/time.h may both be included... $ac_c" 1>&6 -echo "configure:4416: checking whether time.h and sys/time.h may both be included" 1>&5 -if test "${ac_cv_header_time+set}" = set; then +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:4319: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -4426,7 +4329,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4333: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -4437,6 +4340,7 @@ else fi rm -f conftest* fi + echo "$ac_t""$ac_cv_header_time" 1>&6 if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF @@ -4449,13 +4353,13 @@ ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` -echo $ac_n "checking for $ac_hdr that defines DIR... $ac_c" 1>&6 -echo "configure:4454: checking for $ac_hdr that defines DIR" 1>&5 -if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then +echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 +echo "configure:4358: checking for $ac_hdr that defines DIR" >&5 +if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -4463,7 +4367,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:4467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -4487,15 +4391,16 @@ fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then - echo $ac_n "checking for opendir in -ldir... $ac_c" 1>&6 -echo "configure:4492: checking for opendir in -ldir" 1>&5 -if test "${ac_cv_lib_dir_opendir+set}" = set; then +echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 +echo "configure:4396: checking for opendir in -ldir" >&5 +ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_lib_dir_opendir=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_lib_dir_opendir=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" + fi -echo "$ac_t""$ac_cv_lib_dir_opendir" 1>&6 -if test $ac_cv_lib_dir_opendir = yes; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 LIBS="$LIBS -ldir" +else + echo "$ac_t""no" 1>&6 fi else - echo $ac_n "checking for opendir in -lx... $ac_c" 1>&6 -echo "configure:4529: checking for opendir in -lx" 1>&5 -if test "${ac_cv_lib_x_opendir+set}" = set; then +echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 +echo "configure:4437: checking for opendir in -lx" >&5 +ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - ac_cv_lib_x_opendir=yes + eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_cv_lib_x_opendir=no + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" + fi -echo "$ac_t""$ac_cv_lib_x_opendir" 1>&6 -if test $ac_cv_lib_x_opendir = yes; then +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lx" +else + echo "$ac_t""no" 1>&6 fi fi for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:4570: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:4481: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done @@ -4625,13 +4539,13 @@ EOF ;; esac -echo $ac_n "checking whether strstr must be declared... $ac_c" 1>&6 -echo "configure:4630: checking whether strstr must be declared" 1>&5 -if test "${bfd_cv_decl_needed_strstr+set}" = set; then +echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 +echo "configure:4544: checking whether strstr must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4652,7 +4566,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -4672,13 +4586,13 @@ EOF fi -echo $ac_n "checking whether malloc must be declared... $ac_c" 1>&6 -echo "configure:4677: checking whether malloc must be declared" 1>&5 -if test "${bfd_cv_decl_needed_malloc+set}" = set; then +echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 +echo "configure:4591: checking whether malloc must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4699,7 +4613,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:4703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -4719,13 +4633,13 @@ EOF fi -echo $ac_n "checking whether realloc must be declared... $ac_c" 1>&6 -echo "configure:4724: checking whether realloc must be declared" 1>&5 -if test "${bfd_cv_decl_needed_realloc+set}" = set; then +echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 +echo "configure:4638: checking whether realloc must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4746,7 +4660,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:4750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -4766,13 +4680,13 @@ EOF fi -echo $ac_n "checking whether free must be declared... $ac_c" 1>&6 -echo "configure:4771: checking whether free must be declared" 1>&5 -if test "${bfd_cv_decl_needed_free+set}" = set; then +echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 +echo "configure:4685: checking whether free must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4793,7 +4707,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -4813,13 +4727,13 @@ EOF fi -echo $ac_n "checking whether getenv must be declared... $ac_c" 1>&6 -echo "configure:4818: checking whether getenv must be declared" 1>&5 -if test "${bfd_cv_decl_needed_getenv+set}" = set; then +echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 +echo "configure:4732: checking whether getenv must be declared" >&5 +if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -4840,7 +4754,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:4844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -5045,58 +4959,61 @@ EOF # ELF corefile support has several flavors, but all of # them use something called - for ac_header in sys/procfs.h + for ac_hdr in sys/procfs.h do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo $ac_n "checking for $ac_header... $ac_c" 1>&6 -echo "configure:5053: checking for $ac_header" 1>&5 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:4967: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "$ac_ac_Header=yes" + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_Header=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done if test "$ac_cv_header_sys_procfs_h" = yes; then - echo $ac_n "checking for prstatus_t in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5088: checking for prstatus_t in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_prstatus_t+set}" = set; then + echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5005: checking for prstatus_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { prstatus_t avar ; return 0; } EOF -if { (eval echo configure:5100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prstatus_t=yes else @@ -5117,20 +5034,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6 - echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5122: checking for prstatus_t.pr_who in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who+set}" = set; then + echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5039: checking for prstatus_t.pr_who in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { prstatus_t avar; void* aref = (void*) &avar.pr_who ; return 0; } EOF -if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes else @@ -5151,20 +5068,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6 - echo $ac_n "checking for pstatus_t in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5156: checking for pstatus_t in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_pstatus_t+set}" = set; then + echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5073: checking for pstatus_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_pstatus_t=yes else @@ -5185,20 +5102,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6 - echo $ac_n "checking for prpsinfo_t in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5190: checking for prpsinfo_t in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_prpsinfo_t+set}" = set; then + echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5107: checking for prpsinfo_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { prpsinfo_t avar ; return 0; } EOF -if { (eval echo configure:5202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_prpsinfo_t=yes else @@ -5219,20 +5136,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6 - echo $ac_n "checking for psinfo_t in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5224: checking for psinfo_t in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_psinfo_t+set}" = set; then + echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5141: checking for psinfo_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { psinfo_t avar ; return 0; } EOF -if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_psinfo_t=yes else @@ -5253,20 +5170,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6 - echo $ac_n "checking for lwpstatus_t in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5258: checking for lwpstatus_t in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_lwpstatus_t+set}" = set; then + echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5175: checking for lwpstatus_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { lwpstatus_t avar ; return 0; } EOF -if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_lwpstatus_t=yes else @@ -5287,20 +5204,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6 - echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5292: checking for lwpstatus_t.pr_context in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context+set}" = set; then + echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5209: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_context ; return 0; } EOF -if { (eval echo configure:5304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes else @@ -5321,20 +5238,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6 - echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5326: checking for lwpstatus_t.pr_reg in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg+set}" = set; then + echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5243: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { lwpstatus_t avar; void* aref = (void*) &avar.pr_reg ; return 0; } EOF -if { (eval echo configure:5338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes else @@ -5355,20 +5272,20 @@ EOF fi echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6 - echo $ac_n "checking for win32_pstatus_t in sys/procfs.h... $ac_c" 1>&6 -echo "configure:5360: checking for win32_pstatus_t in sys/procfs.h" 1>&5 - if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then + echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6 +echo "configure:5277: checking for win32_pstatus_t in sys/procfs.h" >&5 + if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { win32_pstatus_t avar ; return 0; } EOF -if { (eval echo configure:5372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes else @@ -5697,7 +5614,7 @@ case ${host64}-${target64}-${want64} in wordsize=64 all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)' if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then - echo "configure: warning: You have requested a 64 bit BFD configuration" 1>&2 + echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2 echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2 fi ;; @@ -5719,53 +5636,55 @@ test -n "${selarchs}" && tdefaults="${td test -n "${havevecs}" && tdefaults="${tdefaults} ${havevecs}" -for ac_header in unistd.h +for ac_hdr in unistd.h do -ac_ac_Header=`echo "ac_cv_header_$ac_header" | $ac_tr_sh` -echo $ac_n "checking for $ac_header... $ac_c" 1>&6 -echo "configure:5727: checking for $ac_header" 1>&5 -if eval "test \"\${$ac_ac_Header+set}\" = set"; then +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:5644: checking for $ac_hdr" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < +#include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "$ac_ac_Header=yes" + eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_Header=no" + eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_Header'}'`" 1>&6 -if test `eval echo '${'$ac_ac_Header'}'` = yes; then +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_func in getpagesize do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:5764: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5683: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done -echo $ac_n "checking for working mmap... $ac_c" 1>&6 -echo "configure:5814: checking for working mmap" 1>&5 -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then +echo $ac_n "checking for working mmap""... $ac_c" 1>&6 +echo "configure:5736: checking for working mmap" >&5 +if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -5971,6 +5893,7 @@ rm -fr conftest* fi fi + echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >> confdefs.h <<\EOF @@ -5981,14 +5904,13 @@ fi for ac_func in madvise mprotect do -ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh` -echo $ac_n "checking for $ac_func... $ac_c" 1>&6 -echo "configure:5987: checking for $ac_func" 1>&5 -if eval "test \"\${$ac_ac_var+set}\" = set"; then +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:5909: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "$ac_ac_var=yes" + eval "ac_cv_func_$ac_func=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "$ac_ac_var=no" + eval "ac_cv_func_$ac_func=no" fi rm -f conftest* fi -echo "$ac_t""`eval echo '${'$ac_ac_var'}'`" 1>&6 -if test `eval echo '${'$ac_ac_var'}'` = yes; then + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 fi done @@ -6122,259 +6047,179 @@ cat > $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <>$CONFIG_STATUS < \$ac_cs_root.subs <<\\CEOF -s%@SHELL@%$SHELL%;t t -s%@CFLAGS@%$CFLAGS%;t t -s%@CPPFLAGS@%$CPPFLAGS%;t t -s%@CXXFLAGS@%$CXXFLAGS%;t t -s%@FFLAGS@%$FFLAGS%;t t -s%@DEFS@%$DEFS%;t t -s%@LDFLAGS@%$LDFLAGS%;t t -s%@LIBS@%$LIBS%;t t -s%@exec_prefix@%$exec_prefix%;t t -s%@prefix@%$prefix%;t t -s%@program_transform_name@%$program_transform_name%;t t -s%@bindir@%$bindir%;t t -s%@sbindir@%$sbindir%;t t -s%@libexecdir@%$libexecdir%;t t -s%@datadir@%$datadir%;t t -s%@sysconfdir@%$sysconfdir%;t t -s%@sharedstatedir@%$sharedstatedir%;t t -s%@localstatedir@%$localstatedir%;t t -s%@libdir@%$libdir%;t t -s%@includedir@%$includedir%;t t -s%@oldincludedir@%$oldincludedir%;t t -s%@infodir@%$infodir%;t t -s%@mandir@%$mandir%;t t -s%@host@%$host%;t t -s%@host_alias@%$host_alias%;t t -s%@host_cpu@%$host_cpu%;t t -s%@host_vendor@%$host_vendor%;t t -s%@host_os@%$host_os%;t t -s%@target@%$target%;t t -s%@target_alias@%$target_alias%;t t -s%@target_cpu@%$target_cpu%;t t -s%@target_vendor@%$target_vendor%;t t -s%@target_os@%$target_os%;t t -s%@build@%$build%;t t -s%@build_alias@%$build_alias%;t t -s%@build_cpu@%$build_cpu%;t t -s%@build_vendor@%$build_vendor%;t t -s%@build_os@%$build_os%;t t -s%@CC@%$CC%;t t -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%;t t -s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%;t t -s%@INSTALL_DATA@%$INSTALL_DATA%;t t -s%@PACKAGE@%$PACKAGE%;t t -s%@VERSION@%$VERSION%;t t -s%@ACLOCAL@%$ACLOCAL%;t t -s%@AUTOCONF@%$AUTOCONF%;t t -s%@AUTOMAKE@%$AUTOMAKE%;t t -s%@AUTOHEADER@%$AUTOHEADER%;t t -s%@MAKEINFO@%$MAKEINFO%;t t -s%@SET_MAKE@%$SET_MAKE%;t t -s%@AR@%$AR%;t t -s%@RANLIB@%$RANLIB%;t t -s%@LD@%$LD%;t t -s%@NM@%$NM%;t t -s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%;t t -s%@LN_S@%$LN_S%;t t -s%@DLLTOOL@%$DLLTOOL%;t t -s%@AS@%$AS%;t t -s%@LIBTOOL@%$LIBTOOL%;t t -s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%;t t -s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%;t t -s%@MAINT@%$MAINT%;t t -s%@EXEEXT@%$EXEEXT%;t t -s%@CPP@%$CPP%;t t -s%@ALLOCA@%$ALLOCA%;t t -s%@USE_NLS@%$USE_NLS%;t t -s%@MSGFMT@%$MSGFMT%;t t -s%@GMSGFMT@%$GMSGFMT%;t t -s%@XGETTEXT@%$XGETTEXT%;t t -s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%;t t -s%@CATALOGS@%$CATALOGS%;t t -s%@CATOBJEXT@%$CATOBJEXT%;t t -s%@DATADIRNAME@%$DATADIRNAME%;t t -s%@GMOFILES@%$GMOFILES%;t t -s%@INSTOBJEXT@%$INSTOBJEXT%;t t -s%@INTLDEPS@%$INTLDEPS%;t t -s%@INTLLIBS@%$INTLLIBS%;t t -s%@INTLOBJS@%$INTLOBJS%;t t -s%@POFILES@%$POFILES%;t t -s%@POSUB@%$POSUB%;t t -s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%;t t -s%@GT_NO@%$GT_NO%;t t -s%@GT_YES@%$GT_YES%;t t -s%@MKINSTALLDIRS@%$MKINSTALLDIRS%;t t -s%@l@%$l%;t t -s%@HDEFINES@%$HDEFINES%;t t -s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%;t t -s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%;t t -s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%;t t -s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%;t t -s%@CC_FOR_BUILD@%$CC_FOR_BUILD%;t t -s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%;t t -s%@COREFILE@%$COREFILE%;t t -s%@COREFLAG@%$COREFLAG%;t t -s%@WIN32LDFLAGS@%$WIN32LDFLAGS%;t t -s%@WIN32LIBADD@%$WIN32LIBADD%;t t -s%@TDEFINES@%$TDEFINES%;t t -s%@wordsize@%$wordsize%;t t -s%@all_backends@%$all_backends%;t t -s%@bfd_backends@%$bfd_backends%;t t -s%@bfd_machines@%$bfd_machines%;t t -s%@tdefaults@%$tdefaults%;t t -CEOF +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@CC@%$CC%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@AR@%$AR%g +s%@RANLIB@%$RANLIB%g +s%@LD@%$LD%g +s%@NM@%$NM%g +s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g +s%@LN_S@%$LN_S%g +s%@DLLTOOL@%$DLLTOOL%g +s%@AS@%$AS%g +s%@LIBTOOL@%$LIBTOOL%g +s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g +s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g +s%@MAINT@%$MAINT%g +s%@EXEEXT@%$EXEEXT%g +s%@CPP@%$CPP%g +s%@ALLOCA@%$ALLOCA%g +s%@USE_NLS@%$USE_NLS%g +s%@MSGFMT@%$MSGFMT%g +s%@GMSGFMT@%$GMSGFMT%g +s%@XGETTEXT@%$XGETTEXT%g +s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g +s%@CATALOGS@%$CATALOGS%g +s%@CATOBJEXT@%$CATOBJEXT%g +s%@DATADIRNAME@%$DATADIRNAME%g +s%@GMOFILES@%$GMOFILES%g +s%@INSTOBJEXT@%$INSTOBJEXT%g +s%@INTLDEPS@%$INTLDEPS%g +s%@INTLLIBS@%$INTLLIBS%g +s%@INTLOBJS@%$INTLOBJS%g +s%@POFILES@%$POFILES%g +s%@POSUB@%$POSUB%g +s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g +s%@GT_NO@%$GT_NO%g +s%@GT_YES@%$GT_YES%g +s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g +s%@l@%$l%g +s%@HDEFINES@%$HDEFINES%g +s%@BFD_HOST_64BIT_LONG@%$BFD_HOST_64BIT_LONG%g +s%@BFD_HOST_64_BIT_DEFINED@%$BFD_HOST_64_BIT_DEFINED%g +s%@BFD_HOST_64_BIT@%$BFD_HOST_64_BIT%g +s%@BFD_HOST_U_64_BIT@%$BFD_HOST_U_64_BIT%g +s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g +s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g +s%@COREFILE@%$COREFILE%g +s%@COREFLAG@%$COREFLAG%g +s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g +s%@WIN32LIBADD@%$WIN32LIBADD%g +s%@TDEFINES@%$TDEFINES%g +s%@wordsize@%$wordsize%g +s%@all_backends@%$all_backends%g +s%@bfd_backends@%$bfd_backends%g +s%@bfd_machines@%$bfd_machines%g +s%@tdefaults@%$tdefaults%g +CEOF EOF cat >> $CONFIG_STATUS <<\EOF + # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. -ac_max_sed_lines=48 -ac_sed_frag=1 # Number of current file. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. ac_beg=1 # First line for current file. -ac_end=$ac_max_sed_lines # Line after last line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else - sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag + sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi - if test ! -s $ac_cs_root.sfrag; then + if test ! -s conftest.s$ac_file; then ac_more_lines=false - rm -f $ac_cs_root.sfrag + rm -f conftest.s$ac_file else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag" + ac_sed_cmds="sed -f conftest.s$ac_file" else - ac_sed_cmds="$ac_sed_cmds | sed -f $ac_cs_root.s$ac_sed_frag" + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi - ac_sed_frag=`expr $ac_sed_frag + 1` + ac_file=`expr $ac_file + 1` ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` + ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi - EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". @@ -6417,33 +6262,21 @@ for ac_file in .. $CONFIG_FILES; do if t rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in - *[Mm]akefile*) ac_comsub="1i\\ + *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac -# Don't redirect the output to AC_FILE directly: use `mv' so that updating -# is atomic, and doesn't need trapping. - ac_file_inputs=`echo $ac_file_in | sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` -EOF -cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s%@configure_input@%$configure_input%;t t -s%@srcdir@%$srcdir%;t t -s%@top_srcdir@%$top_srcdir%;t t -s%@INSTALL@%$INSTALL%;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out - mv $ac_cs_root.out $ac_file +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f $ac_cs_root.s* -EOF -cat >>$CONFIG_STATUS <<\EOF +rm -f conftest.s* + # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # @@ -6463,6 +6296,13 @@ ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in @@ -6473,9 +6313,9 @@ for ac_file in .. $CONFIG_HEADERS; do if echo creating $ac_file - rm -f $ac_cs_root.frag $ac_cs_root.in $ac_cs_root.out + rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` - cat $ac_file_inputs > $ac_cs_root.in + cat $ac_file_inputs > conftest.in EOF @@ -6484,23 +6324,15 @@ EOF # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals -cat > $ac_cs_root.hdr <<\EOF +cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g -t clear -: clear -s%^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$%${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD}%gp -t cleanup -s%^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp -: cleanup +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC_DEFINE to be honored. -uniq confdefs.h | sed -n -f $ac_cs_root.hdr > conftest.vals -rm -f $ac_cs_root.hdr +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required @@ -6509,22 +6341,22 @@ cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF -# Break up conftest.vals because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. + rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi - # Write a limited-size here document to $ac_cs_root.frag. - echo ' cat > $ac_cs_root.frag <> $CONFIG_STATUS - echo '/^#[ ]*u*n*d*e*f*/!b' >> $CONFIG_STATUS + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF - sed -f $ac_cs_root.frag $ac_cs_root.in > $ac_cs_root.out - rm -f $ac_cs_root.in - mv $ac_cs_root.out $ac_cs_root.in + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals @@ -6533,13 +6365,13 @@ done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF - rm -f $ac_cs_root.frag $ac_cs_root.h - echo "/* $ac_file. Generated automatically by configure. */" > $ac_cs_root.h - cat $ac_cs_root.in >> $ac_cs_root.h - rm -f $ac_cs_root.in - if cmp -s $ac_file $ac_cs_root.h 2>/dev/null; then + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" - rm -f $ac_cs_root.h + rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -6548,51 +6380,11 @@ cat >> $CONFIG_STATUS <<\EOF test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file - mv $ac_cs_root.h $ac_file + mv conftest.h $ac_file fi fi; done -EOF -cat >> $CONFIG_STATUS <<\EOF -srcdir=$ac_given_srcdir - -for ac_file in : $CONFIG_LINKS; do if test "x$ac_file" != x:; then - ac_dest=`echo "$ac_file"|sed 's%:.*%%'` - ac_source=`echo "$ac_file"|sed 's%[^:]*:%%'` - - echo "linking $srcdir/$ac_source to $ac_dest" - - if test ! -r $srcdir/$ac_source; then - { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; } - fi - rm -f $ac_dest - # Make relative symlinks. - # Remove last slash and all that follows it. Not all systems have dirname. - ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'` - if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then - # The dest file is in a subdirectory. - test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" - ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" - # A "../" for each directory in $ac_dest_dir_suffix. - ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` - else - ac_dest_dir_suffix= ac_dots= - fi - - case "$srcdir" in - [/$]*) ac_rel_source="$srcdir/$ac_source" ;; - *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;; - esac - - # Make a symlink if possible; otherwise try a hard link. - if ln -s $ac_rel_source $ac_dest 2>/dev/null || - ln $srcdir/$ac_source $ac_dest; then : - else - { echo "configure: error: cannot link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; } - fi -fi; done EOF - cat >> $CONFIG_STATUS <type) == STT_ARM_TFUNC) @@ -723,7 +723,7 @@ bfd_elf32_arm_process_before_allocation case R_ARM_THM_PC22: /* This one is a call from thumb code. We look - up the target of the call. If it is not a thumb + up the target of the call. If it is not a thumb target, we insert glue. */ if (ELF_ST_TYPE (h->type) != STT_ARM_TFUNC) @@ -737,6 +737,7 @@ bfd_elf32_arm_process_before_allocation } return true; + error_return: if (free_relocs != NULL) free (free_relocs); @@ -744,8 +745,8 @@ error_return: free (free_contents); if (free_extsyms != NULL) free (free_extsyms); + return false; - } /* The thumb form of a long branch is a bit finicky, because the offset @@ -894,7 +895,7 @@ elf32_thumb_to_arm_stub (info, name, inp + my_offset - (input_section->output_offset + offset + addend) - - 4; + - 8; tmp = bfd_get_32 (input_bfd, hit_data - input_section->vma); @@ -2103,10 +2104,22 @@ elf32_arm_get_symbol_type (elf_sym, type Elf_Internal_Sym * elf_sym; int type; { - if (ELF_ST_TYPE (elf_sym->st_info) == STT_ARM_TFUNC) - return ELF_ST_TYPE (elf_sym->st_info); - else - return type; + switch (ELF_ST_TYPE (elf_sym->st_info)) + { + case STT_ARM_TFUNC: + return ELF_ST_TYPE (elf_sym->st_info); + break; + case STT_ARM_16BIT: + /* If the symbol is not an object, return the STT_ARM_16BIT flag. + This allows us to distinguish between data used by Thumb instructions + and non-data (which is probably code) inside Thumb regions of an + executable. */ + if (type != STT_OBJECT) + return ELF_ST_TYPE (elf_sym->st_info); + break; + } + + return type; } static asection * diff -upr --new-file binutils-2.9.5.0.24/bfd/elf32-i386.c binutils-2.9.5.0.27/bfd/elf32-i386.c --- binutils-2.9.5.0.24/bfd/elf32-i386.c Mon Sep 6 10:57:21 1999 +++ binutils-2.9.5.0.27/bfd/elf32-i386.c Mon Feb 7 20:32:40 2000 @@ -1085,7 +1085,7 @@ elf_i386_size_dynamic_sections (output_b if (strip) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); continue; } diff -upr --new-file binutils-2.9.5.0.24/bfd/elf32-m68k.c binutils-2.9.5.0.27/bfd/elf32-m68k.c --- binutils-2.9.5.0.24/bfd/elf32-m68k.c Fri Nov 19 09:42:45 1999 +++ binutils-2.9.5.0.27/bfd/elf32-m68k.c Mon Feb 7 20:32:40 2000 @@ -1262,7 +1262,7 @@ elf_m68k_size_dynamic_sections (output_b if (strip) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); continue; } diff -upr --new-file binutils-2.9.5.0.24/bfd/elf32-mips.c binutils-2.9.5.0.27/bfd/elf32-mips.c --- binutils-2.9.5.0.24/bfd/elf32-mips.c Thu Jan 13 11:35:40 2000 +++ binutils-2.9.5.0.27/bfd/elf32-mips.c Mon Feb 7 20:32:40 2000 @@ -7920,7 +7920,7 @@ _bfd_mips_elf_size_dynamic_sections (out if (strip) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); continue; } diff -upr --new-file binutils-2.9.5.0.24/bfd/elf32-ppc.c binutils-2.9.5.0.27/bfd/elf32-ppc.c --- binutils-2.9.5.0.24/bfd/elf32-ppc.c Thu Aug 5 17:13:57 1999 +++ binutils-2.9.5.0.27/bfd/elf32-ppc.c Mon Feb 7 20:32:40 2000 @@ -2012,7 +2012,7 @@ ppc_elf_size_dynamic_sections (output_bf if (strip) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); continue; } diff -upr --new-file binutils-2.9.5.0.24/bfd/elf32-sparc.c binutils-2.9.5.0.27/bfd/elf32-sparc.c --- binutils-2.9.5.0.24/bfd/elf32-sparc.c Mon Sep 6 10:14:20 1999 +++ binutils-2.9.5.0.27/bfd/elf32-sparc.c Mon Feb 7 20:32:41 2000 @@ -1010,7 +1010,7 @@ elf32_sparc_size_dynamic_sections (outpu if (strip) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); continue; } @@ -1871,7 +1871,8 @@ elf32_sparc_merge_private_bfd_data (ibfd (_("%s: compiled for a 64 bit system and target is 32 bit"), bfd_get_filename (ibfd)); } - else if (bfd_get_mach (obfd) < bfd_get_mach (ibfd)) + else if (bfd_get_mach (obfd) < bfd_get_mach (ibfd) + && !(ibfd->flags & DYNAMIC)) bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd)); #endif diff -upr --new-file binutils-2.9.5.0.24/bfd/elf64-alpha.c binutils-2.9.5.0.27/bfd/elf64-alpha.c --- binutils-2.9.5.0.24/bfd/elf64-alpha.c Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.27/bfd/elf64-alpha.c Mon Feb 7 20:32:41 2000 @@ -3263,7 +3263,7 @@ elf64_alpha_size_dynamic_sections (outpu } if (strip) - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); else { /* Allocate memory for the section contents. */ diff -upr --new-file binutils-2.9.5.0.24/bfd/elf64-sparc.c binutils-2.9.5.0.27/bfd/elf64-sparc.c --- binutils-2.9.5.0.24/bfd/elf64-sparc.c Mon Aug 9 09:22:04 1999 +++ binutils-2.9.5.0.27/bfd/elf64-sparc.c Mon Feb 7 20:32:41 2000 @@ -474,7 +474,7 @@ sparc64_elf_write_relocs (abfd, sec, dat { boolean *failedp = (boolean *) data; Elf_Internal_Shdr *rela_hdr; - Elf64_External_Rela *outbound_relocas; + Elf64_External_Rela *outbound_relocas, *src_rela; unsigned int idx, count; asymbol *last_sym = 0; int last_sym_idx = 0; @@ -534,17 +534,16 @@ sparc64_elf_write_relocs (abfd, sec, dat /* orelocation has the data, reloc_count has the count... */ outbound_relocas = (Elf64_External_Rela *) rela_hdr->contents; + src_rela = outbound_relocas; for (idx = 0; idx < sec->reloc_count; idx++) { Elf_Internal_Rela dst_rela; - Elf64_External_Rela *src_rela; arelent *ptr; asymbol *sym; int n; ptr = sec->orelocation[idx]; - src_rela = outbound_relocas + idx; /* The address of an ELF reloc is section relative for an object file, and absolute for an executable file or shared library. @@ -601,7 +600,7 @@ sparc64_elf_write_relocs (abfd, sec, dat dst_rela.r_info = ELF64_R_INFO (n, ptr->howto->type); dst_rela.r_addend = ptr->addend; - bfd_elf64_swap_reloca_out (abfd, &dst_rela, src_rela); + bfd_elf64_swap_reloca_out (abfd, &dst_rela, src_rela++); } } @@ -1752,7 +1751,7 @@ sparc64_elf_size_dynamic_sections (outpu if (strip) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); continue; } @@ -2799,25 +2798,32 @@ sparc64_elf_merge_private_bfd_data (ibfd { error = false; - old_flags |= (new_flags & (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)); - new_flags |= (old_flags & (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)); - if ((old_flags & (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)) == - (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)) - { - error = true; - (*_bfd_error_handler) - (_("%s: linking UltraSPARC specific with HAL specific code"), - bfd_get_filename (ibfd)); - } - - /* Choose the most restrictive memory ordering */ - old_mm = (old_flags & EF_SPARCV9_MM); - new_mm = (new_flags & EF_SPARCV9_MM); - old_flags &= ~EF_SPARCV9_MM; - new_flags &= ~EF_SPARCV9_MM; - if (new_mm < old_mm) old_mm = new_mm; - old_flags |= old_mm; - new_flags |= old_mm; + if (ibfd->flags & DYNAMIC) { + /* We don't want dynamic objects memory ordering and architecture to + have any role. That's what dynamic linker should do. */ + old_flags &= ~(EF_SPARCV9_MM|EF_SPARC_SUN_US1|EF_SPARC_HAL_R1); + old_flags |= (new_flags & (EF_SPARCV9_MM|EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)); + } else { + /* Choose the highest architecture requirements */ + old_flags |= (new_flags & (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)); + new_flags |= (old_flags & (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)); + if ((old_flags & (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)) == + (EF_SPARC_SUN_US1|EF_SPARC_HAL_R1)) + { + error = true; + (*_bfd_error_handler) + (_("%s: linking UltraSPARC specific with HAL specific code"), + bfd_get_filename (ibfd)); + } + /* Choose the most restrictive memory ordering */ + old_mm = (old_flags & EF_SPARCV9_MM); + new_mm = (new_flags & EF_SPARCV9_MM); + old_flags &= ~EF_SPARCV9_MM; + new_flags &= ~EF_SPARCV9_MM; + if (new_mm < old_mm) old_mm = new_mm; + old_flags |= old_mm; + new_flags |= old_mm; + } /* Warn about any other mismatches */ if (new_flags != old_flags) diff -upr --new-file binutils-2.9.5.0.24/bfd/elflink.c binutils-2.9.5.0.27/bfd/elflink.c --- binutils-2.9.5.0.24/bfd/elflink.c Thu Jan 13 11:35:41 2000 +++ binutils-2.9.5.0.27/bfd/elflink.c Fri Jan 28 08:33:07 2000 @@ -1,5 +1,5 @@ /* ELF linking support for BFD. - Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -231,7 +231,7 @@ _bfd_elf_link_record_dynamic_symbol (inf if (h->root.type == bfd_link_hash_undefined) { bfd * abfd = h->root.u.undef.abfd; - char * name = h->root.root.string; + const char * name = h->root.root.string; (*info->callbacks->undefined_symbol) (info, name, abfd, bfd_und_section_ptr, 0); diff -upr --new-file binutils-2.9.5.0.24/bfd/elflink.h binutils-2.9.5.0.27/bfd/elflink.h --- binutils-2.9.5.0.24/bfd/elflink.h Thu Jan 13 12:52:34 2000 +++ binutils-2.9.5.0.27/bfd/elflink.h Mon Feb 7 20:32:41 2000 @@ -2987,7 +2987,7 @@ NAME(bfd_elf,size_dynamic_sections) (out verdefs = asvinfo.verdefs; if (verdefs == NULL) - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); else { unsigned int cdefs; @@ -3163,7 +3163,7 @@ NAME(bfd_elf,size_dynamic_sections) (out (PTR) &sinfo); if (elf_tdata (output_bfd)->verref == NULL) - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); else { Elf_Internal_Verneed *t; @@ -3267,7 +3267,7 @@ NAME(bfd_elf,size_dynamic_sections) (out if (dynsymcount == 0 || (verdefs == NULL && elf_tdata (output_bfd)->verref == NULL)) { - _bfd_strip_section_from_output (s); + _bfd_strip_section_from_output (info, s); /* The DYNSYMCOUNT might have changed if we were going to output a dynamic symbol table entry for S. */ dynsymcount = _bfd_elf_link_renumber_dynsyms (output_bfd, info); diff -upr --new-file binutils-2.9.5.0.24/bfd/libbfd.c binutils-2.9.5.0.27/bfd/libbfd.c --- binutils-2.9.5.0.24/bfd/libbfd.c Fri Nov 19 09:42:50 1999 +++ binutils-2.9.5.0.27/bfd/libbfd.c Fri Jan 21 13:04:02 2000 @@ -274,7 +274,10 @@ bfd_read (ptr, size, nitems, abfd) get = size * nitems; if (abfd->where + get > bim->size) { - get = bim->size - abfd->where; + if (bim->size < abfd->where) + get = 0; + else + get = bim->size - abfd->where; bfd_set_error (bfd_error_file_truncated); } memcpy (ptr, bim->buffer + abfd->where, get); @@ -677,10 +680,22 @@ bfd_seek (abfd, position, direction) if ((abfd->flags & BFD_IN_MEMORY) != 0) { + struct bfd_in_memory *bim; + + bim = (struct bfd_in_memory *) abfd->iostream; + if (direction == SEEK_SET) abfd->where = position; else abfd->where += position; + + if (abfd->where > bim->size) + { + abfd->where = bim->size; + bfd_set_error (bfd_error_file_truncated); + return -1; + } + return 0; } diff -upr --new-file binutils-2.9.5.0.24/bfd/linker.c binutils-2.9.5.0.27/bfd/linker.c --- binutils-2.9.5.0.24/bfd/linker.c Mon Jul 12 10:13:30 1999 +++ binutils-2.9.5.0.27/bfd/linker.c Mon Feb 7 20:32:41 2000 @@ -2524,7 +2524,9 @@ _bfd_generic_reloc_link_order (abfd, inf break; } ok = bfd_set_section_contents (abfd, sec, (PTR) buf, - (file_ptr) link_order->offset, size); + (file_ptr) + (link_order->offset * + bfd_octets_per_byte (abfd)), size); free (buf); if (! ok) return false; @@ -2592,7 +2594,9 @@ _bfd_default_link_order (abfd, info, sec case bfd_data_link_order: return bfd_set_section_contents (abfd, sec, (PTR) link_order->u.data.contents, - (file_ptr) link_order->offset, + (file_ptr) + (link_order->offset * + bfd_octets_per_byte (abfd)), link_order->size); } } @@ -2626,7 +2630,9 @@ default_fill_link_order (abfd, info, sec for (i = 1; i < size; i += 2) space[i] = fill; result = bfd_set_section_contents (abfd, sec, space, - (file_ptr) link_order->offset, + (file_ptr) + (link_order->offset * + bfd_octets_per_byte (abfd)), link_order->size); free (space); return result; @@ -2743,7 +2749,10 @@ default_indirect_link_order (output_bfd, /* Output the section contents. */ if (! bfd_set_section_contents (output_bfd, output_section, (PTR) new_contents, - link_order->offset, link_order->size)) + (file_ptr) + (link_order->offset * + bfd_octets_per_byte (output_bfd)), + link_order->size)) goto error_return; if (contents != NULL) diff -upr --new-file binutils-2.9.5.0.24/bfd/reloc.c binutils-2.9.5.0.27/bfd/reloc.c --- binutils-2.9.5.0.24/bfd/reloc.c Thu Dec 2 09:14:46 1999 +++ binutils-2.9.5.0.27/bfd/reloc.c Fri Jan 21 13:08:25 2000 @@ -592,7 +592,7 @@ bfd_perform_relocation (abfd, reloc_entr { bfd_vma relocation; bfd_reloc_status_type flag = bfd_reloc_ok; - bfd_size_type addr = reloc_entry->address; + bfd_size_type octets = reloc_entry->address * bfd_octets_per_byte (abfd); bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *reloc_target_output_section; @@ -628,7 +628,8 @@ bfd_perform_relocation (abfd, reloc_entr } /* Is the address of the relocation really within the section? */ - if (reloc_entry->address > input_section->_cooked_size) + if (reloc_entry->address > input_section->_cooked_size / + bfd_octets_per_byte (abfd)) return bfd_reloc_outofrange; /* Work out which section the relocation is targetted at and the @@ -897,41 +898,41 @@ space consuming. For each target: { case 0: { - char x = bfd_get_8 (abfd, (char *) data + addr); + char x = bfd_get_8 (abfd, (char *) data + octets); DOIT (x); - bfd_put_8 (abfd, x, (unsigned char *) data + addr); + bfd_put_8 (abfd, x, (unsigned char *) data + octets); } break; case 1: { - short x = bfd_get_16 (abfd, (bfd_byte *) data + addr); + short x = bfd_get_16 (abfd, (bfd_byte *) data + octets); DOIT (x); - bfd_put_16 (abfd, x, (unsigned char *) data + addr); + bfd_put_16 (abfd, x, (unsigned char *) data + octets); } break; case 2: { - long x = bfd_get_32 (abfd, (bfd_byte *) data + addr); + long x = bfd_get_32 (abfd, (bfd_byte *) data + octets); DOIT (x); - bfd_put_32 (abfd, x, (bfd_byte *) data + addr); + bfd_put_32 (abfd, x, (bfd_byte *) data + octets); } break; case -2: { - long x = bfd_get_32 (abfd, (bfd_byte *) data + addr); + long x = bfd_get_32 (abfd, (bfd_byte *) data + octets); relocation = -relocation; DOIT (x); - bfd_put_32 (abfd, x, (bfd_byte *) data + addr); + bfd_put_32 (abfd, x, (bfd_byte *) data + octets); } break; case -1: { - long x = bfd_get_16 (abfd, (bfd_byte *) data + addr); + long x = bfd_get_16 (abfd, (bfd_byte *) data + octets); relocation = -relocation; DOIT (x); - bfd_put_16 (abfd, x, (bfd_byte *) data + addr); + bfd_put_16 (abfd, x, (bfd_byte *) data + octets); } break; @@ -942,9 +943,9 @@ space consuming. For each target: case 4: #ifdef BFD64 { - bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + addr); + bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + octets); DOIT (x); - bfd_put_64 (abfd, x, (bfd_byte *) data + addr); + bfd_put_64 (abfd, x, (bfd_byte *) data + octets); } #else abort (); @@ -994,7 +995,7 @@ bfd_install_relocation (abfd, reloc_entr { bfd_vma relocation; bfd_reloc_status_type flag = bfd_reloc_ok; - bfd_size_type addr = reloc_entry->address; + bfd_size_type octets = reloc_entry->address * bfd_octets_per_byte (abfd); bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *reloc_target_output_section; @@ -1283,7 +1284,7 @@ space consuming. For each target: #define DOIT(x) \ x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) + relocation) & howto->dst_mask)) - data = (bfd_byte *) data_start + (addr - data_start_offset); + data = (bfd_byte *) data_start + (octets - data_start_offset); switch (howto->size) { diff -upr --new-file binutils-2.9.5.0.24/bfd/section.c binutils-2.9.5.0.27/bfd/section.c --- binutils-2.9.5.0.24/bfd/section.c Thu Sep 9 16:10:59 1999 +++ binutils-2.9.5.0.27/bfd/section.c Mon Feb 7 20:32:41 2000 @@ -369,22 +369,25 @@ CODE_FRAGMENT . . bfd_vma lma; . -. {* The size of the section in bytes, as it will be output. -. contains a value even if the section has no contents (e.g., the -. size of <<.bss>>). This will be filled in after relocation *} +. {* The size of the section in octets, as it will be output. +. Contains a value even if the section has no contents (e.g., the +. size of <<.bss>>). This will be filled in after relocation. *} . . bfd_size_type _cooked_size; . -. {* The original size on disk of the section, in bytes. Normally this +. {* The original size on disk of the section, in octets. Normally this . value is the same as the size, but if some relaxing has . been done, then this value will be bigger. *} . . bfd_size_type _raw_size; . . {* If this section is going to be output, then this value is the -. offset into the output section of the first byte in the input -. section. E.g., if this was going to start at the 100th byte in -. the output section, this value would be 100. *} +. offset in *bytes* into the output section of the first byte in the +. input section (byte ==> smallest addressable unit on the +. target). In most cases, if this was going to start at the +. 100th octet (8-bit quantity) in the output section, this value +. would be 100. However, if the target byte size is 16 bits +. (bfd_octets_per_byte is "2"), this value would be 50. *} . . bfd_vma output_offset; . @@ -920,7 +923,7 @@ DESCRIPTION Sets the contents of the section @var{section} in BFD @var{abfd} to the data starting in memory at @var{data}. The data is written to the output section starting at offset - @var{offset} for @var{count} bytes. + @var{offset} for @var{count} octets. @@ -1097,20 +1100,28 @@ FUNCTION SYNOPSIS void _bfd_strip_section_from_output - (asection *section); + (struct bfd_link_info *info, asection *section); DESCRIPTION - Remove @var{section} from the output. If the output section becomes - empty, remove it from the output bfd. + Remove @var{section} from the output. If the output section + becomes empty, remove it from the output bfd. @var{info} may + be NULL; if it is not, it is used to decide whether the output + section is empty. */ void -_bfd_strip_section_from_output (s) +_bfd_strip_section_from_output (info, s) + struct bfd_link_info *info; asection *s; { asection **spp, *os; struct bfd_link_order *p, *pp; + boolean keep_os; - /* Excise the input section from the link order. */ + /* Excise the input section from the link order. + + FIXME: For all calls that I can see to this function, the link + orders have not yet been set up. So why are we checking them? -- + Ian */ os = s->output_section; for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next) if (p->type == bfd_indirect_link_order @@ -1125,10 +1136,30 @@ _bfd_strip_section_from_output (s) break; } + keep_os = os->link_order_head != NULL; + + if (! keep_os && info != NULL) + { + bfd *abfd; + for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next) + { + asection *is; + for (is = abfd->sections; is != NULL; is = is->next) + { + if (is != s && is->output_section == os) + break; + } + if (is != NULL) + break; + } + if (abfd != NULL) + keep_os = true; + } + /* If the output section is empty, remove it too. Careful about sections that have been discarded in the link script -- they are mapped to bfd_abs_section, which has no owner. */ - if (!os->link_order_head && os->owner) + if (!keep_os && os->owner != NULL) { for (spp = &os->owner->sections; *spp; spp = &(*spp)->next) if (*spp == os) diff -upr --new-file binutils-2.9.5.0.24/bfd/srec.c binutils-2.9.5.0.27/bfd/srec.c --- binutils-2.9.5.0.24/bfd/srec.c Mon Jul 19 09:13:23 1999 +++ binutils-2.9.5.0.27/bfd/srec.c Thu Jan 20 19:06:21 2000 @@ -1000,31 +1000,28 @@ srec_write_section (abfd, tdata, list) tdata_type *tdata; srec_data_list_type *list; { - unsigned int bytes_written = 0; + unsigned int octets_written = 0; bfd_byte *location = list->data; - while (bytes_written < list->size) + while (octets_written < list->size) { bfd_vma address; + unsigned int octets_this_chunk = list->size - octets_written; - unsigned int bytes_this_chunk = list->size - bytes_written; + if (octets_this_chunk > CHUNK) + octets_this_chunk = CHUNK; - if (bytes_this_chunk > CHUNK) - { - bytes_this_chunk = CHUNK; - } - - address = list->where + bytes_written; + address = list->where + octets_written / bfd_octets_per_byte (abfd); if (! srec_write_record (abfd, tdata->type, address, location, - location + bytes_this_chunk)) + location + octets_this_chunk)) return false; - bytes_written += bytes_this_chunk; - location += bytes_this_chunk; + octets_written += octets_this_chunk; + location += octets_this_chunk; } return true; diff -upr --new-file binutils-2.9.5.0.24/bfd/syms.c binutils-2.9.5.0.27/bfd/syms.c --- binutils-2.9.5.0.24/bfd/syms.c Mon Sep 13 09:36:56 1999 +++ binutils-2.9.5.0.27/bfd/syms.c Fri Jan 28 08:33:15 2000 @@ -584,14 +584,28 @@ bfd_decode_symclass (symbol) if (bfd_is_und_section (symbol->section)) { if (symbol->flags & BSF_WEAK) - return 'w'; + { + /* If weak, determine if it's specifically an object + or non-object weak. */ + if (symbol->flags & BSF_OBJECT) + return 'v'; + else + return 'w'; + } else return 'U'; } if (bfd_is_ind_section (symbol->section)) return 'I'; if (symbol->flags & BSF_WEAK) - return 'W'; + { + /* If weak, determine if it's specifically an object + or non-object weak. */ + if (symbol->flags & BSF_OBJECT) + return 'V'; + else + return 'W'; + } if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL))) return '?'; @@ -617,6 +631,26 @@ bfd_decode_symclass (symbol) /* FUNCTION + bfd_is_undefined_symclass + +DESCRIPTION + Returns non-zero if the class symbol returned by + bfd_decode_symclass represents an undefined symbol. + Returns zero otherwise. + +SYNOPSIS + boolean bfd_is_undefined_symclass (int symclass); +*/ + +boolean +bfd_is_undefined_symclass (symclass) + int symclass; +{ + return symclass == 'U' || symclass == 'w' || symclass == 'v'; +} + +/* +FUNCTION bfd_symbol_info DESCRIPTION @@ -634,10 +668,12 @@ bfd_symbol_info (symbol, ret) symbol_info *ret; { ret->type = bfd_decode_symclass (symbol); - if (ret->type != 'U' && ret->type != 'w') - ret->value = symbol->value + symbol->section->vma; - else + + if (bfd_is_undefined_symclass (ret->type)) ret->value = 0; + else + ret->value = symbol->value + symbol->section->vma; + ret->name = symbol->name; } diff -upr --new-file binutils-2.9.5.0.24/bfd/trad-core.c binutils-2.9.5.0.27/bfd/trad-core.c --- binutils-2.9.5.0.24/bfd/trad-core.c Mon Jul 19 09:13:25 1999 +++ binutils-2.9.5.0.27/bfd/trad-core.c Fri Jan 28 08:33:16 2000 @@ -1,5 +1,5 @@ /* BFD back end for traditional Unix core files (U-area and raw sections) - Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 1999 + Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. Written by John Gilmore of Cygnus Support. @@ -202,7 +202,7 @@ trad_unix_core_file_p (abfd) 0 is at the place pointed to by u_ar0 (by setting the vma of the start of the section to -u_ar0). GDB uses this info to locate the regs, using minor trickery to get around the offset-or-absolute-addr problem. */ - core_regsec (abfd)->vma = 0 - (bfd_vma) u.u_ar0; + core_regsec (abfd)->vma = (asection *) (0 - (bfd_vma) u.u_ar0); core_datasec (abfd)->filepos = NBPG * UPAGES; core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize diff -upr --new-file binutils-2.9.5.0.24/binutils/ChangeLog binutils-2.9.5.0.27/binutils/ChangeLog --- binutils-2.9.5.0.24/binutils/ChangeLog Thu Jan 13 11:35:45 2000 +++ binutils-2.9.5.0.27/binutils/ChangeLog Thu Feb 3 15:24:39 2000 @@ -1,3 +1,52 @@ +2000-02-03 Timothy Wall + + * binutils/objdump.c (dump_section_header, find_symbol_for_address, + show_line, disassemble_bytes, disassemble_data, dump_data): + distinguish between octets and bytes. + +2000-01-27 Thomas de Lellis + + * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to + check to unresolved symbols. + (print_symbol_info_sysv): Ditto. + (print_symbol_info_posix): Ditto. + + * binutils.texi: Document new 'V' symclass flag for nm. + +2000-01-27 Nick Clifton + + * binutils.texi (objdump): Document new ARM specific + disassembler options. + + * objdump.c (usage): Call disassembler_usage(). + +2000-01-27 Alan Modra + + * readelf.c (get_dynamic_flags): Return buff. + (process_dynamic_segment): Don't pass error strings to printf + as format arg. + (read_and_display_attr): Use lx and ld to print longs. + (process_corefile_note_segment): Cast bfd_vma to unsigned long + before printing. + Update copyright. + +2000-01-17 Nick Clifton + + * readelf.c (get_osabi_name): Recognise ELFOSABI_ARM. + +2000-01-15 Alan Modra + + * debug.c (debug_name_type): Return DEBUG_TYPE_NULL rather than + false. + (debug_tag_type): Here too. + * ieee.c (ieee_builtin_type): And here. + * stabs.c (parse_stab_type, parse_stab_array_type): And here. + +2000-01-13 Nick Clifton + + * readelf.c (get_machine_name): Change EM_S370 to return "IBM + System/370". + 2000-01-11 Nick Clifton * readelf.c (get_dynamic_type): Remove DT_ENCODING. diff -upr --new-file binutils-2.9.5.0.24/binutils/binutils.texi binutils-2.9.5.0.27/binutils/binutils.texi --- binutils-2.9.5.0.24/binutils/binutils.texi Thu Jan 13 11:35:46 2000 +++ binutils-2.9.5.0.27/binutils/binutils.texi Fri Jan 28 08:33:21 2000 @@ -700,11 +700,18 @@ The symbol is in the text (code) section @item U The symbol is undefined. +@item V +The symbol is a weak object. When a weak defined symbol is linked with +a normal defined symbol, the normal defined symbol is used with no error. +When a weak undefined symbol is linked and the symbol is not defined, +the value of the weak symbol becomes zero with no error. + @item W -The symbol is weak. When a weak defined symbol is linked with a normal -defined symbol, the normal defined symbol is used with no error. When a -weak undefined symbol is linked and the symbol is not defined, the value -of the weak symbol becomes zero with no error. +The symbol is a weak symbol that has not been specifically tagged as a +weak object symbol. When a weak defined symbol is linked with a normal +defined symbol, the normal defined symbol is used with no error. +When a weak undefined symbol is linked and the symbol is not defined, +the value of the weak symbol becomes zero with no error. @item - The symbol is a stabs symbol in an a.out object file. In this case, the @@ -1346,13 +1353,17 @@ some targets. If the target is an ARM architecture then this switch can be used to select which register name set is used during disassembler. Specifying -@samp{--disassembler-options=reg-name-std} (the default) will select the -register names as used in ARM's instruction set documentation, but with -register 13 called 'sp', register 14 called 'lr' and register 15 called -'pc'. Specifying @samp{--disassembler-options=reg-names-apcs} will -select the name set used by the ARM Procedure Call Standard, whilst -specifying @samp{--disassembler-options=reg-names-raw} will just use -@samp{r} followed by the register number. +@samp{-M reg-name-std} (the default) will select the register names as +used in ARM's instruction set documentation, but with register 13 called +'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying +@samp{-M reg-names-apcs} will select the name set used by the ARM +Procedure Call Standard, whilst specifying @samp{-M reg-names-raw} will +just use @samp{r} followed by the register number. + +There are also two variants on the APCS register naming scheme enabled +by @samp{-M reg-names-atpcs} and @samp{-M reg-names-atpcs-special} which +use the ARM/Thumb Procedure Call Standard naming conventions. (Eiuther +with the normal register name sor the special register names). This option can also be used for ARM architectures to force the disassembler to interpret all instructions as THUMB instructions by diff -upr --new-file binutils-2.9.5.0.24/binutils/debug.c binutils-2.9.5.0.27/binutils/debug.c --- binutils-2.9.5.0.24/binutils/debug.c Mon Jul 12 10:13:37 1999 +++ binutils-2.9.5.0.27/binutils/debug.c Thu Jan 20 19:06:29 2000 @@ -1988,7 +1988,7 @@ debug_name_type (handle, name, type) nm = debug_add_to_namespace (info, &info->current_file->globals, name, DEBUG_OBJECT_TYPE, DEBUG_LINKAGE_NONE); if (nm == NULL) - return false; + return DEBUG_TYPE_NULL; nm->u.type = t; @@ -2044,7 +2044,7 @@ debug_tag_type (handle, name, type) nm = debug_add_to_namespace (info, &info->current_file->globals, name, DEBUG_OBJECT_TAG, DEBUG_LINKAGE_NONE); if (nm == NULL) - return false; + return DEBUG_TYPE_NULL; nm->u.tag = t; diff -upr --new-file binutils-2.9.5.0.24/binutils/dlltool.c binutils-2.9.5.0.27/binutils/dlltool.c --- binutils-2.9.5.0.24/binutils/dlltool.c Thu Jan 13 11:35:46 2000 +++ binutils-2.9.5.0.27/binutils/dlltool.c Fri Jan 21 11:32:14 2000 @@ -454,16 +454,20 @@ static const unsigned char thumb_jtab[] static const unsigned char mcore_be_jtab[] = { - 0x70, 0x01, /* jmpi 1 */ - 0x12, 0x11, /* nop */ - 0x00, 0x00, 0x00, 0x00 /*
*/ + 0x71, 0x02, /* lrw r1,2 */ + 0x81, 0x01, /* ld.w r1,(r1,0) */ + 0x00, 0xC1, /* jmp r1 */ + 0x12, 0x00, /* nop */ + 0x00, 0x00, 0x00, 0x00 /*
*/ }; static const unsigned char mcore_le_jtab[] = { - 0x01, 0x70, /* jmpi 1 */ - 0x11, 0x12, /* nop */ - 0x00, 0x00, 0x00, 0x00 /*
*/ + 0x02, 0x71, /* lrw r1,2 */ + 0x01, 0x81, /* ld.w r1,(r1,0) */ + 0xC1, 0x00, /* jmp r1 */ + 0x00, 0x12, /* nop */ + 0x00, 0x00, 0x00, 0x00 /*
*/ }; /* This is the glue sequence for PowerPC PE. There is a */ @@ -558,37 +562,37 @@ mtable[] = { #define MMCORE_BE 5 "mcore-be", ".byte", ".short", ".long", ".asciz", "//", - "jmpi\t1\n\tnop\n\t.long", + "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long", ".global", ".space", ".align\t2",".align\t4", "", "pe-mcore-big", bfd_arch_mcore, - mcore_be_jtab, sizeof (mcore_be_jtab), 4 + mcore_be_jtab, sizeof (mcore_be_jtab), 8 } , { #define MMCORE_LE 6 "mcore-le", ".byte", ".short", ".long", ".asciz", "//", - "jmpi\t1\n\tnop\n\t.long", + "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long", ".global", ".space", ".align\t2",".align\t4", "-EL", "pe-mcore-little", bfd_arch_mcore, - mcore_le_jtab, sizeof (mcore_le_jtab), 4 + mcore_le_jtab, sizeof (mcore_le_jtab), 8 } , { #define MMCORE_ELF 7 "mcore-elf-be", ".byte", ".short", ".long", ".asciz", "//", - "jmpi\t1\n\tnop\n\t.long", + "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long", ".global", ".space", ".align\t2",".align\t4", "", "elf32-mcore-big", bfd_arch_mcore, - mcore_be_jtab, sizeof (mcore_be_jtab), 4 + mcore_be_jtab, sizeof (mcore_be_jtab), 8 } , { #define MMCORE_ELF_LE 8 "mcore-elf-le", ".byte", ".short", ".long", ".asciz", "//", - "jmpi\t1\n\tnop\n\t.long", + "lrw r1,[1f]\n\tld.w r1,(r1,0)\n\tjmp r1\n\tnop\n1:.long", ".global", ".space", ".align\t2",".align\t4", "-EL", "elf32-mcore-little", bfd_arch_mcore, - mcore_le_jtab, sizeof (mcore_le_jtab), 4 + mcore_le_jtab, sizeof (mcore_le_jtab), 8 } , { diff -upr --new-file binutils-2.9.5.0.24/binutils/ieee.c binutils-2.9.5.0.27/binutils/ieee.c --- binutils-2.9.5.0.24/binutils/ieee.c Mon Jul 12 10:13:38 1999 +++ binutils-2.9.5.0.27/binutils/ieee.c Thu Jan 20 19:06:30 2000 @@ -779,7 +779,7 @@ ieee_builtin_type (info, p, indx) case builtin_bcd_float: ieee_error (info, p, _("BCD float type not supported")); - return false; + return DEBUG_TYPE_NULL; } if (name != NULL) diff -upr --new-file binutils-2.9.5.0.24/binutils/nm.c binutils-2.9.5.0.27/binutils/nm.c --- binutils-2.9.5.0.24/binutils/nm.c Sun Oct 10 12:22:23 1999 +++ binutils-2.9.5.0.27/binutils/nm.c Fri Jan 28 09:10:50 2000 @@ -1447,7 +1447,7 @@ print_symbol_info_bsd (info, abfd) symbol_info *info; bfd *abfd; { - if (info->type == 'U' || info->type == 'w') + if (bfd_is_undefined_symclass (info->type)) { printf ("%*s", #ifdef BFD64 @@ -1478,7 +1478,7 @@ print_symbol_info_sysv (info, abfd) bfd *abfd; { print_symname ("%-20s|", info->name, abfd); /* Name */ - if (info->type == 'U' || info->type == 'w') + if (bfd_is_undefined_symclass (info->type)) printf (" "); /* Value */ else print_value (info->value); @@ -1501,7 +1501,7 @@ print_symbol_info_posix (info, abfd) { print_symname ("%s ", info->name, abfd); printf ("%c ", info->type); - if (info->type == 'U' || info->type == 'w') + if (bfd_is_undefined_symclass (info->type)) printf (" "); else print_value (info->value); diff -upr --new-file binutils-2.9.5.0.24/binutils/objdump.c binutils-2.9.5.0.27/binutils/objdump.c --- binutils-2.9.5.0.24/binutils/objdump.c Mon Nov 22 10:00:41 1999 +++ binutils-2.9.5.0.27/binutils/objdump.c Thu Feb 3 15:29:51 2000 @@ -273,6 +273,8 @@ usage (stream, status) Set demangling style\n\ \n")); list_supported_targets (program_name, stream); + + disassembler_usage (stream); } if (status == 0) binutils_bug_report (stream); @@ -344,10 +346,11 @@ dump_section_header (abfd, section, igno PTR ignored ATTRIBUTE_UNUSED; { char *comma = ""; + int opb = bfd_octets_per_byte (abfd); printf ("%3d %-13s %08lx ", section->index, bfd_get_section_name (abfd, section), - (unsigned long) bfd_section_size (abfd, section)); + (unsigned long) bfd_section_size (abfd, section) / opb); printf_vma (bfd_get_section_vma (abfd, section)); printf (" "); printf_vma (section->lma); @@ -746,6 +749,7 @@ find_symbol_for_address (abfd, sec, vma, long min = 0; long max = sorted_symcount; long thisplace; + int opb = bfd_octets_per_byte (abfd); if (sorted_symcount < 1) return NULL; @@ -793,7 +797,7 @@ find_symbol_for_address (abfd, sec, vma, || ((abfd->flags & HAS_RELOC) != 0 && vma >= bfd_get_section_vma (abfd, sec) && vma < (bfd_get_section_vma (abfd, sec) - + bfd_section_size (abfd, sec))))) + + bfd_section_size (abfd, sec) / opb)))) { long i; @@ -1017,10 +1021,10 @@ skip_to_line (p, line, show) listing. */ static void -show_line (abfd, section, off) +show_line (abfd, section, addr_offset) bfd *abfd; asection *section; - bfd_vma off; + bfd_vma addr_offset; { CONST char *filename; CONST char *functionname; @@ -1029,7 +1033,7 @@ show_line (abfd, section, off) if (! with_line_numbers && ! with_source_code) return; - if (! bfd_find_nearest_line (abfd, section, syms, off, &filename, + if (! bfd_find_nearest_line (abfd, section, syms, addr_offset, &filename, &functionname, &line)) return; @@ -1238,31 +1242,33 @@ objdump_sprintf (va_alist) /* Disassemble some data in memory between given values. */ static void -disassemble_bytes (info, disassemble_fn, insns, data, start, stop, relppp, +disassemble_bytes (info, disassemble_fn, insns, data, + start_offset, stop_offset, relppp, relppend) struct disassemble_info *info; disassembler_ftype disassemble_fn; boolean insns; bfd_byte *data; - bfd_vma start; - bfd_vma stop; + bfd_vma start_offset; + bfd_vma stop_offset; arelent ***relppp; arelent **relppend; { struct objdump_disasm_info *aux; asection *section; - int bytes_per_line; + int octets_per_line; boolean done_dot; int skip_addr_chars; - bfd_vma i; + bfd_vma addr_offset; + int opb = info->octets_per_byte; aux = (struct objdump_disasm_info *) info->application_data; section = aux->sec; if (insns) - bytes_per_line = 4; + octets_per_line = 4; else - bytes_per_line = 16; + octets_per_line = 16; /* Figure out how many characters to skip at the start of an address, to make the disassembly look nicer. We discard leading @@ -1274,8 +1280,8 @@ disassemble_bytes (info, disassemble_fn, char buf[30]; char *s; - sprintf_vma (buf, - section->vma + bfd_section_size (section->owner, section)); + sprintf_vma (buf, section->vma + + bfd_section_size (section->owner, section) / opb); s = buf; while (s[0] == '0' && s[1] == '0' && s[2] == '0' && s[3] == '0' && s[4] == '0') @@ -1288,34 +1294,35 @@ disassemble_bytes (info, disassemble_fn, info->insn_info_valid = 0; done_dot = false; - i = start; - while (i < stop) + addr_offset = start_offset; + while (addr_offset < stop_offset) { bfd_vma z; - int bytes = 0; + int octets = 0; boolean need_nl = false; - /* If we see more than SKIP_ZEROES bytes of zeroes, we just + /* If we see more than SKIP_ZEROES octets of zeroes, we just print `...'. */ - for (z = i; z < stop; z++) + for (z = addr_offset * opb; z < stop_offset * opb; z++) if (data[z] != 0) break; if (! disassemble_zeroes && (info->insn_info_valid == 0 || info->branch_delay_insns == 0) - && (z - i >= SKIP_ZEROES - || (z == stop && z - i < SKIP_ZEROES_AT_END))) + && (z - addr_offset * opb >= SKIP_ZEROES + || (z == stop_offset * opb && + z - addr_offset * opb < SKIP_ZEROES_AT_END))) { printf ("\t...\n"); - /* If there are more nonzero bytes to follow, we only skip + /* If there are more nonzero octets to follow, we only skip zeroes in multiples of 4, to try to avoid running over the start of an instruction which happens to start with zero. */ - if (z != stop) - z = i + ((z - i) &~ 3); + if (z != stop_offset * opb) + z = addr_offset * opb + ((z - addr_offset * opb) &~ 3); - bytes = z - i; + octets = z - addr_offset * opb; } else { @@ -1327,13 +1334,13 @@ disassemble_bytes (info, disassemble_fn, done_dot = false; if (with_line_numbers || with_source_code) - show_line (aux->abfd, section, i); + show_line (aux->abfd, section, addr_offset); if (! prefix_addresses) { char *s; - sprintf_vma (buf, section->vma + i); + sprintf_vma (buf, section->vma + addr_offset); for (s = buf + skip_addr_chars; *s == '0'; s++) *s = ' '; if (*s == '\0') @@ -1343,7 +1350,7 @@ disassemble_bytes (info, disassemble_fn, else { aux->require_sec = true; - objdump_print_address (section->vma + i, info); + objdump_print_address (section->vma + addr_offset, info); aux->require_sec = false; putchar (' '); } @@ -1358,21 +1365,21 @@ disassemble_bytes (info, disassemble_fn, info->bytes_per_line = 0; info->bytes_per_chunk = 0; - /* FIXME: This is wrong. It tests the number of bytes + /* FIXME: This is wrong. It tests the number of octets in the last instruction, not the current one. */ if (*relppp < relppend - && (**relppp)->address >= i - && (**relppp)->address < i + bytes) + && (**relppp)->address >= addr_offset + && (**relppp)->address < addr_offset + octets / opb) info->flags = INSN_HAS_RELOC; else info->flags = 0; - bytes = (*disassemble_fn) (section->vma + i, info); + octets = (*disassemble_fn) (section->vma + addr_offset, info); info->fprintf_func = (fprintf_ftype) fprintf; info->stream = stdout; if (info->bytes_per_line != 0) - bytes_per_line = info->bytes_per_line; - if (bytes < 0) + octets_per_line = info->bytes_per_line; + if (octets < 0) { if (sfile.current != sfile.buffer) printf ("%s\n", sfile.buffer); @@ -1384,18 +1391,18 @@ disassemble_bytes (info, disassemble_fn, { bfd_vma j; - bytes = bytes_per_line; - if (i + bytes > stop) - bytes = stop - i; + octets = octets_per_line; + if (addr_offset + octets / opb > stop_offset) + octets = (stop_offset - addr_offset) * opb; - for (j = i; j < i + bytes; ++j) + for (j = addr_offset * opb; j < addr_offset * opb + octets; ++j) { if (isprint (data[j])) - buf[j - i] = data[j]; + buf[j - addr_offset * opb] = data[j]; else - buf[j - i] = '.'; + buf[j - addr_offset * opb] = '.'; } - buf[j - i] = '\0'; + buf[j - addr_offset * opb] = '\0'; } if (prefix_addresses @@ -1405,17 +1412,17 @@ disassemble_bytes (info, disassemble_fn, bfd_vma j; /* If ! prefix_addresses and ! wide_output, we print - bytes_per_line bytes per line. */ - pb = bytes; - if (pb > bytes_per_line && ! prefix_addresses && ! wide_output) - pb = bytes_per_line; + octets_per_line octets per line. */ + pb = octets; + if (pb > octets_per_line && ! prefix_addresses && ! wide_output) + pb = octets_per_line; if (info->bytes_per_chunk) bpc = info->bytes_per_chunk; else bpc = 1; - for (j = i; j < i + pb; j += bpc) + for (j = addr_offset * opb; j < addr_offset * opb + pb; j += bpc) { int k; if (bpc > 1 && info->display_endian == BFD_ENDIAN_LITTLE) @@ -1432,7 +1439,7 @@ disassemble_bytes (info, disassemble_fn, } } - for (; pb < bytes_per_line; pb += bpc) + for (; pb < octets_per_line; pb += bpc) { int k; @@ -1460,25 +1467,25 @@ disassemble_bytes (info, disassemble_fn, ? show_raw_insn > 0 : show_raw_insn >= 0) { - while (pb < bytes) + while (pb < octets) { bfd_vma j; char *s; putchar ('\n'); - j = i + pb; + j = addr_offset * opb + pb; - sprintf_vma (buf, section->vma + j); + sprintf_vma (buf, section->vma + j / opb); for (s = buf + skip_addr_chars; *s == '0'; s++) *s = ' '; if (*s == '\0') *--s = '0'; printf ("%s:\t", buf + skip_addr_chars); - pb += bytes_per_line; - if (pb > bytes) - pb = bytes; - for (; j < i + pb; j += bpc) + pb += octets_per_line; + if (pb > octets) + pb = octets; + for (; j < addr_offset * opb + pb; j += bpc) { int k; @@ -1508,8 +1515,8 @@ disassemble_bytes (info, disassemble_fn, && (section->flags & SEC_RELOC) != 0) { while ((*relppp) < relppend - && ((**relppp)->address >= (bfd_vma) i - && (**relppp)->address < (bfd_vma) i + bytes)) + && ((**relppp)->address >= (bfd_vma) addr_offset + && (**relppp)->address < (bfd_vma) addr_offset + octets / opb)) { arelent *q; @@ -1560,7 +1567,7 @@ disassemble_bytes (info, disassemble_fn, if (need_nl) printf ("\n"); - i += bytes; + addr_offset += octets / opb; } } @@ -1570,11 +1577,12 @@ static void disassemble_data (abfd) bfd *abfd; { - long i; + long addr_offset; disassembler_ftype disassemble_fn; struct disassemble_info disasm_info; struct objdump_disasm_info aux; asection *section; + int opb = bfd_octets_per_byte (abfd); print_files = NULL; prev_functionname = NULL; @@ -1596,6 +1604,7 @@ disassemble_data (abfd) aux.require_sec = false; disasm_info.print_address_func = objdump_print_address; disasm_info.symbol_at_address_func = objdump_symbol_at_address; + disasm_info.octets_per_byte = opb; if (machine != (char *) NULL) { @@ -1653,7 +1662,7 @@ disassemble_data (abfd) arelent **relbuf = NULL; arelent **relpp = NULL; arelent **relppend = NULL; - long stop; + long stop_offset; asymbol *sym = NULL; long place = 0; @@ -1716,37 +1725,37 @@ disassemble_data (abfd) disasm_info.buffer_length = datasize; if (start_address == (bfd_vma) -1 || start_address < disasm_info.buffer_vma) - i = 0; + addr_offset = 0; else - i = start_address - disasm_info.buffer_vma; + addr_offset = start_address - disasm_info.buffer_vma; if (stop_address == (bfd_vma) -1) - stop = datasize; + stop_offset = datasize / opb; else { if (stop_address < disasm_info.buffer_vma) - stop = 0; + stop_offset = 0; else - stop = stop_address - disasm_info.buffer_vma; - if (stop > disasm_info.buffer_length) - stop = disasm_info.buffer_length; + stop_offset = stop_address - disasm_info.buffer_vma; + if (stop_offset > disasm_info.buffer_length / opb) + stop_offset = disasm_info.buffer_length / opb; } - sym = find_symbol_for_address (abfd, section, section->vma + i, + sym = find_symbol_for_address (abfd, section, section->vma + addr_offset, true, &place); - while (i < stop) + while (addr_offset < stop_offset) { asymbol *nextsym; - long nextstop; + long nextstop_offset; boolean insns; - if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + i) + if (sym != NULL && bfd_asymbol_value (sym) <= section->vma + addr_offset) { int x; for (x = place; (x < sorted_symcount - && bfd_asymbol_value (sorted_syms[x]) <= section->vma + i); + && bfd_asymbol_value (sorted_syms[x]) <= section->vma + addr_offset); ++x) continue; disasm_info.symbols = & sorted_syms[place]; @@ -1759,13 +1768,13 @@ disassemble_data (abfd) { printf ("\n"); objdump_print_addr_with_sym (abfd, section, sym, - section->vma + i, + section->vma + addr_offset, &disasm_info, false); printf (":\n"); } - if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i) + if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset) nextsym = sym; else if (sym == NULL) nextsym = NULL; @@ -1786,19 +1795,19 @@ disassemble_data (abfd) nextsym = sorted_syms[place]; } - if (sym != NULL && bfd_asymbol_value (sym) > section->vma + i) + if (sym != NULL && bfd_asymbol_value (sym) > section->vma + addr_offset) { - nextstop = bfd_asymbol_value (sym) - section->vma; - if (nextstop > stop) - nextstop = stop; + nextstop_offset = bfd_asymbol_value (sym) - section->vma; + if (nextstop_offset > stop_offset) + nextstop_offset = stop_offset; } else if (nextsym == NULL) - nextstop = stop; + nextstop_offset = stop_offset; else { - nextstop = bfd_asymbol_value (nextsym) - section->vma; - if (nextstop > stop) - nextstop = stop; + nextstop_offset = bfd_asymbol_value (nextsym) - section->vma; + if (nextstop_offset > stop_offset) + nextstop_offset = stop_offset; } /* If a symbol is explicitly marked as being an object @@ -1806,7 +1815,7 @@ disassemble_data (abfd) disassembling them. */ if (disassemble_all || sym == NULL - || bfd_asymbol_value (sym) > section->vma + i + || bfd_asymbol_value (sym) > section->vma + addr_offset || ((sym->flags & BSF_OBJECT) == 0 && (strstr (bfd_asymbol_name (sym), "gnu_compiled") == NULL) @@ -1817,10 +1826,10 @@ disassemble_data (abfd) else insns = false; - disassemble_bytes (&disasm_info, disassemble_fn, insns, data, i, - nextstop, &relpp, relppend); + disassemble_bytes (&disasm_info, disassemble_fn, insns, data, + addr_offset, nextstop_offset, &relpp, relppend); - i = nextstop; + addr_offset = nextstop_offset; sym = nextsym; } @@ -2256,8 +2265,9 @@ dump_data (abfd) asection *section; bfd_byte *data = 0; bfd_size_type datasize = 0; - bfd_size_type i; - bfd_size_type start, stop; + bfd_size_type addr_offset; + bfd_size_type start_offset, stop_offset; + int opb = bfd_octets_per_byte (abfd); for (section = abfd->sections; section != NULL; section = section->next) @@ -2281,28 +2291,31 @@ dump_data (abfd) if (start_address == (bfd_vma) -1 || start_address < section->vma) - start = 0; + start_offset = 0; else - start = start_address - section->vma; + start_offset = start_address - section->vma; if (stop_address == (bfd_vma) -1) - stop = bfd_section_size (abfd, section); + stop_offset = bfd_section_size (abfd, section) / opb; else { if (stop_address < section->vma) - stop = 0; + stop_offset = 0; else - stop = stop_address - section->vma; - if (stop > bfd_section_size (abfd, section)) - stop = bfd_section_size (abfd, section); + stop_offset = stop_address - section->vma; + if (stop_offset > bfd_section_size (abfd, section) / opb) + stop_offset = bfd_section_size (abfd, section) / opb; } - for (i = start; i < stop; i += onaline) + for (addr_offset = start_offset; + addr_offset < stop_offset; addr_offset += onaline) { bfd_size_type j; - printf (" %04lx ", (unsigned long int) (i + section->vma)); - for (j = i; j < i + onaline; j++) + printf (" %04lx ", (unsigned long int) + (addr_offset + section->vma)); + for (j = addr_offset * opb; + j < addr_offset * opb + onaline; j++) { - if (j < stop) + if (j < stop_offset * opb) printf ("%02x", (unsigned) (data[j])); else printf (" "); @@ -2311,9 +2324,9 @@ dump_data (abfd) } printf (" "); - for (j = i; j < i + onaline; j++) + for (j = addr_offset; j < addr_offset * opb + onaline; j++) { - if (j >= stop) + if (j >= stop_offset * opb) printf (" "); else printf ("%c", isprint (data[j]) ? data[j] : '.'); diff -upr --new-file binutils-2.9.5.0.24/binutils/readelf.c binutils-2.9.5.0.27/binutils/readelf.c --- binutils-2.9.5.0.24/binutils/readelf.c Thu Jan 13 11:43:43 2000 +++ binutils-2.9.5.0.27/binutils/readelf.c Fri Jan 28 09:10:50 2000 @@ -1,5 +1,5 @@ /* readelf.c -- display contents of an ELF format file - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. Originally developed by Eric Youngdale Modifications by Nick Clifton @@ -1937,6 +1937,7 @@ get_osabi_name (osabi) case ELFOSABI_HPUX: return _("UNIX - HP-UX"); case ELFOSABI_LINUX: return _("UNIX - Linux"); case ELFOSABI_STANDALONE: return _("Standalone App"); + case ELFOSABI_ARM: return _("ARM"); default: sprintf (buff, _(""), osabi); return buff; @@ -3001,9 +3002,10 @@ get_dynamic_flags (flags) case DF_SYMBOLIC: strcat (buff, "SYMBOLIC "); break; case DF_TEXTREL: strcat (buff, "TEXTREL "); break; case DF_BIND_NOW: strcat (buff, "BIND_NOW "); break; - default: strcat (buff, "unknown "); return; + default: strcat (buff, "unknown "); break; } } + return buff; } /* Parse and display the contents of the dynamic segment. */ @@ -3180,7 +3182,7 @@ process_dynamic_segment (file) { case DT_FLAGS: if (do_dynamic) - printf (get_dynamic_flags (entry->d_un.d_val)); + printf ("%s", get_dynamic_flags (entry->d_un.d_val)); break; case DT_AUXILIARY: @@ -5967,7 +5969,7 @@ read_and_display_attr (attribute, form, case DW_FORM_ref_addr: case DW_FORM_addr: uvalue = byte_get (data, pointer_size); - printf (is_ref ? " <%x>" : " %#x", uvalue); + printf (is_ref ? " <%lx>" : " %#lx", uvalue); data += pointer_size; break; @@ -5975,21 +5977,21 @@ read_and_display_attr (attribute, form, case DW_FORM_flag: case DW_FORM_data1: uvalue = byte_get (data ++, 1); - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref2: case DW_FORM_data2: uvalue = byte_get (data, 2); data += 2; - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref4: case DW_FORM_data4: uvalue = byte_get (data, 4); data += 4; - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref8: @@ -6983,7 +6985,9 @@ process_corefile_note_segment (file, off external = pnotes; - printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), offset, length); + printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), + (unsigned long) offset, + (unsigned long) length); printf (_(" Owner\t\tData size\tDescription\n")); while (external < (Elf_External_Note *)((char *) pnotes + length)) diff -upr --new-file binutils-2.9.5.0.24/binutils/stabs.c binutils-2.9.5.0.27/binutils/stabs.c --- binutils-2.9.5.0.24/binutils/stabs.c Mon Jul 12 10:13:40 1999 +++ binutils-2.9.5.0.27/binutils/stabs.c Thu Jan 20 19:06:32 2000 @@ -1639,7 +1639,7 @@ parse_stab_type (dhandle, info, typename if (size != -1) { if (! debug_record_type_size (dhandle, dtype, (unsigned int) size)) - return false; + return DEBUG_TYPE_NULL; } return dtype; @@ -3131,7 +3131,7 @@ parse_stab_array_type (dhandle, info, pp /* If the index type is type 0, we take it as int. */ p = *pp; if (! parse_stab_type_number (&p, typenums)) - return false; + return DEBUG_TYPE_NULL; if (typenums[0] == 0 && typenums[1] == 0 && **pp != '=') { index_type = debug_find_named_type (dhandle, "int"); @@ -3139,7 +3139,7 @@ parse_stab_array_type (dhandle, info, pp { index_type = debug_make_int_type (dhandle, 4, false); if (index_type == DEBUG_TYPE_NULL) - return false; + return DEBUG_TYPE_NULL; } *pp = p; } @@ -3168,7 +3168,7 @@ parse_stab_array_type (dhandle, info, pp if (**pp != ';') { bad_stab (orig); - return false; + return DEBUG_TYPE_NULL; } ++*pp; @@ -3182,14 +3182,14 @@ parse_stab_array_type (dhandle, info, pp if (**pp != ';') { bad_stab (orig); - return false; + return DEBUG_TYPE_NULL; } ++*pp; element_type = parse_stab_type (dhandle, info, (const char *) NULL, pp, (debug_type **) NULL); if (element_type == DEBUG_TYPE_NULL) - return false; + return DEBUG_TYPE_NULL; if (adjustable) { diff -upr --new-file binutils-2.9.5.0.24/binutils.spec binutils-2.9.5.0.27/binutils.spec --- binutils-2.9.5.0.24/binutils.spec Thu Jan 13 13:48:58 2000 +++ binutils-2.9.5.0.27/binutils.spec Mon Feb 7 20:35:34 2000 @@ -1,19 +1,27 @@ Summary: GNU Binary Utility Development Utilities Name: binutils -Version: 2.9.5.0.24 +Version: 2.9.5.0.27 Release: 1 Copyright: GPL Group: Development/Tools +URL: http://sourceware.cygnus.com/binutils Source: ftp://ftp.valinux.com/pub/support/hjl/binutils/binutils-%{version}.tar.gz Buildroot: /var/tmp/binutils-root -Summary(de): GNU Binary Utility Development Utilities -Summary(fr): Utilitaires de développement binaire de GNU -Summary(tr): GNU geliþtirme araçlarý %description -Binutils is a collection of utilities necessary for compiling programs. It -includes the assembler and linker, as well as a number of other -miscellaneous programs for dealing with executable formats. +Binutils is a collection of binary utilities, including ar (for creating, +modifying and extracting from archives), nm (for listing symbols from +object files), objcopy (for copying and translating object files), +objdump (for displaying information from object files), ranlib (for +generating an index for the contents of an archive), size (for listing +the section sizes of an object or archive file), strings (for listing +printable strings from files), strip (for discarding symbols), c++filt +(a filter for demangling encoded C++ symbols), addr2line (for converting +addresses to file and line), and nlmconv (for converting object code into +an NLM). + +Install binutils if you need to perform any of these types of actions on +binary files. Most programmers will want to install binutils. %prep %setup -q @@ -22,12 +30,15 @@ miscellaneous programs for dealing with NumCPUs=`grep -i BogoMIPS /proc/cpuinfo | wc -l | xargs expr` echo "MAKE=make -j $NumCPUs" > makefile echo "include Makefile" >> makefile -./configure --prefix=/usr --enable-shared -%ifarch ppc - sed -e "s!LIB_PATH =!export LIB_PATH = /lib:/usr/lib:/usr/local/lib!" \ - < ld/Makefile >ld/Makefile.tmp - mv -f ld/Makefile.tmp ld/Makefile +ADDITIONAL_TARGETS="" +%ifarch i386 +ADDITIONAL_TARGETS="--enable-targets=i386-linuxaout,i386-coff" +%else +%ifarch sparc +ADDITIONAL_TARGETS="--enable-targets=sparc64-linux" +%endif %endif +./configure --prefix=/usr --enable-shared $ADDITIONAL_TARGETS make tooldir=/usr all info %install @@ -37,13 +48,15 @@ make prefix=$RPM_BUILD_ROOT/usr tooldir= ./binutils/strip-new $RPM_BUILD_ROOT/usr/bin/* gzip -q9f $RPM_BUILD_ROOT/usr/info/*.info* -## Get rid of that arch-specific directory -#rm -rf $RPM_BUILD_ROOT/usr/lib/bin - #install -m 644 libiberty/libiberty.a $RPM_BUILD_ROOT/usr/lib install -m 644 include/libiberty.h $RPM_BUILD_ROOT/usr/include chmod +x $RPM_BUILD_ROOT/usr/lib/lib*.so* + +# This one comes from egcs +# Use the one in binutils since it is more recent than the one +# in egcs. +#rm -f $RPM_BUILD_ROOT/usr/bin/c++filt %clean rm -rf $RPM_BUILD_ROOT diff -upr --new-file binutils-2.9.5.0.24/binutils.spec.in binutils-2.9.5.0.27/binutils.spec.in --- binutils-2.9.5.0.24/binutils.spec.in Thu Jan 13 13:45:47 2000 +++ binutils-2.9.5.0.27/binutils.spec.in Wed Feb 2 10:55:07 2000 @@ -4,16 +4,24 @@ Version: @VERSION@ Release: 1 Copyright: GPL Group: Development/Tools +URL: http://sourceware.cygnus.com/binutils Source: ftp://ftp.valinux.com/pub/support/hjl/binutils/binutils-%{version}.tar.gz Buildroot: /var/tmp/binutils-root -Summary(de): GNU Binary Utility Development Utilities -Summary(fr): Utilitaires de développement binaire de GNU -Summary(tr): GNU geliþtirme araçlarý %description -Binutils is a collection of utilities necessary for compiling programs. It -includes the assembler and linker, as well as a number of other -miscellaneous programs for dealing with executable formats. +Binutils is a collection of binary utilities, including ar (for creating, +modifying and extracting from archives), nm (for listing symbols from +object files), objcopy (for copying and translating object files), +objdump (for displaying information from object files), ranlib (for +generating an index for the contents of an archive), size (for listing +the section sizes of an object or archive file), strings (for listing +printable strings from files), strip (for discarding symbols), c++filt +(a filter for demangling encoded C++ symbols), addr2line (for converting +addresses to file and line), and nlmconv (for converting object code into +an NLM). + +Install binutils if you need to perform any of these types of actions on +binary files. Most programmers will want to install binutils. %prep %setup -q @@ -22,12 +30,15 @@ miscellaneous programs for dealing with NumCPUs=`grep -i BogoMIPS /proc/cpuinfo | wc -l | xargs expr` echo "MAKE=make -j $NumCPUs" > makefile echo "include Makefile" >> makefile -./configure --prefix=/usr --enable-shared -%ifarch ppc - sed -e "s!LIB_PATH =!export LIB_PATH = /lib:/usr/lib:/usr/local/lib!" \ - < ld/Makefile >ld/Makefile.tmp - mv -f ld/Makefile.tmp ld/Makefile +ADDITIONAL_TARGETS="" +%ifarch i386 +ADDITIONAL_TARGETS="--enable-targets=i386-linuxaout,i386-coff" +%else +%ifarch sparc +ADDITIONAL_TARGETS="--enable-targets=sparc64-linux" +%endif %endif +./configure --prefix=/usr --enable-shared $ADDITIONAL_TARGETS make tooldir=/usr all info %install @@ -37,13 +48,15 @@ make prefix=$RPM_BUILD_ROOT/usr tooldir= ./binutils/strip-new $RPM_BUILD_ROOT/usr/bin/* gzip -q9f $RPM_BUILD_ROOT/usr/info/*.info* -## Get rid of that arch-specific directory -#rm -rf $RPM_BUILD_ROOT/usr/lib/bin - #install -m 644 libiberty/libiberty.a $RPM_BUILD_ROOT/usr/lib install -m 644 include/libiberty.h $RPM_BUILD_ROOT/usr/include chmod +x $RPM_BUILD_ROOT/usr/lib/lib*.so* + +# This one comes from egcs +# Use the one in binutils since it is more recent than the one +# in egcs. +#rm -f $RPM_BUILD_ROOT/usr/bin/c++filt %clean rm -rf $RPM_BUILD_ROOT diff -upr --new-file binutils-2.9.5.0.24/gas/ChangeLog binutils-2.9.5.0.27/gas/ChangeLog --- binutils-2.9.5.0.24/gas/ChangeLog Thu Jan 13 11:35:52 2000 +++ binutils-2.9.5.0.27/gas/ChangeLog Thu Feb 3 15:24:43 2000 @@ -1,3 +1,210 @@ +2000-02-03 Timothy Wall + + * as.h: Define OCTETS_PER_BYTE and OCTETS_PER_BYTE_POWER + default values. + * frags.c (frag_new): Calculate fr_fix in octets + (frag_now_fix) Return offset as target address offset (bytes). + (frag_now_fix_octets) New - Return offset in octets (8-bit + quantities). + * frags.h: Added prototype for frag_now_fix_octets(). + Distinguish between octets and bytes in field descriptions. + * listing.c (calc_hex): Account for octets vs bytes when + printing addresses/offsets. + (print_lines) Ditto. Also, if LISTING_WORD_SIZE is not 1, and + target is little-endian, print the octets in a word in big-endian + order so that the display looks like a proper hexadecimal number, + instead of having the octets reversed. + * read.c (do_align): When recording alignment, alignment power + should be in terms of target bytes (minimum addressible unit) + instead of octets. + (do_org) Convert ORG target address (byte) argument into an + octet offset when generating a variable fragment. + * symbols.c (resolve_symbol_value): Symbol final value + converted to a target address offset (bytes) from its octet offset. + * config/obj-coff.c (coff_frob_symbol): Symbol target address + offset (bytes) is adjusted by the frag offset (octets) converted + to bytes. + (coff_frob_section) Section alignment power is in terms of bytes; + convert it to an octet alignment power when calculating size (and + size mask) in octets. Don't modify the section size in order to + "align" it for TI COFF, since that format has a different method + for storing alignment information. + +2000-02-01 Timothy Wall + + * stabs.c (generate_asm_file): Escape backslashes in stabs file + entries, matching the way GCC generates them. If not escaped, the + filename is encoded incorrectly. + +2000-01-31 Nick Clifton + * config/tc-arm.c (reg_table): Add support for ATPCS register + naming conventions. + +2000-01-31 Geoff Keating + + * config/obj-coff.h (OBJ_COPY_SYMBOL_ATTRIBUTES): Don't define if + already defined. + * config/tc-ppc.h [OBJ_XCOFF] (OBJ_COPY_SYMBOL_ATTRIBUTES): + New macro. + * config/tc-ppc.c (ppc_fix_adjustable): Don't look at the frag + of a symbol when we really care about its value. + +2000-01-19 Chandra Chavva + + * config/tc-mcore.c (md_assemble): Give warning message if + operands passes to instruction are more than the spec. + +2000-01-27 Thomas de Lellis + + * config/tc-arm.c (armadjust_symtab): If the assembler is in + Thumb mode but the label seen was not declared as '.thumb_func' + then set the ST_INFO type to STT_ARM_16BIT mode. This allows + correct disassembly of Thumb code bounded by non function labels. + +2000-01-27 Alan Modra + + * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c + Add dependencies for e-i386aout.o. Fix 2 comment lines. + + * Makefile.in: Same here. + Update copyright. + + * configure.in: Set bfd_gas for i386-aout when primary target + is bfd. Handle i386aout emulation. Don't use te_file=multi, as + we may need the primary te_file. Remove incorrect comment. + + * configure: Regenerate. + + * config/e-i386aout.c: New file. + + * as.c (USE_EMULATIONS): Move to before print_version_id. + (struct emulation): Add i386aout. + (show_usage): Split text strings. Reformat -a text. Add --em + help. + Update copyright. + + * obj.h (struct format_ops): Add s_get_other and s_get_desc. + (aout_format_ops): New. + Update copyright. + + * read.c (s_lcomm_internal): Rewrite OBJ_AOUT,OBJ_BOUT + preprocessor conditional and add aout USE_EMULATIONS tests. + (read_a_source_file): Don't pass error strings to printf as + format arg. + Update copyright. + + * gasp.c (exp_get_abs): Don't pass error strings to printf as + format arg. + (do_data): Same here. + (process_file): And here. + Update copyright. + + * symbols.c (colon): Rewrite "already defined" fatal message + code for aout with USE_EMULATIONS. + Update copyright. + + * config/obj-aout.c (OBJ_HEADER): Define. + (obj_pseudo_table): Rename to aout_pseudo_table. Init all + fields of sentinel. + (obj_aout_frob_symbol): Expand S_GET_DESC, S_GET_TYPE, + S_GET_OTHER, S_SET_TYPE macros since we don't need obj-multi + forms here. + (obj_aout_type): Expand S_SET_OTHER here too. + (obj_read_begin_hook): Remove. + (aout_pop_insert): New. + (obj_aout_s_get_other): New. + (obj_aout_s_get_desc): New. + (aout_format_ops): New. + Update copyright. + + * config/obj-aout.h (obj_pop_insert): Define so non-multi usage + gets aout_pseudo_table. + (aout_pseudo_table): Declare. + (obj_read_begin_hook): Define. + Update copyright. + + * config/obj-coff.c (obj_pseudo_table): Rename to + coff_pseudo_table. + (coff_pop_insert): Use coff_pseudo_table. + (coff_sec_sym_ok_for_reloc): Remove. + (coff_format_ops): Add 0 entries for s_get_size, s_set_size, + and comment all zero entries and remove #if 0 code. + Update copyright. + + * config/obj-coff.h (obj_pop_insert): Define. + (coff_pseudo_table): Declare. + Update copyright. + + * config/obj-ecoff.c (ecoff_format_ops): Add 0 entries for + s_get_size, s_set_size. Comment all zero entries. + Update copyright. + + * config/obj-elf.c (elf_s_get_other): New function. + (obj_read_begin_hook): Rename to elf_obj_read_begin_hook. + (obj_symbol_new_hook): Rename to elf_obj_symbol_new_hook. + (elf_format_ops): Add elf_s_get_other, 0 s_get_size entry, and + comment. + (obj_elf_parse_section_letters): Don't pass error strings to + printf as format arg. + Update copyright. + + * config/obj-elf.h (ECOFF_DEBUGGING): Define when + OBJ_MAYBE_ECOFF. + (elf_s_get_other): Declare. + (S_GET_OTHER) Define as elf_s_get_other if not already + defined. + (S_SET_OTHER): Only define when not already defined. + (elf_obj_read_begin_hook): Declare. + (obj_read_begin_hook): Define. + (elf_obj_symbol_new_hook): Declare. + (obj_symbol_new_hook): Define. + Update copyright. + + * config/obj-multi.h: Add copyright header and protect against + multiple inclusion. Add * to all function pointers. + (OBJ_HEADER): If defined, include it rather than other defines + in this file. + (obj_frob_file_after_relocs): Test for NULL. + (obj_symbol_new_hook): Here too. + (obj_sec_sym_ok_for_reloc): And here. + (S_GET_OTHER): Define. + (S_GET_DESC): Define. + (ECOFF_DEBUGGING): Remove as it's done in obj-elf.h + (OBJ_MAYBE_ELF): Update comment. + + * config/tc-i386.c (i386_immediate): Add OBJ_MAYBE_AOUT to + OBJ_AOUT preprocessor conditional and handle emulation by + testing OUTPUT_FLAVOR. + (i386_displacement): Here too. + (md_section_align): Similarly here. + (i386_target_format): Conditionally compile when more than one + of OBJ_MAYBE_{ELF,COFF,AOUT} defined. Add aout case. + (i386_immediate): Fix error message for aout BFD_ASSMBLER. + (i386_displacement): Here too. + Update copyright. + + * config/tc-i386.h (AOUT_TARGET_FORMAT): Define for each TE_*. + Define TARGET_FORMAT for aout only when not multi. + Update copyright. + + * config/te-multi.h: Delete file as it's identical to te-generic.h + +2000-01-15 Alan Modra + + * config/tc-i386.h (DWORD_MNEM_SUFFIX): Delete. + * config/tc-i386.c (DWORD_MNEM_SUFFIX): Rename all occurrences to + LONG_MNEM_SUFFIX. + + * config/tc-i386.h (INTEL_DWORD_MNEM_SUFFIX): Rename to + DWORD_MNEM_SUFFIX. + * config/tc-i386.c (INTEL_DWORD_MNEM_SUFFIX): Here too. Fix some + comments. + +2000-01-13 Clinton Popetz + + * config/tc-mips.c (mips_do_align): New function. + * config/tc-mips.h (md_do_align): Define. + 2000-01-10 Philip Blundell * doc/c-arm.texi (ARM Options): Fix typo. diff -upr --new-file binutils-2.9.5.0.24/gas/ChangeLog.linux binutils-2.9.5.0.27/gas/ChangeLog.linux --- binutils-2.9.5.0.24/gas/ChangeLog.linux Thu Dec 2 09:15:14 1999 +++ binutils-2.9.5.0.27/gas/ChangeLog.linux Fri Feb 4 10:26:54 2000 @@ -1,3 +1,21 @@ +Fri Feb 4 10:13:53 2000 H.J. Lu (hjl@gnu.org) + + * listing.c (print_lines): Don't treat little-endian + differently than big-endian. + +Wed Feb 2 09:49:57 2000 H.J. Lu (hjl@gnu.org) + + * configure.in: Support --enable-targets=all and enable + i386aout and i386coff for Linux when --enable-targets=all + is used. + * configure: Regenerated. + +1999-12-13 Jakub Jelinek + + * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option. + (md_parse_option): Handle it. + (md_show_usage): Document it. + Wed Dec 1 07:15:43 1999 H.J. Lu (hjl@gnu.org) * config/tc-mips.c (mips_fix_adjustable): Back out the change diff -upr --new-file binutils-2.9.5.0.24/gas/Makefile.am binutils-2.9.5.0.27/gas/Makefile.am --- binutils-2.9.5.0.24/gas/Makefile.am Mon Sep 6 10:57:21 1999 +++ binutils-2.9.5.0.27/gas/Makefile.am Fri Jan 28 09:10:50 2000 @@ -324,6 +324,7 @@ TARG_ENV_HFILES = \ # Multi files in config MULTI_CFILES = \ + config/e-i386aout.c \ config/e-i386coff.c \ config/e-i386elf.c \ config/e-mipsecoff.c \ @@ -511,6 +512,8 @@ e-mipself.o : $(srcdir)/config/e-mipself $(COMPILE) -c $(srcdir)/config/e-mipself.c e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c $(COMPILE) -c $(srcdir)/config/e-mipsecoff.c +e-i386aout.o: $(srcdir)/config/e-i386aout.c + $(COMPILE) -c $(srcdir)/config/e-i386aout.c e-i386coff.o: $(srcdir)/config/e-i386coff.c $(COMPILE) -c $(srcdir)/config/e-i386coff.c e-i386elf.o: $(srcdir)/config/e-i386elf.c @@ -759,7 +762,7 @@ DEPTC: $(TARGET_CPU_CFILES) echo 'DEPTC_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> DEPTCA echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA - # We don't try to handle all multi cases. +# We don't try to handle all multi cases. for c in $(CPU_TYPES); do \ $(CPU_MULTI_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -806,7 +809,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPOBJA echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA - # We don't try to handle all multi cases. +# We don't try to handle all multi cases. for c in $(CPU_TYPES); do \ $(CPU_MULTI_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -923,6 +926,8 @@ symbols.o: symbols.c $(INCDIR)/obstack.h write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h gasp.o: gasp.c sb.h macro.h itbl-ops.o: itbl-ops.c itbl-ops.h itbl-parse.h +e-i386aout.o: $(srcdir)/config/e-i386aout.c emul.h \ + emul-target.h e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \ emul-target.h e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h diff -upr --new-file binutils-2.9.5.0.24/gas/Makefile.in binutils-2.9.5.0.27/gas/Makefile.in --- binutils-2.9.5.0.24/gas/Makefile.in Mon Sep 6 10:57:21 1999 +++ binutils-2.9.5.0.27/gas/Makefile.in Fri Jan 28 09:10:50 2000 @@ -1,6 +1,6 @@ # Makefile.in generated automatically by automake 1.4 from Makefile.am -# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# Copyright (C) 1994-99, 2000 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -441,6 +441,7 @@ TARG_ENV_HFILES = \ # Multi files in config MULTI_CFILES = \ + config/e-i386aout.c \ config/e-i386coff.c \ config/e-i386elf.c \ config/e-mipsecoff.c \ @@ -2138,6 +2139,8 @@ e-mipself.o : $(srcdir)/config/e-mipself $(COMPILE) -c $(srcdir)/config/e-mipself.c e-mipsecoff.o : $(srcdir)/config/e-mipsecoff.c $(COMPILE) -c $(srcdir)/config/e-mipsecoff.c +e-i386aout.o: $(srcdir)/config/e-i386aout.c + $(COMPILE) -c $(srcdir)/config/e-i386aout.c e-i386coff.o: $(srcdir)/config/e-i386coff.c $(COMPILE) -c $(srcdir)/config/e-i386coff.c e-i386elf.o: $(srcdir)/config/e-i386elf.c @@ -2355,7 +2358,7 @@ DEPTC: $(TARGET_CPU_CFILES) echo 'DEPTC_hppa_som = $$(srcdir)/config/tc-hppa.h subsegs.h \' >> DEPTCA echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPTCA echo ' $$(INCDIR)/opcode/hppa.h $$(BFDDIR)/som.h' >> DEPTCA - # We don't try to handle all multi cases. +# We don't try to handle all multi cases. for c in $(CPU_TYPES); do \ $(CPU_MULTI_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -2402,7 +2405,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES) echo ' $$(INCDIR)/obstack.h $$(BFDDIR)/libhppa.h \' >> DEPOBJA echo ' $$(BFDDIR)/som.h $$(INCDIR)/aout/stab_gnu.h \' >> DEPOBJA echo ' $$(INCDIR)/aout/stab.def' >> DEPOBJA - # We don't try to handle all multi cases. +# We don't try to handle all multi cases. for c in $(CPU_TYPES); do \ $(CPU_MULTI_VALID) \ if [ x$${valid} = xyes ]; then \ @@ -2519,6 +2522,8 @@ symbols.o: symbols.c $(INCDIR)/obstack.h write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h gasp.o: gasp.c sb.h macro.h itbl-ops.o: itbl-ops.c itbl-ops.h itbl-parse.h +e-i386aout.o: $(srcdir)/config/e-i386aout.c emul.h \ + emul-target.h e-i386coff.o: $(srcdir)/config/e-i386coff.c emul.h \ emul-target.h e-i386elf.o: $(srcdir)/config/e-i386elf.c emul.h emul-target.h diff -upr --new-file binutils-2.9.5.0.24/gas/as.c binutils-2.9.5.0.27/gas/as.c --- binutils-2.9.5.0.24/gas/as.c Tue Oct 12 09:04:41 1999 +++ binutils-2.9.5.0.27/gas/as.c Fri Jan 28 09:10:50 2000 @@ -1,5 +1,5 @@ /* as.c - GAS main program. - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1987, 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -111,100 +111,12 @@ struct itbl_file_list static struct itbl_file_list *itbl_files; -void -print_version_id () -{ - static int printed; - if (printed) - return; - printed = 1; - -#ifdef BFD_ASSEMBLER - fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"), - VERSION, TARGET_ALIAS, BFD_VERSION); -#else - fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS); -#endif - fprintf (stderr, "\n"); -} - -extern void binutils_bug_report PARAMS((FILE *)); - -static void -show_usage (stream) - FILE *stream; -{ - fprintf (stream, _("Usage: %s [option...] [asmfile...]\n"), myname); - - fprintf (stream, _("\ -Options:\n\ - -a[sub-option...] turn on listings\n\ - Sub-options [default hls]:\n\ - c omit false conditionals\n\ - d omit debugging directives\n\ - h include high-level source\n\ - l include assembly\n\ - m include macro expansions\n\ - n omit forms processing\n\ - s include symbols\n\ - L include line debug statistics (if applicable)\n\ - =file set listing file name (must be last sub-option)\n")); - - fprintf (stream, _("\ - -D produce assembler debugging messages\n\ - --defsym SYM=VAL define symbol SYM to given value\n\ - -f skip whitespace and comment preprocessing\n\ - --gstabs generate stabs debugging information\n\ - --gdwarf2 generate DWARF2 debugging information\n\ - --help show this message and exit\n\ - -I DIR add DIR to search list for .include directives\n\ - -J don't warn about signed overflow\n\ - -K warn when differences altered for long displacements\n\ - -L,--keep-locals keep local symbols (e.g. starting with `L')\n")); - - fprintf (stream, _("\ - -M,--mri assemble in MRI compatibility mode\n\ - --MD FILE write dependency information in FILE (default none)\n\ - -nocpp ignored\n\ - -o OBJFILE name the object-file output OBJFILE (default a.out)\n\ - -R fold data section into text section\n\ - --statistics print various measured statistics from execution\n\ - --strip-local-absolute strip local absolute symbols\n\ - --traditional-format Use same format as native assembler when possible\n\ - --version print assembler version number and exit\n\ - -W --no-warn suppress warnings\n\ - --warn don't suppress warnings\n\ - --fatal-warnings treat warnings as errors\n\ - --itbl INSTTBL extend instruction set to include instructions\n\ - matching the specifications defined in file INSTTBL\n\ - -w ignored\n\ - -X ignored\n\ - -Z generate object file even after errors\n")); - - fprintf (stream, _("\ - --listing-lhs-width set the width in words of the output data column of\n\ - the listing\n\ - --listing-lhs-width2 set the width in words of the continuation lines\n\ - of the output data column; ignored if smaller than\n\ - the width of the first line\n\ - --listing-rhs-width set the max width in characters of the lines from\n\ - the source file\n\ - --listing-cont-lines set the maximum number of continuation lines used\n\ - for the output data column of the listing\n")); - - md_show_usage (stream); - - binutils_bug_report (stream); - putc ('\n', stream); - binutils_bug_report (stream); -} - #ifdef USE_EMULATIONS #define EMULATION_ENVIRON "AS_EMULATION" extern struct emulation mipsbelf, mipslelf, mipself; extern struct emulation mipsbecoff, mipslecoff, mipsecoff; -extern struct emulation i386coff, i386elf; +extern struct emulation i386coff, i386elf, i386aout; static struct emulation *const emulations[] = { EMULATIONS }; static const int n_emulations = sizeof (emulations) / sizeof (emulations[0]); @@ -285,6 +197,137 @@ common_emul_init () } } #endif + +void +print_version_id () +{ + static int printed; + if (printed) + return; + printed = 1; + +#ifdef BFD_ASSEMBLER + fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"), + VERSION, TARGET_ALIAS, BFD_VERSION); +#else + fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS); +#endif + fprintf (stderr, "\n"); +} + +extern void binutils_bug_report PARAMS((FILE *)); + +static void +show_usage (stream) + FILE *stream; +{ + fprintf (stream, _("Usage: %s [option...] [asmfile...]\n"), myname); + + fprintf (stream, _("\ +Options:\n\ + -a[sub-option...] turn on listings\n\ + Sub-options [default hls]:\n\ + c omit false conditionals\n\ + d omit debugging directives\n\ + h include high-level source\n\ + l include assembly\n\ + m include macro expansions\n\ + n omit forms processing\n\ + s include symbols\n\ + L include line debug statistics (if applicable)\n\ + =FILE list to FILE (must be last sub-option)\n")); + + fprintf (stream, _("\ + -D produce assembler debugging messages\n")); + fprintf (stream, _("\ + --defsym SYM=VAL define symbol SYM to given value\n")); +#ifdef USE_EMULATIONS + { + int i; + char *def_em; + + fprintf (stream, "\ + --em=["); + for (i = 0; i < n_emulations-1; i++) + fprintf (stream, "%s | ", emulations[i]->name); + fprintf (stream, "%s]\n", emulations[i]->name); + + def_em = getenv (EMULATION_ENVIRON); + if (!def_em) + def_em = DEFAULT_EMULATION; + fprintf (stream, _("\ + emulate output (default %s)\n"), def_em); + } +#endif + fprintf (stream, _("\ + -f skip whitespace and comment preprocessing\n")); + fprintf (stream, _("\ + --gstabs generate stabs debugging information\n")); + fprintf (stream, _("\ + --gdwarf2 generate DWARF2 debugging information\n")); + fprintf (stream, _("\ + --help show this message and exit\n")); + fprintf (stream, _("\ + -I DIR add DIR to search list for .include directives\n")); + fprintf (stream, _("\ + -J don't warn about signed overflow\n")); + fprintf (stream, _("\ + -K warn when differences altered for long displacements\n")); + fprintf (stream, _("\ + -L,--keep-locals keep local symbols (e.g. starting with `L')\n")); + fprintf (stream, _("\ + -M,--mri assemble in MRI compatibility mode\n")); + fprintf (stream, _("\ + --MD FILE write dependency information in FILE (default none)\n")); + fprintf (stream, _("\ + -nocpp ignored\n")); + fprintf (stream, _("\ + -o OBJFILE name the object-file output OBJFILE (default a.out)\n")); + fprintf (stream, _("\ + -R fold data section into text section\n")); + fprintf (stream, _("\ + --statistics print various measured statistics from execution\n")); + fprintf (stream, _("\ + --strip-local-absolute strip local absolute symbols\n")); + fprintf (stream, _("\ + --traditional-format Use same format as native assembler when possible\n")); + fprintf (stream, _("\ + --version print assembler version number and exit\n")); + fprintf (stream, _("\ + -W --no-warn suppress warnings\n")); + fprintf (stream, _("\ + --warn don't suppress warnings\n")); + fprintf (stream, _("\ + --fatal-warnings treat warnings as errors\n")); + fprintf (stream, _("\ + --itbl INSTTBL extend instruction set to include instructions\n\ + matching the specifications defined in file INSTTBL\n")); + fprintf (stream, _("\ + -w ignored\n")); + fprintf (stream, _("\ + -X ignored\n")); + fprintf (stream, _("\ + -Z generate object file even after errors\n")); + fprintf (stream, _("\ + --listing-lhs-width set the width in words of the output data column of\n\ + the listing\n")); + fprintf (stream, _("\ + --listing-lhs-width2 set the width in words of the continuation lines\n\ + of the output data column; ignored if smaller than\n\ + the width of the first line\n")); + fprintf (stream, _("\ + --listing-rhs-width set the max width in characters of the lines from\n\ + the source file\n")); + fprintf (stream, _("\ + --listing-cont-lines set the maximum number of continuation lines used\n\ + for the output data column of the listing\n")); + + md_show_usage (stream); + + binutils_bug_report (stream); + putc ('\n', stream); + binutils_bug_report (stream); +} /* * Since it is easy to do here we interpret the special arg "-" diff -upr --new-file binutils-2.9.5.0.24/gas/as.h binutils-2.9.5.0.27/gas/as.h --- binutils-2.9.5.0.24/gas/as.h Tue Oct 12 09:04:41 1999 +++ binutils-2.9.5.0.27/gas/as.h Thu Feb 3 15:29:51 2000 @@ -646,6 +646,16 @@ void eh_frame_convert_frag PARAMS ((frag #define BSS_SECTION_NAME ".bss" #endif +#ifndef OCTETS_PER_BYTE_POWER +#define OCTETS_PER_BYTE_POWER 0 +#endif +#ifndef OCTETS_PER_BYTE +#define OCTETS_PER_BYTE (1<flags; - desc = S_GET_DESC (sym); - type = S_GET_TYPE (sym); - other = S_GET_OTHER (sym); + desc = aout_symbol (symbol_get_bfdsym (sym))->desc; + type = aout_symbol (symbol_get_bfdsym (sym))->type; + other = aout_symbol (symbol_get_bfdsym (sym))->other; sec = S_GET_SEGMENT (sym); /* Only frob simple symbols this way right now. */ @@ -187,7 +189,7 @@ obj_aout_frob_symbol (sym, punt) symbol_get_bfdsym (sym)->flags |= BSF_DEBUGGING; } - S_SET_TYPE (sym, type); + aout_symbol (symbol_get_bfdsym (sym))->type = type; /* Double check weak symbols. */ if (S_IS_WEAK (sym)) @@ -420,9 +422,17 @@ obj_aout_type (ignore) { ++input_line_pointer; if (strncmp (input_line_pointer, "object", 6) == 0) +#ifdef BFD_ASSEMBLER + aout_symbol (symbol_get_bfdsym (sym))->other = 1; +#else S_SET_OTHER (sym, 1); +#endif else if (strncmp (input_line_pointer, "function", 8) == 0) +#ifdef BFD_ASSEMBLER + aout_symbol (symbol_get_bfdsym (sym))->other = 2; +#else S_SET_OTHER (sym, 2); +#endif } } } @@ -431,11 +441,6 @@ obj_aout_type (ignore) s_ignore (0); } -void -obj_read_begin_hook () -{ -} - #ifndef BFD_ASSEMBLER void @@ -629,5 +634,59 @@ DEFUN_VOID (s_sect) } #endif /* ! BFD_ASSEMBLER */ + +#ifdef BFD_ASSEMBLER + +/* Support for an AOUT emulation. */ + +static void aout_pop_insert PARAMS ((void)); +static int obj_aout_s_get_other PARAMS ((symbolS *)); +static int obj_aout_s_get_desc PARAMS ((symbolS *)); + +static void +aout_pop_insert () +{ + pop_insert (aout_pseudo_table); +} + +static int +obj_aout_s_get_other (sym) + symbolS *sym; +{ + return aout_symbol (symbol_get_bfdsym (sym))->other; +} + +static int +obj_aout_s_get_desc (sym) + symbolS *sym; +{ + return aout_symbol (symbol_get_bfdsym (sym))->desc; +} + + +const struct format_ops aout_format_ops = +{ + bfd_target_aout_flavour, + 1, /* dfl_leading_underscore */ + 0, /* emit_section_symbols */ + obj_aout_frob_symbol, + obj_aout_frob_file, + 0, /* frob_file_after_relocs */ + 0, /* s_get_size */ + 0, /* s_set_size */ + 0, /* s_get_align */ + 0, /* s_set_align */ + obj_aout_s_get_other, + obj_aout_s_get_desc, + 0, /* copy_symbol_attributes */ + 0, /* generate_asm_lineno */ + 0, /* process_stab */ + 0, /* sec_sym_ok_for_reloc */ + aout_pop_insert, + 0, /* ecoff_set_ext */ + 0, /* read_begin_hook */ + 0 /* symbol_new_hook */ +}; +#endif BFD_ASSEMBLER /* end of obj-aout.c */ diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-aout.h binutils-2.9.5.0.27/gas/config/obj-aout.h --- binutils-2.9.5.0.24/gas/config/obj-aout.h Thu Jun 3 11:02:00 1999 +++ binutils-2.9.5.0.27/gas/config/obj-aout.h Fri Jan 28 08:33:33 2000 @@ -1,5 +1,5 @@ /* obj-aout.h, a.out object file format for gas, the assembler. - Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 1999 + Copyright (C) 1989, 90, 91, 92, 93, 94, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -51,6 +51,12 @@ extern const segT N_TYPE_seg[]; #endif /* ! BFD_ASSEMBLER */ +extern const pseudo_typeS aout_pseudo_table[]; + +#ifndef obj_pop_insert +#define obj_pop_insert() pop_insert (aout_pseudo_table) +#endif + /* SYMBOL TABLE */ /* Symbol table entry data type */ @@ -236,6 +242,7 @@ void tc_aout_fix_to_chars PARAMS ((char #endif +#define obj_read_begin_hook() {;} #define obj_symbol_new_hook(s) {;} #define EMIT_SECTION_SYMBOLS 0 diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-coff.c binutils-2.9.5.0.27/gas/config/obj-coff.c --- binutils-2.9.5.0.24/gas/config/obj-coff.c Mon Sep 13 09:37:13 1999 +++ binutils-2.9.5.0.27/gas/config/obj-coff.c Thu Feb 3 15:24:47 2000 @@ -1269,7 +1269,7 @@ coff_frob_symbol (symp, punt) for (; i > 0; i--) { if (lptr->frag) - lptr->l.u.offset += lptr->frag->fr_address; + lptr->l.u.offset += lptr->frag->fr_address / OCTETS_PER_BYTE; l[i] = lptr->l; lptr = lptr->next; } @@ -1453,25 +1453,32 @@ coff_frob_section (sec) char *p; fragS *fragp; bfd_vma size, n_entries, mask; + bfd_vma align_power = (bfd_vma)sec->alignment_power + OCTETS_PER_BYTE_POWER; /* The COFF back end in BFD requires that all section sizes be - rounded up to multiples of the corresponding section alignments. - Seems kinda silly to me, but that's the way it is. */ + rounded up to multiples of the corresponding section alignments, + supposedly because standard COFF has no other way of encoding alignment + for sections. If your COFF flavor has a different way of encoding + section alignment, then skip this step, as TICOFF does. */ size = bfd_get_section_size_before_reloc (sec); - mask = ((bfd_vma) 1 << (bfd_vma) sec->alignment_power) - 1; + mask = ((bfd_vma) 1 << align_power) - 1; +#if !defined(TICOFF) if (size & mask) { size = (size + mask) & ~mask; bfd_set_section_size (stdoutput, sec, size); } +#endif /* If the section size is non-zero, the section symbol needs an aux entry associated with it, indicating the size. We don't know all the values yet; coff_frob_symbol will fill them in later. */ +#ifndef TICOFF if (size != 0 || sec == text_section || sec == data_section || sec == bss_section) +#endif { symbolS *secsym = section_symbol (sec); @@ -4527,7 +4534,7 @@ adjust_stab_section(abfd, seg) #endif /* not BFD_ASSEMBLER */ -const pseudo_typeS obj_pseudo_table[] = +const pseudo_typeS coff_pseudo_table[] = { {"def", obj_coff_def, 0}, {"dim", obj_coff_dim, 0}, @@ -4568,58 +4575,42 @@ const pseudo_typeS obj_pseudo_table[] = {"sdef", obj_coff_def, 0}, #endif {NULL, NULL, 0} /* end sentinel */ -}; /* obj_pseudo_table */ +}; /* coff_pseudo_table */ #ifdef BFD_ASSEMBLER -static void coff_pop_insert PARAMS ((void)); -static int coff_sec_sym_ok_for_reloc PARAMS ((asection *)); - /* Support for a COFF emulation. */ +static void coff_pop_insert PARAMS ((void)); + static void coff_pop_insert () { - pop_insert (obj_pseudo_table); -} - -static int -coff_sec_sym_ok_for_reloc (sec) - asection *sec ATTRIBUTE_UNUSED; -{ - return 0; + pop_insert (coff_pseudo_table); } const struct format_ops coff_format_ops = { bfd_target_coff_flavour, - 0, - 1, + 0, /* dfl_leading_underscore */ + 1, /* emit_section_symbols */ coff_frob_symbol, - 0, + 0, /* frob_file */ coff_frob_file_after_relocs, - 0, 0, - 0, 0, - 0, -#if 0 - obj_generate_asm_lineno, -#else - 0, -#endif -#if 0 - obj_stab, -#else - 0, -#endif - coff_sec_sym_ok_for_reloc, + 0, /* s_get_size */ + 0, /* s_set_size */ + 0, /* s_get_align */ + 0, /* s_set_align */ + 0, /* s_get_other */ + 0, /* s_get_desc */ + 0, /* copy_symbol_attributes */ + 0, /* generate_asm_lineno */ + 0, /* process_stab */ + 0, /* sec_sym_ok_for_reloc */ coff_pop_insert, -#if 0 - obj_set_ext, -#else - 0, -#endif + 0, /* ecoff_set_ext */ coff_obj_read_begin_hook, - coff_obj_symbol_new_hook, + coff_obj_symbol_new_hook }; #endif diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-coff.h binutils-2.9.5.0.27/gas/config/obj-coff.h --- binutils-2.9.5.0.24/gas/config/obj-coff.h Mon Sep 13 09:37:14 1999 +++ binutils-2.9.5.0.27/gas/config/obj-coff.h Tue Feb 1 13:25:56 2000 @@ -1,5 +1,5 @@ /* coff object file format - Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1989, 90, 91, 92, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS. @@ -371,6 +371,7 @@ extern symbolS *coff_last_function; /* Forward the segment of a forwarded symbol, handle assignments that just copy symbol values, etc. */ +#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES #ifndef TE_I386AIX #define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \ (SF_GET_GET_SEGMENT (dest) \ @@ -382,6 +383,7 @@ extern symbolS *coff_last_function; ? (S_SET_SEGMENT (dest, S_GET_SEGMENT (src)), 0) \ : 0) #endif +#endif /* sanity check */ @@ -820,6 +822,12 @@ extern void obj_coff_pe_handle_link_once #endif #endif /* not BFD_ASSEMBLER */ + +extern const pseudo_typeS coff_pseudo_table[]; + +#ifndef obj_pop_insert +#define obj_pop_insert() pop_insert (coff_pseudo_table) +#endif /* In COFF, if a symbol is defined using .def/.val SYM/.endef, it's OK to redefine the symbol later on. This can happen if C symbols use diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-ecoff.c binutils-2.9.5.0.27/gas/config/obj-ecoff.c --- binutils-2.9.5.0.24/gas/config/obj-ecoff.c Sat Jun 26 18:02:41 1999 +++ binutils-2.9.5.0.27/gas/config/obj-ecoff.c Fri Jan 28 08:33:34 2000 @@ -1,5 +1,6 @@ /* ECOFF object file format. - Copyright (C) 1993, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1993, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Contributed by Cygnus Support. This file was put together by Ian Lance Taylor . @@ -292,14 +293,18 @@ ecoff_pop_insert () const struct format_ops ecoff_format_ops = { bfd_target_ecoff_flavour, - 0, - 1, + 0, /* dfl_leading_underscore */ + 1, /* emit_section_symbols */ obj_ecoff_frob_symbol, ecoff_frob_file, - 0, - 0, 0, - 0, 0, - 0, + 0, /* frob_file_after_relocs */ + 0, /* s_get_size */ + 0, /* s_set_size */ + 0, /* s_get_align */ + 0, /* s_set_align */ + 0, /* s_get_other */ + 0, /* s_get_desc */ + 0, /* copy_symbol_attributes */ ecoff_generate_asm_lineno, ecoff_stab, ecoff_sec_sym_ok_for_reloc, diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-elf.c binutils-2.9.5.0.27/gas/config/obj-elf.c --- binutils-2.9.5.0.24/gas/config/obj-elf.c Thu Jan 13 11:43:43 2000 +++ binutils-2.9.5.0.27/gas/config/obj-elf.c Fri Jan 28 09:10:51 2000 @@ -1,5 +1,6 @@ /* ELF object file format - Copyright (C) 1992, 93-98, 1999 Free Software Foundation, Inc. + Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -224,6 +225,13 @@ elf_s_set_align (sym, align) S_SET_ALIGN (sym, align); } +int +elf_s_get_other (sym) + symbolS *sym; +{ + return elf_symbol (symbol_get_bfdsym (sym))->internal_elf_sym.st_other; +} + static void elf_copy_symbol_attributes (dest, src) symbolS *dest, *src; @@ -499,28 +507,28 @@ obj_elf_visibility (visibility) c = get_symbol_end (); symbolP = symbol_find_or_make (name); *input_line_pointer = c; - + SKIP_WHITESPACE (); - + bfdsym = symbol_get_bfdsym (symbolP); elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym); - + assert (elfsym); - + elfsym->internal_elf_sym.st_other = visibility; - + if (c == ',') { input_line_pointer ++; - + SKIP_WHITESPACE (); - + if (*input_line_pointer == '\n') c = '\n'; } } while (c == ','); - + demand_empty_rest_of_line (); } @@ -722,7 +730,7 @@ obj_elf_parse_section_letters (str, len) else #endif { - as_warn (bad_msg); + as_warn ("%s", bad_msg); attr = -1; } } @@ -831,7 +839,7 @@ obj_elf_section (push) ignore_rest_of_line (); return; } - + name = xmalloc (end - input_line_pointer + 1); memcpy (name, input_line_pointer, end - input_line_pointer); name[end - input_line_pointer] = '\0'; @@ -1183,7 +1191,7 @@ obj_elf_vtable_inherit (ignore) symbol_get_value_expression (csym)->X_add_number, 0, psym, 0, 0, BFD_RELOC_VTABLE_INHERIT); } - + /* This handles the .vtable_entry pseudo-op, which is used to indicate to the linker that a vtable slot was used. The syntax is ".vtable_entry tablename, offset". */ @@ -1226,7 +1234,7 @@ obj_elf_vtable_entry (ignore) } void -obj_read_begin_hook () +elf_obj_read_begin_hook () { #ifdef NEED_ECOFF_DEBUG if (ECOFF_DEBUGGING) @@ -1235,7 +1243,7 @@ obj_read_begin_hook () } void -obj_symbol_new_hook (symbolP) +elf_obj_symbol_new_hook (symbolP) symbolS *symbolP; { struct elf_obj_sy *sy_obj; @@ -1362,7 +1370,7 @@ obj_elf_size (ignore) /* Handle the ELF .type pseudo-op. This sets the type of a symbol. There are four syntaxes: - + The first (used on Solaris) is .type SYM,#function The second (used on UnixWare) is @@ -1797,14 +1805,14 @@ elf_frob_file_after_relocs () SCO OpenServer 5 identifies it's ELF modules with a standard ELF .note section. - int_32 namesz = 4 ; Name size - int_32 descsz = 12 ; Descriptive information - int_32 type = 1 ; - char name[4] = "SCO" ; Originator name ALWAYS SCO + NULL + int_32 namesz = 4 ; Name size + int_32 descsz = 12 ; Descriptive information + int_32 type = 1 ; + char name[4] = "SCO" ; Originator name ALWAYS SCO + NULL int_32 version = (major ver # << 16) | version of tools ; int_32 source = (tool_id << 16 ) | 1 ; int_32 info = 0 ; These are set by the SCO tools, but we - don't know enough about the source + don't know enough about the source environment to set them. SCO ld currently ignores them, and recommends we set them to zero. */ @@ -1836,7 +1844,7 @@ sco_id () /* process the version string */ - i_note.namesz = 4; + i_note.namesz = 4; i_note.descsz = 12; /* 12 descriptive bytes */ i_note.type = NT_VERSION; /* Contains a version string */ @@ -1850,7 +1858,7 @@ sco_id () md_number_to_chars (p, (valueT) i_note.type, 4); p = frag_more (4); - strcpy (p, "SCO"); + strcpy (p, "SCO"); /* Note: this is the version number of the ELF we're representing */ p = frag_more (4); @@ -1867,7 +1875,7 @@ sco_id () and just set them to zero. */ p = frag_more (4); md_number_to_chars (p, 0x0000, 4); - + frag_align (2, 0, 0); /* We probably can't restore the current segment, for there likely @@ -1882,28 +1890,30 @@ sco_id () const struct format_ops elf_format_ops = { bfd_target_elf_flavour, - 0, - 1, + 0, /* dfl_leading_underscore */ + 1, /* emit_section_symbols */ elf_frob_symbol, elf_frob_file, elf_frob_file_after_relocs, elf_s_get_size, elf_s_set_size, elf_s_get_align, elf_s_set_align, + elf_s_get_other, + 0, /* s_get_desc */ elf_copy_symbol_attributes, #ifdef NEED_ECOFF_DEBUG ecoff_generate_asm_lineno, ecoff_stab, #else - 0, - 0, /* process_stab */ + 0, /* generate_asm_lineno */ + 0, /* process_stab */ #endif elf_sec_sym_ok_for_reloc, elf_pop_insert, #ifdef NEED_ECOFF_DEBUG elf_ecoff_set_ext, #else - 0, + 0, /* ecoff_set_ext */ #endif - obj_read_begin_hook, - obj_symbol_new_hook, + elf_obj_read_begin_hook, + elf_obj_symbol_new_hook, }; diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-elf.h binutils-2.9.5.0.27/gas/config/obj-elf.h --- binutils-2.9.5.0.24/gas/config/obj-elf.h Mon Sep 6 10:57:22 1999 +++ binutils-2.9.5.0.27/gas/config/obj-elf.h Fri Jan 28 09:10:51 2000 @@ -1,5 +1,5 @@ /* ELF object file format. - Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -53,6 +53,12 @@ extern int alpha_flag_mdebug; #endif /* MIPS_STABS_ELF */ #endif /* TC_MIPS */ +#ifdef OBJ_MAYBE_ECOFF +#ifndef ECOFF_DEBUGGING +#define ECOFF_DEBUGGING 1 +#endif +#endif + /* Additional information we keep for each symbol. */ struct elf_obj_sy { @@ -106,10 +112,14 @@ extern void elf_begin PARAMS ((void)); (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_value = (V)) #endif -#define S_GET_OTHER(S) \ - (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_other) +int elf_s_get_other PARAMS ((symbolS *)); +#ifndef S_GET_OTHER +#define S_GET_OTHER(S) (elf_s_get_other (S)) +#endif +#ifndef S_SET_OTHER #define S_SET_OTHER(S,V) \ (elf_symbol (symbol_get_bfdsym (S))->internal_elf_sym.st_other = (V)) +#endif extern asection *gdb_section; @@ -141,6 +151,16 @@ extern void obj_elf_text PARAMS ((int)); globally defined sections. */ #ifndef obj_sec_sym_ok_for_reloc #define obj_sec_sym_ok_for_reloc(SEC) ((SEC)->owner != 0) +#endif + +void elf_obj_read_begin_hook PARAMS ((void)); +#ifndef obj_read_begin_hook +#define obj_read_begin_hook elf_obj_read_begin_hook +#endif + +void elf_obj_symbol_new_hook PARAMS ((symbolS *)); +#ifndef obj_symbol_new_hook +#define obj_symbol_new_hook elf_obj_symbol_new_hook #endif /* When setting one symbol equal to another, by default we probably diff -upr --new-file binutils-2.9.5.0.24/gas/config/obj-multi.h binutils-2.9.5.0.27/gas/config/obj-multi.h --- binutils-2.9.5.0.24/gas/config/obj-multi.h Fri Sep 3 10:55:46 1999 +++ binutils-2.9.5.0.27/gas/config/obj-multi.h Fri Jan 28 08:33:34 2000 @@ -1,4 +1,30 @@ -/* hi */ +/* Multiple object format emulation. + Copyright (C) 1995, 96, 97, 99, 2000 + Free Software Foundation, Inc. + + This file is part of GAS, the GNU Assembler. + + GAS is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + GAS is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GAS; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#ifndef _OBJ_MULTI_H +#define _OBJ_MULTI_H + +#ifdef OBJ_HEADER +#include OBJ_HEADER +#else #include "emul.h" #include "targ-cpu.h" @@ -7,60 +33,72 @@ (this_format->flavor) #define obj_frob_symbol(S,P) \ - (this_format->frob_symbol) (S, &(P)) + (*this_format->frob_symbol) (S, &(P)) #define obj_frob_file() \ (this_format->frob_file \ - ? this_format->frob_file () \ + ? (*this_format->frob_file) () \ : (void) 0) -#define obj_frob_file_after_relocs \ - (this_format->frob_file_after_relocs) +#define obj_frob_file_after_relocs() \ + (this_format->frob_file_after_relocs \ + ? (*this_format->frob_file_after_relocs) () \ + : (void) 0) #define obj_ecoff_set_ext \ - (this_format->ecoff_set_ext) + (*this_format->ecoff_set_ext) #define obj_pop_insert \ - (this_format->pop_insert) + (*this_format->pop_insert) #define obj_read_begin_hook() \ (this_format->read_begin_hook \ - ? this_format->read_begin_hook () \ + ? (*this_format->read_begin_hook) () \ : (void) 0) -#define obj_symbol_new_hook \ - (this_format->symbol_new_hook) +#define obj_symbol_new_hook(S) \ + (this_format->symbol_new_hook \ + ? (*this_format->symbol_new_hook) (S) \ + : (void) 0) -#define obj_sec_sym_ok_for_reloc \ - (this_format->sec_sym_ok_for_reloc) +#define obj_sec_sym_ok_for_reloc(A) \ + (this_format->sec_sym_ok_for_reloc \ + ? (*this_format->sec_sym_ok_for_reloc) (A) \ + : 0) #define S_GET_SIZE \ - (this_format->s_get_size) + (*this_format->s_get_size) #define S_SET_SIZE \ - (this_format->s_set_size) + (*this_format->s_set_size) #define S_GET_ALIGN \ - (this_format->s_get_align) + (*this_format->s_get_align) #define S_SET_ALIGN \ - (this_format->s_set_align) + (*this_format->s_set_align) + +#define S_GET_OTHER \ + (*this_format->s_get_other) + +#define S_GET_DESC \ + (*this_format->s_get_desc) #define OBJ_COPY_SYMBOL_ATTRIBUTES(d,s) \ (this_format->copy_symbol_attributes \ - ? this_format->copy_symbol_attributes (d, s) \ + ? (*this_format->copy_symbol_attributes) (d, s) \ : (void) 0) #define OBJ_PROCESS_STAB(SEG,W,S,T,O,D) \ (this_format->process_stab \ - ? this_format->process_stab (SEG,W,S,T,O,D) \ + ? (*this_format->process_stab) (SEG,W,S,T,O,D) \ : (void) 0) -#if defined (OBJ_MAYBE_ECOFF) || (defined (OBJ_MAYBE_ELF) && defined (TC_MIPS)) -#define ECOFF_DEBUGGING 1 -#endif - #ifdef OBJ_MAYBE_ELF -/* We need obj-elf for OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined */ +/* We need OBJ_SYMFIELD_TYPE so that symbol_get_obj is defined in symbol.c + We also need various STAB defines for stab.c */ #include "obj-elf.h" #endif + +#endif /* !OBJ_HEADER */ +#endif /* _OBJ_MULTI_H */ diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-arm.c binutils-2.9.5.0.27/gas/config/tc-arm.c --- binutils-2.9.5.0.24/gas/config/tc-arm.c Thu Jan 13 11:35:55 2000 +++ binutils-2.9.5.0.27/gas/config/tc-arm.c Tue Feb 1 13:25:57 2000 @@ -857,20 +857,22 @@ struct reg_entry #define REG_LR 14 #define REG_SP 13 -/* These are the standard names; Users can add aliases with .req */ +/* These are the standard names. Users can add aliases with .req */ static CONST struct reg_entry reg_table[] = { - /* Processor Register Numbers */ + /* Processor Register Numbers. */ {"r0", 0}, {"r1", 1}, {"r2", 2}, {"r3", 3}, {"r4", 4}, {"r5", 5}, {"r6", 6}, {"r7", 7}, {"r8", 8}, {"r9", 9}, {"r10", 10}, {"r11", 11}, {"r12", 12}, {"r13", REG_SP},{"r14", REG_LR},{"r15", REG_PC}, - /* APCS conventions */ + /* APCS conventions. */ {"a1", 0}, {"a2", 1}, {"a3", 2}, {"a4", 3}, {"v1", 4}, {"v2", 5}, {"v3", 6}, {"v4", 7}, {"v5", 8}, {"v6", 9}, {"sb", 9}, {"v7", 10}, {"sl", 10}, {"fp", 11}, {"ip", 12}, {"sp", REG_SP},{"lr", REG_LR},{"pc", REG_PC}, - /* FP Registers */ + /* ATPCS additions to APCS conventions. */ + {"wr", 7}, {"v8", 11}, + /* FP Registers. */ {"f0", 16}, {"f1", 17}, {"f2", 18}, {"f3", 19}, {"f4", 20}, {"f5", 21}, {"f6", 22}, {"f7", 23}, {"c0", 32}, {"c1", 33}, {"c2", 34}, {"c3", 35}, @@ -881,6 +883,13 @@ static CONST struct reg_entry reg_table[ {"cr4", 36}, {"cr5", 37}, {"cr6", 38}, {"cr7", 39}, {"cr8", 40}, {"cr9", 41}, {"cr10", 42}, {"cr11", 43}, {"cr12", 44}, {"cr13", 45}, {"cr14", 46}, {"cr15", 47}, + /* ATPCS additions to float register names. */ + {"s0",16}, {"s1",17}, {"s2",18}, {"s3",19}, + {"s4",20}, {"s5",21}, {"s6",22}, {"s7",23}, + {"d0",16}, {"d1",17}, {"d2",18}, {"d3",19}, + {"d4",20}, {"d5",21}, {"d6",22}, {"d7",23}, + /* FIXME: At some point we need to add VFP register names. */ + /* Array terminator. */ {NULL, 0} }; @@ -6888,12 +6897,14 @@ arm_adjust_symtab () { if (ARM_IS_THUMB (sym)) { + elf_sym = elf_symbol (symbol_get_bfdsym (sym)); + bind = ELF_ST_BIND (elf_sym); + + /* If it's a .thumb_func, declare it as so, else tag label as .code 16. */ if (THUMB_IS_FUNC (sym)) - { - elf_sym = elf_symbol (symbol_get_bfdsym (sym)); - bind = ELF_ST_BIND (elf_sym); - elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_TFUNC); - } + elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_TFUNC); + else + elf_sym->internal_elf_sym.st_info = ELF_ST_INFO (bind, STT_ARM_16BIT); } } #endif diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-i386.c binutils-2.9.5.0.27/gas/config/tc-i386.c --- binutils-2.9.5.0.24/gas/config/tc-i386.c Thu Jan 13 11:43:43 2000 +++ binutils-2.9.5.0.27/gas/config/tc-i386.c Fri Jan 28 09:10:51 2000 @@ -1,5 +1,5 @@ /* i386.c -- Assemble code for the Intel 80386 - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -232,7 +232,8 @@ static int allow_naked_reg = 0; /* 1 if static char stackop_size = '\0'; /* Used in 16 bit gcc mode to add an l suffix to call, ret, enter, leave, push, - and pop instructions. */ + and pop instructions so that gcc has the + same stack frame as in 32 bit mode. */ /* Interface to relax_segment. There are 2 relax states for 386 jump insns: one for conditional & @@ -1093,20 +1094,17 @@ md_assemble (line) /* See if we can get a match by trimming off a suffix. */ switch (mnem_p[-1]) { - case DWORD_MNEM_SUFFIX: case WORD_MNEM_SUFFIX: case BYTE_MNEM_SUFFIX: case SHORT_MNEM_SUFFIX: -#if LONG_MNEM_SUFFIX != DWORD_MNEM_SUFFIX case LONG_MNEM_SUFFIX: -#endif i.suffix = mnem_p[-1]; mnem_p[-1] = '\0'; current_templates = hash_find (op_hash, mnemonic); break; /* Intel Syntax */ - case INTEL_DWORD_MNEM_SUFFIX: + case DWORD_MNEM_SUFFIX: if (intel_syntax) { i.suffix = mnem_p[-1]; @@ -1359,7 +1357,7 @@ md_assemble (line) ? No_sSuf : (i.suffix == LONG_MNEM_SUFFIX ? No_lSuf - : (i.suffix == INTEL_DWORD_MNEM_SUFFIX + : (i.suffix == DWORD_MNEM_SUFFIX ? No_dSuf : (i.suffix == LONG_DOUBLE_MNEM_SUFFIX ? No_xSuf : 0)))))); @@ -1518,7 +1516,7 @@ md_assemble (line) if (i.tm.opcode_modifier & Size16) i.suffix = WORD_MNEM_SUFFIX; else - i.suffix = DWORD_MNEM_SUFFIX; + i.suffix = LONG_MNEM_SUFFIX; } else if (i.reg_operands) { @@ -1535,7 +1533,7 @@ md_assemble (line) { i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX : (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX : - DWORD_MNEM_SUFFIX); + LONG_MNEM_SUFFIX); break; } } @@ -1590,7 +1588,7 @@ md_assemble (line) } } } - else if (i.suffix == DWORD_MNEM_SUFFIX) + else if (i.suffix == LONG_MNEM_SUFFIX) { int op; for (op = i.operands; --op >= 0; ) @@ -1744,8 +1742,7 @@ md_assemble (line) /* Now select between word & dword operations via the operand size prefix, except for instructions that will ignore this prefix anyway. */ - if (((intel_syntax && (i.suffix == INTEL_DWORD_MNEM_SUFFIX)) - || i.suffix == DWORD_MNEM_SUFFIX + if (((intel_syntax && (i.suffix == DWORD_MNEM_SUFFIX)) || i.suffix == LONG_MNEM_SUFFIX) == flag_16bit_code && !(i.tm.opcode_modifier & IgnoreSize)) { @@ -1758,7 +1755,7 @@ md_assemble (line) } /* Size floating point instruction. */ if (i.suffix == LONG_MNEM_SUFFIX - || (intel_syntax && i.suffix == INTEL_DWORD_MNEM_SUFFIX)) + || (intel_syntax && i.suffix == DWORD_MNEM_SUFFIX)) { if (i.tm.opcode_modifier & FloatMF) i.tm.base_opcode ^= 4; @@ -2578,7 +2575,7 @@ i386_immediate (imm_start) i.types[this_operand] |= (bigimm | smallest_imm_type ((long) exp->X_add_number)); - /* If a suffix is given, this operand may be shortended. */ + /* If a suffix is given, this operand may be shortened. */ switch (i.suffix) { case WORD_MNEM_SUFFIX: @@ -2589,8 +2586,12 @@ i386_immediate (imm_start) break; } } -#ifdef OBJ_AOUT - else if (exp_seg != text_section +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) + else if ( +#ifdef BFD_ASSEMBLER + OUTPUT_FLAVOR == bfd_target_aout_flavour && +#endif + exp_seg != text_section && exp_seg != data_section && exp_seg != bss_section && exp_seg != undefined_section @@ -2599,7 +2600,11 @@ i386_immediate (imm_start) #endif ) { +#ifdef BFD_ASSEMBLER + as_bad (_("Unimplemented segment %s in operand"), exp_seg->name); +#else as_bad (_("Unimplemented segment type %d in operand"), exp_seg); +#endif return 0; } #endif @@ -2824,13 +2829,21 @@ i386_displacement (disp_start, disp_end) if (fits_in_signed_byte (exp->X_add_number)) i.types[this_operand] |= Disp8; } -#ifdef OBJ_AOUT - else if (exp_seg != text_section +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) + else if ( +#ifdef BFD_ASSEMBLER + OUTPUT_FLAVOR == bfd_target_aout_flavour && +#endif + exp_seg != text_section && exp_seg != data_section && exp_seg != bss_section && exp_seg != undefined_section) { - as_bad (_ ("Unimplemented segment type %d in operand"), exp_seg); +#ifdef BFD_ASSEMBLER + as_bad (_("Unimplemented segment %s in operand"), exp_seg->name); +#else + as_bad (_("Unimplemented segment type %d in operand"), exp_seg); +#endif return 0; } #endif @@ -2863,14 +2876,14 @@ i386_operand_modifier (op_string, got_a_ if (got_a_float) i.suffix = SHORT_MNEM_SUFFIX; else - i.suffix = DWORD_MNEM_SUFFIX; + i.suffix = LONG_MNEM_SUFFIX; *op_string += 9; return DWORD_PTR; } else if (!strncasecmp (*op_string, "QWORD PTR", 9)) { - i.suffix = INTEL_DWORD_MNEM_SUFFIX; + i.suffix = DWORD_MNEM_SUFFIX; *op_string += 9; return QWORD_PTR; } @@ -4209,8 +4222,9 @@ md_show_usage (stream) } #ifdef BFD_ASSEMBLER -#ifdef OBJ_MAYBE_ELF -#ifdef OBJ_MAYBE_COFF +#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \ + || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \ + || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT))) /* Pick the target format to use. */ @@ -4219,18 +4233,25 @@ i386_target_format () { switch (OUTPUT_FLAVOR) { +#ifdef OBJ_MAYBE_AOUT + case bfd_target_aout_flavour: + return AOUT_TARGET_FORMAT; +#endif +#ifdef OBJ_MAYBE_COFF case bfd_target_coff_flavour: return "coff-i386"; +#endif +#ifdef OBJ_MAYBE_ELF case bfd_target_elf_flavour: return "elf32-i386"; +#endif default: abort (); return NULL; } } -#endif /* OBJ_MAYBE_COFF */ -#endif /* OBJ_MAYBE_ELF */ +#endif /* OBJ_MAYBE_ more than one */ #endif /* BFD_ASSEMBLER */ symbolS * @@ -4260,17 +4281,20 @@ md_section_align (segment, size) segT segment ATTRIBUTE_UNUSED; valueT size; { -#ifdef OBJ_AOUT #ifdef BFD_ASSEMBLER - /* For a.out, force the section size to be aligned. If we don't do - this, BFD will align it for us, but it will not write out the - final bytes of the section. This may be a bug in BFD, but it is - easier to fix it here since that is how the other a.out targets - work. */ - int align; +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT)) + if (OUTPUT_FLAVOR == bfd_target_aout_flavour) + { + /* For a.out, force the section size to be aligned. If we don't do + this, BFD will align it for us, but it will not write out the + final bytes of the section. This may be a bug in BFD, but it is + easier to fix it here since that is how the other a.out targets + work. */ + int align; - align = bfd_get_section_alignment (stdoutput, segment); - size = ((size + (1 << align) - 1) & ((valueT) -1 << align)); + align = bfd_get_section_alignment (stdoutput, segment); + size = ((size + (1 << align) - 1) & ((valueT) -1 << align)); + } #endif #endif diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-i386.h binutils-2.9.5.0.27/gas/config/tc-i386.h --- binutils-2.9.5.0.24/gas/config/tc-i386.h Mon Sep 13 09:37:16 1999 +++ binutils-2.9.5.0.27/gas/config/tc-i386.h Fri Jan 28 08:33:37 2000 @@ -1,5 +1,5 @@ /* tc-i386.h -- Header file for tc-i386.c - Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -74,35 +74,36 @@ extern int tc_i386_fix_adjustable PARAMS #define TARGET_ARCH bfd_arch_i386 -#ifdef OBJ_AOUT #ifdef TE_NetBSD -#define TARGET_FORMAT "a.out-i386-netbsd" +#define AOUT_TARGET_FORMAT "a.out-i386-netbsd" #endif #ifdef TE_386BSD -#define TARGET_FORMAT "a.out-i386-bsd" +#define AOUT_TARGET_FORMAT "a.out-i386-bsd" #endif #ifdef TE_LINUX -#define TARGET_FORMAT "a.out-i386-linux" +#define AOUT_TARGET_FORMAT "a.out-i386-linux" #endif #ifdef TE_Mach -#define TARGET_FORMAT "a.out-mach3" +#define AOUT_TARGET_FORMAT "a.out-mach3" #endif #ifdef TE_DYNIX -#define TARGET_FORMAT "a.out-i386-dynix" +#define AOUT_TARGET_FORMAT "a.out-i386-dynix" #endif -#ifndef TARGET_FORMAT -#define TARGET_FORMAT "a.out-i386" +#ifndef AOUT_TARGET_FORMAT +#define AOUT_TARGET_FORMAT "a.out-i386" #endif -#endif /* OBJ_AOUT */ +#if ((defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_COFF)) \ + || (defined (OBJ_MAYBE_ELF) && defined (OBJ_MAYBE_AOUT)) \ + || (defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT))) +extern const char *i386_target_format PARAMS ((void)); +#define TARGET_FORMAT i386_target_format () +#else #ifdef OBJ_ELF #define TARGET_FORMAT "elf32-i386" #endif - -#ifdef OBJ_MAYBE_ELF -#ifdef OBJ_MAYBE_COFF -extern const char *i386_target_format PARAMS ((void)); -#define TARGET_FORMAT i386_target_format () +#ifdef OBJ_AOUT +#define TARGET_FORMAT AOUT_TARGET_FORMAT #endif #endif @@ -216,7 +217,6 @@ extern const char extra_symbol_chars[]; #define NO_BASE_REGISTER_16 6 /* these are the instruction mnemonic suffixes. */ -#define DWORD_MNEM_SUFFIX 'l' #define WORD_MNEM_SUFFIX 'w' #define BYTE_MNEM_SUFFIX 'b' #define SHORT_MNEM_SUFFIX 's' @@ -224,7 +224,7 @@ extern const char extra_symbol_chars[]; /* Intel Syntax */ #define LONG_DOUBLE_MNEM_SUFFIX 'x' /* Intel Syntax */ -#define INTEL_DWORD_MNEM_SUFFIX 'd' +#define DWORD_MNEM_SUFFIX 'd' /* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */ #define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */ diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-mcore.c binutils-2.9.5.0.27/gas/config/tc-mcore.c --- binutils-2.9.5.0.24/gas/config/tc-mcore.c Fri Nov 19 09:43:18 1999 +++ binutils-2.9.5.0.27/gas/config/tc-mcore.c Tue Feb 1 13:26:00 2000 @@ -1,5 +1,5 @@ /* tc-mcore.c -- Assemble code for M*Core - Copyright (C) 1999 Free Software Foundation. + Copyright (C) 1999, 2000 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -1339,8 +1339,11 @@ md_assemble (str) ++ op_end; if (* op_end == ',') - /* parse_rt calls frag_more() for us. */ - input_line_pointer = parse_rt (op_end + 1, & output, 0, 0); + { + /* parse_rt calls frag_more() for us. */ + input_line_pointer = parse_rt (op_end + 1, & output, 0, 0); + op_end = input_line_pointer; + } else { as_bad (_("second operand missing")); @@ -1351,6 +1354,7 @@ md_assemble (str) case LJ: input_line_pointer = parse_rt (op_end + 1, & output, 1, 0); /* parse_rt() calls frag_more() for us. */ + op_end = input_line_pointer; break; case RM: @@ -1463,6 +1467,7 @@ md_assemble (str) case BR: input_line_pointer = parse_exp (op_end + 1, & e); + op_end = input_line_pointer; output = frag_more (2); @@ -1495,6 +1500,7 @@ md_assemble (str) case JC: input_line_pointer = parse_exp (op_end + 1, & e); + op_end = input_line_pointer; output = frag_var (rs_machine_dependent, md_relax_table[C (COND_JUMP, COND32)].rlx_length, @@ -1505,6 +1511,8 @@ md_assemble (str) case JU: input_line_pointer = parse_exp (op_end + 1, & e); + op_end = input_line_pointer; + output = frag_var (rs_machine_dependent, md_relax_table[C (UNCD_JUMP, UNCD32)].rlx_length, md_relax_table[C (UNCD_JUMP, UNCD12)].rlx_length, @@ -1516,6 +1524,7 @@ md_assemble (str) inst = MCORE_INST_JSRI; /* jsri */ input_line_pointer = parse_rt (op_end + 1, & output, 1, & e); /* parse_rt() calls frag_more for us. */ + op_end = input_line_pointer; /* Only do this if we know how to do it ... */ if (e.X_op != O_absent && do_jsri2bsr) @@ -1595,6 +1604,14 @@ md_assemble (str) default: as_bad (_("unimplemented opcode \"%s\""), name); } + + /* Drop whitespace after all the operands have been parsed. */ + while (isspace (* op_end)) + op_end ++; + + /* Give warning message if the insn has more operands than required. */ + if (strcmp (op_end, opcode->name) && strcmp (op_end, "")) + as_warn (_("ignoring operands: %s "), op_end); output[0] = INST_BYTE0 (inst); output[1] = INST_BYTE1 (inst); @@ -1971,8 +1988,8 @@ md_apply_fix3 (fixP, valp, segment) as_bad_where (file, fixP->fx_line, _("pcrel for branch to %s too far (0x%x)"), symname, val); - buf[0] |= ((val >> 8) & 0x7); - buf[1] |= (val & 0xff); + buf[0] |= ((val >> 8) & 0x7); + buf[1] |= (val & 0xff); break; case BFD_RELOC_MCORE_PCREL_IMM8BY4: /* lower 8 bits of 2 byte opcode */ @@ -1991,7 +2008,7 @@ md_apply_fix3 (fixP, valp, segment) as_bad_where (file, fixP->fx_line, _("pcrel for loopt too far (0x%x)"), val); val /= 2; - buf[1] |= (val & 0xf); + buf[1] |= (val & 0xf); break; case BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: @@ -2248,7 +2265,7 @@ mcore_force_relocation (fix) { if ( fix->fx_r_type == BFD_RELOC_VTABLE_INHERIT || fix->fx_r_type == BFD_RELOC_VTABLE_ENTRY - || fixP->fx_r_type == BFD_RELOC_RVA) + || fix->fx_r_type == BFD_RELOC_RVA) return 1; return 0; diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-mips.c binutils-2.9.5.0.27/gas/config/tc-mips.c --- binutils-2.9.5.0.24/gas/config/tc-mips.c Thu Dec 2 09:15:17 1999 +++ binutils-2.9.5.0.27/gas/config/tc-mips.c Fri Jan 21 13:08:26 2000 @@ -11446,6 +11446,36 @@ static procS cur_proc; static procS *cur_proc_ptr; static int numprocs; +/* When we align code in the .text section of mips16, use the correct two + byte nop pattern of 0x6500 (move $0,$0) */ + +int +mips_do_align (n, fill, len, max) + int n; + const char *fill; + int len; + int max; +{ + if (fill == NULL + && subseg_text_p (now_seg) + && n > 1 + && mips_opts.mips16) + { + static const unsigned char be_nop[] = { 0x65, 0x00 }; + static const unsigned char le_nop[] = { 0x00, 0x65 }; + + frag_align (1, 0, 0); + + if (target_big_endian) + frag_align_pattern (n, be_nop, 2, max); + else + frag_align_pattern (n, le_nop, 2, max); + return 1; + } + + return 0; +} + static void md_obj_begin () { diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-mips.h binutils-2.9.5.0.27/gas/config/tc-mips.h --- binutils-2.9.5.0.24/gas/config/tc-mips.h Thu Jun 3 11:02:01 1999 +++ binutils-2.9.5.0.27/gas/config/tc-mips.h Thu Jan 20 19:06:47 2000 @@ -55,6 +55,9 @@ extern int mips_relax_frag PARAMS ((stru #define md_undefined_symbol(name) (0) #define md_operand(x) +extern int mips_do_align PARAMS ((int, const char *, int, int)); +#define md_do_align(n,fill,len,max,l) if (mips_do_align (n,fill,len,max)) goto l + /* We permit PC relative difference expressions when generating embedded PIC code. */ #define DIFF_EXPR_OK diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-ppc.c binutils-2.9.5.0.27/gas/config/tc-ppc.c --- binutils-2.9.5.0.24/gas/config/tc-ppc.c Sat Aug 21 10:32:26 1999 +++ binutils-2.9.5.0.27/gas/config/tc-ppc.c Tue Feb 1 13:26:01 2000 @@ -1,5 +1,6 @@ /* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000) - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GAS, the GNU Assembler. @@ -4556,14 +4557,13 @@ ppc_fix_adjustable (fix) { while (symbol_get_tc (csect)->next != (symbolS *) NULL && (symbol_get_frag (symbol_get_tc (csect)->next)->fr_address - <= symbol_get_frag (fix->fx_addsy)->fr_address)) + <= val)) { /* If the csect address equals the symbol value, then we have to look through the full symbol table to see whether this is the csect we want. Note that we will only get here if the csect has zero length. */ - if ((symbol_get_frag (csect)->fr_address - == symbol_get_frag (fix->fx_addsy)->fr_address) + if ((symbol_get_frag (csect)->fr_address == val) && S_GET_VALUE (csect) == S_GET_VALUE (fix->fx_addsy)) { symbolS *scan; diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-ppc.h binutils-2.9.5.0.27/gas/config/tc-ppc.h --- binutils-2.9.5.0.24/gas/config/tc-ppc.h Sat Jul 10 08:51:24 1999 +++ binutils-2.9.5.0.27/gas/config/tc-ppc.h Tue Feb 1 13:26:01 2000 @@ -1,5 +1,6 @@ /* tc-ppc.h -- Header file for tc-ppc.c. - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000 + Free Software Foundation, Inc. Written by Ian Lance Taylor, Cygnus Support. This file is part of GAS, the GNU Assembler. @@ -186,6 +187,19 @@ extern void ppc_adjust_symtab PARAMS ((v /* Niclas Andersson says this is needed. */ #define SUB_SEGMENT_ALIGN(SEG) 2 + +/* We also need to copy, in particular, the class of the symbol, + over what obj-coff would otherwise have copied. */ +#define OBJ_COPY_SYMBOL_ATTRIBUTES(dest,src) \ +do { \ + if (SF_GET_GET_SEGMENT (dest)) \ + S_SET_SEGMENT (dest, S_GET_SEGMENT (src)); \ + symbol_get_tc (dest)->size = symbol_get_tc (src)->size; \ + symbol_get_tc (dest)->align = symbol_get_tc (src)->align; \ + symbol_get_tc (dest)->class = symbol_get_tc (src)->class; \ + symbol_get_tc (dest)->within = symbol_get_tc (src)->within; \ +} while (0) + #endif /* OBJ_XCOFF */ diff -upr --new-file binutils-2.9.5.0.24/gas/config/tc-sparc.c binutils-2.9.5.0.27/gas/config/tc-sparc.c --- binutils-2.9.5.0.24/gas/config/tc-sparc.c Mon Aug 9 10:27:24 1999 +++ binutils-2.9.5.0.27/gas/config/tc-sparc.c Fri Jan 21 13:08:26 2000 @@ -412,6 +412,8 @@ struct option md_longopts[] = { #ifdef OBJ_ELF #define OPTION_NO_UNDECLARED_REGS (OPTION_MD_BASE + 12) {"no-undeclared-regs", no_argument, NULL, OPTION_NO_UNDECLARED_REGS}, +#define OPTION_UNDECLARED_REGS (OPTION_MD_BASE + 13) + {"undeclared-regs", no_argument, NULL, OPTION_UNDECLARED_REGS}, #endif {NULL, no_argument, NULL, 0} }; @@ -566,6 +568,10 @@ md_parse_option (c, arg) case OPTION_NO_UNDECLARED_REGS: no_undeclared_regs = 1; break; + + case OPTION_UNDECLARED_REGS: + no_undeclared_regs = 0; + break; #endif default: @@ -619,6 +625,10 @@ md_show_usage (stream) fprintf (stream, _("\ -KPIC generate PIC\n\ -V print assembler version number\n\ +-undeclared-regs ignore application global register usage without\n\ + appropriate .register directive (default)\n\ +-no-undeclared-regs force error on application global register usage\n\ + without appropriate .register directive\n\ -q ignored\n\ -Qy, -Qn ignored\n\ -s ignored\n")); diff -upr --new-file binutils-2.9.5.0.24/gas/config/te-multi.h binutils-2.9.5.0.27/gas/config/te-multi.h --- binutils-2.9.5.0.24/gas/config/te-multi.h Thu Jun 3 11:02:01 1999 +++ binutils-2.9.5.0.27/gas/config/te-multi.h Wed Dec 31 16:00:00 1969 @@ -1,22 +0,0 @@ -/* - * This file is te-generic.h and is intended to be a template for - * target environment specific header files. - * - * It is my intent that this file will evolve into a file suitable for config, - * compile, and copying as an aid for testing and porting. xoxorich. - */ - -/* Added these, because if we don't know what we're targetting we may - need an assembler version of libgcc, and that will use local - labels. */ -#define LOCAL_LABELS_DOLLAR 1 -#define LOCAL_LABELS_FB 1 - -/* these define interfaces */ -#ifdef OBJ_HEADER -#include OBJ_HEADER -#else -#include "obj-format.h" -#endif - -/* end of te-generic.h */ diff -upr --new-file binutils-2.9.5.0.24/gas/configure binutils-2.9.5.0.27/gas/configure --- binutils-2.9.5.0.24/gas/configure Thu Jan 13 11:43:43 2000 +++ binutils-2.9.5.0.27/gas/configure Wed Feb 2 10:53:39 2000 @@ -51,6 +51,7 @@ program_suffix=NONE program_transform_name=s,x,x, silent= site= +sitefile= srcdir= target=NONE verbose= @@ -165,6 +166,7 @@ Configuration: --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages + --site-file=FILE use FILE as the site file --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX @@ -335,6 +337,11 @@ EOF -site=* | --site=* | --sit=*) site="$ac_optarg" ;; + -site-file | --site-file | --site-fil | --site-fi | --site-f) + ac_prev=sitefile ;; + -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*) + sitefile="$ac_optarg" ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) @@ -500,12 +507,16 @@ fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" +if test -z "$sitefile"; then + if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi fi +else + CONFIG_SITE="$sitefile" fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then @@ -592,7 +603,7 @@ else { echo "configure: error: can not r fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:596: checking host system type" >&5 +echo "configure:607: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -613,7 +624,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)- echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:617: checking target system type" >&5 +echo "configure:628: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -631,7 +642,7 @@ target_os=`echo $target | sed 's/^\([^-] echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:635: checking build system type" >&5 +echo "configure:646: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -666,7 +677,7 @@ test "$host_alias" != "$target_alias" && # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:670: checking for a BSD compatible install" >&5 +echo "configure:681: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -719,7 +730,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:723: checking whether build environment is sane" >&5 +echo "configure:734: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -776,7 +787,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:780: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:791: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -822,7 +833,7 @@ EOF missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:826: checking for working aclocal" >&5 +echo "configure:837: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -835,7 +846,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:839: checking for working autoconf" >&5 +echo "configure:850: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -848,7 +859,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:852: checking for working automake" >&5 +echo "configure:863: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -861,7 +872,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:865: checking for working autoheader" >&5 +echo "configure:876: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -874,7 +885,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:878: checking for working makeinfo" >&5 +echo "configure:889: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -960,7 +971,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:964: checking for $ac_word" >&5 +echo "configure:975: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -990,7 +1001,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:994: checking for $ac_word" >&5 +echo "configure:1005: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1020,7 +1031,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1024: checking for $ac_word" >&5 +echo "configure:1035: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1071,7 +1082,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1075: checking for $ac_word" >&5 +echo "configure:1086: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1103,7 +1114,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1107: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1118: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1114,12 +1125,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1118 "configure" +#line 1129 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1145,12 +1156,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1154: checking whether we are using GNU C" >&5 +echo "configure:1165: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1159,7 +1170,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1178,7 +1189,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1182: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1193: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1221,7 +1232,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1225: checking for ld used by GCC" >&5 +echo "configure:1236: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1245,10 +1256,10 @@ echo "configure:1225: checking for ld us esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1249: checking for GNU ld" >&5 +echo "configure:1260: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1252: checking for non-GNU ld" >&5 +echo "configure:1263: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1284,7 +1295,7 @@ fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1288: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1299: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1300,7 +1311,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1304: checking for BSD-compatible nm" >&5 +echo "configure:1315: checking for BSD-compatible nm" >&5 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1338,7 +1349,7 @@ echo "$ac_t""$NM" 1>&6 # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6 -echo "configure:1342: checking command to parse $NM output" >&5 +echo "configure:1353: checking command to parse $NM output" >&5 if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1401,11 +1412,11 @@ void nm_test_func(){} int main(){nm_test_var='a';nm_test_func;return 0;} EOF - if { (eval echo configure:1405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1409: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1420: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # Try sorting and uniquifying the output. if sort "$ac_nlist" | uniq > "$ac_nlist"T; then @@ -1457,7 +1468,7 @@ EOF ac_save_CFLAGS="$CFLAGS" LIBS="conftestm.$ac_objext" CFLAGS="$CFLAGS$no_builtin_flag" - if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + if { (eval echo configure:1472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_pipe_works=yes else echo "configure: failed program was:" >&5 @@ -1503,7 +1514,7 @@ fi echo "$ac_t""$ac_result" 1>&6 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6 -echo "configure:1507: checking for _ prefix in compiled symbols" >&5 +echo "configure:1518: checking for _ prefix in compiled symbols" >&5 if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1512,10 +1523,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then # Now try to grab the symbols. ac_nlist=conftest.nm - if { (eval echo configure:1519: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then + if { (eval echo configure:1530: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes @@ -1541,7 +1552,7 @@ echo "$ac_t""$ac_cv_sys_symbol_underscor USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no} echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1545: checking whether ln -s works" >&5 +echo "configure:1556: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1583,8 +1594,8 @@ test "$ac_cv_prog_gnu_ld" = yes && libto case "$host" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1587 "configure"' > conftest.$ac_ext - if { (eval echo configure:1588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1598 "configure"' > conftest.$ac_ext + if { (eval echo configure:1599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1605,19 +1616,19 @@ case "$host" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1609: checking whether the C compiler needs -belf" >&5 +echo "configure:1620: checking whether the C compiler needs -belf" >&5 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1640,7 +1651,7 @@ echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1644: checking for $ac_word" >&5 +echo "configure:1655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1672,7 +1683,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1676: checking for $ac_word" >&5 +echo "configure:1687: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1707,7 +1718,7 @@ fi # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1711: checking for $ac_word" >&5 +echo "configure:1722: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1739,7 +1750,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1743: checking for $ac_word" >&5 +echo "configure:1754: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1928,9 +1939,9 @@ if test -n "$enable_targets" ; then result=`$ac_config_sub $t 2>/dev/null` if test -n "$result" ; then canon_targets="$canon_targets $result" -# else -# # Permit "all", etc. We don't support it yet though. -# canon_targets="$canon_targets $t" + else + # Permit "all", etc. We don't support it yet though. + canon_targets="$canon_targets $t" fi done _gas_uniq_list="$canon_targets" @@ -1952,7 +1963,9 @@ emulations="" for this_target in $target $canon_targets ; do +if test "$this_target" != "all"; then eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` +fi # check for architecture variants arch= @@ -2276,9 +2289,10 @@ EOF *-elf) bfd_gas=yes ;; *-ecoff) bfd_gas=yes ;; *-som) bfd_gas=yes ;; - #enable bfd for coff to allow testing if a bfd target is the primary target, - #but not for coff as the primary target + #enable bfd for coff and aout to allow testing if a bfd target is + #the primary target, but not for coff or aout as the primary target i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;; + i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;; *) ;; esac @@ -2386,11 +2400,17 @@ EOF big) emulation="mipsbelf mipslelf mipself" ;; *) emulation="mipslelf mipsbelf mipself" ;; esac ;; - i386-*-elf) emulation="i386elf" ;; + # Turn on support for i386 AOUT and COFF if asked. + i386-*-linux*-elf) + if test x"$this_target" = x"all"; then + emulation="i386aout i386coff" + else + emulation="i386elf" + fi + ;; + i386-*-aout) emulation="i386aout" ;; i386-*-coff) emulation="i386coff" ;; - # Uncommenting the next line will turn on support for i386 COFF - # in any i386 ELF configuration. - # i386-*-*-elf) emulation="i386elf i386coff" ;; + i386-*-elf) emulation="i386elf" ;; esac emulations="$emulations $emulation" @@ -2507,6 +2527,8 @@ for em in . $emulations ; do fmt=elf file=mipself ;; mipsbecoff | mipslecoff) fmt=ecoff file=mipsecoff ;; + i386aout) + fmt=aout file=i386aout ;; i386coff) fmt=coff file=i386coff ;; i386elf) @@ -2597,7 +2619,6 @@ if test `set . $emfiles ; shift ; echo $ # USE_EMULATIONS or include any of the e-files as they will only be bloat. case "${obj_format}${emfiles}" in multi* | *mips*) - te_file=multi extra_objects="$extra_objects $emfiles" cat >> confdefs.h <<\EOF #define USE_EMULATIONS 1 @@ -2689,7 +2710,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2692: checking for $ac_word" >&5 +echo "configure:2714: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2719,7 +2740,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2722: checking for $ac_word" >&5 +echo "configure:2744: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2770,7 +2791,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2773: checking for $ac_word" >&5 +echo "configure:2795: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2802,7 +2823,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2805: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2827: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -2813,12 +2834,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 2816 "configure" +#line 2838 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2844,12 +2865,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2847: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2869: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2852: checking whether we are using GNU C" >&5 +echo "configure:2874: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2858,7 +2879,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2877,7 +2898,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2880: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2902: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2914,7 +2935,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2917: checking for $ac_word" >&5 +echo "configure:2939: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2945,7 +2966,7 @@ done test -n "$YACC" || YACC="yacc" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2948: checking how to run the C preprocessor" >&5 +echo "configure:2970: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2960,13 +2981,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2977,13 +2998,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2994,13 +3015,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -3030,7 +3051,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3033: checking for $ac_word" >&5 +echo "configure:3055: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3063,7 +3084,7 @@ test -n "$LEX" || LEX=""$missing_dir/mis # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3066: checking for $ac_word" >&5 +echo "configure:3088: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3097,7 +3118,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:3100: checking for yywrap in -l$ac_lib" >&5 +echo "configure:3122: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3105,7 +3126,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3139,7 +3160,7 @@ fi fi echo $ac_n "checking lex output file root""... $ac_c" 1>&6 -echo "configure:3142: checking lex output file root" >&5 +echo "configure:3164: checking lex output file root" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3160,7 +3181,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 -echo "configure:3163: checking whether yytext is a pointer" >&5 +echo "configure:3185: checking whether yytext is a pointer" >&5 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3172,14 +3193,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPU ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_prog_lex_yytext_pointer=yes else @@ -3203,7 +3224,7 @@ fi ALL_LINGUAS= echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:3206: checking for POSIXized ISC" >&5 +echo "configure:3228: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -3224,12 +3245,12 @@ else fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3227: checking for ANSI C header files" >&5 +echo "configure:3249: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3237,7 +3258,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3254,7 +3275,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3272,7 +3293,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3293,7 +3314,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3304,7 +3325,7 @@ if (XOR (islower (i), ISLOWER (i)) || to exit (0); } EOF -if { (eval echo configure:3307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -3328,12 +3349,12 @@ EOF fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3331: checking for working const" >&5 +echo "configure:3353: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3403,21 +3424,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3406: checking for inline" >&5 +echo "configure:3428: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3443,12 +3464,12 @@ EOF esac echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3446: checking for off_t" >&5 +echo "configure:3468: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3476,12 +3497,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3479: checking for size_t" >&5 +echo "configure:3501: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3511,19 +3532,19 @@ fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:3514: checking for working alloca.h" >&5 +echo "configure:3536: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:3526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -3544,12 +3565,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:3547: checking for alloca" >&5 +echo "configure:3569: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -3609,12 +3630,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:3612: checking whether alloca needs Cray hooks" >&5 +echo "configure:3634: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3642: checking for $ac_func" >&5 +echo "configure:3664: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3694,7 +3715,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3697: checking stack direction for C alloca" >&5 +echo "configure:3719: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3702,7 +3723,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3746,17 +3767,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3749: checking for $ac_hdr" >&5 +echo "configure:3771: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3785,12 +3806,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3788: checking for $ac_func" >&5 +echo "configure:3810: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3838,7 +3859,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:3841: checking for working mmap" >&5 +echo "configure:3863: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3846,7 +3867,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -4014,17 +4035,17 @@ unistd.h values.h sys/param.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4017: checking for $ac_hdr" >&5 +echo "configure:4039: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4054,12 +4075,12 @@ done __argz_count __argz_stringify __argz_next do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4057: checking for $ac_func" >&5 +echo "configure:4079: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4111,12 +4132,12 @@ done for ac_func in stpcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4114: checking for $ac_func" >&5 +echo "configure:4136: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4173,19 +4194,19 @@ EOF if test $ac_cv_header_locale_h = yes; then echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 -echo "configure:4176: checking for LC_MESSAGES" >&5 +echo "configure:4198: checking for LC_MESSAGES" >&5 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return LC_MESSAGES ; return 0; } EOF -if { (eval echo configure:4188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* am_cv_val_LC_MESSAGES=yes else @@ -4206,7 +4227,7 @@ EOF fi fi echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 -echo "configure:4209: checking whether NLS is requested" >&5 +echo "configure:4231: checking whether NLS is requested" >&5 # Check whether --enable-nls or --disable-nls was given. if test "${enable_nls+set}" = set; then enableval="$enable_nls" @@ -4226,7 +4247,7 @@ fi EOF echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 -echo "configure:4229: checking whether included gettext is requested" >&5 +echo "configure:4251: checking whether included gettext is requested" >&5 # Check whether --with-included-gettext or --without-included-gettext was given. if test "${with_included_gettext+set}" = set; then withval="$with_included_gettext" @@ -4245,17 +4266,17 @@ fi ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 -echo "configure:4248: checking for libintl.h" >&5 +echo "configure:4270: checking for libintl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4272,19 +4293,19 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 -echo "configure:4275: checking for gettext in libc" >&5 +echo "configure:4297: checking for gettext in libc" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return (int) gettext ("") ; return 0; } EOF -if { (eval echo configure:4287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libc=yes else @@ -4300,7 +4321,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1 if test "$gt_cv_func_gettext_libc" != "yes"; then echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 -echo "configure:4303: checking for bindtextdomain in -lintl" >&5 +echo "configure:4325: checking for bindtextdomain in -lintl" >&5 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4308,7 +4329,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4335,19 +4356,19 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 -echo "configure:4338: checking for gettext in libintl" >&5 +echo "configure:4360: checking for gettext in libintl" >&5 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gt_cv_func_gettext_libintl=yes else @@ -4375,7 +4396,7 @@ EOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4378: checking for $ac_word" >&5 +echo "configure:4400: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4409,12 +4430,12 @@ fi for ac_func in dcgettext do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4412: checking for $ac_func" >&5 +echo "configure:4434: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4464,7 +4485,7 @@ done # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4467: checking for $ac_word" >&5 +echo "configure:4489: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4500,7 +4521,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4503: checking for $ac_word" >&5 +echo "configure:4525: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4532,7 +4553,7 @@ else fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* CATOBJEXT=.gmo DATADIRNAME=share @@ -4572,7 +4593,7 @@ fi # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4575: checking for $ac_word" >&5 +echo "configure:4597: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4606,7 +4627,7 @@ fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4609: checking for $ac_word" >&5 +echo "configure:4631: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4642,7 +4663,7 @@ fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4645: checking for $ac_word" >&5 +echo "configure:4667: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4732,7 +4753,7 @@ fi LINGUAS= else echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 -echo "configure:4735: checking for catalogs to be installed" >&5 +echo "configure:4757: checking for catalogs to be installed" >&5 NEW_LINGUAS= for lang in ${LINGUAS=$ALL_LINGUAS}; do case "$ALL_LINGUAS" in @@ -4760,17 +4781,17 @@ echo "configure:4735: checking for catal if test "$CATOBJEXT" = ".cat"; then ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 -echo "configure:4763: checking for linux/version.h" >&5 +echo "configure:4785: checking for linux/version.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4833,7 +4854,7 @@ fi echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:4836: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:4858: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -4856,12 +4877,12 @@ fi echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:4859: checking for Cygwin environment" >&5 +echo "configure:4881: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -4889,19 +4910,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:4892: checking for mingw32 environment" >&5 +echo "configure:4914: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -4920,7 +4941,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=y echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:4923: checking for executable suffix" >&5 +echo "configure:4945: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4930,10 +4951,10 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:4933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in - *.c | *.o | *.obj) ;; + *.c | *.o | *.obj | *.ilk | *.pdb) ;; *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; esac done @@ -4955,17 +4976,17 @@ for ac_hdr in string.h stdlib.h memory.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:4958: checking for $ac_hdr" >&5 +echo "configure:4980: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -4995,7 +5016,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:4998: checking whether compiling a cross-assembler" >&5 +echo "configure:5020: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -5010,19 +5031,19 @@ echo "$ac_t""$cross_gas" 1>&6 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:5013: checking for working alloca.h" >&5 +echo "configure:5035: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -5043,12 +5064,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:5046: checking for alloca" >&5 +echo "configure:5068: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -5108,12 +5129,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:5111: checking whether alloca needs Cray hooks" >&5 +echo "configure:5133: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5141: checking for $ac_func" >&5 +echo "configure:5163: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5193,7 +5214,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:5196: checking stack direction for C alloca" >&5 +echo "configure:5218: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -5201,7 +5222,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:5245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -5242,21 +5263,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:5245: checking for inline" >&5 +echo "configure:5267: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -5286,12 +5307,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5289: checking for $ac_func" >&5 +echo "configure:5311: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5343,12 +5364,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5346: checking for $ac_func" >&5 +echo "configure:5368: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5400,12 +5421,12 @@ done # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:5403: checking for working assert macro" >&5 +echo "configure:5425: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -5421,7 +5442,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -5462,12 +5483,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:5465: checking whether declaration is required for strstr" >&5 +echo "configure:5487: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -5499,12 +5520,12 @@ fi echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:5502: checking whether declaration is required for malloc" >&5 +echo "configure:5524: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -5536,12 +5557,12 @@ fi echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:5539: checking whether declaration is required for free" >&5 +echo "configure:5561: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -5573,12 +5594,12 @@ fi echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:5576: checking whether declaration is required for sbrk" >&5 +echo "configure:5598: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -5610,12 +5631,12 @@ fi echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 -echo "configure:5613: checking whether declaration is required for environ" >&5 +echo "configure:5635: checking whether declaration is required for environ" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_environ=no else @@ -5650,12 +5671,12 @@ fi # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:5653: checking whether declaration is required for errno" >&5 +echo "configure:5675: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* gas_cv_decl_needed_errno=no else diff -upr --new-file binutils-2.9.5.0.24/gas/configure.in binutils-2.9.5.0.27/gas/configure.in --- binutils-2.9.5.0.24/gas/configure.in Thu Jan 13 11:43:43 2000 +++ binutils-2.9.5.0.27/gas/configure.in Wed Feb 2 10:53:39 2000 @@ -64,9 +64,9 @@ if test -n "$enable_targets" ; then result=`$ac_config_sub $t 2>/dev/null` if test -n "$result" ; then canon_targets="$canon_targets $result" -# else -# # Permit "all", etc. We don't support it yet though. -# canon_targets="$canon_targets $t" + else + # Permit "all", etc. We don't support it yet though. + canon_targets="$canon_targets $t" fi done GAS_UNIQ(canon_targets) @@ -76,9 +76,11 @@ emulations="" for this_target in $target $canon_targets ; do +if test "$this_target" != "all"; then changequote(,)dnl eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` changequote([,])dnl +fi # check for architecture variants arch= @@ -396,9 +398,10 @@ changequote([,])dnl *-elf) bfd_gas=yes ;; *-ecoff) bfd_gas=yes ;; *-som) bfd_gas=yes ;; - #enable bfd for coff to allow testing if a bfd target is the primary target, - #but not for coff as the primary target + #enable bfd for coff and aout to allow testing if a bfd target is + #the primary target, but not for coff or aout as the primary target i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;; + i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;; *) ;; esac @@ -503,11 +506,17 @@ changequote([,])dnl big) emulation="mipsbelf mipslelf mipself" ;; *) emulation="mipslelf mipsbelf mipself" ;; esac ;; - i386-*-elf) emulation="i386elf" ;; + # Turn on support for i386 AOUT and COFF if asked. + i386-*-linux*-elf) + if test x"$this_target" = x"all"; then + emulation="i386aout i386coff" + else + emulation="i386elf" + fi + ;; + i386-*-aout) emulation="i386aout" ;; i386-*-coff) emulation="i386coff" ;; - # Uncommenting the next line will turn on support for i386 COFF - # in any i386 ELF configuration. - # i386-*-*-elf) emulation="i386elf i386coff" ;; + i386-*-elf) emulation="i386elf" ;; esac emulations="$emulations $emulation" @@ -603,6 +612,8 @@ for em in . $emulations ; do fmt=elf file=mipself ;; mipsbecoff | mipslecoff) fmt=ecoff file=mipsecoff ;; + i386aout) + fmt=aout file=i386aout ;; i386coff) fmt=coff file=i386coff ;; i386elf) @@ -639,7 +650,6 @@ if test `set . $emfiles ; shift ; echo $ # USE_EMULATIONS or include any of the e-files as they will only be bloat. case "${obj_format}${emfiles}" in multi* | *mips*) - te_file=multi extra_objects="$extra_objects $emfiles" AC_DEFINE(USE_EMULATIONS, 1, [Use emulation support?]) ;; esac diff -upr --new-file binutils-2.9.5.0.24/gas/frags.c binutils-2.9.5.0.27/gas/frags.c --- binutils-2.9.5.0.24/gas/frags.c Thu Jun 3 11:01:58 1999 +++ binutils-2.9.5.0.27/gas/frags.c Thu Feb 3 15:24:46 2000 @@ -114,7 +114,7 @@ frag_new (old_frags_var_max_size) assert (frchain_now->frch_last == frag_now); /* Fix up old frag's fr_fix. */ - frag_now->fr_fix = frag_now_fix () - old_frags_var_max_size; + frag_now->fr_fix = frag_now_fix_octets () - old_frags_var_max_size; /* Make sure its type is valid. */ assert (frag_now->fr_type != 0); @@ -336,12 +336,19 @@ frag_align_pattern (alignment, fill_patt } addressT -frag_now_fix () +frag_now_fix_octets () { if (now_seg == absolute_section) return abs_section_offset; - return (addressT) ((char*) obstack_next_free (&frchain_now->frch_obstack) - - frag_now->fr_literal); + + return ((char*) obstack_next_free (&frchain_now->frch_obstack) + - frag_now->fr_literal); +} + +addressT +frag_now_fix () +{ + return frag_now_fix_octets() / OCTETS_PER_BYTE; } void diff -upr --new-file binutils-2.9.5.0.24/gas/frags.h binutils-2.9.5.0.27/gas/frags.h --- binutils-2.9.5.0.24/gas/frags.h Thu Jun 3 11:01:58 1999 +++ binutils-2.9.5.0.27/gas/frags.h Thu Feb 3 15:24:46 2000 @@ -44,14 +44,14 @@ struct obstack; struct frag { - /* Object file address. */ + /* Object file address (as an octet offset). */ addressT fr_address; /* Chain forward; ascending address order. Rooted in frch_root. */ struct frag *fr_next; - /* (Fixed) number of chars we know we have. May be 0. */ + /* (Fixed) number of octets we know we have. May be 0. */ offsetT fr_fix; - /* (Variable) number of chars after above. May be 0. */ + /* (Variable) number of octets after above. May be 0. */ offsetT fr_var; /* For variable-length tail. */ symbolS *fr_symbol; @@ -101,6 +101,7 @@ struct frag instead, use frag_now_fix (). */ COMMON fragS *frag_now; extern addressT frag_now_fix PARAMS ((void)); +extern addressT frag_now_fix_octets PARAMS ((void)); /* For foreign-segment symbol fixups. */ COMMON fragS zero_address_frag; diff -upr --new-file binutils-2.9.5.0.24/gas/gasp.c binutils-2.9.5.0.27/gas/gasp.c --- binutils-2.9.5.0.24/gas/gasp.c Fri Aug 6 08:06:31 1999 +++ binutils-2.9.5.0.27/gas/gasp.c Fri Jan 28 09:10:50 2000 @@ -1,5 +1,6 @@ /* gasp.c - Gnu assembler preprocessor main program. - Copyright (C) 1994, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. + Copyright (C) 1994, 95, 96, 97, 98, 99, 2000 + Free Software Foundation, Inc. Written by Steve and Judy Chamberlain of Cygnus Support, sac@cygnus.com @@ -893,7 +894,7 @@ exp_get_abs (emsg, idx, in, val) exp_t res; idx = exp_parse (idx, in, &res); if (res.add_symbol.len || res.sub_symbol.len) - ERROR ((stderr, emsg)); + ERROR ((stderr, "%s", emsg)); *val = res.value; return idx; } @@ -1384,7 +1385,7 @@ do_data (idx, in, size) idx = exp_parse (idx, in, &e); exp_string (&e, &acc); sb_add_char (&acc, 0); - fprintf (outfile, acc.ptr); + fprintf (outfile, "%s", acc.ptr); if (idx < in->len && in->ptr[idx] == ',') { fprintf (outfile, ","); @@ -1922,7 +1923,7 @@ process_file () || line.ptr[0] == '!')) { /* MRI line comment. */ - fprintf (outfile, sb_name (&line)); + fprintf (outfile, "%s", sb_name (&line)); } else { diff -upr --new-file binutils-2.9.5.0.24/gas/listing.c binutils-2.9.5.0.27/gas/listing.c --- binutils-2.9.5.0.24/gas/listing.c Mon Jul 12 10:13:45 1999 +++ binutils-2.9.5.0.27/gas/listing.c Fri Feb 4 10:26:54 2000 @@ -596,7 +596,7 @@ calc_hex (list) unsigned int address = ~ (unsigned int) 0; fragS *frag; fragS *frag_ptr; - unsigned int byte_in_frag; + unsigned int octet_in_frag; /* Find first frag which says it belongs to this line */ frag = list->frag; @@ -611,33 +611,33 @@ calc_hex (list) while (frag_ptr != (fragS *) NULL && frag_ptr->line == first) { /* Print as many bytes from the fixed part as is sensible */ - byte_in_frag = 0; - while ((offsetT) byte_in_frag < frag_ptr->fr_fix + octet_in_frag = 0; + while ((offsetT) octet_in_frag < frag_ptr->fr_fix && data_buffer_size < MAX_BYTES - 3) { if (address == ~ (unsigned int) 0) { - address = frag_ptr->fr_address; + address = frag_ptr->fr_address / OCTETS_PER_BYTE; } sprintf (data_buffer + data_buffer_size, "%02X", - (frag_ptr->fr_literal[byte_in_frag]) & 0xff); + (frag_ptr->fr_literal[octet_in_frag]) & 0xff); data_buffer_size += 2; - byte_in_frag++; + octet_in_frag++; } { - unsigned int var_rep_max = byte_in_frag; - unsigned int var_rep_idx = byte_in_frag; + unsigned int var_rep_max = octet_in_frag; + unsigned int var_rep_idx = octet_in_frag; /* Print as many bytes from the variable part as is sensible */ - while (((offsetT) byte_in_frag - < frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset) + while (((offsetT) octet_in_frag + < (frag_ptr->fr_fix + frag_ptr->fr_var * frag_ptr->fr_offset)) && data_buffer_size < MAX_BYTES - 3) { if (address == ~ (unsigned int) 0) { - address = frag_ptr->fr_address; + address = frag_ptr->fr_address / OCTETS_PER_BYTE; } sprintf (data_buffer + data_buffer_size, "%02X", @@ -649,7 +649,7 @@ calc_hex (list) data_buffer_size += 2; var_rep_idx++; - byte_in_frag++; + octet_in_frag++; if ((offsetT) var_rep_idx >= frag_ptr->fr_fix + frag_ptr->fr_var) var_rep_idx = var_rep_max; @@ -677,8 +677,10 @@ print_lines (list, lineno, string, addre unsigned int idx; unsigned int nchars; unsigned int lines; - unsigned int byte_in_word = 0; + unsigned int octet_in_word = 0; char *src = data_buffer; + int end = strlen(src); + int cur; /* Print the stuff on the first line */ listing_page (list); @@ -707,18 +709,20 @@ print_lines (list, lineno, string, addre /* And the data to go along with it */ idx = 0; - - while (*src && idx < nchars) + cur = 0; + while (src[cur] && idx < nchars) { - fprintf (list_file, "%c%c", src[0], src[1]); - src += 2; - byte_in_word++; + int offset; + offset = cur; + fprintf (list_file, "%c%c", src[offset], src[offset+1]); + cur += 2; + octet_in_word++; - if (byte_in_word == LISTING_WORD_SIZE) + if (octet_in_word == LISTING_WORD_SIZE) { fprintf (list_file, " "); idx++; - byte_in_word = 0; + octet_in_word = 0; } idx += 2; @@ -740,7 +744,7 @@ print_lines (list, lineno, string, addre for (lines = 0; lines < (unsigned int) listing_lhs_cont_lines - && *src; + && src[cur]; lines ++) { nchars = ((LISTING_WORD_SIZE * 2) + 1) @@ -750,18 +754,20 @@ print_lines (list, lineno, string, addre /* Print any more lines of data, but more compactly */ fprintf (list_file, "% 4d ", lineno); - while (*src && idx < nchars) + while (src[cur] && idx < nchars) { - fprintf (list_file, "%c%c", src[0], src[1]); - src += 2; + int offset; + offset = cur; + fprintf (list_file, "%c%c", src[offset], src[offset+1]); + cur += 2; idx += 2; - byte_in_word++; + octet_in_word++; - if (byte_in_word == LISTING_WORD_SIZE) + if (octet_in_word == LISTING_WORD_SIZE) { fprintf (list_file, " "); idx++; - byte_in_word = 0; + octet_in_word = 0; } } diff -upr --new-file binutils-2.9.5.0.24/gas/obj.h binutils-2.9.5.0.27/gas/obj.h --- binutils-2.9.5.0.24/gas/obj.h Thu Jun 3 11:01:59 1999 +++ binutils-2.9.5.0.27/gas/obj.h Fri Jan 28 08:33:32 2000 @@ -1,7 +1,7 @@ /* obj.h - defines the object dependent hooks for all object format backends. - Copyright (C) 1987, 90, 91, 92, 93, 95, 96, 97, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 95, 96, 97, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -57,6 +57,8 @@ struct format_ops { void (*s_set_size) PARAMS ((symbolS *, bfd_vma)); bfd_vma (*s_get_align) PARAMS ((symbolS *)); void (*s_set_align) PARAMS ((symbolS *, bfd_vma)); + int (*s_get_other) PARAMS ((symbolS *)); + int (*s_get_desc) PARAMS ((symbolS *)); void (*copy_symbol_attributes) PARAMS ((symbolS *, symbolS *)); void (*generate_asm_lineno) PARAMS ((void)); void (*process_stab) PARAMS ((segT, int, const char *, int, int, int)); @@ -72,6 +74,7 @@ struct format_ops { extern const struct format_ops elf_format_ops; extern const struct format_ops ecoff_format_ops; extern const struct format_ops coff_format_ops; +extern const struct format_ops aout_format_ops; #ifndef this_format COMMON const struct format_ops *this_format; diff -upr --new-file binutils-2.9.5.0.24/gas/read.c binutils-2.9.5.0.27/gas/read.c --- binutils-2.9.5.0.24/gas/read.c Thu Nov 4 10:32:46 1999 +++ binutils-2.9.5.0.27/gas/read.c Thu Feb 3 15:29:51 2000 @@ -1,6 +1,6 @@ /* read.c - read a source file - - Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 - Free Software Foundation, Inc. + Copyright (C) 1986, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -879,7 +879,7 @@ read_a_source_file (name) if (check_macro (s, &out, '\0', &err)) { if (err != NULL) - as_bad (err); + as_bad ("%s", err); *input_line_pointer++ = c; input_scrub_include_sb (&out, input_line_pointer); @@ -1203,7 +1203,7 @@ do_align (n, fill, len, max) just_record_alignment: #endif - record_alignment (now_seg, n); + record_alignment (now_seg, n - OCTETS_PER_BYTE_POWER); } /* Handle the .align pseudo-op. A positive ARG is a default alignment @@ -2066,12 +2066,17 @@ s_lcomm_internal (needs_align, bytes_p) *p = c; if ( -#if defined(OBJ_AOUT) | defined(OBJ_BOUT) - S_GET_OTHER (symbolP) == 0 && - S_GET_DESC (symbolP) == 0 && -#endif /* OBJ_AOUT or OBJ_BOUT */ - (S_GET_SEGMENT (symbolP) == bss_seg - || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0))) +#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT) \ + || defined (OBJ_BOUT) || defined (OBJ_MAYBE_BOUT)) +#ifdef BFD_ASSEMBLER + (OUTPUT_FLAVOR != bfd_target_aout_flavour + || (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0)) && +#else + (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0) && +#endif +#endif + (S_GET_SEGMENT (symbolP) == bss_seg + || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0))) { char *pfrag; @@ -2380,7 +2385,7 @@ do_org (segment, exp, fill) char *p; p = frag_var (rs_org, 1, 1, (relax_substateT) 0, exp->X_add_symbol, - exp->X_add_number, (char *) NULL); + exp->X_add_number * OCTETS_PER_BYTE, (char *) NULL); *p = fill; } } diff -upr --new-file binutils-2.9.5.0.24/gas/stabs.c binutils-2.9.5.0.27/gas/stabs.c --- binutils-2.9.5.0.24/gas/stabs.c Mon Jul 12 10:13:46 1999 +++ binutils-2.9.5.0.27/gas/stabs.c Thu Feb 3 15:24:47 2000 @@ -498,7 +498,7 @@ generate_asm_file (type, file) static char *last_file; static int label_count; char *hold; - char buf[100]; + char *buf = xmalloc (2 * strlen (file) + 10); char sym[30]; /* Rather than try to do this in some efficient fashion, we just @@ -511,10 +511,28 @@ generate_asm_file (type, file) if (last_file == NULL || strcmp (last_file, file) != 0) { + char *tmp = file; + char *endp = file + strlen(file); + char *bufp = buf; + sprintf (sym, "%sF%d", FAKE_LABEL_NAME, label_count); ++label_count; - sprintf (buf, "\"%s\",%d,0,0,%s\n", file, type, sym); + *bufp++ = '"'; + while (tmp < endp) + { + char *bslash = strchr (tmp, '\\'); + int len = (bslash ? (bslash - tmp + 1) : strlen (tmp)); + /* double all backslashes, since demand_copy_C_string (used by + s_stab to extract the part in quotes) will try to replace them as + escape sequences. backslash may appear in a filespec. */ + strncpy (bufp, tmp, len); + tmp += len; + bufp += len; + if (bslash != NULL) + *bufp++ = '\\'; + } + sprintf (bufp, "\",%d,0,0,%s\n", type, sym); input_line_pointer = buf; s_stab ('s'); colon (sym); @@ -525,6 +543,7 @@ generate_asm_file (type, file) } input_line_pointer = hold; + free (buf); } /* Generate stabs debugging information for the current line. This is diff -upr --new-file binutils-2.9.5.0.24/gas/symbols.c binutils-2.9.5.0.27/gas/symbols.c --- binutils-2.9.5.0.24/gas/symbols.c Fri Aug 6 08:06:31 1999 +++ binutils-2.9.5.0.27/gas/symbols.c Thu Feb 3 15:29:51 2000 @@ -1,5 +1,5 @@ /* symbols.c -symbol table- - Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1987, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of GAS, the GNU Assembler. @@ -437,18 +437,24 @@ colon (sym_name) /* just seen "x:" - ra } else { -#if defined (S_GET_OTHER) && defined (S_GET_DESC) - as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%d.%d.%ld."), - sym_name, - segment_name (S_GET_SEGMENT (symbolP)), - S_GET_OTHER (symbolP), S_GET_DESC (symbolP), - (long) S_GET_VALUE (symbolP)); +#if (!defined (OBJ_AOUT) && !defined (OBJ_MAYBE_AOUT) \ + && !defined (OBJ_BOUT) && !defined (OBJ_MAYBE_BOUT)) + static const char *od_buf = ""; #else - as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%ld."), + char od_buf[100]; + od_buf[0] = '\0'; +#ifdef BFD_ASSEMBLER + if (OUTPUT_FLAVOR == bfd_target_aout_flavour) +#endif + sprintf(od_buf, "%d.%d.", + S_GET_OTHER (symbolP), + S_GET_DESC (symbolP)); +#endif + as_fatal (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."), sym_name, segment_name (S_GET_SEGMENT (symbolP)), + od_buf, (long) S_GET_VALUE (symbolP)); -#endif } } /* if the undefined symbol has no value */ } @@ -856,10 +862,10 @@ resolve_symbol_value (symp, finalize) struct local_symbol *locsym = (struct local_symbol *) symp; if (local_symbol_resolved_p (locsym)) - return locsym->lsy_offset; + return locsym->lsy_offset / OCTETS_PER_BYTE; final_val = (local_symbol_get_frag (locsym)->fr_address - + locsym->lsy_offset); + + locsym->lsy_offset) / OCTETS_PER_BYTE; if (finalize) { @@ -915,7 +921,7 @@ resolve_symbol_value (symp, finalize) /* Fall through. */ case O_constant: - final_val += symp->sy_frag->fr_address; + final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE; if (final_seg == expr_section) final_seg = absolute_section; resolved = 1; diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/ChangeLog binutils-2.9.5.0.27/gas/testsuite/ChangeLog --- binutils-2.9.5.0.24/gas/testsuite/ChangeLog Thu Dec 2 08:44:39 1999 +++ binutils-2.9.5.0.27/gas/testsuite/ChangeLog Tue Feb 1 13:26:04 2000 @@ -1,3 +1,31 @@ +2000-01-31 Nick Clifton + + * gas/arm/inst.s: Include test of ATPCS register naming + conventions. + + * gas/arm/float.s: Include test of ATPCS register naming + conventions. + +Fri Jan 21 12:48:06 2000 H.J. Lu + + * gas/i386/general.l: Support a.out. + * gas/i386/jump.d: Likewise. + * gas/i386/jump16.d: Likewise. + +2000-01-21 Alan Modra + + * gas/i386/general.{s,l}: Move 16 bit jmp and call tests from here + * gas/i386/jump16.{s,d}: To here. + * gas/i386/jump.{s,d}: New files. Duplicate 32 bit jmp and call + tests in general.s so that objdump is exercised. + + * gas/i386/i386.exp: Call new tests. + +2000-01-15 Alan Modra + + * gas/i386/general.{s,l}: Add jmp and call tests for .code16gcc, + .code16, and .code32 modes. + Tue Nov 30 23:02:01 1999 Jeffrey A Law (law@cygnus.com) * gas/mn10300/{am33.s, am33_2.s, am33_3.s}: New test files. diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/arm/float.s binutils-2.9.5.0.27/gas/testsuite/gas/arm/float.s --- binutils-2.9.5.0.24/gas/testsuite/gas/arm/float.s Thu Jun 3 11:02:02 1999 +++ binutils-2.9.5.0.27/gas/testsuite/gas/arm/float.s Tue Feb 1 13:26:06 2000 @@ -4,21 +4,21 @@ mvfeqe f3, f5 mvfeqd f4, #1.0 mvfs f4, f7 - mvfsp f0, f1 - mvfdm f3, f4 - mvfez f7, f7 + mvfsp s0, s1 + mvfdm s3, s4 + mvfez s7, s7 adfe f0, f1, #2.0 - adfeqe f1, f2, #0.5 - adfsm f3, f4, f5 + adfeqe f1, s2, #0.5 + adfsm f3, f4, s5 - sufd f0, f0, #2.0 - sufs f1, f2, #10.0 - sufneez f3, f4, f5 + sufd d0, f0, #2.0 + sufs d1, d2, #10.0 + sufneez d3, d4, d5 rsfs f1, f1, #0.0 rsfdp f3, f0, #5.0 - rsfled f7, f6, f0 + rsfled f7, s6, f0 mufd f0, f0, f0 mufez f1, f2, #3.0 @@ -34,9 +34,9 @@ powd f0, f2, f3 pows f1, f3, #0e1e1 - powcsez f4, f7, #1 + powcsez f4, d7, #1 - rpws f7, f6, f7 + rpws f7, d6, f7 rpweqd f0, f1, f2 rpwem f2, f2, f3 diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/arm/inst.s binutils-2.9.5.0.27/gas/testsuite/gas/arm/inst.s --- binutils-2.9.5.0.24/gas/testsuite/gas/arm/inst.s Mon Nov 1 14:31:31 1999 +++ binutils-2.9.5.0.27/gas/testsuite/gas/arm/inst.s Tue Feb 1 13:26:06 2000 @@ -9,25 +9,25 @@ mov r8, r9, asr r10 mov r11, r12, asl r13 mov r14, r15, rrx - moval r1, r2 - moveq r2, r3 - movne r4, r5 - movlt r6, r7 - movge r8, r9 - movle r10, r11 - movgt r12, r13 + moval a2, a3 + moveq a3, a4 + movne v1, v2 + movlt v3, v4 + movge v5, v6 + movle v7, v8 + movgt ip, sp movcc r1, r2 movcs r1, r3 movmi r3, r6 - movpl r7, r9 + movpl wr, sb movvs r1, r8 - movvc r9, r1, lsr #31 - movhi r8, r15 - movls r15, r14 + movvc SB, r1, lsr #31 + movhi r8, pc + movls PC, lr movhs r9, r8 movul r1, r3 movs r0, r8 - movuls r0, r7 + movuls r0, WR add r0, r1, #10 add r2, r3, r4 @@ -129,10 +129,10 @@ mulne r0, r1, r0 mullss r9, r8, r7 - mla r1, r9, r10, r11 - mlas r3, r4, r9, r12 - mlalt r9, r8, r7, r13 - mlages r4, r1, r3, r14 + mla r1, r9, sl, fp + mlas r3, r4, r9, IP + mlalt r9, r8, r7, SP + mlages r4, r1, r3, LR ldr r0, [r1] ldr r1, [r1, r2] @@ -165,7 +165,7 @@ bar: ldmia r0, {r1} ldmeqib r2, {r3, r4, r5} ldmalda r3, {r0-r15}^ - ldmdb r11!, {r0-r8, r10} + ldmdb FP!, {r0-r8, SL} ldmed r1, {r0, r1, r2}|0xf0 ldmfd r2, {r3, r4}+{r5, r6, r7, r8} ldmea r3, 3 diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/general.l binutils-2.9.5.0.27/gas/testsuite/gas/i386/general.l --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/general.l Sat Aug 21 10:32:35 1999 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/general.l Fri Jan 21 13:07:56 2000 @@ -25,6 +25,16 @@ .*:100: Warning:.* .*:101: Warning:.* .*:135: Warning:.* +.*:162: Warning:.* +.*:164: Warning:.* +.*:166: Warning:.* +.*:168: Warning:.* +.*:170: Warning:.* +.*:176: Warning:.* +.*:178: Warning:.* +.*:180: Warning:.* +.*:182: Warning:.* +.*:184: Warning:.* 1 .psize 0 2 .text 3 # test various segment reg insns @@ -209,5 +219,45 @@ 156 0160 67668984 248C0000 movl %eax,140\(%esp\) 156 00 157 - 158 # Force a good alignment. - 159 0169 00000000 000000[ ]*.p2align 4,0 + 158 .code32 + 159 0169 EB98 jmp 1b + 160 016b E9(FCFF|90FE)FF FF jmp xxx + 161 0170 FF250000 0000 jmp \*xxx + 162 0176 FF250000 0000 jmp xxx\(,1\) +.*Warning:.* + 163 017c FFE7 jmp \*%edi + 164 017e FFE7 jmp %edi +.*Warning:.* + 165 0180 FF27 jmp \*\(%edi\) + 166 0182 FF27 jmp \(%edi\) +.*Warning:.* + 167 0184 FF2CBD00 000000 ljmp \*xxx\(,%edi,4\) + 168 018b FF2CBD00 000000 ljmp xxx\(,%edi,4\) +.*Warning:.* + 169 0192 FF2D0000 0000 ljmp \*xxx + 170 0198 FF2D0000 0000 ljmp xxx\(,1\) +.*Warning:.* + 171 019e EA000000 003412 ljmp \$0x1234,\$xxx + 172 + 173 01a5 E859FFFF FF call 1b + 174 01aa E8(FCFF|51FE)FF FF call xxx + 175 01af FF150000 0000 call \*xxx + 176 01b5 FF150000 0000 call xxx\(,1\) +.*Warning:.* + 177 01bb FFD7 call \*%edi + 178 01bd FFD7 call %edi +.*Warning:.* + 179 01bf FF17 call \*\(%edi\) + 180 01c1 FF17 call \(%edi\) +.*Warning:.* + 181 01c3 FF1CBD00 000000 lcall \*xxx\(,%edi,4\) + 182 01ca FF1CBD00 000000 lcall xxx\(,%edi,4\) +.*Warning:.* + 183 01d1 FF1D0000 0000 lcall \*xxx + 184 01d7 FF1D0000 0000 lcall xxx\(,1\) +.*Warning:.* + 185 01dd 9A000000 003412 lcall \$0x1234,\$xxx + 186 + 187 # Force a good alignment. + 188 01e4 00000000 00000000 .p2align 4,0 + 188 00000000 diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/general.s binutils-2.9.5.0.27/gas/testsuite/gas/i386/general.s --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/general.s Sat Aug 21 10:32:35 1999 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/general.s Fri Jan 21 11:32:26 2000 @@ -155,5 +155,34 @@ leal -1760(%ebp),%ebx movl %eax,140(%esp) +.code32 + jmp 1b + jmp xxx + jmp *xxx + jmp xxx(,1) + jmp *%edi + jmp %edi + jmp *(%edi) + jmp (%edi) + ljmp *xxx(,%edi,4) + ljmp xxx(,%edi,4) + ljmp *xxx + ljmp xxx(,1) + ljmp $0x1234,$xxx + + call 1b + call xxx + call *xxx + call xxx(,1) + call *%edi + call %edi + call *(%edi) + call (%edi) + lcall *xxx(,%edi,4) + lcall xxx(,%edi,4) + lcall *xxx + lcall xxx(,1) + lcall $0x1234,$xxx + # Force a good alignment. .p2align 4,0 diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/i386.exp binutils-2.9.5.0.27/gas/testsuite/gas/i386/i386.exp --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/i386.exp Wed Sep 22 15:13:18 1999 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/i386.exp Fri Jan 21 13:08:27 2000 @@ -26,11 +26,13 @@ if [istarget "i*86-*-*"] then { run_dump_test "prefix" run_dump_test "amd" run_dump_test "katmai" + run_dump_test "jump" - # The reloc and white tests require support for 8 and 16 bit - # relocs, so we only run them for ELF and COFF targets. + # These tests require support for 8 and 16 bit relocs, + # so we only run them for ELF and COFF targets. if {[istarget "*-*-elf*"] || [istarget "*-*-linux*"] || [istarget "*-*-coff*"]} then { run_dump_test "reloc" + run_dump_test "jump16" run_list_test "white" "-al --listing-lhs-width=3" } } diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump.d binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump.d --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump.d Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump.d Fri Jan 21 13:07:56 2000 @@ -0,0 +1,26 @@ +#name: i386 jump +#objdump: -drw + +.*: +file format .*i386.* + +Disassembly of section .text: + +0+000 <.text>: + 0: eb fe [ ]*jmp (0x0|0 <.text>) + 2: e9 (fc|f9) ff ff ff [ ]*jmp (0x3|0x0|0 <.text>) 3: (R_386_PC)?(DISP)?32 xxx + 7: ff 25 00 00 00 00 [ ]*jmp \*0x0 9: (R_386_)?(dir)?32 xxx + d: ff e7 [ ]*jmp \*%edi + f: ff 27 [ ]*jmp \*\(%edi\) + 11: ff 2c bd 00 00 00 00 [ ]*ljmp \*0x0\(,%edi,4\) 14: (R_386_)?(dir)?32 xxx + 18: ff 2d 00 00 00 00 [ ]*ljmp \*0x0 1a: (R_386_)?(dir)?32 xxx + 1e: ea 00 00 00 00 34 12 [ ]*ljmp \$0x1234,\$0x0 1f: (R_386_)?(dir)?32 xxx + 25: e8 d6 ff ff ff [ ]*call (0x0|0 <.text>) + 2a: e8 (fc|d1) ff ff ff [ ]*call (0x2b|0x0|0 <.text>) 2b: (R_386_PC)?(DISP)?32 xxx + 2f: ff 15 00 00 00 00 [ ]*call \*0x0 31: (R_386_)?(dir)?32 xxx + 35: ff d7 [ ]*call \*%edi + 37: ff 17 [ ]*call \*\(%edi\) + 39: ff 1c bd 00 00 00 00 [ ]*lcall \*0x0\(,%edi,4\) 3c: (R_386_)?(dir)?32 xxx + 40: ff 1d 00 00 00 00 [ ]*lcall \*0x0 42: (R_386_)?(dir)?32 xxx + 46: 9a 00 00 00 00 34 12 [ ]*lcall \$0x1234,\$0x0 47: (R_386_)?(dir)?32 xxx + 4d:.* +.* diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump.s binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump.s --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump.s Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump.s Fri Jan 21 11:32:26 2000 @@ -0,0 +1,24 @@ +.psize 0 +.text +.extern xxx + +1: jmp 1b + jmp xxx + jmp *xxx + jmp *%edi + jmp *(%edi) + ljmp *xxx(,%edi,4) + ljmp *xxx + ljmp $0x1234,$xxx + + call 1b + call xxx + call *xxx + call *%edi + call *(%edi) + lcall *xxx(,%edi,4) + lcall *xxx + lcall $0x1234,$xxx + + # Force a good alignment. + .p2align 4,0 diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump16.d binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump16.d --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump16.d Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump16.d Fri Jan 21 13:07:56 2000 @@ -0,0 +1,40 @@ +#name: i386 jump16 +#objdump: -drw -mi8086 + +.*: file format .*i386.* + +Disassembly of section .text: + +0+000 <.text>: + 0: eb fe [ ]*jmp (0x0|0 <.text>) + 2: e9 (fe|fb) ff [ ]*jmp (0x3|0x0|0 <.text>) 3: (R_386_PC)?(DISP)?16 xxx + 5: ff 26 00 00 [ ]*jmp \*0 7: (R_386_)?(dir)?16 xxx + 9: 66 ff e7 [ ]*jmpl \*%edi + c: 67 ff 27 [ ]*addr32 jmp \*\(%edi\) + f: 67 ff af 00 00 00 00 [ ]*addr32 ljmp \*0x0\(%edi\) 12: (R_386_)?(dir)?32 xxx + 16: ff 2e 00 00 [ ]*ljmp \*0 18: (R_386_)?(dir)?16 xxx + 1a: ea 00 00 34 12 [ ]*ljmp \$0x1234,\$0x0 1b: (R_386_)?(dir)?16 xxx + 1f: 66 e8 db ff ff ff [ ]*calll (0x0|0 <.text>) + 25: 66 e8 (fc|d5) ff ff ff [ ]*calll (0x27|0x0|0 <.text>) 27: (R_386_PC)?(DISP)?32 xxx + 2b: 66 ff 16 00 00 [ ]*calll \*0 2e: (R_386_)?(dir)?16 xxx + 30: 66 ff d7 [ ]*calll \*%edi + 33: 67 66 ff 17 [ ]*addr32 calll \*\(%edi\) + 37: 67 66 ff 9f 00 00 00 00 [ ]*addr32 lcalll \*0x0\(%edi\) 3b: (R_386_)?(dir)?32 xxx + 3f: 66 ff 1e 00 00 [ ]*lcalll \*0 42: (R_386_)?(dir)?16 xxx + 44: 66 9a 00 00 00 00 34 12 [ ]*lcalll \$0x1234,\$0x0 46: (R_386_)?(dir)?32 xxx + 4c: eb b2 [ ]*jmp (0x0|0 <.text>) + 4e: ff 26 00 00 [ ]*jmp \*0 50: (R_386_)?(dir)?16 xxx + 52: ff e7 [ ]*jmp \*%di + 54: ff 25 [ ]*jmp \*\(%di\) + 56: ff ad 00 00 [ ]*ljmp \*0\(%di\) 58: (R_386_)?(dir)?16 xxx + 5a: ff 2e 00 00 [ ]*ljmp \*0 5c: (R_386_)?(dir)?16 xxx + 5e: ea 00 00 34 12 [ ]*ljmp \$0x1234,\$0x0 5f: (R_386_)?(dir)?16 xxx + 63: e8 9a ff [ ]*call (0x0|0 <.text>) + 66: e8 (fe|97) ff [ ]*call (0x67|0x0|0 <.text>) 67: (R_386_PC)?(DISP)?16 xxx + 69: ff 16 00 00 [ ]*call \*0 6b: (R_386_)?(dir)?16 xxx + 6d: ff d7 [ ]*call \*%di + 6f: ff 15 [ ]*call \*\(%di\) + 71: ff 9d 00 00 [ ]*lcall \*0\(%di\) 73: (R_386_)?(dir)?16 xxx + 75: ff 1e 00 00 [ ]*lcall \*0 77: (R_386_)?(dir)?16 xxx + 79: 9a 00 00 34 12 [ ]*lcall \$0x1234,\$0x0 7a: (R_386_)?(dir)?16 xxx + ... diff -upr --new-file binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump16.s binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump16.s --- binutils-2.9.5.0.24/gas/testsuite/gas/i386/jump16.s Wed Dec 31 16:00:00 1969 +++ binutils-2.9.5.0.27/gas/testsuite/gas/i386/jump16.s Fri Jan 21 11:32:26 2000 @@ -0,0 +1,43 @@ +.psize 0 +.text +.extern xxx + +.code16gcc +1: jmp 1b + jmp xxx + jmp *xxx + jmp *%edi + jmp *(%edi) + ljmp *xxx(%edi) + ljmp *xxx + ljmp $0x1234,$xxx + + call 1b + call xxx + call *xxx + call *%edi + call *(%edi) + lcall *xxx(%edi) + lcall *xxx + lcall $0x1234,$xxx + +.code16 + jmp 1b + jmp *xxx + jmp *%di + jmp *(%di) + ljmp *xxx(%di) + ljmp *xxx + ljmp $0x1234,$xxx + + call 1b + call xxx + call *xxx + call *%di + call *(%di) + lcall *xxx(%di) + lcall *xxx + lcall $0x1234,$xxx + + # Force a good alignment. + .p2align 4,0 diff -upr --new-file binutils-2.9.5.0.24/gprof/ChangeLog binutils-2.9.5.0.27/gprof/ChangeLog --- binutils-2.9.5.0.24/gprof/ChangeLog Mon Sep 27 11:11:22 1999 +++ binutils-2.9.5.0.27/gprof/ChangeLog Fri Jan 28 08:34:04 2000 @@ -1,3 +1,8 @@ +2000-01-27 Alan Modra + + * utils.c (print_name_only): Don't pass error strings to + printf as format arg. + 1999-09-24 Nick Clifton * gmon_io.c (gmon_out_read): Make sure that sensible values diff -upr --new-file binutils-2.9.5.0.24/gprof/utils.c binutils-2.9.5.0.27/gprof/utils.c --- binutils-2.9.5.0.24/gprof/utils.c Sun Oct 10 12:23:06 1999 +++ binutils-2.9.5.0.27/gprof/utils.c Fri Jan 28 09:10:51 2000 @@ -69,7 +69,7 @@ DEFUN (print_name_only, (self), Sym * se } } sprintf (buf, " (%s:%d)", filename, self->line_num); - printf (buf); + printf ("%s", buf); size += strlen (buf); } if (demangled) diff -upr --new-file binutils-2.9.5.0.24/include/ChangeLog binutils-2.9.5.0.27/include/ChangeLog --- binutils-2.9.5.0.24/include/ChangeLog Thu Jan 13 11:36:04 2000 +++ binutils-2.9.5.0.27/include/ChangeLog Thu Feb 3 15:24:59 2000 @@ -1,3 +1,15 @@ +2000-02-03 Timothy Wall + + * dis-asm.h (struct disassemble_info): Added octets_per_byte + field and initialize it to one (1). + +2000-01-27 Nick Clifton + + * dis-asm.h: Add prototype for disassembler_usage(). + Add prototype for arm_disassembler_options(). + Remvoe prototype for arm_toggle_regnames(). + Add prototype for parse_arm_disassembler_option(). + 1999-12-15 Doug Evans * dis-asm.h: Enclose in extern "C" ifdef __cplusplus. diff -upr --new-file binutils-2.9.5.0.24/include/coff/ChangeLog binutils-2.9.5.0.27/include/coff/ChangeLog --- binutils-2.9.5.0.24/include/coff/ChangeLog Thu Jan 13 11:36:04 2000 +++ binutils-2.9.5.0.27/include/coff/ChangeLog Thu Jan 20 19:07:19 2000 @@ -68,7 +68,7 @@ Mon May 17 13:35:35 1999 Stan Cox - * mcore.h: New header file. Defines for Motorolla's MCore + * mcore.h: New header file. Defines for Motorola's MCore processor. Sun Dec 6 21:36:37 1998 Mark Elbrecht diff -upr --new-file binutils-2.9.5.0.24/include/coff/mcore.h binutils-2.9.5.0.27/include/coff/mcore.h --- binutils-2.9.5.0.24/include/coff/mcore.h Thu Jun 3 11:02:09 1999 +++ binutils-2.9.5.0.27/include/coff/mcore.h Thu Jan 20 19:07:19 2000 @@ -1,4 +1,4 @@ -/* Motorolla MCore support for BFD. +/* Motorola MCore support for BFD. Copyright (C) 1999 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff -upr --new-file binutils-2.9.5.0.24/include/dis-asm.h binutils-2.9.5.0.27/include/dis-asm.h --- binutils-2.9.5.0.24/include/dis-asm.h Thu Jan 13 11:43:43 2000 +++ binutils-2.9.5.0.27/include/dis-asm.h Thu Feb 3 15:29:51 2000 @@ -121,6 +121,11 @@ typedef struct disassemble_info { int bytes_per_chunk; enum bfd_endian display_endian; + /* Number of octets per incremented target address + Normally one, but some DSPs have byte sizes of 16 or 32 bits + */ + int octets_per_byte; + /* Results from instruction decoders. Not all decoders yet support this information. This info is set each time an instruction is decoded, and is only valid for the last such instruction. @@ -190,11 +195,15 @@ extern int print_insn_vax PARAMS ((bfd_ extern int print_insn_tic80 PARAMS ((bfd_vma, disassemble_info*)); extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*)); -extern int arm_toggle_regnames PARAMS ((void)); +extern void print_arm_disassembler_options PARAMS ((FILE *)); +extern void parse_arm_disassembler_option PARAMS ((char *)); /* Fetch the disassembler for a given BFD, if that support is available. */ extern disassembler_ftype disassembler PARAMS ((bfd *)); +/* Document any target specific options available from the disassembler. */ +extern void disassembler_usage PARAMS ((FILE *)); + /* This block of definitions is for particular callers who read instructions into a buffer before calling the instruction decoder. */ @@ -226,6 +235,7 @@ extern int generic_symbol_at_address (INFO).arch = bfd_arch_unknown, \ (INFO).mach = 0, \ (INFO).endian = BFD_ENDIAN_UNKNOWN, \ + (INFO).octets_per_byte = 1, \ INIT_DISASSEMBLE_INFO_NO_ARCH(INFO, STREAM, FPRINTF_FUNC) /* Call this macro to initialize only the internal variables for the diff -upr --new-file binutils-2.9.5.0.24/include/elf/ChangeLog binutils-2.9.5.0.27/include/elf/ChangeLog --- binutils-2.9.5.0.24/include/elf/ChangeLog Thu Jan 13 11:36:04 2000 +++ binutils-2.9.5.0.27/include/elf/ChangeLog Thu Feb 3 15:25:00 2000 @@ -1,3 +1,25 @@ +2000-02-03 H.J. Lu + + * arm-oabi.h: Duplicate changes made to arm.h on Jan. 27, + 2000 by Thomas de Lellis . + +2000-01-27 Thomas de Lellis + + * arm.h (STT_ARM_TFUNC): Define in terms of STT_LOPROC. + (STT_ARM_16BIT): New flag. Denotes a label that was defined in + Thumb block but was does not identify a function. + +2000-01-20 Nick Clifton + + * common.h (EM_MCORE): Fix spelling of Motorola. + * mcore.h (EM_MCORE): Fix spelling of Motorola. + +2000-01-13 Nick Clifton + + * common.h (EM_S370): Change comment - this is now the IBM + System/370. + (EM_IA_64): Change comment - this is now the IA-64. + 2000-01-11 Nick Clifton * common.h (DT_ENCODING): Fix definition of this value. @@ -198,7 +220,7 @@ Wed Jun 9 15:16:34 1999 Jeffrey A Law 1999-04-08 Nick Clifton - * mcore.h: New header file. Defines for Motorolla's MCore + * mcore.h: New header file. Defines for Motorola's MCore processor. 1999-04-08 Nick Clifton diff -upr --new-file binutils-2.9.5.0.24/include/elf/arm-oabi.h binutils-2.9.5.0.27/include/elf/arm-oabi.h --- binutils-2.9.5.0.24/include/elf/arm-oabi.h Thu Jun 3 11:02:09 1999 +++ binutils-2.9.5.0.27/include/elf/arm-oabi.h Thu Feb 3 15:29:51 2000 @@ -1,5 +1,5 @@ /* ARM ELF support for BFD. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,7 +29,7 @@ #define EF_APCS_26 0x08 #define EF_APCS_FLOAT 0x10 #define EF_PIC 0x20 -#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */ +#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */ #define EF_NEW_ABI 0x80 #define EF_OLD_ABI 0x100 @@ -39,15 +39,16 @@ #define F_APCS_FLOAT EF_APCS_FLOAT #define F_PIC EF_PIC -/* Additional symbol types for Thumb */ -#define STT_ARM_TFUNC 0xd +/* Additional symbol types for Thumb. */ +#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ +#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ + +/* ARM-specific values for sh_flags. */ +#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */ +#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ -/* ARM-specific values for sh_flags */ -#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point */ -#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step */ - -/* ARM-specific program header flags */ -#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */ +/* ARM-specific program header flags. */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ /* Relocation types. */ START_RELOC_NUMBERS (elf_arm_reloc_type) @@ -62,18 +63,18 @@ START_RELOC_NUMBERS (elf_arm_reloc_type) RELOC_NUMBER (R_ARM_THM_PC22, 8) RELOC_NUMBER (R_ARM_SBREL32, 9) RELOC_NUMBER (R_ARM_AMP_VCALL9, 10) - RELOC_NUMBER (R_ARM_THM_PC11, 11) /* cygnus extension to abi: thumb unconditional branch */ - RELOC_NUMBER (R_ARM_THM_PC9, 12) /* cygnus extension to abi: thumb conditional branch */ + RELOC_NUMBER (R_ARM_THM_PC11, 11) /* Cygnus extension to abi: Thumb unconditional branch. */ + RELOC_NUMBER (R_ARM_THM_PC9, 12) /* Cygnus extension to abi: Thumb conditional branch. */ RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 13) RELOC_NUMBER (R_ARM_GNU_VTENTRY, 14) - RELOC_NUMBER (R_ARM_COPY, 20) /* copy symbol at runtime */ - RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* create GOT entry */ - RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* create PLT entry */ - RELOC_NUMBER (R_ARM_RELATIVE, 23) /* adjust by program base */ - RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT */ - RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT */ - RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry */ - RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address */ + RELOC_NUMBER (R_ARM_COPY, 20) /* Copy symbol at runtime. */ + RELOC_NUMBER (R_ARM_GLOB_DAT, 21) /* Create GOT entry. */ + RELOC_NUMBER (R_ARM_JUMP_SLOT, 22) /* Create PLT entry. */ + RELOC_NUMBER (R_ARM_RELATIVE, 23) /* Adjust by program base. */ + RELOC_NUMBER (R_ARM_GOTOFF, 24) /* 32 bit offset to GOT. */ + RELOC_NUMBER (R_ARM_GOTPC, 25) /* 32 bit PC relative offset to GOT. */ + RELOC_NUMBER (R_ARM_GOT32, 26) /* 32 bit GOT entry. */ + RELOC_NUMBER (R_ARM_PLT32, 27) /* 32 bit PLT address. */ FAKE_RELOC (FIRST_INVALID_RELOC, 28) FAKE_RELOC (LAST_INVALID_RELOC, 249) RELOC_NUMBER (R_ARM_RSBREL32, 250) diff -upr --new-file binutils-2.9.5.0.24/include/elf/arm.h binutils-2.9.5.0.27/include/elf/arm.h --- binutils-2.9.5.0.24/include/elf/arm.h Sat Jul 17 13:53:17 1999 +++ binutils-2.9.5.0.27/include/elf/arm.h Fri Jan 28 08:34:09 2000 @@ -1,5 +1,5 @@ /* ARM ELF support for BFD. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -29,7 +29,7 @@ #define EF_APCS_26 0x08 #define EF_APCS_FLOAT 0x10 #define EF_PIC 0x20 -#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use */ +#define EF_ALIGN8 0x40 /* 8-bit structure alignment is in use. */ #define EF_NEW_ABI 0x80 #define EF_OLD_ABI 0x100 #define EF_SOFT_FLOAT 0x200 @@ -41,15 +41,16 @@ #define F_PIC EF_PIC #define F_SOFT_FLOAT EF_SOFT_FLOAT -/* Additional symbol types for Thumb */ -#define STT_ARM_TFUNC 0xd +/* Additional symbol types for Thumb. */ +#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */ +#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */ + +/* ARM-specific values for sh_flags. */ +#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point. */ +#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step. */ -/* ARM-specific values for sh_flags */ -#define SHF_ENTRYSECT 0x10000000 /* Section contains an entry point */ -#define SHF_COMDEF 0x80000000 /* Section may be multiply defined in the input to a link step */ - -/* ARM-specific program header flags */ -#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */ +/* ARM-specific program header flags. */ +#define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base. */ /* Relocation types. */ START_RELOC_NUMBERS (elf_arm_reloc_type) @@ -82,8 +83,8 @@ START_RELOC_NUMBERS (elf_arm_reloc_type) FAKE_RELOC (LAST_INVALID_RELOC1, 99) RELOC_NUMBER (R_ARM_GNU_VTENTRY, 100) RELOC_NUMBER (R_ARM_GNU_VTINHERIT, 101) - RELOC_NUMBER (R_ARM_THM_PC11, 102) /* cygnus extension to abi: thumb unconditional branch */ - RELOC_NUMBER (R_ARM_THM_PC9, 103) /* cygnus extension to abi: thumb conditional branch */ + RELOC_NUMBER (R_ARM_THM_PC11, 102) /* Cygnus extension to abi: Thumb unconditional branch */ + RELOC_NUMBER (R_ARM_THM_PC9, 103) /* Cygnus extension to abi: Thumb conditional branch */ FAKE_RELOC (FIRST_INVALID_RELOC2, 104) FAKE_RELOC (LAST_INVALID_RELOC2, 248) RELOC_NUMBER (R_ARM_RXPC25, 249) diff -upr --new-file binutils-2.9.5.0.24/include/elf/common.h binutils-2.9.5.0.27/include/elf/common.h --- binutils-2.9.5.0.24/include/elf/common.h Thu Jan 13 11:51:30 2000 +++ binutils-2.9.5.0.27/include/elf/common.h Fri Jan 21 13:08:27 2000 @@ -106,7 +106,7 @@ Foundation, Inc., 59 Temple Place - Suit #define EM_V800 36 /* NEC V800 series */ #define EM_FR20 37 /* Fujitsu FR20 */ #define EM_RH32 38 /* TRW RH32 */ -#define EM_MCORE 39 /* Motorolla MCore */ /* May also be taken by Fujitsu MMA */ +#define EM_MCORE 39 /* Motorola M*Core */ /* May also be taken by Fujitsu MMA */ #define EM_RCE 39 /* Old name for MCore */ #define EM_ARM 40 /* ARM */ #define EM_OLD_ALPHA 41 /* Digital Alpha */ diff -upr --new-file binutils-2.9.5.0.24/include/elf/mcore.h binutils-2.9.5.0.27/include/elf/mcore.h --- binutils-2.9.5.0.24/include/elf/mcore.h Thu Jun 3 11:02:09 1999 +++ binutils-2.9.5.0.27/include/elf/mcore.h Thu Jan 20 19:07:20 2000 @@ -1,4 +1,4 @@ -/* Motorolla MCore support for BFD. +/* Motorola MCore support for BFD. Copyright (C) 1995, 1999 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. diff -upr --new-file binutils-2.9.5.0.24/include/opcode/ChangeLog binutils-2.9.5.0.27/include/opcode/ChangeLog --- binutils-2.9.5.0.24/include/opcode/ChangeLog Thu Jan 13 11:36:04 2000 +++ binutils-2.9.5.0.27/include/opcode/ChangeLog Thu Jan 20 19:07:22 2000 @@ -1,3 +1,7 @@ +2000-01-15 Alan Modra + + * i386.h: Qualify intel mode far call and jmp with x_Suf. + 1999-12-27 Alan Modra * i386.h: Add JumpAbsolute qualifier to all non-intel mode diff -upr --new-file binutils-2.9.5.0.24/include/opcode/i386.h binutils-2.9.5.0.27/include/opcode/i386.h --- binutils-2.9.5.0.24/include/opcode/i386.h Thu Jan 13 11:36:05 2000 +++ binutils-2.9.5.0.27/include/opcode/i386.h Thu Jan 20 19:07:23 2000 @@ -316,7 +316,7 @@ static const template i386_optab[] = { /* Intel Syntax */ {"call", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} }, /* Intel Syntax */ -{"call", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem, 0, 0} }, +{"call", 1, 0xff, 3, x_Suf|Modrm|DefaultSize, { WordMem, 0, 0} }, {"lcall", 2, 0x9a, X, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} }, {"lcall", 1, 0xff, 3, wl_Suf|Modrm|DefaultSize, { WordMem|JumpAbsolute, 0, 0} }, @@ -326,7 +326,7 @@ static const template i386_optab[] = { /* Intel Syntax */ {"jmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} }, /* Intel Syntax */ -{"jmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem, 0, 0} }, +{"jmp", 1, 0xff, 5, x_Suf|Modrm, { WordMem, 0, 0} }, {"ljmp", 2, 0xea, X, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} }, {"ljmp", 1, 0xff, 5, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} }, diff -upr --new-file binutils-2.9.5.0.24/ld/ChangeLog binutils-2.9.5.0.27/ld/ChangeLog --- binutils-2.9.5.0.24/ld/ChangeLog Thu Jan 13 11:36:05 2000 +++ binutils-2.9.5.0.27/ld/ChangeLog Thu Feb 3 15:25:05 2000 @@ -1,3 +1,51 @@ +2000-02-03 Timothy Wall + + * ld/ldexp.c (fold_name): Make SIZEOF operator return byte count, not + octet count. + * ld/ldlang.c (print_input_section, print_data_statement, + print_reloc_statement, print_padding_statement): Print target + address values and section sizes as bytes, not octets. + (insert_pad) Calculate padding size in octets, and adjust "dot" + by bytes. + (size_input_section) Always adjust "dot" by bytes, not octets. + (lang_check_section_addresses, lang_do_assignments) Adjust + "dot" by bytes, not octets. Use the larger of the directive size + or octets_per_byte for the number of octets actually allocated in + the output section. + (lang_set_startof) Make sure STARTOF returns a target address. + (lang_one_common) Record size changes in octets. + (lang_abs_symbol_at_end_of) Section end symbol's value is + recorded in target bytes. + * ld.texinfo: Updated description of BYTE, SHORT, LONG, etc. + to be clear about behavior when an octet is smaller than one byte. + +2000-01-27 Alan Modra + + * ldcref.c (output_cref): Don't pass message strings to printf + as format arg. + Update copyright. + + * ldmisc.c (vfinfo): Same here. + Update copyright. + +2000-01-23 Alan Modra + + * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em, + generic.em,gld960.em,gld960c.em,hppaelf.em,linux.em,lnk960.em, + mipsecoff.em,sunos.em,vanilla.em} (ld_emulation_xfer_struct): + Add missing NULL initialisers, and comments. + + * testsuite/ld-srec/sr3.cc (__rethrow): New. + +2000-01-21 Nick Clifton + + * ldlang.c (lang_size_sections): Fix typo in comment. + +2000-01-18 H.J. Lu + + * ldlang.c (lang_size_sections): Also update the current + address of a region if the SEC_NEVER_LOAD bit is not set. + 2000-01-10 Philip Blundell * configure.tgt (arm*-*-conix*): New target. diff -upr --new-file binutils-2.9.5.0.24/ld/ChangeLog.linux binutils-2.9.5.0.27/ld/ChangeLog.linux --- binutils-2.9.5.0.24/ld/ChangeLog.linux Thu Jan 13 11:24:39 2000 +++ binutils-2.9.5.0.27/ld/ChangeLog.linux Mon Feb 7 20:32:59 2000 @@ -1,3 +1,15 @@ +Thu Feb 3 16:00:05 2000 H.J. Lu + + * ldlang.c (lang_size_sections): Fix a typo in ALIGN_N usage. + +2000-01-29 Ivan Kokshaysky + + * emulparams/elf64alpha.sh: Implement "-taso" emulation + specific option to fit 64-bit executable in the lower + 31-bit address range. This is done by changing start + address of .interp (the very first section of executable) + and then setting EF_ALPHA_32BIT elf header flag. + Sun Jan 9 09:50:17 2000 H.J. Lu * ldmain.c (undefined_symbol): Don't delete the output file diff -upr --new-file binutils-2.9.5.0.24/ld/emulparams/elf64alpha.sh binutils-2.9.5.0.27/ld/emulparams/elf64alpha.sh --- binutils-2.9.5.0.24/ld/emulparams/elf64alpha.sh Thu Jun 3 11:02:10 1999 +++ binutils-2.9.5.0.27/ld/emulparams/elf64alpha.sh Wed Feb 2 10:56:33 2000 @@ -13,3 +13,87 @@ DATA_PLT= NOP=0x47ff041f OTHER_READONLY_SECTIONS='.reginfo : { *(.reginfo) }' + +# This code gets inserted into the generic elf32.sc linker script +# and allows us to define our own command line switches. +PARSE_AND_LIST_ARGS=' +#define OPTION_TASO 300 +/* Set the start address as in the Tru64 ld */ +#define ALPHA_TEXT_START_32BIT 0x12000000 + +static int elf64alpha_32bit = 0; + +static struct option longopts[] = +{ + {"taso", no_argument, NULL, OPTION_TASO}, + {NULL, no_argument, NULL, 0} +}; + +static void +gld_elf64alpha_list_options (file) + FILE * file; +{ + fprintf (file, _( +" -taso Load executable in the lower 31-bit addressable + virtual address range.\n")); +} + +struct ld_emulation_xfer_struct ld_elf64alpha_emulation; +static void gld_elf64alpha_finish(); + +static int +gld_elf64alpha_parse_args (argc, argv) + int argc; + char ** argv; +{ + int longind; + int optc; + int prevoptind = optind; + int prevopterr = opterr; + int wanterror; + static int lastoptind = -1; + + if (lastoptind != optind) + opterr = 0; + + wanterror = opterr; + lastoptind = optind; + + optc = getopt_long_only (argc, argv, "-", longopts, & longind); + opterr = prevopterr; + + switch (optc) + { + default: + if (wanterror) + xexit (1); + optind = prevoptind; + return 0; + + case EOF: + if (elf64alpha_32bit && !link_info.shared && !link_info.relocateable) + { + lang_section_start(".interp", + exp_binop('\''+'\'', exp_intop(ALPHA_TEXT_START_32BIT), + exp_nameop(SIZEOF_HEADERS, NULL))); + ld_elf64alpha_emulation.finish = gld_elf64alpha_finish; + } + return 0; + + case OPTION_TASO: + elf64alpha_32bit = 1; + break; + } + + return 1; +} + +#include "elf/internal.h" +#include "elf/alpha.h" +#include "elf-bfd.h" + +static void +gld_elf64alpha_finish() +{ + elf_elfheader (output_bfd)->e_flags |= EF_ALPHA_32BIT; +}' diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/armcoff.em binutils-2.9.5.0.27/ld/emultempl/armcoff.em --- binutils-2.9.5.0.24/ld/emultempl/armcoff.em Wed Oct 27 09:22:56 1999 +++ binutils-2.9.5.0.27/ld/emultempl/armcoff.em Fri Jan 28 08:34:20 2000 @@ -278,13 +278,14 @@ struct ld_emulation_xfer_struct ld_${EMU gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - gld${EMULATION_NAME}_finish, /* finish */ - NULL, /* create output section statements */ - NULL, /* open dynamic archive */ - NULL, /* place orphan */ - NULL, /* set_symbols */ + gld${EMULATION_NAME}_finish, + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ gld${EMULATION_NAME}_parse_args, - NULL, /* unrecognised file */ - gld${EMULATION_NAME}_list_options + NULL, /* unrecognised file */ + gld${EMULATION_NAME}_list_options, + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/armelf.em binutils-2.9.5.0.27/ld/emultempl/armelf.em --- binutils-2.9.5.0.24/ld/emultempl/armelf.em Mon Nov 1 14:32:04 1999 +++ binutils-2.9.5.0.27/ld/emultempl/armelf.em Fri Jan 28 08:34:21 2000 @@ -1278,14 +1278,14 @@ struct ld_emulation_xfer_struct ld_${EMU gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - gld${EMULATION_NAME}_finish, /* finish */ - NULL, /* create output section statements */ + gld${EMULATION_NAME}_finish, + NULL, /* create output section statements */ gld${EMULATION_NAME}_open_dynamic_archive, gld${EMULATION_NAME}_place_orphan, - NULL, /* set_symbols */ + NULL, /* set symbols */ gld${EMULATION_NAME}_parse_args, - NULL, /* unrecognised file */ + NULL, /* unrecognized file */ gld${EMULATION_NAME}_list_options, - NULL /* recognized file */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/armelf_oabi.em binutils-2.9.5.0.27/ld/emultempl/armelf_oabi.em --- binutils-2.9.5.0.24/ld/emultempl/armelf_oabi.em Mon Aug 9 09:23:02 1999 +++ binutils-2.9.5.0.27/ld/emultempl/armelf_oabi.em Fri Jan 28 08:34:21 2000 @@ -163,13 +163,14 @@ struct ld_emulation_xfer_struct ld_${EMU gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - NULL, /* finish */ - NULL, /* create output section statements */ - NULL, /* open dynamic archive */ - NULL, /* place orphan */ - NULL, /* set_symbols */ - NULL, - NULL, /* unrecognised file */ - NULL + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/beos.em binutils-2.9.5.0.27/ld/emultempl/beos.em --- binutils-2.9.5.0.24/ld/emultempl/beos.em Mon Aug 9 09:23:02 1999 +++ binutils-2.9.5.0.27/ld/emultempl/beos.em Fri Jan 28 08:34:21 2000 @@ -832,6 +832,9 @@ struct ld_emulation_xfer_struct ld_${EMU NULL, /* open dynamic archive */ gld${EMULATION_NAME}_place_orphan, gld_${EMULATION_NAME}_set_symbols, - gld_${EMULATION_NAME}_parse_args + gld_${EMULATION_NAME}_parse_args, + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/generic.em binutils-2.9.5.0.27/ld/emultempl/generic.em --- binutils-2.9.5.0.24/ld/emultempl/generic.em Mon Aug 9 09:23:03 1999 +++ binutils-2.9.5.0.27/ld/emultempl/generic.em Fri Jan 28 08:34:21 2000 @@ -113,6 +113,15 @@ struct ld_emulation_xfer_struct ld_${EMU before_allocation_default, gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", - "${OUTPUT_FORMAT}" + "${OUTPUT_FORMAT}", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/gld960.em binutils-2.9.5.0.27/ld/emultempl/gld960.em --- binutils-2.9.5.0.24/ld/emultempl/gld960.em Mon Aug 9 10:27:46 1999 +++ binutils-2.9.5.0.27/ld/emultempl/gld960.em Fri Jan 28 09:10:52 2000 @@ -169,6 +169,15 @@ struct ld_emulation_xfer_struct ld_gld96 before_allocation_default, gld960_get_script, "960", - "" + "", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/gld960c.em binutils-2.9.5.0.27/ld/emultempl/gld960c.em --- binutils-2.9.5.0.24/ld/emultempl/gld960c.em Mon Aug 9 10:27:46 1999 +++ binutils-2.9.5.0.27/ld/emultempl/gld960c.em Fri Jan 28 09:10:52 2000 @@ -184,6 +184,15 @@ struct ld_emulation_xfer_struct ld_gld96 before_allocation_default, gld960_get_script, "960coff", - "" + "", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/hppaelf.em binutils-2.9.5.0.27/ld/emultempl/hppaelf.em --- binutils-2.9.5.0.24/ld/emultempl/hppaelf.em Mon Aug 9 09:23:03 1999 +++ binutils-2.9.5.0.27/ld/emultempl/hppaelf.em Fri Jan 28 08:34:21 2000 @@ -276,5 +276,12 @@ struct ld_emulation_xfer_struct ld_hppae "elf32-hppa", hppaelf_finish, hppaelf_create_output_section_statements, + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/linux.em binutils-2.9.5.0.27/ld/emultempl/linux.em --- binutils-2.9.5.0.24/ld/emultempl/linux.em Mon Aug 9 09:23:03 1999 +++ binutils-2.9.5.0.27/ld/emultempl/linux.em Fri Jan 28 08:34:21 2000 @@ -198,14 +198,14 @@ struct ld_emulation_xfer_struct ld_${EMU gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - NULL, + NULL, /* finish */ gld${EMULATION_NAME}_create_output_section_statements, gld${EMULATION_NAME}_open_dynamic_archive, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/lnk960.em binutils-2.9.5.0.27/ld/emultempl/lnk960.em --- binutils-2.9.5.0.24/ld/emultempl/lnk960.em Mon Aug 9 10:27:46 1999 +++ binutils-2.9.5.0.27/ld/emultempl/lnk960.em Fri Jan 28 09:10:52 2000 @@ -321,6 +321,15 @@ struct ld_emulation_xfer_struct ld_lnk96 lnk960_before_allocation, lnk960_get_script, "lnk960", - "" + "", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/mipsecoff.em binutils-2.9.5.0.27/ld/emultempl/mipsecoff.em --- binutils-2.9.5.0.24/ld/emultempl/mipsecoff.em Mon Aug 9 09:23:03 1999 +++ binutils-2.9.5.0.27/ld/emultempl/mipsecoff.em Fri Jan 28 08:34:21 2000 @@ -224,6 +224,15 @@ struct ld_emulation_xfer_struct ld_${EMU before_allocation_default, gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", - "${OUTPUT_FORMAT}" + "${OUTPUT_FORMAT}", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/sunos.em binutils-2.9.5.0.27/ld/emultempl/sunos.em --- binutils-2.9.5.0.24/ld/emultempl/sunos.em Mon Aug 9 10:27:46 1999 +++ binutils-2.9.5.0.27/ld/emultempl/sunos.em Fri Jan 28 09:10:52 2000 @@ -1029,10 +1029,14 @@ struct ld_emulation_xfer_struct ld_${EMU gld${EMULATION_NAME}_get_script, "${EMULATION_NAME}", "${OUTPUT_FORMAT}", - NULL, /* finish */ + NULL, /* finish */ gld${EMULATION_NAME}_create_output_section_statements, - NULL, /* open_dynamic_library */ - NULL, /* place_orphan */ - gld${EMULATION_NAME}_set_symbols + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + gld${EMULATION_NAME}_set_symbols, + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/emultempl/vanilla.em binutils-2.9.5.0.27/ld/emultempl/vanilla.em --- binutils-2.9.5.0.24/ld/emultempl/vanilla.em Thu Jun 3 11:02:10 1999 +++ binutils-2.9.5.0.27/ld/emultempl/vanilla.em Fri Jan 28 08:34:21 2000 @@ -64,6 +64,15 @@ struct ld_emulation_xfer_struct ld_vanil before_allocation_default, vanilla_get_script, "vanilla", - "a.out-sunos-big" + "a.out-sunos-big", + NULL, /* finish */ + NULL, /* create output section statements */ + NULL, /* open dynamic archive */ + NULL, /* place orphan */ + NULL, /* set symbols */ + NULL, /* parse args */ + NULL, /* unrecognized file */ + NULL, /* list options */ + NULL /* recognized file */ }; EOF diff -upr --new-file binutils-2.9.5.0.24/ld/ldcref.c binutils-2.9.5.0.27/ld/ldcref.c --- binutils-2.9.5.0.24/ld/ldcref.c Mon Jul 12 10:14:21 1999 +++ binutils-2.9.5.0.27/ld/ldcref.c Fri Jan 28 08:34:15 2000 @@ -1,5 +1,5 @@ /* ldcref.c -- output a cross reference table - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor This file is part of GLD, the Gnu Linker. @@ -238,7 +238,7 @@ output_cref (fp) fprintf (fp, _("\nCross Reference Table\n\n")); msg = _("Symbol"); - fprintf (fp, msg); + fprintf (fp, "%s", msg); len = strlen (msg); while (len < FILECOL) { diff -upr --new-file binutils-2.9.5.0.24/ld/ldexp.c binutils-2.9.5.0.27/ld/ldexp.c --- binutils-2.9.5.0.24/ld/ldexp.c Mon Jul 12 10:14:21 1999 +++ binutils-2.9.5.0.27/ld/ldexp.c Thu Feb 3 15:25:06 2000 @@ -456,11 +456,12 @@ fold_name (tree, current_section, alloca case SIZEOF: if (allocation_done != lang_first_phase_enum) { + int opb = bfd_octets_per_byte (output_bfd); lang_output_section_statement_type *os; os = lang_output_section_find (tree->name.name); check (os, tree->name.name, "SIZEOF"); - result = new_abs (os->bfd_section->_raw_size); + result = new_abs (os->bfd_section->_raw_size / opb); } else result = invalid (); diff -upr --new-file binutils-2.9.5.0.24/ld/ldlang.c binutils-2.9.5.0.27/ld/ldlang.c --- binutils-2.9.5.0.24/ld/ldlang.c Thu Jan 13 11:36:06 2000 +++ binutils-2.9.5.0.27/ld/ldlang.c Mon Feb 7 20:32:59 2000 @@ -2168,7 +2168,8 @@ print_input_section (in) { asection *i = in->section; bfd_size_type size = i->_cooked_size != 0 ? i->_cooked_size : i->_raw_size; - + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); if (size != 0) { print_space (); @@ -2192,7 +2193,7 @@ print_input_section (in) } minfo ("0x%V %W %B\n", - i->output_section->vma + i->output_offset, size, + i->output_section->vma + i->output_offset, size / opb, i->owner); if (i->_cooked_size != 0 && i->_cooked_size != i->_raw_size) @@ -2214,7 +2215,7 @@ print_input_section (in) bfd_link_hash_traverse (link_info.hash, print_one_symbol, (PTR) i); - print_dot = i->output_section->vma + i->output_offset + size; + print_dot = i->output_section->vma + i->output_offset + size / opb; } } } @@ -2234,6 +2235,8 @@ print_data_statement (data) bfd_vma addr; bfd_size_type size; const char *name; + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++) print_space (); @@ -2278,7 +2281,8 @@ print_data_statement (data) print_nl (); - print_dot = addr + size; + print_dot = addr + size / opb; + } /* Print an address statement. These are generated by options like @@ -2302,6 +2306,8 @@ print_reloc_statement (reloc) int i; bfd_vma addr; bfd_size_type size; + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); for (i = 0; i < SECTION_NAME_MAP_LENGTH; i++) print_space (); @@ -2323,7 +2329,7 @@ print_reloc_statement (reloc) print_nl (); - print_dot = addr + size; + print_dot = addr + size / opb; } static void @@ -2332,6 +2338,8 @@ print_padding_statement (s) { int len; bfd_vma addr; + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); minfo (" *fill*"); @@ -2352,7 +2360,7 @@ print_padding_statement (s) print_nl (); - print_dot = addr + s->size; + print_dot = addr + s->size / opb; } static void @@ -2547,6 +2555,8 @@ insert_pad (this_ptr, fill, power, outpu inserting a magic 'padding' statement. */ + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); unsigned int alignment_needed = align_power (dot, power) - dot; if (alignment_needed != 0) @@ -2563,7 +2573,7 @@ insert_pad (this_ptr, fill, power, outpu new->padding_statement.output_offset = dot - output_section_statement->vma; new->padding_statement.fill = fill; - new->padding_statement.size = alignment_needed; + new->padding_statement.size = alignment_needed * opb; } @@ -2572,9 +2582,9 @@ insert_pad (this_ptr, fill, power, outpu { output_section_statement->alignment_power = power; } - output_section_statement->_raw_size += alignment_needed; - return alignment_needed + dot; + output_section_statement->_raw_size += alignment_needed * opb; + return dot + alignment_needed; } /* Work out how much this section will move the dot point */ @@ -2588,6 +2598,8 @@ size_input_section (this_ptr, output_sec { lang_input_section_type *is = &((*this_ptr)->input_section); asection *i = is->section; + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); if (is->ifile->just_syms_flag == false) { @@ -2605,10 +2617,11 @@ size_input_section (this_ptr, output_sec /* Mark how big the output section must be to contain this now */ if (i->_cooked_size != 0) - dot += i->_cooked_size; + dot += i->_cooked_size / opb; else - dot += i->_raw_size; - output_section_statement->bfd_section->_raw_size = dot - output_section_statement->bfd_section->vma; + dot += i->_raw_size / opb; + output_section_statement->bfd_section->_raw_size = + (dot - output_section_statement->bfd_section->vma) * opb; } else { @@ -2629,6 +2642,7 @@ static void lang_check_section_addresses () { asection * s; + int opb = bfd_octets_per_byte (output_bfd); /* Scan all sections in the output list. */ for (s = output_bfd->sections; s != NULL; s = s->next) @@ -2692,6 +2706,9 @@ lang_size_sections (s, output_section_st bfd_vma dot; boolean relax; { + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); + /* Size up the sections from their constituent parts. */ for (; s != (lang_statement_union_type *) NULL; s = s->next) { @@ -2805,28 +2822,34 @@ lang_size_sections (s, output_section_st (void) lang_size_sections (os->children.head, os, &os->children.head, os->fill, dot, relax); - /* Ignore the size of the input sections, use the vma and size to - align against. */ - + /* put the section within the requested block size, or align at + the block boundary */ after = ALIGN_N (os->bfd_section->vma + - os->bfd_section->_raw_size, + os->bfd_section->_raw_size / opb, /* The coercion here is important, see ld.h. */ (bfd_vma) os->block_value); if (bfd_is_abs_section (os->bfd_section)) ASSERT (after == os->bfd_section->vma); else - os->bfd_section->_raw_size = after - os->bfd_section->vma; - dot = os->bfd_section->vma + os->bfd_section->_raw_size; + os->bfd_section->_raw_size = + (after - os->bfd_section->vma) * opb; + dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb; os->processed = true; /* Update dot in the region ? We only do this if the section is going to be allocated, since unallocated sections do not contribute to the region's - overall size in memory. */ + overall size in memory. + + If the SEC_NEVER_LOAD bit is not set, it will affect the + addresses of sections after it. We have to update + dot. */ if (os->region != (lang_memory_region_type *) NULL - && (bfd_get_section_flags (output_bfd, os->bfd_section) - & (SEC_ALLOC | SEC_LOAD))) + && ((bfd_get_section_flags (output_bfd, os->bfd_section) + & SEC_NEVER_LOAD) == 0 + || (bfd_get_section_flags (output_bfd, os->bfd_section) + & (SEC_ALLOC | SEC_LOAD)))) { os->region->current = dot; @@ -2897,8 +2920,9 @@ lang_size_sections (s, output_section_st size = BYTE_SIZE; break; } - - dot += size; + if (size < opb) + size = opb; + dot += size / opb; output_section_statement->bfd_section->_raw_size += size; /* The output section gets contents, and then we inspect for any flags set in the input script which override any ALLOC. */ @@ -2918,7 +2942,7 @@ lang_size_sections (s, output_section_st s->reloc_statement.output_section = output_section_statement->bfd_section; size = bfd_get_reloc_size (s->reloc_statement.howto); - dot += size; + dot += size / opb; output_section_statement->bfd_section->_raw_size += size; } break; @@ -3006,7 +3030,7 @@ lang_size_sections (s, output_section_st new->padding_statement.output_offset = dot - output_section_statement->bfd_section->vma; new->padding_statement.fill = fill; - new->padding_statement.size = newdot - dot; + new->padding_statement.size = (newdot - dot) * opb; output_section_statement->bfd_section->_raw_size += new->padding_statement.size; } @@ -3024,7 +3048,7 @@ lang_size_sections (s, output_section_st pass than it did at this point in the previous pass. */ s->padding_statement.output_offset = dot - output_section_statement->bfd_section->vma; - dot += s->padding_statement.size; + dot += s->padding_statement.size / opb; output_section_statement->bfd_section->_raw_size += s->padding_statement.size; break; @@ -3057,6 +3081,9 @@ lang_do_assignments (s, output_section_s fill_type fill; bfd_vma dot; { + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); + for (; s != (lang_statement_union_type *) NULL; s = s->next) { switch (s->header.type) @@ -3078,7 +3105,8 @@ lang_do_assignments (s, output_section_s dot = os->bfd_section->vma; (void) lang_do_assignments (os->children.head, os, os->fill, dot); - dot = os->bfd_section->vma + os->bfd_section->_raw_size; + dot = os->bfd_section->vma + os->bfd_section->_raw_size / opb; + } if (os->load_base) { @@ -3118,22 +3146,28 @@ lang_do_assignments (s, output_section_s if (value.valid_p == false) einfo (_("%F%P: invalid data statement\n")); } - switch (s->data_statement.type) - { - case QUAD: - case SQUAD: - dot += QUAD_SIZE; - break; - case LONG: - dot += LONG_SIZE; - break; - case SHORT: - dot += SHORT_SIZE; - break; - case BYTE: - dot += BYTE_SIZE; - break; - } + { + int size; + switch (s->data_statement.type) + { + case QUAD: + case SQUAD: + size = QUAD_SIZE; + break; + case LONG: + size = LONG_SIZE; + break; + case SHORT: + size = SHORT_SIZE; + break; + case BYTE: + size = BYTE_SIZE; + break; + } + if (size < opb) + size = opb; + dot += size / opb; + } break; case lang_reloc_statement_enum: @@ -3147,7 +3181,7 @@ lang_do_assignments (s, output_section_s if (value.valid_p == false) einfo (_("%F%P: invalid reloc statement\n")); } - dot += bfd_get_reloc_size (s->reloc_statement.howto); + dot += bfd_get_reloc_size (s->reloc_statement.howto) / opb; break; case lang_input_section_enum: @@ -3155,9 +3189,9 @@ lang_do_assignments (s, output_section_s asection *in = s->input_section.section; if (in->_cooked_size != 0) - dot += in->_cooked_size; + dot += in->_cooked_size / opb; else - dot += in->_raw_size; + dot += in->_raw_size / opb; } break; @@ -3177,7 +3211,7 @@ lang_do_assignments (s, output_section_s break; case lang_padding_statement_enum: - dot += s->padding_statement.size; + dot += s->padding_statement.size / opb; break; case lang_group_statement_enum: @@ -3235,11 +3269,13 @@ lang_set_startof () h = bfd_link_hash_lookup (link_info.hash, buf, false, false, true); if (h != NULL && h->type == bfd_link_hash_undefined) { + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); h->type = bfd_link_hash_defined; if (s->_cooked_size != 0) - h->u.def.value = s->_cooked_size; + h->u.def.value = s->_cooked_size / opb; else - h->u.def.value = s->_raw_size; + h->u.def.value = s->_raw_size / opb; h->u.def.section = bfd_abs_section_ptr; } @@ -3416,6 +3452,8 @@ lang_one_common (h, info) unsigned int power_of_two; bfd_vma size; asection *section; + int opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture, + ldfile_output_machine); if (h->type != bfd_link_hash_common) return true; @@ -3430,8 +3468,8 @@ lang_one_common (h, info) section = h->u.c.p->section; /* Increase the size of the section. */ - section->_cooked_size = ALIGN_N (section->_cooked_size, - (bfd_size_type) (1 << power_of_two)); + section->_cooked_size = ALIGN_N ((section->_cooked_size + opb - 1) / opb, + (bfd_size_type) (1 << power_of_two)) * opb; /* Adjust the alignment if necessary. */ if (power_of_two > section->alignment_power) @@ -4291,7 +4329,8 @@ lang_abs_symbol_at_end_of (secname, name h->u.def.value = 0; else h->u.def.value = (bfd_get_section_vma (output_bfd, sec) - + bfd_section_size (output_bfd, sec)); + + bfd_section_size (output_bfd, sec) / + bfd_octets_per_byte (output_bfd)); h->u.def.section = bfd_abs_section_ptr; } diff -upr --new-file binutils-2.9.5.0.24/ld/ldmisc.c binutils-2.9.5.0.27/ld/ldmisc.c --- binutils-2.9.5.0.24/ld/ldmisc.c Sun Oct 10 12:23:21 1999 +++ binutils-2.9.5.0.27/ld/ldmisc.c Fri Jan 28 09:10:52 2000 @@ -1,5 +1,5 @@ /* ldmisc.c - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. @@ -213,7 +213,7 @@ vfinfo (fp, fmt, arg) case 'E': /* current bfd error or errno */ - fprintf (fp, bfd_errmsg (bfd_get_error ())); + fprintf (fp, "%s", bfd_errmsg (bfd_get_error ())); break; case 'I': diff -upr --new-file binutils-2.9.5.0.24/ld/testsuite/ld-srec/sr3.cc binutils-2.9.5.0.27/ld/testsuite/ld-srec/sr3.cc --- binutils-2.9.5.0.24/ld/testsuite/ld-srec/sr3.cc Mon Jul 19 09:48:29 1999 +++ binutils-2.9.5.0.27/ld/testsuite/ld-srec/sr3.cc Fri Jan 28 09:10:53 2000 @@ -56,6 +56,11 @@ __throw () } void +__rethrow () +{ +} + +void __terminate () { } diff -upr --new-file binutils-2.9.5.0.24/opcodes/ChangeLog binutils-2.9.5.0.27/opcodes/ChangeLog --- binutils-2.9.5.0.24/opcodes/ChangeLog Thu Jan 13 11:36:19 2000 +++ binutils-2.9.5.0.27/opcodes/ChangeLog Thu Feb 3 15:25:09 2000 @@ -1,3 +1,47 @@ +2000-02-03 Timothy Wall + + * dis-buf.c (buffer_read_memory): Use octets_per_byte field + to adjust target address bounds checking and calculate the + appropriate octet offset into data. + +2000-01-27 Nick Clifton + + * arm-dis.c: (parse_disassembler_option): Rename to + parse_arm_disassembler_option and allow to be exported. + + * disassemble.c (disassembler_usage): New function: Print out any + target specific disassembler options. + Call arm_disassembler_options() if the ARM architecture is being + supported. + + * arm-dis.c (NUM_ELEM): Define this macro if not already + defined. + (arm_regname): New struct type for ARM register names. + (arm_toggle_regnames): Delete. + (parse_disassembler_option): Use register name structure. + (print_insn): New function: Combines duplicate code found in + print_insn_big_arm and print_insn_little_arm. + (print_insn_big_arm): Call print_insn. + (print_insn_little_arm): Call print_insn. + (print_arm_disassembler_options): Display list of supported, + ARM specific disassembler options. + +2000-01-27 Thomas de Lellis + + * arm-dis.c (printf_insn_big_arm): Treat ELF symbols with the + ARM_STT_16BIT flag as Thumb code symbols. + + * arm-dis.c (printf_insn_little_arm): Ditto. + +2000-01-25 Thomas de Lellis + + * arm-dis.c (printf_insn_thumb): Prevent double dumping + of raw thumb instructions. + +2000-01-20 Nick Clifton + + * mcore-opc.h (mcore_table): Add "add" as an alias for "addu". + 2000-01-03 Nick Clifton * arm-dis.c (streq): New macro. diff -upr --new-file binutils-2.9.5.0.24/opcodes/arm-dis.c binutils-2.9.5.0.27/opcodes/arm-dis.c --- binutils-2.9.5.0.24/opcodes/arm-dis.c Thu Jan 13 11:36:19 2000 +++ binutils-2.9.5.0.27/opcodes/arm-dis.c Fri Jan 28 08:34:30 2000 @@ -33,30 +33,48 @@ Foundation, Inc., 59 Temple Place - Suit #include "elf/arm.h" #ifndef streq -#define streq(a,b) (strcmp ((a), (b)) == 0) +#define streq(a,b) (strcmp ((a), (b)) == 0) #endif + #ifndef strneq -#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) +#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0) +#endif + +#ifndef NUM_ELEM +#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0]) #endif static char * arm_conditional[] = {"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc", "hi", "ls", "ge", "lt", "gt", "le", "", "nv"}; -static char * arm_regnames_raw[] = -{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}; - -static char * arm_regnames_standard[] = -{"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", - "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc"}; - -static char * arm_regnames_apcs[] = -{"a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", - "v5", "v6", "sl", "fp", "ip", "sp", "lr", "pc"}; +typedef struct +{ + const char * name; + const char * description; + const char * reg_names[16]; +} +arm_regname; + +static arm_regname regnames[] = +{ + { "raw" , "Select raw register names", + { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"}}, + { "std", "Select register names used in ARM's ISA documentation", + { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12", "sp", "lr", "pc" }}, + { "apcs", "Select register names used in the APCS", + { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "sl", "fp", "ip", "sp", "lr", "pc" }}, + { "atpcs", "Select register names used in the ATPCS", + { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "IP", "SP", "LR", "PC" }}, + { "atpcs-special", "Select special register names used in the ATPCS", + { "a1", "a2", "a3", "a4", "v1", "v2", "v3", "WR", "v5", "SB", "SL", "FP", "IP", "SP", "LR", "PC" }} +}; + +/* Default to standard register name set. */ +static unsigned int regname_selected = 1; -/* Choose which register name set to use. */ -static char ** arm_regnames = arm_regnames_standard; +#define NUM_ARM_REGNAMES NUM_ELEM (regnames) +#define arm_regnames regnames[regname_selected].reg_names static boolean force_thumb = false; @@ -70,8 +88,8 @@ static char * arm_shift[] = static void arm_decode_shift PARAMS ((long, fprintf_ftype, void *)); static int print_insn_arm PARAMS ((bfd_vma, struct disassemble_info *, long)); static int print_insn_thumb PARAMS ((bfd_vma, struct disassemble_info *, long)); -static void parse_disassembler_option PARAMS ((char *)); static void parse_disassembler_options PARAMS ((char *)); +static int print_insn PARAMS ((bfd_vma, struct disassemble_info *, boolean)); /* Functions. */ static void @@ -110,7 +128,6 @@ arm_decode_shift (given, func, stream) /* Print one instruction from PC on INFO->STREAM. Return the size of the instruction (always 4 on ARM). */ - static int print_insn_arm (pc, info, given) bfd_vma pc; @@ -155,18 +172,19 @@ print_insn_arm (pc, info, given) offset += pc + 8; - /* Cope with the possibility of write-back being used. - Probably a very dangerous thing for the programmer - to do, but who are we to argue ? */ + /* Cope with the possibility of write-back + being used. Probably a very dangerous thing + for the programmer to do, but who are we to + argue ? */ if (given & 0x00200000) func (stream, "!"); } else { - /* post indexed */ + /* Post indexed. */ func (stream, "], #%x", offset); - offset = pc + 8; /* ie ignore the offset */ + offset = pc + 8; /* ie ignore the offset. */ } func (stream, "\t; "); @@ -223,7 +241,7 @@ print_insn_arm (pc, info, given) case 's': if ((given & 0x004f0000) == 0x004f0000) { - /* PC relative with immediate offset */ + /* PC relative with immediate offset. */ int offset = ((given & 0xf00) >> 4) | (given & 0xf); if ((given & 0x00800000) == 0) @@ -240,10 +258,10 @@ print_insn_arm (pc, info, given) arm_regnames[(given >> 16) & 0xf]); if ((given & 0x01000000) != 0) { - /* pre-indexed */ + /* Pre-indexed. */ if ((given & 0x00400000) == 0x00400000) { - /* immediate */ + /* Immediate. */ int offset = ((given & 0xf00) >> 4) | (given & 0xf); if (offset) func (stream, ", %s#%d", @@ -252,7 +270,7 @@ print_insn_arm (pc, info, given) } else { - /* register */ + /* Register. */ func (stream, ", %s%s", (((given & 0x00800000) == 0) ? "-" : ""), @@ -264,10 +282,10 @@ print_insn_arm (pc, info, given) } else { - /* post-indexed */ + /* Post-indexed. */ if ((given & 0x00400000) == 0x00400000) { - /* immediate */ + /* Immediate. */ int offset = ((given & 0xf00) >> 4) | (given & 0xf); if (offset) func (stream, "], %s#%d", @@ -278,7 +296,7 @@ print_insn_arm (pc, info, given) } else { - /* register */ + /* Register. */ func (stream, "], %s%s", (((given & 0x00800000) == 0) ? "-" : ""), @@ -469,36 +487,46 @@ print_insn_arm (pc, info, given) { case '-': c++; + while (*c >= '0' && *c <= '9') bitend = (bitend * 10) + *c++ - '0'; + if (!bitend) abort (); + switch (*c) { case 'r': { long reg; + reg = given >> bitstart; reg &= (2 << (bitend - bitstart)) - 1; + func (stream, "%s", arm_regnames[reg]); } break; case 'd': { long reg; + reg = given >> bitstart; reg &= (2 << (bitend - bitstart)) - 1; + func (stream, "%d", reg); } break; case 'x': { long reg; + reg = given >> bitstart; reg &= (2 << (bitend - bitstart)) - 1; + func (stream, "0x%08x", reg); - /* Some SWI instructions have special meanings. */ + /* Some SWI instructions have special + meanings. */ if ((given & 0x0fffffff) == 0x0FF00000) func (stream, "\t; IMB"); else if ((given & 0x0fffffff) == 0x0FF00001) @@ -508,16 +536,20 @@ print_insn_arm (pc, info, given) case 'X': { long reg; + reg = given >> bitstart; reg &= (2 << (bitend - bitstart)) - 1; + func (stream, "%01x", reg & 0xf); } break; case 'f': { long reg; + reg = given >> bitstart; reg &= (2 << (bitend - bitstart)) - 1; + if (reg > 7) func (stream, "#%s", arm_fp_const[reg & 7]); @@ -529,6 +561,7 @@ print_insn_arm (pc, info, given) abort (); } break; + case '`': c++; if ((given & (1 << bitstart)) == 0) @@ -567,7 +600,6 @@ print_insn_arm (pc, info, given) /* Print one instruction from PC on INFO->STREAM. Return the size of the instruction. */ - static int print_insn_thumb (pc, info, given) bfd_vma pc; @@ -584,15 +616,14 @@ print_insn_thumb (pc, info, given) { char * c = insn->assembler; - /* Special processing for Thumb 2 instruction BL sequence: */ - if (!*c) /* check for empty (not NULL) assembler string */ + /* Special processing for Thumb 2 instruction BL sequence: */ + if (!*c) /* Check for empty (not NULL) assembler string. */ { info->bytes_per_chunk = 4; info->bytes_per_line = 4; - func (stream, "%04x\tbl\t", given & 0xffff); - (*info->print_address_func) - (BDISP23 (given) * 2 + pc + 4, info); + func (stream, "bl\t"); + info->print_address_func (BDISP23 (given) * 2 + pc + 4, info); return 4; } else @@ -601,7 +632,6 @@ print_insn_thumb (pc, info, given) info->bytes_per_line = 4; given &= 0xffff; - func (stream, "%04x\t", given); for (; *c; c++) { @@ -619,9 +649,11 @@ print_insn_thumb (pc, info, given) case 'S': { long reg; + reg = (given >> 3) & 0x7; if (given & (1 << 6)) reg += 8; + func (stream, "%s", arm_regnames[reg]); } break; @@ -633,6 +665,7 @@ print_insn_thumb (pc, info, given) reg = given & 0x7; if (given & (1 << 7)) reg += 8; + func (stream, "%s", arm_regnames[reg]); } break; @@ -645,17 +678,18 @@ print_insn_thumb (pc, info, given) case 'N': if (given & (1 << 8)) domasklr = 1; - /* fall through */ + /* Fall through. */ case 'O': if (*c == 'O' && (given & (1 << 8))) domaskpc = 1; - /* fall through */ + /* Fall through. */ case 'M': { int started = 0; int reg; func (stream, "{"); + /* It would be nice if we could spot ranges, and generate the rS-rE format: */ for (reg = 0; (reg < 8); reg++) @@ -729,8 +763,8 @@ print_insn_thumb (pc, info, given) case 'a': /* PC-relative address -- the bottom two - bits of the address are dropped before - the calculation. */ + bits of the address are dropped + before the calculation. */ info->print_address_func (((pc + 4) & ~3) + (reg << 2), info); break; @@ -788,23 +822,11 @@ print_insn_thumb (pc, info, given) } } - /* no match */ + /* No match. */ abort (); } -/* Select a different register name set. - Returns true if the name set selected is the APCS name set. */ -int -arm_toggle_regnames () -{ - if (arm_regnames == arm_regnames_standard) - arm_regnames = arm_regnames_apcs; - else - arm_regnames = arm_regnames_standard; - - return arm_regnames == arm_regnames_apcs; -} - +/* Parse an individual disassembler option. */ static void parse_disassembler_option (option) char * option; @@ -814,27 +836,31 @@ parse_disassembler_option (option) if (strneq (option, "reg-names-", 10)) { + int i; + option += 10; + + for (i = NUM_ARM_REGNAMES; i--;) + if (streq (option, regnames[i].name)) + { + regname_selected = i; + break; + } - if (streq (option, "std")) - arm_regnames = arm_regnames_standard; - else if (streq (option, "apcs")) - arm_regnames = arm_regnames_apcs; - else if (streq (option, "raw")) - arm_regnames = arm_regnames_raw; - else - fprintf (stderr, "Unrecognised register name set: %s\n", option); + if (i < 0) + fprintf (stderr, _("Unrecognised register name set: %s\n"), option); } else if (streq (option, "force-thumb")) force_thumb = 1; else if (streq (option, "no-force-thumb")) force_thumb = 0; else - fprintf (stderr, "Unrecognised disassembler option: %s\n", option); + fprintf (stderr, _("Unrecognised disassembler option: %s\n"), option); return; } +/* Parse the string of disassembler options, spliting it at whitespaces. */ static void parse_disassembler_options (options) char * options; @@ -861,26 +887,24 @@ parse_disassembler_options (options) while (space); } -/* NOTE: There are no checks in these routines that the relevant number of - data bytes exist. */ - -int -print_insn_big_arm (pc, info) +/* NOTE: There are no checks in these routines that + the relevant number of data bytes exist. */ +static int +print_insn (pc, info, little) bfd_vma pc; struct disassemble_info * info; + boolean little; { unsigned char b[4]; long given; int status; - coff_symbol_type * cs; - elf_symbol_type * es; int is_thumb; - + if (info->disassembler_options) { parse_disassembler_options (info->disassembler_options); - /* To avoid repeated parsing of this option, we remove it here. */ + /* To avoid repeated parsing of these options, we remove them here. */ info->disassembler_options = NULL; } @@ -890,6 +914,8 @@ print_insn_big_arm (pc, info) { if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour) { + coff_symbol_type * cs; + cs = coffsymbol (*info->symbols); is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT || cs->native->u.syment.n_sclass == C_THUMBSTAT @@ -899,45 +925,71 @@ print_insn_big_arm (pc, info) } else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour) { + elf_symbol_type * es; + unsigned int type; + es = *(elf_symbol_type **)(info->symbols); - is_thumb = ELF_ST_TYPE (es->internal_elf_sym.st_info) == - STT_ARM_TFUNC; + type = ELF_ST_TYPE (es->internal_elf_sym.st_info); + + is_thumb = (type == STT_ARM_TFUNC) || (type == STT_ARM_16BIT); } } - + info->bytes_per_chunk = 4; - info->display_endian = BFD_ENDIAN_BIG; + info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG; - /* Always fetch word aligned values. */ - - status = (*info->read_memory_func) (pc & ~ 0x3, (bfd_byte *) &b[0], 4, info); - if (status != 0) + if (little) { - (*info->memory_error_func) (status, pc, info); - return -1; + status = info->read_memory_func (pc, (bfd_byte *) &b[0], 4, info); + if (status != 0 && is_thumb) + { + info->bytes_per_chunk = 2; + + status = info->read_memory_func (pc, (bfd_byte *) b, 2, info); + b[3] = b[2] = 0; + } + + if (status != 0) + { + info->memory_error_func (status, pc, info); + return -1; + } + + given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24); } - - if (is_thumb) + else { - if (pc & 0x2) + status = info->read_memory_func + (pc & ~ 0x3, (bfd_byte *) &b[0], 4, info); + if (status != 0) { - given = (b[2] << 8) | b[3]; - - status = info->read_memory_func ((pc + 4) & ~ 0x3, (bfd_byte *) b, 4, info); - if (status != 0) + info->memory_error_func (status, pc, info); + return -1; + } + + if (is_thumb) + { + if (pc & 0x2) { - info->memory_error_func (status, pc + 4, info); - return -1; + given = (b[2] << 8) | b[3]; + + status = info->read_memory_func + ((pc + 4) & ~ 0x3, (bfd_byte *) b, 4, info); + if (status != 0) + { + info->memory_error_func (status, pc + 4, info); + return -1; + } + + given |= (b[0] << 24) | (b[1] << 16); } - - given |= (b[0] << 24) | (b[1] << 16); + else + given = (b[0] << 8) | b[1] | (b[2] << 24) | (b[3] << 16); } else - given = (b[0] << 8) | b[1] | (b[2] << 24) | (b[3] << 16); + given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]); } - else - given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]); - + if (is_thumb) status = print_insn_thumb (pc, info, given); else @@ -947,70 +999,36 @@ print_insn_big_arm (pc, info) } int -print_insn_little_arm (pc, info) +print_insn_big_arm (pc, info) bfd_vma pc; struct disassemble_info * info; { - unsigned char b[4]; - long given; - int status; - coff_symbol_type * cs; - elf_symbol_type * es; - int is_thumb; - - if (info->disassembler_options) - { - parse_disassembler_options (info->disassembler_options); - - /* To avoid repeated parsing of this option, we remove it here. */ - info->disassembler_options = NULL; - } + return print_insn (pc, info, false); +} - is_thumb = force_thumb; - - if (!is_thumb && info->symbols != NULL) - { - if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour) - { - cs = coffsymbol (*info->symbols); - is_thumb = ( cs->native->u.syment.n_sclass == C_THUMBEXT - || cs->native->u.syment.n_sclass == C_THUMBSTAT - || cs->native->u.syment.n_sclass == C_THUMBLABEL - || cs->native->u.syment.n_sclass == C_THUMBEXTFUNC - || cs->native->u.syment.n_sclass == C_THUMBSTATFUNC); - } - else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour) - { - es = *(elf_symbol_type **)(info->symbols); - is_thumb = ELF_ST_TYPE (es->internal_elf_sym.st_info) == - STT_ARM_TFUNC; - } - } - - info->bytes_per_chunk = 4; - info->display_endian = BFD_ENDIAN_LITTLE; +int +print_insn_little_arm (pc, info) + bfd_vma pc; + struct disassemble_info * info; +{ + return print_insn (pc, info, true); +} - status = (*info->read_memory_func) (pc, (bfd_byte *) &b[0], 4, info); - if (status != 0 && is_thumb) - { - info->bytes_per_chunk = 2; +void +print_arm_disassembler_options (FILE * stream) +{ + int i; - status = info->read_memory_func (pc, (bfd_byte *) b, 2, info); - b[3] = b[2] = 0; - } + fprintf (stream, _("\n\ +The following ARM specific disassembler options are supported for use with\n\ +the -M switch:\n")); - if (status != 0) - { - info->memory_error_func (status, pc, info); - return -1; - } + for (i = NUM_ARM_REGNAMES; i--;) + fprintf (stream, " reg-names-%s %*c%s\n", + regnames[i].name, + 14 - strlen (regnames[i].name), ' ', + regnames[i].description); - given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24); - - if (is_thumb) - status = print_insn_thumb (pc, info, given); - else - status = print_insn_arm (pc, info, given); - - return status; + fprintf (stream, " force-thumb Assume all insns are Thumb insns\n"); + fprintf (stream, " no-force-thumb Examine preceeding label to determine an insn's type\n\n"); } diff -upr --new-file binutils-2.9.5.0.24/opcodes/dis-buf.c binutils-2.9.5.0.27/opcodes/dis-buf.c --- binutils-2.9.5.0.24/opcodes/dis-buf.c Fri Aug 13 11:27:18 1999 +++ binutils-2.9.5.0.27/opcodes/dis-buf.c Thu Feb 3 15:25:09 2000 @@ -29,11 +29,17 @@ buffer_read_memory (memaddr, myaddr, len int length; struct disassemble_info *info; { + int opb = info->octets_per_byte; + int end_addr_offset = length / opb; + int max_addr_offset = info->buffer_length / opb; + int octets = (memaddr - info->buffer_vma) * opb; + if (memaddr < info->buffer_vma - || memaddr - info->buffer_vma + length > info->buffer_length) + || memaddr - info->buffer_vma + end_addr_offset > max_addr_offset) /* Out of bounds. Use EIO because GDB uses it. */ return EIO; - memcpy (myaddr, info->buffer + (memaddr - info->buffer_vma), length); + memcpy (myaddr, info->buffer + octets, length); + return 0; } diff -upr --new-file binutils-2.9.5.0.24/opcodes/disassemble.c binutils-2.9.5.0.27/opcodes/disassemble.c --- binutils-2.9.5.0.24/opcodes/disassemble.c Mon Sep 6 10:57:22 1999 +++ binutils-2.9.5.0.27/opcodes/disassemble.c Fri Jan 28 09:10:53 2000 @@ -257,3 +257,13 @@ disassembler (abfd) } return disassemble; } + +void +disassembler_usage (FILE * stream) +{ +#ifdef ARCH_arm + print_arm_disassembler_options (stream); +#endif + + return; +} diff -upr --new-file binutils-2.9.5.0.24/opcodes/mcore-dis.c binutils-2.9.5.0.27/opcodes/mcore-dis.c --- binutils-2.9.5.0.24/opcodes/mcore-dis.c Wed Oct 27 15:39:55 1999 +++ binutils-2.9.5.0.27/opcodes/mcore-dis.c Fri Jan 21 13:08:27 2000 @@ -1,4 +1,4 @@ -/* Disassemble Motorolla M*Core instructions. +/* Disassemble Motorola M*Core instructions. Copyright (C) 1993, 1999 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff -upr --new-file binutils-2.9.5.0.24/opcodes/mcore-opc.h binutils-2.9.5.0.27/opcodes/mcore-opc.h --- binutils-2.9.5.0.24/opcodes/mcore-opc.h Fri Aug 13 11:27:21 1999 +++ binutils-2.9.5.0.27/opcodes/mcore-opc.h Fri Jan 21 11:32:45 2000 @@ -1,4 +1,4 @@ -/* Assembler instructions for Motorolla's Mcore processor +/* Assembler instructions for Motorola's Mcore processor Copyright (C) 1999 Free Software Foundation, Inc. @@ -109,6 +109,7 @@ mcore_opcode_info mcore_table[] = { "asr", O2, 0, 0x1A00 }, { "lsl", O2, 0, 0x1B00 }, { "addu", O2, 0, 0x1C00 }, + { "add", O2, 0, 0x1C00 }, /* Official alias. */ { "ixh", O2, 0, 0x1D00 }, { "or", O2, 0, 0x1E00 }, { "andn", O2, 0, 0x1F00 },