Import of GNU Binutils version 2.10.1.
Believe it or not, this is heavily stripped down.
This commit is contained in:
parent
3191012c29
commit
98c12ca6b6
@ -1683,7 +1683,8 @@ DEVO_SUPPORT= README Makefile.in configure configure.in \
|
||||
# ChangeLog omitted because it may refer to files which are not in this
|
||||
# distribution (perhaps it would be better to include it anyway).
|
||||
ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
|
||||
make-stds.texi standards.info*
|
||||
make-stds.texi standards.info* configure.texi configure.info* \
|
||||
configbuild.* configdev.*
|
||||
|
||||
# When you use `make setup-dirs' or `make taz' you should always redefine
|
||||
# this macro.
|
||||
|
@ -1,3 +1,147 @@
|
||||
2000-11-07 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* coff-h8300.c (special): Adjust reloc address.
|
||||
|
||||
From mainline 2000-04-03 Kazu Hirata <kazu@hxi.com>
|
||||
* coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
|
||||
the R_PCRWORD_B case.
|
||||
|
||||
2000-11-05 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
|
||||
BFDs containing no sections to be merged, regardless of their flags.
|
||||
|
||||
2000-11-04 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* elf32-arm.h (elf32_arm_relocate_section): Suppress error message
|
||||
if a relocation for an undefined symbol also results in an
|
||||
overflow.
|
||||
|
||||
2000-10-31 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
|
||||
EF_SOFT_FLOAT if it is defined.
|
||||
|
||||
From 2000-05-23 H.J. Lu <hjl@gnu.org>
|
||||
* elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
|
||||
|
||||
2000-10-27 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
|
||||
attempts to mix PIC code with non-PIC, just mark the output as
|
||||
being position dependent.
|
||||
(elf32_arm_merge_private_bfd_data): Likewise. Print an error
|
||||
message for EF_SOFT_FLOAT mismatches. Display diagnostics for
|
||||
all mismatches, not just the first one.
|
||||
|
||||
2000-10-23 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
From 2000-05-23 H.J. Lu <hjl@gnu.org>
|
||||
* elf64-alpha.c (elf64_alpha_relocate_section): Check
|
||||
h->root.other not h->other.
|
||||
* elf32-mips.c (mips_elf_calculate_relocation): Likewise.
|
||||
|
||||
2000-10-23 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Undo previous
|
||||
accidental checkin.
|
||||
|
||||
2000-10-22 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make
|
||||
PLT entries that could serve as a definition for a weak symbol.
|
||||
|
||||
From 2000-06-05 H.J. Lu <hjl@gnu.org>
|
||||
* elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
|
||||
an error when seeing an undefined symbol with hidden/internal
|
||||
attribute. It is handled in *_relocate_section ().
|
||||
|
||||
From 2000-05-23 H.J. Lu <hjl@gnu.org>
|
||||
* elf32-i386.c (elf_i386_relocate_section): Don't allow the
|
||||
undefined symbol with the non-default visibility attributes.
|
||||
* elf-hppa.h (elf_hppa_relocate_section): Likewise.
|
||||
* elf32-arm.h (elf32_arm_relocate_section): Likewise.
|
||||
* elf32-i370.c (i370_elf_relocate_section): Likewise.
|
||||
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
|
||||
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
|
||||
* elf32-mips.c (mips_elf_calculate_relocation): Likewise.
|
||||
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
|
||||
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
|
||||
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
|
||||
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
|
||||
|
||||
2000-10-16 Geoffrey Keating <geoffk@cygnus.com>
|
||||
|
||||
From 2000-10-14 Geoffrey Keating <geoffk@cygnus.com>
|
||||
* elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
|
||||
entries that could serve as a definition for a weak symbol.
|
||||
|
||||
2000-10-15 Philip Blundell <philb@gnu.org>
|
||||
|
||||
From 2000-09-08 Nick Clifton <nickc@redhat.com>
|
||||
* elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
|
||||
initialise flags in output bfd if the input bfd is the default
|
||||
architecture with the default flags.
|
||||
|
||||
From 2000-09-03 Philip Blundell <philb@gnu.org>
|
||||
* elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
|
||||
references to undefined symbols in debugging sections.
|
||||
|
||||
From 2000-05-30 H.J. Lu <hjl@gnu.org>
|
||||
* elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
|
||||
visibility bits if the symbol is undefined. Correctly handle
|
||||
weak undefined symbols with hidden and internal attributes.
|
||||
* elflink.h (elf_link_add_object_symbols): Always turn the
|
||||
symbol into local if it has the hidden or internal attribute.
|
||||
|
||||
From 2000-05-22 H.J. Lu <hjl@gnu.org>
|
||||
* elflink.h (elf_link_output_extsym): Clear the visibility
|
||||
field for symbols not defined locally.
|
||||
|
||||
From 2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
|
||||
* elflink.h (elf_link_add_object_symbols): Reset dynindx for
|
||||
hidden and internal symbols.
|
||||
(elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
|
||||
visibility.
|
||||
* elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
|
||||
assign a PLT or GOT entry to symbols with hidden and
|
||||
internal visibility.
|
||||
|
||||
2000-10-16 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* configure.in: Set version to 2.10.1.
|
||||
* configure: Regenerate.
|
||||
|
||||
2000-09-24 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
From 2000-04-20 H.J. Lu <hjl@gnu.org>
|
||||
* elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
|
||||
patch to symbols defined by a shared object.
|
||||
|
||||
2000-09-06 Philip Blundell <philb@gnu.org>
|
||||
|
||||
Merge from mainline:
|
||||
|
||||
2000-05-31 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
|
||||
definitions. We must not assume they are sorted in the file
|
||||
according to their index numbers.
|
||||
|
||||
2000-09-06 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* config.bfd (arm*-*-uclinux*): New target.
|
||||
(armeb-*-elf, arm*b-*-linux-gnu*): Likewise.
|
||||
|
||||
2000-08-22 Doug Kwan <dkwan@transmeta.com>
|
||||
|
||||
* coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
|
||||
* coffcode.h (coff_set_flags): Add detection of w65 architecture.
|
||||
|
||||
2000-04-14 Matthew Green <mrg@cygnus.com>
|
||||
|
||||
* config.bfd: Add NetBSD/sparc64 support.
|
||||
|
||||
2000-05-31 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
Add support for FreeBSD/Alpha.
|
||||
|
@ -2582,6 +2582,12 @@ coff_set_flags (abfd, magicp, flagsp)
|
||||
return true;
|
||||
#endif
|
||||
|
||||
#ifdef W65MAGIC
|
||||
case bfd_arch_w65:
|
||||
*magicp = W65MAGIC;
|
||||
return true;
|
||||
#endif
|
||||
|
||||
default: /* Unknown architecture */
|
||||
/* return false; -- fall through to "return false" below, to avoid
|
||||
"statement never reached" errors on the one below. */
|
||||
|
@ -79,6 +79,10 @@ case "${targ}" in
|
||||
alpha*-*-*)
|
||||
targ_defvec=ecoffalpha_little_vec
|
||||
;;
|
||||
sparc64-*-netbsd*)
|
||||
targ_defvec=bfd_elf64_sparc_vec
|
||||
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
|
||||
;;
|
||||
#endif /* BFD64 */
|
||||
|
||||
arc-*-elf*)
|
||||
@ -122,7 +126,11 @@ case "${targ}" in
|
||||
targ_selvecs=armcoff_big_vec
|
||||
targ_underscore=yes
|
||||
;;
|
||||
arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix*)
|
||||
armeb-*-elf | arm*b-*-linux-gnu*)
|
||||
targ_defvec=bfd_elf32_bigarm_vec
|
||||
targ_selvecs=bfd_elf32_littlearm_vec
|
||||
;;
|
||||
arm-*-elf | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*)
|
||||
targ_defvec=bfd_elf32_littlearm_vec
|
||||
targ_selvecs=bfd_elf32_bigarm_vec
|
||||
;;
|
||||
|
2
contrib/binutils/bfd/configure
vendored
2
contrib/binutils/bfd/configure
vendored
@ -1050,7 +1050,7 @@ fi
|
||||
|
||||
PACKAGE=bfd
|
||||
|
||||
VERSION=2.10
|
||||
VERSION=2.10.1
|
||||
|
||||
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; }
|
||||
|
@ -7,7 +7,7 @@ AC_INIT(libbfd.c)
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_ISC_POSIX
|
||||
|
||||
AM_INIT_AUTOMAKE(bfd, 2.10)
|
||||
AM_INIT_AUTOMAKE(bfd, 2.10.1)
|
||||
|
||||
dnl These must be called before AM_PROG_LIBTOOL, because it may want
|
||||
dnl to call AC_CHECK_PROG.
|
||||
|
@ -4488,18 +4488,13 @@ _bfd_elf_slurp_version_tables (abfd)
|
||||
Elf_Internal_Shdr *hdr;
|
||||
Elf_External_Verdef *everdef;
|
||||
Elf_Internal_Verdef *iverdef;
|
||||
Elf_Internal_Verdef *iverdefarr;
|
||||
Elf_Internal_Verdef iverdefmem;
|
||||
unsigned int i;
|
||||
unsigned int maxidx;
|
||||
|
||||
hdr = &elf_tdata (abfd)->dynverdef_hdr;
|
||||
|
||||
elf_tdata (abfd)->verdef =
|
||||
((Elf_Internal_Verdef *)
|
||||
bfd_zalloc (abfd, hdr->sh_info * sizeof (Elf_Internal_Verdef)));
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
|
||||
elf_tdata (abfd)->cverdefs = hdr->sh_info;
|
||||
|
||||
contents = (bfd_byte *) bfd_malloc (hdr->sh_size);
|
||||
if (contents == NULL)
|
||||
goto error_return;
|
||||
@ -4507,15 +4502,42 @@ _bfd_elf_slurp_version_tables (abfd)
|
||||
|| bfd_read ((PTR) contents, 1, hdr->sh_size, abfd) != hdr->sh_size)
|
||||
goto error_return;
|
||||
|
||||
/* We know the number of entries in the section but not the maximum
|
||||
index. Therefore we have to run through all entries and find
|
||||
the maximum. */
|
||||
everdef = (Elf_External_Verdef *) contents;
|
||||
iverdef = elf_tdata (abfd)->verdef;
|
||||
for (i = 0; i < hdr->sh_info; i++, iverdef++)
|
||||
maxidx = 0;
|
||||
for (i = 0; i < hdr->sh_info; ++i)
|
||||
{
|
||||
_bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
|
||||
|
||||
if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx)
|
||||
maxidx = iverdefmem.vd_ndx & VERSYM_VERSION;
|
||||
|
||||
everdef = ((Elf_External_Verdef *)
|
||||
((bfd_byte *) everdef + iverdefmem.vd_next));
|
||||
}
|
||||
|
||||
elf_tdata (abfd)->verdef =
|
||||
((Elf_Internal_Verdef *)
|
||||
bfd_zalloc (abfd, maxidx * sizeof (Elf_Internal_Verdef)));
|
||||
if (elf_tdata (abfd)->verdef == NULL)
|
||||
goto error_return;
|
||||
|
||||
elf_tdata (abfd)->cverdefs = maxidx;
|
||||
|
||||
everdef = (Elf_External_Verdef *) contents;
|
||||
iverdefarr = elf_tdata (abfd)->verdef;
|
||||
for (i = 0; i < hdr->sh_info; i++)
|
||||
{
|
||||
Elf_External_Verdaux *everdaux;
|
||||
Elf_Internal_Verdaux *iverdaux;
|
||||
unsigned int j;
|
||||
|
||||
_bfd_elf_swap_verdef_in (abfd, everdef, iverdef);
|
||||
_bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
|
||||
|
||||
iverdef = &iverdefarr[(iverdefmem.vd_ndx & VERSYM_VERSION) - 1];
|
||||
memcpy (iverdef, &iverdefmem, sizeof (Elf_Internal_Verdef));
|
||||
|
||||
iverdef->vd_bfd = abfd;
|
||||
|
||||
|
@ -1756,7 +1756,14 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
(!info->symbolic && h->dynindx != -1)
|
||||
|| (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
|
||||
)
|
||||
&& ((input_section->flags & SEC_ALLOC) != 0)
|
||||
&& ((input_section->flags & SEC_ALLOC) != 0
|
||||
/* DWARF will emit R_ARM_ABS32 relocations in its
|
||||
sections against symbols defined externally
|
||||
in shared libraries. We can't do anything
|
||||
with them here. */
|
||||
|| ((input_section->flags & SEC_DEBUGGING) != 0
|
||||
&& (h->elf_link_hash_flags
|
||||
& ELF_LINK_HASH_DEF_DYNAMIC) != 0))
|
||||
)
|
||||
relocation_needed = 0;
|
||||
break;
|
||||
@ -1800,14 +1807,17 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_undefweak)
|
||||
relocation = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic
|
||||
&& !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||
relocation = 0;
|
||||
else
|
||||
{
|
||||
if (!((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd,
|
||||
input_section, rel->r_offset,
|
||||
(!info->shared || info->no_undefined))))
|
||||
(!info->shared || info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->other)))))
|
||||
return false;
|
||||
relocation = 0;
|
||||
}
|
||||
@ -1836,10 +1846,15 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
switch (r)
|
||||
{
|
||||
case bfd_reloc_overflow:
|
||||
if (!((*info->callbacks->reloc_overflow)
|
||||
(info, name, howto->name, (bfd_vma) 0,
|
||||
input_bfd, input_section, rel->r_offset)))
|
||||
return false;
|
||||
/* If the overflowing reloc was to an undefined symbol,
|
||||
we have already printed one error message and there
|
||||
is no point complaining again. */
|
||||
if ((! h ||
|
||||
h->root.type != bfd_link_hash_undefined)
|
||||
&& (!((*info->callbacks->reloc_overflow)
|
||||
(info, name, howto->name, (bfd_vma) 0,
|
||||
input_bfd, input_section, rel->r_offset))))
|
||||
return false;
|
||||
break;
|
||||
|
||||
case bfd_reloc_undefined:
|
||||
@ -1923,10 +1938,6 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd)
|
||||
|
||||
if (elf_flags_init (obfd) && in_flags != out_flags)
|
||||
{
|
||||
/* Cannot mix PIC and non-PIC code. */
|
||||
if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
|
||||
return false;
|
||||
|
||||
/* Cannot mix APCS26 and APCS32 code. */
|
||||
if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
|
||||
return false;
|
||||
@ -1946,6 +1957,10 @@ Warning: Clearing the interwork flag in %s because non-interworking code in %s h
|
||||
|
||||
in_flags &= ~EF_INTERWORK;
|
||||
}
|
||||
|
||||
/* Likewise for PIC, though don't warn for this case. */
|
||||
if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
|
||||
in_flags &= ~EF_PIC;
|
||||
}
|
||||
|
||||
elf_elfheader (obfd)->e_flags = in_flags;
|
||||
@ -1963,6 +1978,9 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
|
||||
{
|
||||
flagword out_flags;
|
||||
flagword in_flags;
|
||||
boolean flags_compatible = true;
|
||||
boolean null_input_bfd = true;
|
||||
asection *sec;
|
||||
|
||||
if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|
||||
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
|
||||
@ -1994,13 +2012,14 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
|
||||
|
||||
if (!elf_flags_init (obfd))
|
||||
{
|
||||
/* If the input is the default architecture then do not
|
||||
bother setting the flags for the output architecture,
|
||||
instead allow future merges to do this. If no future
|
||||
merges ever set these flags then they will retain their
|
||||
unitialised values, which surprise surprise, correspond
|
||||
/* If the input is the default architecture and had the default
|
||||
flags then do not bother setting the flags for the output
|
||||
architecture, instead allow future merges to do this. If no
|
||||
future merges ever set these flags then they will retain their
|
||||
uninitialised values, which surprise surprise, correspond
|
||||
to the default values. */
|
||||
if (bfd_get_arch_info (ibfd)->the_default)
|
||||
if (bfd_get_arch_info (ibfd)->the_default
|
||||
&& elf_elfheader (ibfd)->e_flags == 0)
|
||||
return true;
|
||||
|
||||
elf_flags_init (obfd) = true;
|
||||
@ -2013,48 +2032,77 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Check flag compatibility. */
|
||||
/* Identical flags must be compatible. */
|
||||
if (in_flags == out_flags)
|
||||
return true;
|
||||
|
||||
/* Complain about various flag mismatches. */
|
||||
/* Check to see if the input BFD actually contains any sections.
|
||||
If not, its flags may not have been initialised either, but it cannot
|
||||
actually cause any incompatibility. */
|
||||
for (sec = ibfd->sections; sec != NULL; sec = sec->next)
|
||||
{
|
||||
/* Ignore synthetic glue sections. */
|
||||
if (strcmp (sec->name, ".glue_7")
|
||||
&& strcmp (sec->name, ".glue_7t"))
|
||||
{
|
||||
null_input_bfd = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (null_input_bfd)
|
||||
return true;
|
||||
|
||||
/* If any of the input BFDs is non-PIC, the output is also position
|
||||
dependent. */
|
||||
if (!(in_flags & EF_PIC))
|
||||
elf_elfheader (obfd)->e_flags &= ~EF_PIC;
|
||||
|
||||
/* Complain about various flag mismatches. */
|
||||
if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
|
||||
_bfd_error_handler (_ ("\
|
||||
{
|
||||
_bfd_error_handler (_ ("\
|
||||
Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"),
|
||||
bfd_get_filename (ibfd),
|
||||
in_flags & EF_APCS_26 ? 26 : 32,
|
||||
bfd_get_filename (obfd),
|
||||
out_flags & EF_APCS_26 ? 26 : 32);
|
||||
flags_compatible = false;
|
||||
}
|
||||
|
||||
if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT))
|
||||
_bfd_error_handler (_ ("\
|
||||
{
|
||||
_bfd_error_handler (_ ("\
|
||||
Error: %s passes floats in %s registers, whereas %s passes them in %s registers"),
|
||||
bfd_get_filename (ibfd),
|
||||
in_flags & EF_APCS_FLOAT ? _ ("float") : _ ("integer"),
|
||||
bfd_get_filename (obfd),
|
||||
out_flags & EF_APCS_26 ? _ ("float") : _ ("integer"));
|
||||
flags_compatible = false;
|
||||
}
|
||||
|
||||
if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
|
||||
_bfd_error_handler (_ ("\
|
||||
Error: %s is compiled as position %s code, whereas %s is not"),
|
||||
bfd_get_filename (ibfd),
|
||||
in_flags & EF_PIC ? _ ("independent") : _ ("dependent"),
|
||||
bfd_get_filename (obfd));
|
||||
|
||||
/* Interworking mismatch is only a warning. */
|
||||
if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK))
|
||||
#ifdef EF_SOFT_FLOAT
|
||||
if ((in_flags & EF_SOFT_FLOAT) != (out_flags & EF_SOFT_FLOAT))
|
||||
{
|
||||
_bfd_error_handler (_ ("\
|
||||
Error: %s uses %s floating point, whereas %s uses %s floating point"),
|
||||
bfd_get_filename (ibfd),
|
||||
in_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"),
|
||||
bfd_get_filename (obfd),
|
||||
out_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"));
|
||||
flags_compatible = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Interworking mismatch is only a warning. */
|
||||
if ((in_flags & EF_INTERWORK) != (out_flags & EF_INTERWORK))
|
||||
_bfd_error_handler (_ ("\
|
||||
Warning: %s %s interworking, whereas %s %s"),
|
||||
bfd_get_filename (ibfd),
|
||||
in_flags & EF_INTERWORK ? _ ("supports") : _ ("does not support"),
|
||||
bfd_get_filename (obfd),
|
||||
out_flags & EF_INTERWORK ? _ ("does not") : _ ("does"));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return flags_compatible;
|
||||
}
|
||||
|
||||
/* Display the flags field */
|
||||
|
@ -1291,7 +1291,9 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
sections against symbols defined externally
|
||||
in shared libraries. We can't do anything
|
||||
with them here. */
|
||||
|| (input_section->flags & SEC_DEBUGGING) != 0)))
|
||||
|| ((input_section->flags & SEC_DEBUGGING) != 0
|
||||
&& (h->elf_link_hash_flags
|
||||
& ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
|
||||
{
|
||||
/* In these cases, we don't need the relocation
|
||||
value. We check specially because in some
|
||||
@ -1313,14 +1315,17 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_undefweak)
|
||||
relocation = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic
|
||||
&& !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||
relocation = 0;
|
||||
else
|
||||
{
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd,
|
||||
input_section, rel->r_offset,
|
||||
(!info->shared || info->no_undefined))))
|
||||
(!info->shared || info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->other)))))
|
||||
return false;
|
||||
relocation = 0;
|
||||
}
|
||||
|
@ -5930,7 +5930,8 @@ mips_elf_calculate_relocation (abfd,
|
||||
and check to see if they exist by looking at their
|
||||
addresses. */
|
||||
symbol = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
|
||||
symbol = 0;
|
||||
else if (strcmp (h->root.root.root.string, "_DYNAMIC_LINK") == 0)
|
||||
{
|
||||
@ -5948,7 +5949,8 @@ mips_elf_calculate_relocation (abfd,
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.root.string, input_bfd,
|
||||
input_section, relocation->r_offset,
|
||||
(!info->shared || info->no_undefined))))
|
||||
(!info->shared || info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->root.other)))))
|
||||
return bfd_reloc_undefined;
|
||||
symbol = 0;
|
||||
}
|
||||
|
@ -2687,6 +2687,13 @@ ppc_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
|
||||
/* Mark the symbol as undefined, rather than as defined in
|
||||
the .plt section. Leave the value alone. */
|
||||
sym->st_shndx = SHN_UNDEF;
|
||||
/* If the symbol is weak, we do need to clear the value.
|
||||
Otherwise, the PLT entry would provide a definition for
|
||||
the symbol even if the symbol wasn't defined anywhere,
|
||||
and so the symbol would never be NULL. */
|
||||
if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
|
||||
== 0)
|
||||
sym->st_value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3101,7 +3108,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_undefweak)
|
||||
relocation = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic
|
||||
&& !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||
relocation = 0;
|
||||
else
|
||||
{
|
||||
@ -3111,7 +3120,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
input_section,
|
||||
rel->r_offset,
|
||||
(!info->shared
|
||||
|| info->no_undefined)))
|
||||
|| info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->other))))
|
||||
return false;
|
||||
relocation = 0;
|
||||
}
|
||||
|
@ -1213,14 +1213,17 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_undefweak)
|
||||
relocation = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic
|
||||
&& !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||
relocation = 0;
|
||||
else
|
||||
{
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd,
|
||||
input_section, rel->r_offset,
|
||||
(!info->shared || info->no_undefined))))
|
||||
(!info->shared || info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->other)))))
|
||||
return false;
|
||||
relocation = 0;
|
||||
}
|
||||
|
@ -3475,14 +3475,17 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
}
|
||||
else if (h->root.root.type == bfd_link_hash_undefweak)
|
||||
relocation = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic
|
||||
&& !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
|
||||
relocation = 0;
|
||||
else
|
||||
{
|
||||
if (!((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.root.string, input_bfd,
|
||||
input_section, rel->r_offset,
|
||||
(!info->shared || info->no_undefined))))
|
||||
(!info->shared || info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->root.other)))))
|
||||
return false;
|
||||
relocation = 0;
|
||||
}
|
||||
|
@ -2049,14 +2049,17 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_undefweak)
|
||||
relocation = 0;
|
||||
else if (info->shared && !info->symbolic && !info->no_undefined)
|
||||
else if (info->shared && !info->symbolic
|
||||
&& !info->no_undefined
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
|
||||
relocation = 0;
|
||||
else
|
||||
{
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string, input_bfd,
|
||||
input_section, rel->r_offset,
|
||||
(!info->shared || info->no_undefined))))
|
||||
(!info->shared || info->no_undefined
|
||||
|| ELF_ST_VISIBILITY (h->other)))))
|
||||
return false;
|
||||
relocation = 0;
|
||||
}
|
||||
|
@ -226,20 +226,13 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
|
||||
{
|
||||
case STV_INTERNAL:
|
||||
case STV_HIDDEN:
|
||||
/* This symbol must be defined in the shared object or
|
||||
executable. */
|
||||
if (h->root.type == bfd_link_hash_undefined)
|
||||
if (h->root.type != bfd_link_hash_undefined
|
||||
&& h->root.type != bfd_link_hash_undefweak)
|
||||
{
|
||||
bfd * abfd = h->root.u.undef.abfd;
|
||||
const char * name = h->root.root.string;
|
||||
|
||||
(*info->callbacks->undefined_symbol)
|
||||
(info, name, abfd, bfd_und_section_ptr, 0, true);
|
||||
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
|
||||
return true;
|
||||
}
|
||||
|
||||
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -1852,6 +1852,18 @@ elf_link_add_object_symbols (abfd, info)
|
||||
goto error_return;
|
||||
}
|
||||
}
|
||||
else if (dynsym && h->dynindx != -1)
|
||||
/* If the symbol already has a dynamic index, but
|
||||
visibility says it should not be visible, turn it into
|
||||
a local symbol. */
|
||||
switch (ELF_ST_VISIBILITY (h->other))
|
||||
{
|
||||
case STV_INTERNAL:
|
||||
case STV_HIDDEN:
|
||||
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
|
||||
(*bed->elf_backend_hide_symbol) (h);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3339,10 +3351,12 @@ elf_fix_symbol_flags (h, eif)
|
||||
/* If -Bsymbolic was used (which means to bind references to global
|
||||
symbols to the definition within the shared object), and this
|
||||
symbol was defined in a regular object, then it actually doesn't
|
||||
need a PLT entry. */
|
||||
need a PLT entry. Likewise, if the symbol has any kind of
|
||||
visibility (internal, hidden, or protected), it doesn't need a
|
||||
PLT. */
|
||||
if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0
|
||||
&& eif->info->shared
|
||||
&& eif->info->symbolic
|
||||
&& (eif->info->symbolic || ELF_ST_VISIBILITY (h->other))
|
||||
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0)
|
||||
{
|
||||
h->elf_link_hash_flags &=~ ELF_LINK_HASH_NEEDS_PLT;
|
||||
@ -5072,6 +5086,11 @@ elf_link_output_extsym (h, data)
|
||||
sym.st_info = ELF_ST_INFO (bindtype, ELF_ST_TYPE (sym.st_info));
|
||||
}
|
||||
|
||||
/* If a symbol is not defined locally, we clear the visibility
|
||||
field. */
|
||||
if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
|
||||
sym.st_other ^= ELF_ST_VISIBILITY(sym.st_other);
|
||||
|
||||
/* If this symbol should be put in the .dynsym section, then put it
|
||||
there now. We have already know the symbol index. We also fill
|
||||
in the entry in the .hash section. */
|
||||
|
@ -1,3 +1,99 @@
|
||||
2000-11-01 Philip Blundell <philb@gnu.org>
|
||||
|
||||
From 2000-06-15 H.J. Lu <hjl@gnu.org>
|
||||
* dyn-string.c: Removed. Not needed with dyn-string.c in
|
||||
libiberty.
|
||||
* dyn-string.h: Likewise.
|
||||
* Makefile.am: Remove references to dyn-string.c and
|
||||
dyn-string.h. Rebuild dependency.
|
||||
* Makefile.in: Rebuild.
|
||||
|
||||
2000-10-16 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* configure.in: Set version number to 2.10.1.
|
||||
* configure: Regenerate.
|
||||
|
||||
2000-10-14 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* config.sub, config.guess: Update from mainline sources.
|
||||
|
||||
From 2000-09-07 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
|
||||
* configure: Rebuild.
|
||||
|
||||
From 2000-08-17 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* readelf.c (display_debug_pubnames): Only issue warning
|
||||
message once. Terminate message with a new line.
|
||||
(display_debug_aranges): Only display version 2 debug info.
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* readelf.c (get_dynamic_type): Change "AUXILARY" to
|
||||
"AUXILIARY".
|
||||
(process_dynamic_segment): Print out strings for DT_CONFIG,
|
||||
DT_DEPAUDIT, DT_AUDIT and DT_RUNPATH.
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* readelf.c (process_dynamic_segment): Change DF_1_NODEPLIB
|
||||
to DF_1_NODEFLIB.
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* readelf.c (get_dynamic_type): Fix DT_CHECKSUM.
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* readelf.c (get_dynamic_type): Change DT_FEATURE_1 to
|
||||
DT_FEATURE.
|
||||
(process_dynamic_segment): Likewise.
|
||||
|
||||
* readelf.c (get_dynamic_type): Handle DT_CONFIG, DT_DEPAUDIT,
|
||||
DT_AUDIT, DT_PLTPAD, DT_MOVETAB and DT_CHECKSUM.
|
||||
(process_dynamic_segment): Handle DTF_1_CONFEXP, DF_1_NODEPLIB,
|
||||
DF_1_NODUMP and DF_1_CONLFAT.
|
||||
|
||||
From 2000-07-01 Alexander Aganichev <AAganichev@hypercom.com>
|
||||
|
||||
* stabs.c (parse_stab_type): Divide size in bits by 8 as binutils
|
||||
struct debug_type stores size in bytes.
|
||||
|
||||
From 2000-08-17 Christopher C. Chimelis <chris@debian.org>
|
||||
|
||||
* objdump.c (LONGEST_ARCH): Set to sizeof("powerpc:common").
|
||||
|
||||
From 2000-07-11 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* objdump.c (usage): Make output of `objdump --help' more
|
||||
consistent with the rest of the GNU world. Add a line describing
|
||||
the purpose of the program.
|
||||
|
||||
From 2000-06-24 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* objdump.c (usage): Fix description of --stabs switch.
|
||||
|
||||
From 2000-07-18 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* binutils.texi (readelf): Fix spelling typo.
|
||||
|
||||
From 2000-07-19 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* nm.c (usage): Change output of `nm --help' to include a
|
||||
description of the purpose of the program and a detailed
|
||||
description of the accepted options.
|
||||
|
||||
2000-09-05 Todd Vierling <tv@wasabisystems.com>
|
||||
|
||||
From 2000-08-14 Todd Vierling <tv@wasabisystems.com>
|
||||
* objcopy.c (strip_main): Silently accept -d as an alias for -g
|
||||
for compatability with old BSD systems.
|
||||
|
||||
2000-09-04 Todd Vierling <tv@wasabisystems.com>
|
||||
|
||||
* strip.1: Fix stray '\' in -o formatting.
|
||||
|
||||
2000-05-30 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* objdump.c (display_target_list): Use bfd_close_all_done, not
|
||||
|
@ -74,7 +74,7 @@ MKDEP = gcc -MM
|
||||
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
|
||||
|
||||
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
||||
windres.h winduni.h dyn-string.h
|
||||
windres.h winduni.h
|
||||
|
||||
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
|
||||
|
||||
@ -84,7 +84,7 @@ CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
|
||||
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
||||
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
||||
windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
|
||||
resres.c dyn-string.c dllwrap.c rename.c
|
||||
resres.c dllwrap.c rename.c
|
||||
|
||||
GENERATED_CFILES = \
|
||||
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
||||
@ -242,7 +242,7 @@ sysinfo.h: sysinfo.c
|
||||
|
||||
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
|
||||
|
||||
dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
|
||||
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
|
||||
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
||||
|
||||
dlltool.o:dlltool.c
|
||||
@ -267,7 +267,7 @@ windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
||||
winduni.c resres.c $(BULIBS)
|
||||
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
||||
|
||||
dllwrap_SOURCES = dllwrap.c dyn-string.c version.c
|
||||
dllwrap_SOURCES = dllwrap.c version.c
|
||||
dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
|
||||
|
||||
|
||||
@ -391,7 +391,7 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h debug.h
|
||||
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \
|
||||
dlltool.h
|
||||
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
|
||||
@ -484,11 +484,9 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/libiberty.h windres.h winduni.h
|
||||
dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \
|
||||
dyn-string.h
|
||||
dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
|
||||
$(INCDIR)/fopen-same.h dyn-string.h
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
|
||||
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
|
||||
underscore.o: underscore.c
|
||||
|
@ -151,8 +151,7 @@ DLLWRAP_PROG = dllwrap
|
||||
|
||||
SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
|
||||
|
||||
man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 \
|
||||
addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
|
||||
man_MANS = ar.1 nm.1 objdump.1 ranlib.1 size.1 strings.1 strip.1 objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
|
||||
|
||||
|
||||
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
|
||||
@ -174,24 +173,15 @@ MKDEP = gcc -MM
|
||||
|
||||
INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(prefix)/share/locale\""
|
||||
|
||||
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h \
|
||||
windres.h winduni.h dyn-string.h
|
||||
HFILES = arsup.h bucomm.h budbg.h coffgrok.h debug.h nlmconv.h dlltool.h windres.h winduni.h
|
||||
|
||||
|
||||
GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
|
||||
|
||||
CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c \
|
||||
dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c \
|
||||
maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c \
|
||||
objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c \
|
||||
stabs.c strings.c sysdump.c version.c wrstabs.c \
|
||||
windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c \
|
||||
resres.c dyn-string.c dllwrap.c rename.c
|
||||
CFILES = addr2line.c ar.c arsup.c bucomm.c coffdump.c coffgrok.c debug.c dlltool.c filemode.c ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c nlmconv.c nm.c not-ranlib.c not-strip.c objcopy.c objdump.c prdbg.c rdcoff.c rddbg.c size.c srconv.c stabs.c strings.c sysdump.c version.c wrstabs.c windres.c resrc.c rescoff.c resbin.c winduni.c readelf.c resres.c dllwrap.c rename.c
|
||||
|
||||
|
||||
GENERATED_CFILES = \
|
||||
underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
|
||||
defparse.c deflex.c nlmheader.c rcparse.c rclex.c
|
||||
GENERATED_CFILES = underscore.c arparse.c arlex.c sysroff.c sysinfo.c syslex.c defparse.c deflex.c nlmheader.c rcparse.c rclex.c
|
||||
|
||||
|
||||
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
|
||||
@ -208,29 +198,12 @@ LIBIBERTY = ../libiberty/libiberty.a
|
||||
|
||||
POTFILES = $(CFILES) $(DEBUG_SRCS) $(HFILES)
|
||||
|
||||
EXPECT = `if [ -f $$r/../expect/expect ] ; then \
|
||||
echo $$r/../expect/expect ; \
|
||||
else echo expect ; fi`
|
||||
EXPECT = `if [ -f $$r/../expect/expect ] ; then echo $$r/../expect/expect ; else echo expect ; fi`
|
||||
|
||||
RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then \
|
||||
echo ${srcdir}/../dejagnu/runtest ; \
|
||||
else echo runtest ; fi`
|
||||
RUNTEST = `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest ; fi`
|
||||
|
||||
|
||||
CC_FOR_TARGET = ` \
|
||||
if [ -f $$r/../gcc/xgcc ] ; then \
|
||||
if [ -f $$r/../newlib/Makefile ] ; then \
|
||||
echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
|
||||
else \
|
||||
echo $$r/../gcc/xgcc -B$$r/../gcc/; \
|
||||
fi; \
|
||||
else \
|
||||
if [ "@host@" = "@target@" ] ; then \
|
||||
echo $(CC); \
|
||||
else \
|
||||
echo gcc | sed '$(transform)'; \
|
||||
fi; \
|
||||
fi`
|
||||
CC_FOR_TARGET = ` if [ -f $$r/../gcc/xgcc ] ; then if [ -f $$r/../newlib/Makefile ] ; then echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; else echo $$r/../gcc/xgcc -B$$r/../gcc/; fi; else if [ "@host@" = "@target@" ] ; then echo $(CC); else echo gcc | sed '$(transform)'; fi; fi`
|
||||
|
||||
|
||||
info_TEXINFOS = binutils.texi
|
||||
@ -266,7 +239,7 @@ addr2line_SOURCES = addr2line.c $(BULIBS)
|
||||
|
||||
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
|
||||
|
||||
dlltool_SOURCES = dlltool.c defparse.y deflex.l dyn-string.c $(BULIBS)
|
||||
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
|
||||
dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
||||
|
||||
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
|
||||
@ -275,26 +248,22 @@ sysdump_SOURCES = sysdump.c $(BULIBS)
|
||||
|
||||
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
|
||||
|
||||
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
|
||||
winduni.c resres.c $(BULIBS)
|
||||
windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l winduni.c resres.c $(BULIBS)
|
||||
|
||||
windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
|
||||
|
||||
dllwrap_SOURCES = dllwrap.c dyn-string.c version.c
|
||||
dllwrap_SOURCES = dllwrap.c version.c
|
||||
dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
|
||||
|
||||
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
|
||||
syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
|
||||
DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
|
||||
|
||||
|
||||
DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
|
||||
site.exp site.bak
|
||||
DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h site.exp site.bak
|
||||
|
||||
|
||||
MAINTAINERCLEANFILES = config.texi
|
||||
|
||||
MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \
|
||||
abcdefgh*
|
||||
MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum abcdefgh*
|
||||
|
||||
|
||||
CLEANFILES = dep.sed DEP DEP1 DEP2
|
||||
@ -330,15 +299,15 @@ coffdump_OBJECTS = coffdump.o coffgrok.o bucomm.o version.o filemode.o
|
||||
coffdump_LDADD = $(LDADD)
|
||||
coffdump_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
||||
coffdump_LDFLAGS =
|
||||
dlltool_OBJECTS = dlltool.o defparse.o deflex.o dyn-string.o bucomm.o \
|
||||
version.o filemode.o
|
||||
dlltool_OBJECTS = dlltool.o defparse.o deflex.o bucomm.o version.o \
|
||||
filemode.o
|
||||
dlltool_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
||||
dlltool_LDFLAGS =
|
||||
windres_OBJECTS = windres.o resrc.o rescoff.o resbin.o rcparse.o \
|
||||
rclex.o winduni.o resres.o bucomm.o version.o filemode.o
|
||||
windres_DEPENDENCIES = ../bfd/libbfd.la ../libiberty/libiberty.a
|
||||
windres_LDFLAGS =
|
||||
dllwrap_OBJECTS = dllwrap.o dyn-string.o version.o
|
||||
dllwrap_OBJECTS = dllwrap.o version.o
|
||||
dllwrap_DEPENDENCIES = ../libiberty/libiberty.a
|
||||
dllwrap_LDFLAGS =
|
||||
size_OBJECTS = size.o bucomm.o version.o filemode.o
|
||||
@ -1247,7 +1216,7 @@ debug.o: debug.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h debug.h
|
||||
dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/demangle.h dyn-string.h \
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/demangle.h $(INCDIR)/dyn-string.h \
|
||||
dlltool.h
|
||||
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
|
||||
@ -1340,11 +1309,9 @@ readelf.o: readelf.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
resres.o: resres.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
|
||||
$(INCDIR)/libiberty.h windres.h winduni.h
|
||||
dyn-string.o: dyn-string.c config.h $(INCDIR)/ansidecl.h \
|
||||
dyn-string.h
|
||||
dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
$(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
|
||||
$(INCDIR)/fopen-same.h dyn-string.h
|
||||
$(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
|
||||
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
|
||||
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
|
||||
underscore.o: underscore.c
|
||||
|
@ -2530,7 +2530,7 @@ exist.
|
||||
@item -D
|
||||
@itemx --use-dynamic
|
||||
When displaying symbols, this option makes @code{readelf} use the
|
||||
symblol table in the file's dynamic section, rather than the one in the
|
||||
symbol table in the file's dynamic section, rather than the one in the
|
||||
symbols section.
|
||||
|
||||
@item -x <number>
|
||||
|
@ -1 +1 @@
|
||||
@set VERSION 2.10
|
||||
@set VERSION 2.10.1
|
||||
|
926
contrib/binutils/binutils/configure
vendored
926
contrib/binutils/binutils/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,9 @@ AC_PREREQ(2.13)
|
||||
AC_INIT(ar.c)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_ISC_POSIX
|
||||
|
||||
AM_INIT_AUTOMAKE(binutils, 2.10)
|
||||
AM_INIT_AUTOMAKE(binutils, 2.10.1)
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
|
@ -291,19 +291,38 @@ usage (stream, status)
|
||||
FILE *stream;
|
||||
int status;
|
||||
{
|
||||
fprintf (stream, _("\
|
||||
Usage: %s [-aABCDglnopPrsuvV] [-t radix] [--radix=radix] [--target=bfdname]\n\
|
||||
[--debug-syms] [--extern-only] [--print-armap] [--print-file-name]\n\
|
||||
[--numeric-sort] [--no-sort] [--reverse-sort] [--size-sort]\n\
|
||||
[--undefined-only] [--portability] [-f {bsd,sysv,posix}]\n\
|
||||
[--format={bsd,sysv,posix}] [--demangle] [--no-demangle] [--dynamic]\n\
|
||||
[--defined-only] [--line-numbers]\n\
|
||||
[--version] [--help]\n\
|
||||
[file...]\n"),
|
||||
program_name);
|
||||
fprintf (stream, _("Usage: %s [OPTION]... [FILE]...\n"), program_name);
|
||||
fprintf (stream, _("List symbols from FILEs (a.out by default).\n"));
|
||||
fprintf (stream, _("\n\
|
||||
-a, --debug-syms Display debugger-only symbols\n\
|
||||
-A, --print-file-name Print name of the input file before every symbol\n\
|
||||
-B Same as --format=bsd\n\
|
||||
-C, --demangle Decode low-level symbol names into user-level names\n\
|
||||
--no-demangle Do not demangle low-level symbol names\n\
|
||||
-D, --dynamic Display dynamic symbols instead of normal symbols\n\
|
||||
--defined-only Display only defined symbols\n\
|
||||
-e (ignored)\n\
|
||||
-f, --format=FORMAT Use the output format FORMAT. FORMAT can be `bsd',\n\
|
||||
`sysv' or `posix'. The default is `bsd'\n\
|
||||
-g, --extern-only Display only external symbols\n\
|
||||
-h, --help Display this information\n\
|
||||
-l, --line-numbers Use debugging information to find a filename and\n\
|
||||
line number for each symbol\n\
|
||||
-n, --numeric-sort Sort symbols numerically by address\n\
|
||||
-o Same as -A\n\
|
||||
-p, --no-sort Do not sort the symbols\n\
|
||||
-P, --portability Same as --format=posix\n\
|
||||
-r, --reverse-sort Reverse the sense of the sort\n\
|
||||
-s, --print-armap Include index for symbols from archive members\n\
|
||||
--size-sort Sort symbols by size\n\
|
||||
-t, --radix=RADIX Use RADIX for printing symbol values\n\
|
||||
--target=BFDNAME Specify the target object format as BFDNAME\n\
|
||||
-u, --undefined-only Display only undefined symbols\n\
|
||||
-V, --version Display this program's version number\n\
|
||||
\n"));
|
||||
list_supported_targets (program_name, stream);
|
||||
if (status == 0)
|
||||
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
|
||||
fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
|
@ -1663,7 +1663,7 @@ strip_main (argc, argv)
|
||||
struct section_list *p;
|
||||
char *output_file = NULL;
|
||||
|
||||
while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpgxXVv",
|
||||
while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv",
|
||||
strip_options, (int *) 0)) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
@ -1687,6 +1687,7 @@ strip_main (argc, argv)
|
||||
break;
|
||||
case 'S':
|
||||
case 'g':
|
||||
case 'd': /* NetBSD, historic BSD strip */
|
||||
strip_symbols = STRIP_DEBUG;
|
||||
break;
|
||||
case OPTION_STRIP_UNNEEDED:
|
||||
|
@ -220,55 +220,56 @@ usage (stream, status)
|
||||
FILE *stream;
|
||||
int status;
|
||||
{
|
||||
fprintf (stream, _("Usage: %s <switches> file(s)\n"), program_name);
|
||||
fprintf (stream, _(" At least one of the following switches must be given:\n"));
|
||||
fprintf (stream, _("Usage: %s OPTION... FILE...\n"), program_name);
|
||||
fprintf (stream, _("Display information from object FILE.\n"));
|
||||
fprintf (stream, _("\n At least one of the following switches must be given:\n"));
|
||||
fprintf (stream, _("\
|
||||
-a --archive-headers Display archive header information\n\
|
||||
-f --file-headers Display the contents of the overall file header\n\
|
||||
-p --private-headers Display object format specific file header contents\n\
|
||||
-h --[section-]headers Display the contents of the section headers\n\
|
||||
-x --all-headers Display the contents of all headers\n\
|
||||
-d --disassemble Display assembler contents of executable sections\n\
|
||||
-D --disassemble-all Display assembler contents of all sections\n\
|
||||
-S --source Intermix source code with disassembly\n\
|
||||
-s --full-contents Display the full contents of all sections requested\n\
|
||||
-g --debugging Display debug information in object file\n\
|
||||
-G --stabs Display the STABS contents of an ELF format file\n\
|
||||
-t --syms Display the contents of the symbol table(s)\n\
|
||||
-T --dynamic-syms Display the contents of the dynamic symbol table\n\
|
||||
-r --reloc Display the relocation entries in the file\n\
|
||||
-R --dynamic-reloc Display the dynamic relocation entries in the file\n\
|
||||
-V --version Display this program's version number\n\
|
||||
-i --info List object formats and architectures supported\n\
|
||||
-H --help Display this information\n\
|
||||
-a, --archive-headers Display archive header information\n\
|
||||
-f, --file-headers Display the contents of the overall file header\n\
|
||||
-p, --private-headers Display object format specific file header contents\n\
|
||||
-h, --[section-]headers Display the contents of the section headers\n\
|
||||
-x, --all-headers Display the contents of all headers\n\
|
||||
-d, --disassemble Display assembler contents of executable sections\n\
|
||||
-D, --disassemble-all Display assembler contents of all sections\n\
|
||||
-S, --source Intermix source code with disassembly\n\
|
||||
-s, --full-contents Display the full contents of all sections requested\n\
|
||||
-g, --debugging Display debug information in object file\n\
|
||||
-G, --stabs Display (in raw form) any STABS info in the file\n\
|
||||
-t, --syms Display the contents of the symbol table(s)\n\
|
||||
-T, --dynamic-syms Display the contents of the dynamic symbol table\n\
|
||||
-r, --reloc Display the relocation entries in the file\n\
|
||||
-R, --dynamic-reloc Display the dynamic relocation entries in the file\n\
|
||||
-V, --version Display this program's version number\n\
|
||||
-i, --info List object formats and architectures supported\n\
|
||||
-H, --help Display this information\n\
|
||||
"));
|
||||
if (status != 2)
|
||||
{
|
||||
fprintf (stream, _("\n The following switches are optional:\n"));
|
||||
fprintf (stream, _("\
|
||||
-b --target <bfdname> Specify the target object format as <bfdname>\n\
|
||||
-m --architecture <machine> Specify the target architecture as <machine>\n\
|
||||
-j --section <name> Only display information for section <name>\n\
|
||||
-M --disassembler-options <o> Pass text <o> on to the disassembler\n\
|
||||
-b, --target=BFDNAME Specify the target object format as BFDNAME\n\
|
||||
-m, --architecture=MACHINE Specify the target architecture as MACHINE\n\
|
||||
-j, --section=NAME Only display information for section NAME\n\
|
||||
-M, --disassembler-options=OPT Pass text OPT on to the disassembler\n\
|
||||
-EB --endian=big Assume big endian format when disassembling\n\
|
||||
-EL --endian=little Assume little endian format when disassembling\n\
|
||||
--file-start-context Include context from start of file (with -S)\n\
|
||||
-l --line-numbers Include line numbers and filenames in output\n\
|
||||
-C --demangle Decode mangled/processed symbol names\n\
|
||||
-w --wide Format output for more than 80 columns\n\
|
||||
-z --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
|
||||
--start-address <addr> Only process data whoes address is >= <addr>\n\
|
||||
--stop-address <addr> Only process data whoes address is <= <addr>\n\
|
||||
-l, --line-numbers Include line numbers and filenames in output\n\
|
||||
-C, --demangle Decode mangled/processed symbol names\n\
|
||||
-w, --wide Format output for more than 80 columns\n\
|
||||
-z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
|
||||
--start-address=ADDR Only process data whoes address is >= ADDR\n\
|
||||
--stop-address=ADDR Only process data whoes address is <= ADDR\n\
|
||||
--prefix-addresses Print complete address alongside disassembly\n\
|
||||
--[no-]show-raw-insn Display hex alongside symbolic disassembly\n\
|
||||
--adjust-vma <offset> Add <offset> to all displayed section addresses\n\
|
||||
--adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\
|
||||
\n"));
|
||||
list_supported_targets (program_name, stream);
|
||||
|
||||
|
||||
disassembler_usage (stream);
|
||||
}
|
||||
if (status == 0)
|
||||
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
|
||||
fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
|
||||
exit (status);
|
||||
}
|
||||
|
||||
@ -2606,7 +2607,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
|
||||
}
|
||||
|
||||
/* The length of the longest architecture name + 1. */
|
||||
#define LONGEST_ARCH sizeof("rs6000:6000")
|
||||
#define LONGEST_ARCH sizeof("powerpc:common")
|
||||
|
||||
static const char *
|
||||
endian_string (endian)
|
||||
|
@ -1063,15 +1063,21 @@ get_dynamic_type (type)
|
||||
case DT_PREINIT_ARRAY: return "PREINIT_ARRAY";
|
||||
case DT_PREINIT_ARRAYSZ: return "PREINIT_ARRAYSZ";
|
||||
|
||||
case DT_CHECKSUM: return "CHECKSUM";
|
||||
case DT_PLTPADSZ: return "PLTPADSZ";
|
||||
case DT_MOVEENT: return "MOVEENT";
|
||||
case DT_MOVESZ: return "MOVESZ";
|
||||
case DT_FEATURE_1: return "FEATURE_1";
|
||||
case DT_FEATURE: return "FEATURE";
|
||||
case DT_POSFLAG_1: return "POSFLAG_1";
|
||||
case DT_SYMINSZ: return "SYMINSZ";
|
||||
case DT_SYMINENT: return "SYMINENT"; /* aka VALRNGHI */
|
||||
|
||||
case DT_ADDRRNGLO: return "ADDRRNGLO";
|
||||
case DT_CONFIG: return "CONFIG";
|
||||
case DT_DEPAUDIT: return "DEPAUDIT";
|
||||
case DT_AUDIT: return "AUDIT";
|
||||
case DT_PLTPAD: return "PLTPAD";
|
||||
case DT_MOVETAB: return "MOVETAB";
|
||||
case DT_SYMINFO: return "SYMINFO"; /* aka ADDRRNGHI */
|
||||
|
||||
case DT_VERSYM: return "VERSYM";
|
||||
@ -1084,7 +1090,7 @@ get_dynamic_type (type)
|
||||
case DT_VERNEED: return "VERNEED";
|
||||
case DT_VERNEEDNUM: return "VERNEEDNUM";
|
||||
|
||||
case DT_AUXILIARY: return "AUXILARY";
|
||||
case DT_AUXILIARY: return "AUXILIARY";
|
||||
case DT_USED: return "USED";
|
||||
case DT_FILTER: return "FILTER";
|
||||
|
||||
@ -3202,12 +3208,33 @@ process_dynamic_segment (file)
|
||||
|
||||
case DT_AUXILIARY:
|
||||
case DT_FILTER:
|
||||
case DT_CONFIG:
|
||||
case DT_DEPAUDIT:
|
||||
case DT_AUDIT:
|
||||
if (do_dynamic)
|
||||
{
|
||||
if (entry->d_tag == DT_AUXILIARY)
|
||||
printf (_("Auxiliary library"));
|
||||
else
|
||||
printf (_("Filter library"));
|
||||
switch (entry->d_tag)
|
||||
{
|
||||
case DT_AUXILIARY:
|
||||
printf (_("Auxiliary library"));
|
||||
break;
|
||||
|
||||
case DT_FILTER:
|
||||
printf (_("Filter library"));
|
||||
break;
|
||||
|
||||
case DT_CONFIG:
|
||||
printf (_("Configuration file"));
|
||||
break;
|
||||
|
||||
case DT_DEPAUDIT:
|
||||
printf (_("Dependency audit library"));
|
||||
break;
|
||||
|
||||
case DT_AUDIT:
|
||||
printf (_("Audit library"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (dynamic_strings)
|
||||
printf (": [%s]\n", dynamic_strings + entry->d_un.d_val);
|
||||
@ -3220,7 +3247,7 @@ process_dynamic_segment (file)
|
||||
}
|
||||
break;
|
||||
|
||||
case DT_FEATURE_1:
|
||||
case DT_FEATURE:
|
||||
if (do_dynamic)
|
||||
{
|
||||
printf (_("Flags:"));
|
||||
@ -3234,6 +3261,11 @@ process_dynamic_segment (file)
|
||||
printf (" PARINIT");
|
||||
val ^= DTF_1_PARINIT;
|
||||
}
|
||||
if (val & DTF_1_CONFEXP)
|
||||
{
|
||||
printf (" CONFEXP");
|
||||
val ^= DTF_1_CONFEXP;
|
||||
}
|
||||
if (val != 0)
|
||||
printf (" %lx", val);
|
||||
puts ("");
|
||||
@ -3331,6 +3363,21 @@ process_dynamic_segment (file)
|
||||
printf (" INTERPOSE");
|
||||
val ^= DF_1_INTERPOSE;
|
||||
}
|
||||
if (val & DF_1_NODEFLIB)
|
||||
{
|
||||
printf (" NODEFLIB");
|
||||
val ^= DF_1_NODEFLIB;
|
||||
}
|
||||
if (val & DF_1_NODUMP)
|
||||
{
|
||||
printf (" NODUMP");
|
||||
val ^= DF_1_NODUMP;
|
||||
}
|
||||
if (val & DF_1_CONLFAT)
|
||||
{
|
||||
printf (" CONLFAT");
|
||||
val ^= DF_1_CONLFAT;
|
||||
}
|
||||
if (val != 0)
|
||||
printf (" %lx", val);
|
||||
puts ("");
|
||||
@ -3359,6 +3406,7 @@ process_dynamic_segment (file)
|
||||
case DT_DEBUG :
|
||||
case DT_TEXTREL :
|
||||
case DT_JMPREL :
|
||||
case DT_RUNPATH :
|
||||
dynamic_info[entry->d_tag] = entry->d_un.d_val;
|
||||
|
||||
if (do_dynamic)
|
||||
@ -3389,6 +3437,10 @@ process_dynamic_segment (file)
|
||||
printf (_("Library rpath: [%s]"), name);
|
||||
break;
|
||||
|
||||
case DT_RUNPATH:
|
||||
printf (_("Library runpath: [%s]"), name);
|
||||
break;
|
||||
|
||||
default:
|
||||
print_vma (entry->d_un.d_val, PREFIX_HEX);
|
||||
break;
|
||||
@ -5039,7 +5091,14 @@ display_debug_pubnames (section, start, file)
|
||||
|
||||
if (pubnames.pn_version != 2)
|
||||
{
|
||||
warn (_("Only DWARF 2 pubnames are currently supported"));
|
||||
static int warned = 0;
|
||||
|
||||
if (! warned)
|
||||
{
|
||||
warn (_("Only DWARF 2 pubnames are currently supported\n"));
|
||||
warned = 1;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -6357,6 +6416,12 @@ display_debug_aranges (section, start, file)
|
||||
arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
|
||||
arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
|
||||
|
||||
if (arange.ar_version != 2)
|
||||
{
|
||||
warn (_("Only DWARF 2 aranges are currently supported.\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
printf (_(" Length: %ld\n"), arange.ar_length);
|
||||
printf (_(" Version: %d\n"), arange.ar_version);
|
||||
printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);
|
||||
|
@ -1261,6 +1261,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
|
||||
{
|
||||
case 's':
|
||||
size = atoi (attr + 1);
|
||||
size /= 8; /* Size is in bits. We store it in bytes. */
|
||||
if (size <= 0)
|
||||
size = -1;
|
||||
break;
|
||||
|
@ -26,7 +26,7 @@ strip \- Discard symbols from object files.
|
||||
.RB "[\|" \-X\fR\ |\ \fB\-\-discard\-locals "\|]"
|
||||
.RB "[\|" \-K\ \fIsymbolname\fR\ |\ \fB\-\-keep\-symbol=\fIsymbolname\fR "\|]"
|
||||
.RB "[\|" \-N\ \fIsymbolname\fR\ |\ \fB\-\-strip\-symbol=\fIsymbolname\fR "\|]"
|
||||
.RB "[\|" \-o\ \fIfile\f\R "\|]"
|
||||
.RB "[\|" \-o\ \fIfile\fR "\|]"
|
||||
.RB "[\|" \-p\fR\ |\ \fB\-\-preserve\-dates "\|]"
|
||||
.RB "[\|" \-v\fR\ |\ \fB\-\-verbose "\|]"
|
||||
.RB "[\|" \-V\fR\ |\ \fB\-\-version "\|]"
|
||||
|
160
contrib/binutils/config.guess
vendored
160
contrib/binutils/config.guess
vendored
@ -2,7 +2,9 @@
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
|
||||
version='2000-09-05'
|
||||
|
||||
# This file 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 2 of the License, or
|
||||
@ -36,6 +38,46 @@
|
||||
# (but try to keep the structure clean).
|
||||
#
|
||||
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]
|
||||
|
||||
Output the configuration name of this system.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
exit 1 ;;
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test $# != 0; then
|
||||
echo "$me: too many arguments$help" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Use $HOST_CC if defined. $CC may point to a cross-compiler
|
||||
if test x"$CC_FOR_BUILD" = x; then
|
||||
if test x"$HOST_CC" != x; then
|
||||
@ -77,7 +119,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-cbm ;;
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
@ -173,7 +215,7 @@ EOF
|
||||
echo alpha-dec-winnt3.5
|
||||
exit 0 ;;
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-cbm-sysv4
|
||||
echo m68k-unknown-sysv4
|
||||
exit 0;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
@ -266,7 +308,7 @@ EOF
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
|
||||
# to the lowercase version "mint" (or "freemint"). Finally
|
||||
# the system name "TOS" denotes a system which is actually not
|
||||
@ -360,7 +402,7 @@ EOF
|
||||
AViiON:dgux:*:*)
|
||||
# DG/UX returns AViiON for all architectures
|
||||
UNAME_PROCESSOR=`/usr/bin/uname -p`
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
|
||||
if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
|
||||
then
|
||||
if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
|
||||
[ ${TARGET_BINARY_INTERFACE}x = x ]
|
||||
@ -458,6 +500,8 @@ EOF
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@ -588,7 +632,7 @@ EOF
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
@ -604,7 +648,7 @@ EOF
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
|
||||
i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:BSD/OS:*:*)
|
||||
@ -614,12 +658,6 @@ EOF
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
if test -x /usr/bin/objformat; then
|
||||
if test "elf" = "`/usr/bin/objformat`"; then
|
||||
echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
@ -631,6 +669,9 @@ EOF
|
||||
i*:MINGW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-mingw32
|
||||
exit 0 ;;
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
@ -649,6 +690,9 @@ EOF
|
||||
*:GNU:*:*)
|
||||
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
|
||||
exit 0 ;;
|
||||
i*86:Minix:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-minix
|
||||
exit 0 ;;
|
||||
*:Linux:*:*)
|
||||
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
@ -670,6 +714,9 @@ EOF
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
|
||||
exit 0
|
||||
;;
|
||||
elf_i?86)
|
||||
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
|
||||
;;
|
||||
i?86coff)
|
||||
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
|
||||
exit 0
|
||||
@ -721,11 +768,15 @@ EOF
|
||||
if test "$?" = 0 ; then
|
||||
LIBC="libc1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f $dummy.c $dummy
|
||||
echo powerpc-unknown-linux-gnu${LIBC}
|
||||
exit 0
|
||||
;;
|
||||
shelf_linux)
|
||||
echo "${UNAME_MACHINE}-unknown-linux-gnu"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "${UNAME_MACHINE}" = "alpha" ; then
|
||||
@ -807,6 +858,8 @@ EOF
|
||||
rm -f $dummy.c $dummy
|
||||
elif test "${UNAME_MACHINE}" = "s390"; then
|
||||
echo s390-ibm-linux && exit 0
|
||||
elif test "${UNAME_MACHINE}" = "x86_64"; then
|
||||
echo x86_64-unknown-linux-gnu && exit 0
|
||||
else
|
||||
# Either a pre-BFD a.out linker (linux-gnuoldld)
|
||||
# or one that does not give us useful --help.
|
||||
@ -851,6 +904,7 @@ EOF
|
||||
EOF
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
fi ;;
|
||||
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
|
||||
# are messed up and put the nodename in both sysname and nodename.
|
||||
@ -987,7 +1041,7 @@ EOF
|
||||
mc68*:A/UX:*:*)
|
||||
echo m68k-apple-aux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
news*:NEWS-OS:*:6*)
|
||||
news*:NEWS-OS:6*:*)
|
||||
echo mips-sony-newsos6
|
||||
exit 0 ;;
|
||||
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
|
||||
@ -1018,14 +1072,37 @@ EOF
|
||||
*:Rhapsody:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Mac*OS:*:*)
|
||||
echo powerpc-apple-macos${UNAME_RELEASE}
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Mac*OS:*:*)
|
||||
echo ${UNAME_MACHINE}-apple-macos${UNAME_RELEASE}
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-qnx-qnx${UNAME_VERSION}
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
BS2000:POSIX*:*:*)
|
||||
echo bs2000-siemens-sysv
|
||||
exit 0 ;;
|
||||
DS/*:UNIX_System_V:*:*)
|
||||
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Plan9:*:*)
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
if test "$cputype" = "386"; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
UNAME_MACHINE="$cputype"
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
@ -1166,6 +1243,47 @@ then
|
||||
esac
|
||||
fi
|
||||
|
||||
#echo '(Unable to guess system type)' 1>&2
|
||||
cat >&2 <<EOF
|
||||
$0: unable to guess system type
|
||||
|
||||
The $version version of this script cannot recognize your system type.
|
||||
Please download the most up to date version of the config scripts:
|
||||
|
||||
ftp://ftp.gnu.org/pub/gnu/config/
|
||||
|
||||
If the version you run ($0) is already up to date, please
|
||||
send the following data and any information you think might be
|
||||
pertinent to <config-patches@gnu.org> in order to provide the needed
|
||||
information to handle your system.
|
||||
|
||||
config.guess version = $version
|
||||
|
||||
uname -m = `(uname -m) 2>/dev/null || echo unknown`
|
||||
uname -r = `(uname -r) 2>/dev/null || echo unknown`
|
||||
uname -s = `(uname -s) 2>/dev/null || echo unknown`
|
||||
uname -v = `(uname -v) 2>/dev/null || echo unknown`
|
||||
|
||||
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
|
||||
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
|
||||
|
||||
hostinfo = `(hostinfo) 2>/dev/null`
|
||||
/bin/universe = `(/bin/universe) 2>/dev/null`
|
||||
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
|
||||
/bin/arch = `(/bin/arch) 2>/dev/null`
|
||||
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
|
||||
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
|
||||
|
||||
UNAME_MACHINE = ${UNAME_MACHINE}
|
||||
UNAME_RELEASE = ${UNAME_RELEASE}
|
||||
UNAME_SYSTEM = ${UNAME_SYSTEM}
|
||||
UNAME_VERSION = ${UNAME_VERSION}
|
||||
EOF
|
||||
|
||||
exit 1
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
154
contrib/binutils/config.sub
vendored
154
contrib/binutils/config.sub
vendored
@ -2,7 +2,9 @@
|
||||
# Configuration validation subroutine script, version 1.1.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
|
||||
version='2000-09-11'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
# can handle that machine. It does not imply ALL GNU software can.
|
||||
@ -27,7 +29,6 @@
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
@ -50,30 +51,61 @@
|
||||
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||
# It is wrong to echo any other type of specification.
|
||||
|
||||
if [ x$1 = x ]
|
||||
then
|
||||
echo Configuration name missing. 1>&2
|
||||
echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
|
||||
echo "or $0 ALIAS" 1>&2
|
||||
echo where ALIAS is a recognized configuration type. 1>&2
|
||||
exit 1
|
||||
fi
|
||||
me=`echo "$0" | sed -e 's,.*/,,'`
|
||||
|
||||
# First pass through any local machine types.
|
||||
case $1 in
|
||||
*local*)
|
||||
echo $1
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
usage="\
|
||||
Usage: $0 [OPTION] CPU-MFR-OPSYS
|
||||
$0 [OPTION] ALIAS
|
||||
|
||||
Canonicalize a configuration name.
|
||||
|
||||
Operation modes:
|
||||
-h, --help print this help, then exit
|
||||
-V, --version print version number, then exit"
|
||||
|
||||
help="
|
||||
Try \`$me --help' for more information."
|
||||
|
||||
# Parse command line
|
||||
while test $# -gt 0 ; do
|
||||
case "$1" in
|
||||
--version | --vers* | -V )
|
||||
echo "$version" ; exit 0 ;;
|
||||
--help | --h* | -h )
|
||||
echo "$usage"; exit 0 ;;
|
||||
-- ) # Stop option processing
|
||||
shift; break ;;
|
||||
- ) # Use stdin as input.
|
||||
break ;;
|
||||
-* )
|
||||
exec >&2
|
||||
echo "$me: invalid option $1"
|
||||
echo "$help"
|
||||
exit 1 ;;
|
||||
|
||||
*local*)
|
||||
# First pass through any local machine types.
|
||||
echo $1
|
||||
exit 0;;
|
||||
|
||||
* )
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
case $# in
|
||||
0) echo "$me: missing argument$help" >&2
|
||||
exit 1;;
|
||||
1) ;;
|
||||
*) echo "$me: too many arguments$help" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
linux-gnu*)
|
||||
nto-qnx* | linux-gnu*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@ -99,7 +131,7 @@ case $os in
|
||||
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
|
||||
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
|
||||
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
|
||||
-apple)
|
||||
-apple | -axis)
|
||||
os=
|
||||
basic_machine=$1
|
||||
;;
|
||||
@ -172,27 +204,35 @@ case $basic_machine in
|
||||
# Recognize the basic CPU types without company name.
|
||||
# Some are omitted here because they have special meanings below.
|
||||
tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
|
||||
| arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
|
||||
| 580 | i960 | h8300 \
|
||||
| x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
|
||||
| hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
|
||||
| hppa64 \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
|
||||
| alphaev6[78] \
|
||||
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
|
||||
| we32k | ns16k | clipper | i370 | sh | sh[34] \
|
||||
| powerpc | powerpcle \
|
||||
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
|
||||
| mips64orion | mips64orionel | mipstx39 | mipstx39el \
|
||||
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr5000 | miprs64vr5000el | mcore \
|
||||
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
|
||||
| thumb | d10v | fr30 | avr)
|
||||
| thumb | d10v | d30v | fr30 | avr)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
m6811 | m68hc11 | m6812 | m68hc12)
|
||||
# Motorola 68HC11/12.
|
||||
basic_machine=$basic_machine-unknown
|
||||
os=-none
|
||||
;;
|
||||
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
|
||||
;;
|
||||
|
||||
# We use `pc' rather than `unknown'
|
||||
# because (1) that's what they normally are, and
|
||||
# (2) the word "unknown" tends to confuse beginning users.
|
||||
i[34567]86)
|
||||
i[234567]86 | x86_64)
|
||||
basic_machine=$basic_machine-pc
|
||||
;;
|
||||
# Object if more than one company name word.
|
||||
@ -202,12 +242,14 @@ case $basic_machine in
|
||||
;;
|
||||
# Recognize the basic CPU types with company name.
|
||||
# FIXME: clean up the formatting here.
|
||||
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
|
||||
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
|
||||
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
|
||||
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
|
||||
| xmp-* | ymp-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
|
||||
| x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* | armbe-* | armle-* \
|
||||
| hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
|
||||
| hppa2.0n-* | hppa64-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
|
||||
| alphaev6[78]-* \
|
||||
| we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
|
||||
@ -219,7 +261,8 @@ case $basic_machine in
|
||||
| mipstx39-* | mipstx39el-* | mcore-* \
|
||||
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \
|
||||
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
|
||||
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
|
||||
| bs2000-* | tic54x-* | c54x-* | x86_64-*)
|
||||
;;
|
||||
# Recognize the various machine names and aliases which stand
|
||||
# for a CPU type and a company and sometimes even an OS.
|
||||
@ -256,14 +299,14 @@ case $basic_machine in
|
||||
os=-sysv
|
||||
;;
|
||||
amiga | amiga-*)
|
||||
basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
;;
|
||||
amigaos | amigados)
|
||||
basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
os=-amigaos
|
||||
;;
|
||||
amigaunix | amix)
|
||||
basic_machine=m68k-cbm
|
||||
basic_machine=m68k-unknown
|
||||
os=-sysv4
|
||||
;;
|
||||
apollo68)
|
||||
@ -317,6 +360,9 @@ case $basic_machine in
|
||||
crds | unos)
|
||||
basic_machine=m68k-crds
|
||||
;;
|
||||
cris | cris-* | etrax*)
|
||||
basic_machine=cris-axis
|
||||
;;
|
||||
da30 | da30-*)
|
||||
basic_machine=m68k-da30
|
||||
;;
|
||||
@ -471,8 +517,9 @@ case $basic_machine in
|
||||
basic_machine=i386-unknown
|
||||
os=-mingw32
|
||||
;;
|
||||
i386-qnx | qnx)
|
||||
basic_machine=i386-qnx
|
||||
i[34567]86-pw32 | pw32)
|
||||
basic_machine=i586-unknown
|
||||
os=-pw32
|
||||
;;
|
||||
iris | iris4d)
|
||||
basic_machine=mips-sgi
|
||||
@ -596,6 +643,9 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
op50n-* | op60c-*)
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
@ -628,7 +678,7 @@ case $basic_machine in
|
||||
pentium | p5 | k5 | k6 | nexen)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86)
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
@ -637,7 +687,7 @@ case $basic_machine in
|
||||
pentium-* | p5-* | k5-* | k6-* | nexen-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-*)
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
@ -752,6 +802,10 @@ case $basic_machine in
|
||||
basic_machine=t3e-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
@ -853,6 +907,9 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4)
|
||||
base_machine=sh-unknown
|
||||
;;
|
||||
sparc | sparcv9)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
@ -933,9 +990,22 @@ case $os in
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
case $basic_machine in
|
||||
x86-* | i[34567]86-*)
|
||||
;;
|
||||
*)
|
||||
os=-nto$os
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
|
||||
@ -982,6 +1052,9 @@ case $os in
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk*)
|
||||
os=-nsk
|
||||
;;
|
||||
# Preserve the version number of sinix5.
|
||||
-sinix5.*)
|
||||
os=`echo $os | sed -e 's|sinix|sysv|'`
|
||||
@ -995,9 +1068,6 @@ case $os in
|
||||
-oss*)
|
||||
os=-sysv3
|
||||
;;
|
||||
-qnx)
|
||||
os=-qnx4
|
||||
;;
|
||||
-svr4)
|
||||
os=-sysv4
|
||||
;;
|
||||
@ -1248,3 +1318,11 @@ case $basic_machine in
|
||||
esac
|
||||
|
||||
echo $basic_machine$os
|
||||
exit 0
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "version='"
|
||||
# time-stamp-format: "%:y-%02m-%02d"
|
||||
# time-stamp-end: "'"
|
||||
# End:
|
||||
|
@ -50,7 +50,7 @@ fi
|
||||
# these tools are built for the host environment
|
||||
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
|
||||
# know that we are building the simulator.
|
||||
host_tools="texinfo byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
|
||||
host_tools="byacc flex bison binutils ld gas gcc sim gdb make patch prms send-pr gprof gdbtest tgas etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool ispell grep diff rcs cvssrc fileutils shellutils time textutils wdiff find emacs emacs19 uudecode hello tar gzip indent recode release sed utils guile perl apache inet gawk findutils snavigator libtool gettext zip"
|
||||
|
||||
# these libraries are built for the target environment, and are built after
|
||||
# the host libraries and the host tools (which may be a cross compiler)
|
||||
|
@ -1,3 +1,40 @@
|
||||
2000-11-02 Theo Honohan <th@futuretv.com>
|
||||
|
||||
* config/tc-arm.c (do_msr): Improve error message.
|
||||
|
||||
2000-11-01 Philip Blundell <philb@gnu.org>
|
||||
|
||||
From 2000-08-01 Nick Clifton <nickc@cygnus.com>
|
||||
* config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag.
|
||||
|
||||
2000-10-16 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* configure.in: Set version number to 2.10.1.
|
||||
* configure: Regenerate.
|
||||
|
||||
2000-10-14 Philip Blundell <philb@gnu.org>
|
||||
|
||||
From 2000-06-17 Mark Elbrecht <snowball3@bigfoot.com>
|
||||
|
||||
* config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER
|
||||
to BFD_ASSEMBLER.
|
||||
|
||||
2000-09-08 Philip Blundell <philb@gnu.org>
|
||||
|
||||
* config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when
|
||||
offset is negative.
|
||||
|
||||
2000-08-30 Matthew Jacob <mjacob@feral.com>
|
||||
|
||||
* config/tc-alpha.c (md_undefined_symbol): Properly understand that
|
||||
$at is the integer register $r28, vs. both $r28 and the floating
|
||||
point register $f28.
|
||||
|
||||
2000-04-14 Matthew Green <mrg@cygnus.com>
|
||||
|
||||
* configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support.
|
||||
* configure: Regenerate.
|
||||
|
||||
2000-06-09 Nick Clifton <nickc@cygnus.com>
|
||||
|
||||
* config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value
|
||||
|
@ -213,7 +213,7 @@ obj_coff_weak (ignore)
|
||||
*input_line_pointer = c;
|
||||
SKIP_WHITESPACE ();
|
||||
|
||||
#ifdef BFD_ASSEMLER
|
||||
#ifdef BFD_ASSEMBLER
|
||||
S_SET_WEAK (symbolP);
|
||||
#endif
|
||||
|
||||
|
@ -1372,7 +1372,7 @@ md_undefined_symbol(name)
|
||||
else
|
||||
break;
|
||||
|
||||
if (!alpha_noat_on && num == AXP_REG_AT)
|
||||
if (!alpha_noat_on && (num + is_float) == AXP_REG_AT)
|
||||
as_warn(_("Used $at without \".set noat\""));
|
||||
return alpha_register_table[num + is_float];
|
||||
|
||||
|
@ -1943,7 +1943,7 @@ do_mrs (str, flags)
|
||||
/* This is for backwards compatability with older toolchains. */
|
||||
else if (strcmp (str, "cpsr_all") == 0
|
||||
|| strcmp (str, "spsr_all") == 0)
|
||||
skip = 7;
|
||||
skip = 8;
|
||||
else
|
||||
{
|
||||
inst.error = _("{C|S}PSR expected");
|
||||
@ -2004,7 +2004,7 @@ do_msr (str, flags)
|
||||
|
||||
if (inst.instruction & ((PSR_c | PSR_x | PSR_s) << PSR_SHIFT))
|
||||
{
|
||||
inst.error = _("can only set flag field with immediate value");
|
||||
inst.error = _("only flag field of psr can be set with immediate value");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5450,7 +5450,7 @@ md_apply_fix3 (fixP, val, seg)
|
||||
if (newimm != (unsigned int) FAIL)
|
||||
newinsn = temp;
|
||||
/* Still No ? Try using a negated value. */
|
||||
else if (validate_immediate_twopart (- value, & highpart) != (unsigned int) FAIL)
|
||||
else if ((newimm = validate_immediate_twopart (- value, & highpart)) != (unsigned int) FAIL)
|
||||
temp = newinsn = (temp & OPCODE_MASK) | OPCODE_SUB << DATA_OP_SHIFT;
|
||||
/* Otherwise - give up. */
|
||||
else
|
||||
|
344
contrib/binutils/gas/configure
vendored
344
contrib/binutils/gas/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ AC_INIT(as.h)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AM_INIT_AUTOMAKE(gas, 2.10)
|
||||
AM_INIT_AUTOMAKE(gas, 2.10.1)
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
@ -351,7 +351,15 @@ changequote([,])dnl
|
||||
sparc-fujitsu-none) fmt=aout ;;
|
||||
sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*)
|
||||
fmt=elf ;;
|
||||
sparc-*-netbsd*) fmt=aout em=nbsd ;;
|
||||
sparc-*-netbsd*) em=nbsd bfd_gas=yes
|
||||
case ${cpu} in
|
||||
sparc) case ${os} in
|
||||
*elf*) fmt=elf ;;
|
||||
*) fmt=aout ;;
|
||||
esac ;;
|
||||
sparc64) fmt=elf ;;
|
||||
esac
|
||||
;;
|
||||
sparc-*-openbsd*) fmt=aout em=nbsd ;;
|
||||
|
||||
strongarm-*-coff) fmt=coff ;;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2000-10-23 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* demangle.h, dyn-string.h: Update from trunk version.
|
||||
|
||||
2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* filenames.h: New file.
|
||||
|
@ -24,21 +24,23 @@
|
||||
|
||||
/* Options passed to cplus_demangle (in 2nd parameter). */
|
||||
|
||||
#define DMGL_NO_OPTS 0 /* For readability... */
|
||||
#define DMGL_PARAMS (1 << 0) /* Include function args */
|
||||
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
|
||||
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
|
||||
#define DMGL_NO_OPTS 0 /* For readability... */
|
||||
#define DMGL_PARAMS (1 << 0) /* Include function args */
|
||||
#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
|
||||
#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */
|
||||
|
||||
#define DMGL_AUTO (1 << 8)
|
||||
#define DMGL_GNU (1 << 9)
|
||||
#define DMGL_LUCID (1 << 10)
|
||||
#define DMGL_ARM (1 << 11)
|
||||
#define DMGL_HP (1 << 12) /* For the HP aCC compiler; same as ARM
|
||||
except for template arguments, etc. */
|
||||
#define DMGL_EDG (1 << 13)
|
||||
#define DMGL_AUTO (1 << 8)
|
||||
#define DMGL_GNU (1 << 9)
|
||||
#define DMGL_LUCID (1 << 10)
|
||||
#define DMGL_ARM (1 << 11)
|
||||
#define DMGL_HP (1 << 12) /* For the HP aCC compiler;
|
||||
same as ARM except for
|
||||
template arguments, etc. */
|
||||
#define DMGL_EDG (1 << 13)
|
||||
#define DMGL_GNU_NEW_ABI (1 << 14)
|
||||
|
||||
/* If none of these are set, use 'current_demangling_style' as the default. */
|
||||
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG)
|
||||
#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_NEW_ABI)
|
||||
|
||||
/* Enumeration of possible demangling styles.
|
||||
|
||||
@ -56,17 +58,19 @@ extern enum demangling_styles
|
||||
lucid_demangling = DMGL_LUCID,
|
||||
arm_demangling = DMGL_ARM,
|
||||
hp_demangling = DMGL_HP,
|
||||
edg_demangling = DMGL_EDG
|
||||
edg_demangling = DMGL_EDG,
|
||||
gnu_new_abi_demangling = DMGL_GNU_NEW_ABI
|
||||
} current_demangling_style;
|
||||
|
||||
/* Define string names for the various demangling styles. */
|
||||
|
||||
#define AUTO_DEMANGLING_STYLE_STRING "auto"
|
||||
#define GNU_DEMANGLING_STYLE_STRING "gnu"
|
||||
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
|
||||
#define ARM_DEMANGLING_STYLE_STRING "arm"
|
||||
#define HP_DEMANGLING_STYLE_STRING "hp"
|
||||
#define EDG_DEMANGLING_STYLE_STRING "edg"
|
||||
#define AUTO_DEMANGLING_STYLE_STRING "auto"
|
||||
#define GNU_DEMANGLING_STYLE_STRING "gnu"
|
||||
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
|
||||
#define ARM_DEMANGLING_STYLE_STRING "arm"
|
||||
#define HP_DEMANGLING_STYLE_STRING "hp"
|
||||
#define EDG_DEMANGLING_STYLE_STRING "edg"
|
||||
#define GNU_NEW_ABI_DEMANGLING_STYLE_STRING "gnu-new-abi"
|
||||
|
||||
/* Some macros to test what demangling style is active. */
|
||||
|
||||
@ -77,6 +81,17 @@ extern enum demangling_styles
|
||||
#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM)
|
||||
#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
|
||||
#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
|
||||
#define GNU_NEW_ABI_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_NEW_ABI)
|
||||
|
||||
/* Provide information about the available demangle styles. This code is
|
||||
pulled from gdb into libiberty because it is useful to binutils also. */
|
||||
|
||||
extern struct demangler_engine
|
||||
{
|
||||
const char *demangling_style_name;
|
||||
enum demangling_styles demangling_style;
|
||||
const char *demangling_style_doc;
|
||||
} libiberty_demanglers[];
|
||||
|
||||
extern char *
|
||||
cplus_demangle PARAMS ((const char *mangled, int options));
|
||||
@ -92,4 +107,14 @@ cplus_mangle_opname PARAMS ((const char *opname, int options));
|
||||
extern void
|
||||
set_cplus_marker_for_demangling PARAMS ((int ch));
|
||||
|
||||
extern enum demangling_styles
|
||||
cplus_demangle_set_style PARAMS ((enum demangling_styles style));
|
||||
|
||||
extern enum demangling_styles
|
||||
cplus_demangle_name_to_style PARAMS ((const char *name));
|
||||
|
||||
/* New-ABI demangling entry point, defined in cp-demangle.c. */
|
||||
extern char*
|
||||
cplus_demangle_new_abi PARAMS ((const char* mangled));
|
||||
|
||||
#endif /* DEMANGLE_H */
|
||||
|
92
contrib/binutils/include/dyn-string.h
Normal file
92
contrib/binutils/include/dyn-string.h
Normal file
@ -0,0 +1,92 @@
|
||||
/* An abstract string datatype.
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Contributed by Mark Mitchell (mark@markmitchell.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC 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 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
|
||||
typedef struct dyn_string
|
||||
{
|
||||
int allocated; /* The amount of space allocated for the string. */
|
||||
int length; /* The actual length of the string. */
|
||||
char *s; /* The string itself, NUL-terminated. */
|
||||
}* dyn_string_t;
|
||||
|
||||
/* The length STR, in bytes, not including the terminating NUL. */
|
||||
#define dyn_string_length(STR) \
|
||||
((STR)->length)
|
||||
|
||||
/* The NTBS in which the contents of STR are stored. */
|
||||
#define dyn_string_buf(STR) \
|
||||
((STR)->s)
|
||||
|
||||
/* Compare DS1 to DS2 with strcmp. */
|
||||
#define dyn_string_compare(DS1, DS2) \
|
||||
(strcmp ((DS1)->s, (DS2)->s))
|
||||
|
||||
|
||||
/* dyn_string functions are used in the demangling implementation
|
||||
included in the G++ runtime library. To prevent collisions with
|
||||
names in user programs, the functions that are used in the
|
||||
demangler are given implementation-reserved names. */
|
||||
|
||||
#ifdef IN_LIBGCC2
|
||||
|
||||
#define dyn_string_init __cxa_dyn_string_init
|
||||
#define dyn_string_new __cxa_dyn_string_new
|
||||
#define dyn_string_delete __cxa_dyn_string_delete
|
||||
#define dyn_string_release __cxa_dyn_string_release
|
||||
#define dyn_string_resize __cxa_dyn_string_resize
|
||||
#define dyn_string_clear __cxa_dyn_string_clear
|
||||
#define dyn_string_copy __cxa_dyn_string_copy
|
||||
#define dyn_string_copy_cstr __cxa_dyn_string_copy_cstr
|
||||
#define dyn_string_prepend __cxa_dyn_string_prepend
|
||||
#define dyn_string_prepend_cstr __cxa_dyn_string_prepend_cstr
|
||||
#define dyn_string_insert __cxa_dyn_string_insert
|
||||
#define dyn_string_insert_cstr __cxa_dyn_string_insert_cstr
|
||||
#define dyn_string_insert_char __cxa_dyn_string_insert_char
|
||||
#define dyn_string_append __cxa_dyn_string_append
|
||||
#define dyn_string_append_cstr __cxa_dyn_string_append_cstr
|
||||
#define dyn_string_append_char __cxa_dyn_string_append_char
|
||||
#define dyn_string_substring __cxa_dyn_string_substring
|
||||
#define dyn_string_eq __cxa_dyn_string_eq
|
||||
|
||||
#endif /* IN_LIBGCC2 */
|
||||
|
||||
|
||||
extern int dyn_string_init PARAMS ((struct dyn_string *, int));
|
||||
extern dyn_string_t dyn_string_new PARAMS ((int));
|
||||
extern void dyn_string_delete PARAMS ((dyn_string_t));
|
||||
extern char *dyn_string_release PARAMS ((dyn_string_t));
|
||||
extern dyn_string_t dyn_string_resize PARAMS ((dyn_string_t, int));
|
||||
extern void dyn_string_clear PARAMS ((dyn_string_t));
|
||||
extern int dyn_string_copy PARAMS ((dyn_string_t, dyn_string_t));
|
||||
extern int dyn_string_copy_cstr PARAMS ((dyn_string_t, const char *));
|
||||
extern int dyn_string_prepend PARAMS ((dyn_string_t, dyn_string_t));
|
||||
extern int dyn_string_prepend_cstr PARAMS ((dyn_string_t, const char *));
|
||||
extern int dyn_string_insert PARAMS ((dyn_string_t, int,
|
||||
dyn_string_t));
|
||||
extern int dyn_string_insert_cstr PARAMS ((dyn_string_t, int,
|
||||
const char *));
|
||||
extern int dyn_string_insert_char PARAMS ((dyn_string_t, int, int));
|
||||
extern int dyn_string_append PARAMS ((dyn_string_t, dyn_string_t));
|
||||
extern int dyn_string_append_cstr PARAMS ((dyn_string_t, const char *));
|
||||
extern int dyn_string_append_char PARAMS ((dyn_string_t, int));
|
||||
extern int dyn_string_substring PARAMS ((dyn_string_t,
|
||||
dyn_string_t, int, int));
|
||||
extern int dyn_string_eq PARAMS ((dyn_string_t, dyn_string_t));
|
@ -1,3 +1,32 @@
|
||||
2000-10-14 Philip Blundell <philb@gnu.org>
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* common.h (DF_1_NODEFLIB): Renamed from DF_1_NODEPLIB.
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* common.h (DT_CHECKSUM): Set to 0x6ffffdf8.
|
||||
(DTF_1_CONFEXP): It is 0x00000002 as suspected.
|
||||
|
||||
From 2000-07-19 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* common.h (DT_FEATURE): Renamed from DT_FEATURE_1.
|
||||
(DT_CONFIG): New. From Solaris 8.
|
||||
(DT_DEPAUDIT): Likewise.
|
||||
(DT_AUDIT): Likewise.
|
||||
(DT_PLTPAD): Likewise.
|
||||
(DT_MOVETAB): Likewise.
|
||||
(DF_1_NODEPLIB): Likewise.
|
||||
(DF_1_NODUMP): Likewise.
|
||||
(DF_1_CONLFAT): Likewise.
|
||||
(DT_CHECKSUM): Likewise. FIXME. Check the value on Solaris 8.
|
||||
(DTF_1_CONFEXP): Likewise.
|
||||
|
||||
From 2000-07-18 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* common.h (DT_FLAGS_1): Renamed from DT_1_FLAGS.
|
||||
|
||||
2000-05-02 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* common.h (ELFOSABI_NONE): Renamed from ELFOSABI_SYSV.
|
||||
|
@ -444,16 +444,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
OS specific values. This is a deliberate special case and we
|
||||
maintain it for backwards compatability. */
|
||||
#define DT_VALRNGLO 0x6ffffd00
|
||||
#define DT_CHECKSUM 0x6ffffdf8
|
||||
#define DT_PLTPADSZ 0x6ffffdf9
|
||||
#define DT_MOVEENT 0x6ffffdfa
|
||||
#define DT_MOVESZ 0x6ffffdfb
|
||||
#define DT_FEATURE_1 0x6ffffdfc
|
||||
#define DT_FEATURE 0x6ffffdfc
|
||||
#define DT_POSFLAG_1 0x6ffffdfd
|
||||
#define DT_SYMINSZ 0x6ffffdfe
|
||||
#define DT_SYMINENT 0x6ffffdff
|
||||
#define DT_VALRNGHI 0x6ffffdff
|
||||
|
||||
#define DT_ADDRRNGLO 0x6ffffe00
|
||||
#define DT_CONFIG 0x6ffffefa
|
||||
#define DT_DEPAUDIT 0x6ffffefb
|
||||
#define DT_AUDIT 0x6ffffefc
|
||||
#define DT_PLTPAD 0x6ffffefd
|
||||
#define DT_MOVETAB 0x6ffffefe
|
||||
#define DT_SYMINFO 0x6ffffeff
|
||||
#define DT_ADDRRNGHI 0x6ffffeff
|
||||
|
||||
@ -478,14 +484,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#define DT_USED 0x7ffffffe
|
||||
#define DT_FILTER 0x7fffffff
|
||||
|
||||
/* Values used in DT_FEATURE_1 .dynamic entry. */
|
||||
|
||||
/* Values used in DT_FEATURE .dynamic entry. */
|
||||
#define DTF_1_PARINIT 0x00000001
|
||||
/* From
|
||||
|
||||
http://docs.sun.com:80/ab2/coll.45.13/LLM/@Ab2PageView/21165?Ab2Lang=C&Ab2Enc=iso-8859-1
|
||||
|
||||
DTF_1_CONFEXP is the same as DTF_1_PARINIT. It is a typo. The value
|
||||
defined here is the same as the one in <sys/link.h> on Solaris 8. */
|
||||
#define DTF_1_CONFEXP 0x00000002
|
||||
|
||||
/* Flag values used in the DT_POSFLAG_1 .dynamic entry. */
|
||||
#define DF_P1_LAZYLOAD 0x00000001
|
||||
#define DF_P1_GROUPPERM 0x00000002
|
||||
|
||||
/* Flag value in in the DT_1_FLAGS .dynamic entry. */
|
||||
/* Flag value in in the DT_FLAGS_1 .dynamic entry. */
|
||||
#define DF_1_NOW 0x00000001
|
||||
#define DF_1_GLOBAL 0x00000002
|
||||
#define DF_1_GROUP 0x00000004
|
||||
@ -497,6 +511,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#define DF_1_DIRECT 0x00000100
|
||||
#define DF_1_TRANS 0x00000200
|
||||
#define DF_1_INTERPOSE 0x00000400
|
||||
#define DF_1_NODEFLIB 0x00000800
|
||||
#define DF_1_NODUMP 0x00001000
|
||||
#define DF_1_CONLFAT 0x00002000
|
||||
|
||||
/* Flag values for the DT_FLAGS entry. */
|
||||
#define DF_ORIGIN (1 << 0)
|
||||
|
@ -1,3 +1,105 @@
|
||||
2000-11-06 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
Merge most place_orphan changes from mainline.
|
||||
2000-09-07 Alan Modra <alan@linuxcare.com.au>
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Fix
|
||||
broken list handling. Create __start_SECNAME and __stop_SECNAME
|
||||
when no place-holder. Add some comments. Test both SEC_CODE and
|
||||
SEC_READONLY for hold_text to prevent .rodata orphan poisoning.
|
||||
Handle case where no output section statement created.
|
||||
|
||||
2000-09-06 Alan Modra <alan@linuxcare.com.au>
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
|
||||
try shuffling sections when the orphan happens to be the place
|
||||
holder. Keep count of unique section names generated so we speed
|
||||
the search for a new name.
|
||||
|
||||
2000-04-25 Alan Modra <alan@linuxcare.com.au>
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_place_section): Delete.
|
||||
(output_rel_find): New function.
|
||||
(hold_section, hold_use): Delete.
|
||||
(hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
|
||||
hold_interp): Make local to place_orphan.
|
||||
(gld${EMULATION_NAME}_place_orphan): Use lang_output_section_find
|
||||
rather than place_section to find possible previous use of orphan.
|
||||
Similarly find the place-holder output sections. Use returned
|
||||
value from lang_enter_output_section_statement rather than calling
|
||||
lang_output_section_statement_lookup.
|
||||
* ldlang.c (lang_enter_output_section_statement): Return output
|
||||
section statement.
|
||||
* ldlang.h (lang_enter_output_section_statement): Change
|
||||
declaration too.
|
||||
* ldlang.h (lang_output_section_statement): Export it.
|
||||
* ldlang.c (lang_output_section_statement): Ditto.
|
||||
|
||||
2000-04-18 H.J. Lu <hjl@gnu.org>
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
|
||||
lang_leave_output_section_statement () after calling
|
||||
lang_enter_output_section_statement ().
|
||||
|
||||
2000-04-18 Alan Modra <alan@linuxcare.com.au>
|
||||
* emultempl/elf32.em (struct orphan_save): Add section field.
|
||||
(gld${EMULATION_NAME}_place_orphan): Use above to keep sections in
|
||||
better order, and place first orphan section as we did before the
|
||||
2000-04-12 patch. Ignore ~SEC_ALLOC sections when choosing place.
|
||||
Don't call make_bfd_section here, let wild_doit do the job for us.
|
||||
Don't build a statement list when we'll only throw it away.
|
||||
|
||||
2000-04-14 Alan Modra <alan@linuxcare.com.au>
|
||||
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Process
|
||||
~SEC_ALLOC sections too. Init start address of debug sections.
|
||||
|
||||
2000-04-12 Alan Modra <alan@linuxcare.com.au>
|
||||
* emultempl/elf32.em (struct orphan_save): New.
|
||||
(hold_text, hold_rodata, hold_data, hold_bss, hold_rel,
|
||||
hold_interp): Make them struct orphan_save.
|
||||
(gld${EMULATION_NAME}_place_section): Modify for new hold_*.
|
||||
(gld${EMULATION_NAME}_place_orphan): Add new orphan sections to
|
||||
the end of the relevant section list. Also add associated section
|
||||
statements to the end of any previous orphan statements.
|
||||
|
||||
2000-11-05 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* ldlex.l (yy_create_string_buffer): Init yy_is_our_buffer,
|
||||
yy_is_interactive, yy_at_bol, and yy_fill_buffer.
|
||||
* ldlex.c: Regenerate.
|
||||
|
||||
* Makefile.am (DISTCLEANFILES): Add stringify.sed.
|
||||
* Makefile.in: Regenerate.
|
||||
|
||||
2000-10-16 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* configure.in: Set version number to 2.10.1.
|
||||
* configure: Regenerate.
|
||||
|
||||
2000-10-12 Peter Jeremy <peter.jeremy@alcatel.com.au>
|
||||
|
||||
From 2000-08-08 Peter Jeremy <peter.jeremy@alcatel.com.au>
|
||||
* emultempl/elf32.em (_after_close): Refer to -rpath not --rpath
|
||||
in error message.
|
||||
|
||||
2000-04-14 Matthew Green <mrg@cygnus.com>
|
||||
|
||||
* configure.tgt: Add NetBSD/sparc ELF, and NetBSD/sparc64 support.
|
||||
|
||||
2000-06-07 Michael Sokolov <msokolov@ivan.Harhan.ORG>
|
||||
|
||||
* emultempl/mipsecoff.em (gld{EMULATION_NAME}_after_open): Require all
|
||||
input objects to be ECOFF.
|
||||
(check_sections): einfo takes %B, not %P, to print a BFD name.
|
||||
|
||||
2000-07-31 Rodney Brown <RodneyBrown@pmsc.com>
|
||||
|
||||
* configure.tgt: Select targ_emul=elf_i386 for Unixware 7
|
||||
(i586-sco-sysv5uw7.1.0).
|
||||
|
||||
2000-06-18 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* NEWS: Update list of targets supporting --gc-sections.
|
||||
|
||||
* scripttempl/elf.sc: KEEP .eh_frame contents.
|
||||
* scripttempl/elfd30v.sc: Same here.
|
||||
|
||||
2000-05-22 David O'Brien <obrien@FreeBSD.org>
|
||||
|
||||
* configure.tgt: Recognize alpha-*-freebsd*.
|
||||
@ -38,6 +140,10 @@
|
||||
|
||||
* ld.h: Correctly check GCC version.
|
||||
|
||||
2000-04-21 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* scripttempl/elfd30v.sc: Place .gcc_except_table.
|
||||
|
||||
2000-04-19 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* ld.texinfo (Simple Example): Remove extraneous paragraph.
|
||||
|
@ -837,7 +837,7 @@ install-data-local:
|
||||
LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
|
||||
diststuff: $(LDDISTSTUFF) info
|
||||
|
||||
DISTCLEANFILES = tdirs site.exp site.bak
|
||||
DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
|
||||
distclean-local:
|
||||
rm -rf ldscripts
|
||||
|
||||
|
@ -386,7 +386,7 @@ CLEANFILES = dep.sed DEP DEP1 DEP2
|
||||
# target is run by the taz target in ../Makefile.in.
|
||||
LDDISTSTUFF = ldgram.c ldgram.h ldlex.c
|
||||
|
||||
DISTCLEANFILES = tdirs site.exp site.bak
|
||||
DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
|
||||
CONFIG_HEADER = config.h
|
||||
|
@ -2,9 +2,14 @@
|
||||
|
||||
Changes in version 2.10:
|
||||
|
||||
* Added AT> to the linker script language to allow load-time allocation of
|
||||
sections into regions.
|
||||
|
||||
* Added garbage collection of unused sections, enabled by --gc-sections.
|
||||
It does require a bit of backend support; currently implemented are
|
||||
ppc-elf, mips-elf, and mn10300-elf. Others will ignore the option.
|
||||
avr-elf, d10v-elf, fr30-elf, i386-elf, m32r-elf, m68k-elf, mcore-elf,
|
||||
mips-elf, mn10300-elf, ppc-elf, sh-elf, sparc-elf, and v850-elf.
|
||||
Others will ignore the option.
|
||||
|
||||
* Added SORT to the linker script language to permit sorting sections by file
|
||||
name or section name.
|
||||
|
209
contrib/binutils/ld/configure
vendored
209
contrib/binutils/ld/configure
vendored
@ -803,7 +803,7 @@ fi
|
||||
|
||||
PACKAGE=ld
|
||||
|
||||
VERSION=2.10
|
||||
VERSION=2.10.1
|
||||
|
||||
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; }
|
||||
@ -2133,7 +2133,7 @@ for ac_kw in inline __inline__ __inline; do
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
} $ac_kw foo() {
|
||||
} int $ac_kw foo() {
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
@ -2239,7 +2239,7 @@ else
|
||||
#include "confdefs.h"
|
||||
#include <alloca.h>
|
||||
int main() {
|
||||
char *p = alloca(2 * sizeof(int));
|
||||
void *p = alloca(2 * sizeof(int));
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
@ -2592,12 +2592,15 @@ else
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* This mess was copied from the GNU getpagesize.h. */
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
# ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
|
||||
/* Assume that all systems that can run configure have sys/param.h. */
|
||||
# ifndef HAVE_SYS_PARAM_H
|
||||
@ -2652,7 +2655,7 @@ main()
|
||||
/*
|
||||
* First, make a file with some known garbage in it.
|
||||
*/
|
||||
data = malloc(pagesize);
|
||||
data = (char*)malloc(pagesize);
|
||||
if (!data)
|
||||
exit(1);
|
||||
for (i = 0; i < pagesize; ++i)
|
||||
@ -2673,7 +2676,7 @@ main()
|
||||
fd = open("conftestmmap", O_RDWR);
|
||||
if (fd < 0)
|
||||
exit(1);
|
||||
data2 = malloc(2 * pagesize);
|
||||
data2 = (char*)malloc(2 * pagesize);
|
||||
if (!data2)
|
||||
exit(1);
|
||||
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
|
||||
@ -2691,7 +2694,7 @@ main()
|
||||
*/
|
||||
for (i = 0; i < pagesize; ++i)
|
||||
*(data2 + i) = *(data2 + i) + 1;
|
||||
data3 = malloc(pagesize);
|
||||
data3 = (char*)malloc(pagesize);
|
||||
if (!data3)
|
||||
exit(1);
|
||||
if (read(fd, data3, pagesize) != pagesize)
|
||||
@ -2705,7 +2708,7 @@ main()
|
||||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:2712: \"$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
|
||||
@ -2733,17 +2736,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:2737: checking for $ac_hdr" >&5
|
||||
echo "configure:2740: 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
|
||||
#line 2742 "configure"
|
||||
#line 2745 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2750: \"$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*
|
||||
@ -2773,12 +2776,12 @@ done
|
||||
__argz_count __argz_stringify __argz_next
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2777: checking for $ac_func" >&5
|
||||
echo "configure:2780: 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 <<EOF
|
||||
#line 2782 "configure"
|
||||
#line 2785 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -2801,7 +2804,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:2808: \"$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
|
||||
@ -2830,12 +2833,12 @@ done
|
||||
for ac_func in stpcpy
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2834: checking for $ac_func" >&5
|
||||
echo "configure:2837: 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 <<EOF
|
||||
#line 2839 "configure"
|
||||
#line 2842 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -2858,7 +2861,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:2865: \"$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
|
||||
@ -2892,19 +2895,19 @@ EOF
|
||||
|
||||
if test $ac_cv_header_locale_h = yes; then
|
||||
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
|
||||
echo "configure:2896: checking for LC_MESSAGES" >&5
|
||||
echo "configure:2899: 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 <<EOF
|
||||
#line 2901 "configure"
|
||||
#line 2904 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <locale.h>
|
||||
int main() {
|
||||
return LC_MESSAGES
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:2911: \"$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
|
||||
@ -2925,7 +2928,7 @@ EOF
|
||||
fi
|
||||
fi
|
||||
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
|
||||
echo "configure:2929: checking whether NLS is requested" >&5
|
||||
echo "configure:2932: 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"
|
||||
@ -2945,7 +2948,7 @@ fi
|
||||
EOF
|
||||
|
||||
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
|
||||
echo "configure:2949: checking whether included gettext is requested" >&5
|
||||
echo "configure:2952: 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"
|
||||
@ -2964,17 +2967,17 @@ fi
|
||||
|
||||
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
|
||||
echo "configure:2968: checking for libintl.h" >&5
|
||||
echo "configure:2971: 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
|
||||
#line 2973 "configure"
|
||||
#line 2976 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <libintl.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:2978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:2981: \"$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*
|
||||
@ -2991,19 +2994,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:2995: checking for gettext in libc" >&5
|
||||
echo "configure:2998: 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 <<EOF
|
||||
#line 3000 "configure"
|
||||
#line 3003 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <libintl.h>
|
||||
int main() {
|
||||
return (int) gettext ("")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3010: \"$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
|
||||
@ -3019,7 +3022,7 @@ 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:3023: checking for bindtextdomain in -lintl" >&5
|
||||
echo "configure:3026: 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
|
||||
@ -3027,7 +3030,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lintl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3031 "configure"
|
||||
#line 3034 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -3038,7 +3041,7 @@ int main() {
|
||||
bindtextdomain()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3045: \"$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
|
||||
@ -3054,19 +3057,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:3058: checking for gettext in libintl" >&5
|
||||
echo "configure:3061: 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 <<EOF
|
||||
#line 3063 "configure"
|
||||
#line 3066 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return (int) gettext ("")
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3073: \"$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
|
||||
@ -3094,7 +3097,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:3098: checking for $ac_word" >&5
|
||||
echo "configure:3101: 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
|
||||
@ -3128,12 +3131,12 @@ fi
|
||||
for ac_func in dcgettext
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3132: checking for $ac_func" >&5
|
||||
echo "configure:3135: 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 <<EOF
|
||||
#line 3137 "configure"
|
||||
#line 3140 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -3156,7 +3159,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3163: \"$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
|
||||
@ -3183,7 +3186,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:3187: checking for $ac_word" >&5
|
||||
echo "configure:3190: 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
|
||||
@ -3219,7 +3222,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:3223: checking for $ac_word" >&5
|
||||
echo "configure:3226: 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
|
||||
@ -3251,7 +3254,7 @@ else
|
||||
fi
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3255 "configure"
|
||||
#line 3258 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@ -3259,7 +3262,7 @@ extern int _nl_msg_cat_cntr;
|
||||
return _nl_msg_cat_cntr
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
CATOBJEXT=.gmo
|
||||
DATADIRNAME=share
|
||||
@ -3291,7 +3294,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:3295: checking for $ac_word" >&5
|
||||
echo "configure:3298: 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
|
||||
@ -3325,7 +3328,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:3329: checking for $ac_word" >&5
|
||||
echo "configure:3332: 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
|
||||
@ -3361,7 +3364,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:3365: checking for $ac_word" >&5
|
||||
echo "configure:3368: 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
|
||||
@ -3451,7 +3454,7 @@ fi
|
||||
LINGUAS=
|
||||
else
|
||||
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
|
||||
echo "configure:3455: checking for catalogs to be installed" >&5
|
||||
echo "configure:3458: checking for catalogs to be installed" >&5
|
||||
NEW_LINGUAS=
|
||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
||||
case "$ALL_LINGUAS" in
|
||||
@ -3479,17 +3482,17 @@ echo "configure:3455: checking for catalogs to be installed" >&5
|
||||
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:3483: checking for linux/version.h" >&5
|
||||
echo "configure:3486: 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
|
||||
#line 3488 "configure"
|
||||
#line 3491 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <linux/version.h>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3496: \"$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*
|
||||
@ -3552,12 +3555,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
|
||||
echo "configure:3556: checking for Cygwin environment" >&5
|
||||
echo "configure:3559: 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 <<EOF
|
||||
#line 3561 "configure"
|
||||
#line 3564 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
@ -3568,7 +3571,7 @@ int main() {
|
||||
return __CYGWIN__;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_cygwin=yes
|
||||
else
|
||||
@ -3585,19 +3588,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:3589: checking for mingw32 environment" >&5
|
||||
echo "configure:3592: 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 <<EOF
|
||||
#line 3594 "configure"
|
||||
#line 3597 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
return __MINGW32__;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_mingw32=yes
|
||||
else
|
||||
@ -3616,7 +3619,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes
|
||||
|
||||
|
||||
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
|
||||
echo "configure:3620: checking for executable suffix" >&5
|
||||
echo "configure:3623: checking for executable suffix" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -3626,7 +3629,7 @@ else
|
||||
rm -f conftest*
|
||||
echo 'int main () { return 0; }' > conftest.$ac_ext
|
||||
ac_cv_exeext=
|
||||
if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
if { (eval echo configure:3633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
|
||||
for file in conftest.*; do
|
||||
case $file in
|
||||
*.c | *.o | *.obj) ;;
|
||||
@ -3652,7 +3655,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:3656: checking for $ac_word" >&5
|
||||
echo "configure:3659: 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
|
||||
@ -3688,7 +3691,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:3692: checking for $ac_word" >&5
|
||||
echo "configure:3695: 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
|
||||
@ -3721,7 +3724,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
|
||||
# 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:3725: checking for $ac_word" >&5
|
||||
echo "configure:3728: 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
|
||||
@ -3755,7 +3758,7 @@ then
|
||||
*) ac_lib=l ;;
|
||||
esac
|
||||
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
|
||||
echo "configure:3759: checking for yywrap in -l$ac_lib" >&5
|
||||
echo "configure:3762: 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
|
||||
@ -3763,7 +3766,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-l$ac_lib $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3767 "configure"
|
||||
#line 3770 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -3774,7 +3777,7 @@ int main() {
|
||||
yywrap()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3781: \"$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
|
||||
@ -3797,7 +3800,7 @@ fi
|
||||
fi
|
||||
|
||||
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
|
||||
echo "configure:3801: checking lex output file root" >&5
|
||||
echo "configure:3804: 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
|
||||
@ -3818,7 +3821,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:3822: checking whether yytext is a pointer" >&5
|
||||
echo "configure:3825: 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
|
||||
@ -3830,14 +3833,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LEXLIB"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 3834 "configure"
|
||||
#line 3837 "configure"
|
||||
#include "confdefs.h"
|
||||
`cat $LEX_OUTPUT_ROOT.c`
|
||||
int main() {
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3844: \"$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
|
||||
@ -3860,7 +3863,7 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
|
||||
echo "configure:3864: checking whether to enable maintainer-specific portions of Makefiles" >&5
|
||||
echo "configure:3867: 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"
|
||||
@ -3894,17 +3897,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:3898: checking for $ac_hdr" >&5
|
||||
echo "configure:3901: 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
|
||||
#line 3903 "configure"
|
||||
#line 3906 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:3908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:3911: \"$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*
|
||||
@ -3933,12 +3936,12 @@ done
|
||||
for ac_func in sbrk
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:3937: checking for $ac_func" >&5
|
||||
echo "configure:3940: 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 <<EOF
|
||||
#line 3942 "configure"
|
||||
#line 3945 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -3961,7 +3964,7 @@ $ac_func();
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:3968: \"$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
|
||||
@ -3990,12 +3993,12 @@ 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:3994: checking for $ac_hdr that defines DIR" >&5
|
||||
echo "configure:3997: 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 <<EOF
|
||||
#line 3999 "configure"
|
||||
#line 4002 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <$ac_hdr>
|
||||
@ -4003,7 +4006,7 @@ int main() {
|
||||
DIR *dirp = 0;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_header_dirent_$ac_safe=yes"
|
||||
else
|
||||
@ -4028,7 +4031,7 @@ 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:4032: checking for opendir in -ldir" >&5
|
||||
echo "configure:4035: 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
|
||||
@ -4036,7 +4039,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-ldir $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4040 "configure"
|
||||
#line 4043 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -4047,7 +4050,7 @@ int main() {
|
||||
opendir()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4054: \"$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
|
||||
@ -4069,7 +4072,7 @@ fi
|
||||
|
||||
else
|
||||
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
|
||||
echo "configure:4073: checking for opendir in -lx" >&5
|
||||
echo "configure:4076: 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
|
||||
@ -4077,7 +4080,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lx $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4081 "configure"
|
||||
#line 4084 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -4088,7 +4091,7 @@ int main() {
|
||||
opendir()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:4095: \"$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
|
||||
@ -4121,12 +4124,12 @@ EOF
|
||||
esac
|
||||
|
||||
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
|
||||
echo "configure:4125: checking whether strstr must be declared" >&5
|
||||
echo "configure:4128: 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 <<EOF
|
||||
#line 4130 "configure"
|
||||
#line 4133 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -4147,7 +4150,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) strstr
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_strstr=no
|
||||
else
|
||||
@ -4168,12 +4171,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
|
||||
echo "configure:4172: checking whether free must be declared" >&5
|
||||
echo "configure:4175: 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 <<EOF
|
||||
#line 4177 "configure"
|
||||
#line 4180 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -4194,7 +4197,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) free
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_free=no
|
||||
else
|
||||
@ -4215,12 +4218,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
|
||||
echo "configure:4219: checking whether sbrk must be declared" >&5
|
||||
echo "configure:4222: checking whether sbrk must be declared" >&5
|
||||
if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4224 "configure"
|
||||
#line 4227 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -4241,7 +4244,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) sbrk
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_sbrk=no
|
||||
else
|
||||
@ -4262,12 +4265,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
|
||||
echo "configure:4266: checking whether getenv must be declared" >&5
|
||||
echo "configure:4269: 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 <<EOF
|
||||
#line 4271 "configure"
|
||||
#line 4274 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -4288,7 +4291,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) getenv
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_getenv=no
|
||||
else
|
||||
@ -4309,12 +4312,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
|
||||
echo "configure:4313: checking whether environ must be declared" >&5
|
||||
echo "configure:4316: checking whether environ must be declared" >&5
|
||||
if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4318 "configure"
|
||||
#line 4321 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -4335,7 +4338,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) environ
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4339: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
bfd_cv_decl_needed_environ=no
|
||||
else
|
||||
@ -4363,19 +4366,19 @@ fi
|
||||
# constants, while still supporting pre-ANSI compilers which do not
|
||||
# support string concatenation.
|
||||
echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
|
||||
echo "configure:4367: checking whether ANSI C string concatenation works" >&5
|
||||
echo "configure:4370: checking whether ANSI C string concatenation works" >&5
|
||||
if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 4372 "configure"
|
||||
#line 4375 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
int main() {
|
||||
char *a = "a" "a";
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:4379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:4382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ld_cv_string_concatenation=yes
|
||||
else
|
||||
|
@ -5,7 +5,7 @@ AC_INIT(ldmain.c)
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
|
||||
AM_INIT_AUTOMAKE(ld, 2.10)
|
||||
AM_INIT_AUTOMAKE(ld, 2.10.1)
|
||||
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
|
@ -55,6 +55,8 @@ sparc*-*-linux-gnu*) targ_emul=elf32_sparc
|
||||
tdir_sun4=sparc-sun-sunos4
|
||||
;;
|
||||
sparc*-*-lynxos*) targ_emul=sparclynx ;;
|
||||
sparc64-*-netbsd*) targ_emul=elf64_sparc ;;
|
||||
sparc*-*-netbsd*elf*) targ_emul=elf32_sparc ;;
|
||||
sparc*-*-netbsd*) targ_emul=sparcnbsd ;;
|
||||
sparc-*-solaris2.[0-6] | sparc-*-solaris2.[0-6].*)
|
||||
targ_emul=elf32_sparc ;;
|
||||
@ -116,7 +118,7 @@ i[3456]86-*-linux-gnu*) targ_emul=elf_i386
|
||||
targ_extra_emuls=i386linux
|
||||
tdir_i386linux=${targ_alias}aout
|
||||
;;
|
||||
i[3456]86-*-sysv4*) targ_emul=elf_i386 ;;
|
||||
i[3456]86-*-sysv[45]*) targ_emul=elf_i386 ;;
|
||||
i[3456]86-*-solaris2*) targ_emul=elf_i386 ;;
|
||||
i[3456]86-*-unixware) targ_emul=elf_i386 ;;
|
||||
i[3456]86-*-solaris*) targ_emul=elf_i386 ;;
|
||||
|
@ -7,7 +7,7 @@ cat >e${EMULATION_NAME}.c <<EOF
|
||||
/* This file is is generated by a shell script. DO NOT EDIT! */
|
||||
|
||||
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
|
||||
Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 1999
|
||||
Copyright (C) 1991, 93, 94, 95, 96, 97, 98, 99, 2000
|
||||
Free Software Foundation, Inc.
|
||||
Written by Steve Chamberlain <sac@cygnus.com>
|
||||
ELF support by Ian Lance Taylor <ian@cygnus.com>
|
||||
@ -63,10 +63,9 @@ static void gld${EMULATION_NAME}_before_allocation PARAMS ((void));
|
||||
static void gld${EMULATION_NAME}_find_statement_assignment
|
||||
PARAMS ((lang_statement_union_type *));
|
||||
static void gld${EMULATION_NAME}_find_exp_assignment PARAMS ((etree_type *));
|
||||
static lang_output_section_statement_type *output_rel_find PARAMS ((void));
|
||||
static boolean gld${EMULATION_NAME}_place_orphan
|
||||
PARAMS ((lang_input_statement_type *, asection *));
|
||||
static void gld${EMULATION_NAME}_place_section
|
||||
PARAMS ((lang_statement_union_type *));
|
||||
static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
|
||||
|
||||
static void
|
||||
@ -376,7 +375,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
|
||||
if (force < 2)
|
||||
continue;
|
||||
|
||||
einfo ("%P: warning: %s, needed by %B, not found (try using --rpath)\n",
|
||||
einfo ("%P: warning: %s, needed by %B, not found (try using -rpath or -rpath-link)\n",
|
||||
l->name, l->by);
|
||||
}
|
||||
}
|
||||
@ -862,58 +861,83 @@ gld${EMULATION_NAME}_find_exp_assignment (exp)
|
||||
}
|
||||
}
|
||||
|
||||
/* A variant of lang_output_section_find. Used by place_orphan. */
|
||||
|
||||
static lang_output_section_statement_type *
|
||||
output_rel_find ()
|
||||
{
|
||||
lang_statement_union_type *u;
|
||||
lang_output_section_statement_type *lookup;
|
||||
|
||||
for (u = lang_output_section_statement.head;
|
||||
u != (lang_statement_union_type *) NULL;
|
||||
u = lookup->next)
|
||||
{
|
||||
lookup = &u->output_section_statement;
|
||||
if (strncmp (".rel", lookup->name, 4) == 0
|
||||
&& lookup->bfd_section != NULL
|
||||
&& (lookup->bfd_section->flags & SEC_ALLOC) != 0)
|
||||
{
|
||||
return lookup;
|
||||
}
|
||||
}
|
||||
return (lang_output_section_statement_type *) NULL;
|
||||
}
|
||||
|
||||
/* Place an orphan section. We use this to put random SHF_ALLOC
|
||||
sections in the right segment. */
|
||||
|
||||
static asection *hold_section;
|
||||
static lang_output_section_statement_type *hold_use;
|
||||
static lang_output_section_statement_type *hold_text;
|
||||
static lang_output_section_statement_type *hold_rodata;
|
||||
static lang_output_section_statement_type *hold_data;
|
||||
static lang_output_section_statement_type *hold_bss;
|
||||
static lang_output_section_statement_type *hold_rel;
|
||||
static lang_output_section_statement_type *hold_interp;
|
||||
struct orphan_save {
|
||||
lang_output_section_statement_type *os;
|
||||
asection **section;
|
||||
lang_statement_union_type **stmt;
|
||||
};
|
||||
|
||||
/*ARGSUSED*/
|
||||
static boolean
|
||||
gld${EMULATION_NAME}_place_orphan (file, s)
|
||||
lang_input_statement_type *file;
|
||||
asection *s;
|
||||
{
|
||||
lang_output_section_statement_type *place;
|
||||
asection *snew, **pps;
|
||||
static struct orphan_save hold_text;
|
||||
static struct orphan_save hold_rodata;
|
||||
static struct orphan_save hold_data;
|
||||
static struct orphan_save hold_bss;
|
||||
static struct orphan_save hold_rel;
|
||||
static struct orphan_save hold_interp;
|
||||
struct orphan_save *place;
|
||||
lang_statement_list_type *old;
|
||||
lang_statement_list_type add;
|
||||
etree_type *address;
|
||||
const char *secname, *ps;
|
||||
const char *secname;
|
||||
const char *outsecname;
|
||||
const char *ps = NULL;
|
||||
lang_output_section_statement_type *os;
|
||||
|
||||
if ((s->flags & SEC_ALLOC) == 0)
|
||||
return false;
|
||||
secname = bfd_get_section_name (s->owner, s);
|
||||
|
||||
/* Look through the script to see where to place this section. */
|
||||
hold_section = s;
|
||||
hold_use = NULL;
|
||||
lang_for_each_statement (gld${EMULATION_NAME}_place_section);
|
||||
/* Look through the script to see where to place this section. */
|
||||
os = lang_output_section_find (secname);
|
||||
|
||||
if (hold_use != NULL)
|
||||
if (os != NULL
|
||||
&& os->bfd_section != NULL
|
||||
&& ((s->flags ^ os->bfd_section->flags) & (SEC_LOAD | SEC_ALLOC)) == 0)
|
||||
{
|
||||
/* We have already placed a section with this name. */
|
||||
wild_doit (&hold_use->children, s, hold_use, file);
|
||||
wild_doit (&os->children, s, os, file);
|
||||
return true;
|
||||
}
|
||||
|
||||
secname = bfd_get_section_name (s->owner, s);
|
||||
if (hold_text.os == NULL)
|
||||
hold_text.os = lang_output_section_find (".text");
|
||||
|
||||
/* If this is a final link, then always put .gnu.warning.SYMBOL
|
||||
sections into the .text section to get them out of the way. */
|
||||
if (! link_info.shared
|
||||
&& ! link_info.relocateable
|
||||
&& strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0
|
||||
&& hold_text != NULL)
|
||||
&& hold_text.os != NULL)
|
||||
{
|
||||
wild_doit (&hold_text->children, s, hold_text, file);
|
||||
wild_doit (&hold_text.os->children, s, hold_text.os, file);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -922,31 +946,37 @@ gld${EMULATION_NAME}_place_orphan (file, s)
|
||||
right after the .interp section, so that the PT_NOTE segment is
|
||||
stored right after the program headers where the OS can read it
|
||||
in the first page. */
|
||||
place = NULL;
|
||||
#define HAVE_SECTION(hold, name) \
|
||||
(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
|
||||
|
||||
if (s->flags & SEC_EXCLUDE)
|
||||
return false;
|
||||
|
||||
place = NULL;
|
||||
if ((s->flags & SEC_ALLOC) == 0)
|
||||
;
|
||||
else if ((s->flags & SEC_LOAD) != 0
|
||||
&& strncmp (secname, ".note", 4) == 0
|
||||
&& hold_interp != NULL)
|
||||
place = hold_interp;
|
||||
&& strncmp (secname, ".note", 4) == 0
|
||||
&& HAVE_SECTION (hold_interp, ".interp"))
|
||||
place = &hold_interp;
|
||||
else if ((s->flags & SEC_HAS_CONTENTS) == 0
|
||||
&& hold_bss != NULL)
|
||||
place = hold_bss;
|
||||
&& HAVE_SECTION (hold_bss, ".bss"))
|
||||
place = &hold_bss;
|
||||
else if ((s->flags & SEC_READONLY) == 0
|
||||
&& hold_data != NULL)
|
||||
place = hold_data;
|
||||
&& HAVE_SECTION (hold_data, ".data"))
|
||||
place = &hold_data;
|
||||
else if (strncmp (secname, ".rel", 4) == 0
|
||||
&& hold_rel != NULL)
|
||||
place = hold_rel;
|
||||
else if ((s->flags & SEC_CODE) == 0
|
||||
&& (s->flags & SEC_READONLY) != 0
|
||||
&& hold_rodata != NULL)
|
||||
place = hold_rodata;
|
||||
else if ((s->flags & SEC_READONLY) != 0
|
||||
&& hold_text != NULL)
|
||||
place = hold_text;
|
||||
if (place == NULL)
|
||||
return false;
|
||||
&& (hold_rel.os != NULL
|
||||
|| (hold_rel.os = output_rel_find ()) != NULL))
|
||||
place = &hold_rel;
|
||||
else if ((s->flags & (SEC_CODE | SEC_READONLY)) == SEC_READONLY
|
||||
&& HAVE_SECTION (hold_rodata, ".rodata"))
|
||||
place = &hold_rodata;
|
||||
else if ((s->flags & (SEC_CODE | SEC_READONLY)) == (SEC_CODE | SEC_READONLY)
|
||||
&& hold_text.os != NULL)
|
||||
place = &hold_text;
|
||||
|
||||
#undef HAVE_SECTION
|
||||
|
||||
/* Choose a unique name for the section. This will be needed if the
|
||||
same section name appears in the input file with different
|
||||
@ -972,115 +1002,144 @@ gld${EMULATION_NAME}_place_orphan (file, s)
|
||||
outsecname = newname;
|
||||
}
|
||||
|
||||
/* Create the section in the output file, and put it in the right
|
||||
place. This shuffling is to make the output file look neater. */
|
||||
snew = bfd_make_section (output_bfd, outsecname);
|
||||
if (snew == NULL)
|
||||
einfo ("%P%F: output format %s cannot represent section called %s\n",
|
||||
output_bfd->xvec->name, outsecname);
|
||||
if (place->bfd_section != NULL)
|
||||
{
|
||||
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
|
||||
;
|
||||
*pps = snew->next;
|
||||
snew->next = place->bfd_section->next;
|
||||
place->bfd_section->next = snew;
|
||||
}
|
||||
|
||||
/* Start building a list of statements for this section. */
|
||||
/* Start building a list of statements for this section.
|
||||
First save the current statement pointer. */
|
||||
old = stat_ptr;
|
||||
stat_ptr = &add;
|
||||
lang_list_init (stat_ptr);
|
||||
|
||||
/* If the name of the section is representable in C, then create
|
||||
symbols to mark the start and the end of the section. */
|
||||
for (ps = outsecname; *ps != '\0'; ps++)
|
||||
if (! isalnum ((unsigned char) *ps) && *ps != '_')
|
||||
break;
|
||||
if (*ps == '\0' && config.build_constructors)
|
||||
/* If we have found an appropriate place for the output section
|
||||
statements for this orphan, add them to our own private list,
|
||||
inserting them later into the global statement list. */
|
||||
if (place != NULL)
|
||||
{
|
||||
char *symname;
|
||||
|
||||
symname = (char *) xmalloc (ps - outsecname + sizeof "__start_");
|
||||
sprintf (symname, "__start_%s", outsecname);
|
||||
lang_add_assignment (exp_assop ('=', symname,
|
||||
exp_unop (ALIGN_K,
|
||||
exp_intop ((bfd_vma) 1
|
||||
<< s->alignment_power))));
|
||||
stat_ptr = &add;
|
||||
lang_list_init (stat_ptr);
|
||||
}
|
||||
|
||||
if (! link_info.relocateable)
|
||||
address = NULL;
|
||||
else
|
||||
if (config.build_constructors)
|
||||
{
|
||||
/* If the name of the section is representable in C, then create
|
||||
symbols to mark the start and the end of the section. */
|
||||
for (ps = outsecname; *ps != '\0'; ps++)
|
||||
if (! isalnum ((unsigned char) *ps) && *ps != '_')
|
||||
break;
|
||||
if (*ps == '\0')
|
||||
{
|
||||
char *symname;
|
||||
etree_type *e_align;
|
||||
|
||||
symname = (char *) xmalloc (ps - outsecname + sizeof "__start_");
|
||||
sprintf (symname, "__start_%s", outsecname);
|
||||
e_align = exp_unop (ALIGN_K,
|
||||
exp_intop ((bfd_vma) 1 << s->alignment_power));
|
||||
lang_add_assignment (exp_assop ('=', symname, e_align));
|
||||
}
|
||||
}
|
||||
|
||||
if (link_info.relocateable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
|
||||
address = exp_intop ((bfd_vma) 0);
|
||||
else
|
||||
address = NULL;
|
||||
|
||||
lang_enter_output_section_statement (outsecname, address, 0,
|
||||
(bfd_vma) 0,
|
||||
(etree_type *) NULL,
|
||||
(etree_type *) NULL,
|
||||
(etree_type *) NULL);
|
||||
os = lang_enter_output_section_statement (outsecname, address, 0,
|
||||
(bfd_vma) 0,
|
||||
(etree_type *) NULL,
|
||||
(etree_type *) NULL,
|
||||
(etree_type *) NULL);
|
||||
|
||||
os = lang_output_section_statement_lookup (outsecname);
|
||||
wild_doit (&os->children, s, os, file);
|
||||
|
||||
lang_leave_output_section_statement
|
||||
((bfd_vma) 0, "*default*", (struct lang_output_section_phdr_list *) NULL,
|
||||
"*default*");
|
||||
stat_ptr = &add;
|
||||
((bfd_vma) 0, "*default*",
|
||||
(struct lang_output_section_phdr_list *) NULL, "*default*");
|
||||
|
||||
if (*ps == '\0' && config.build_constructors)
|
||||
if (config.build_constructors && *ps == '\0')
|
||||
{
|
||||
char *symname;
|
||||
|
||||
/* lang_leave_ouput_section_statement resets stat_ptr. Put
|
||||
stat_ptr back where we want it. */
|
||||
if (place != NULL)
|
||||
stat_ptr = &add;
|
||||
|
||||
symname = (char *) xmalloc (ps - outsecname + sizeof "__stop_");
|
||||
sprintf (symname, "__stop_%s", outsecname);
|
||||
lang_add_assignment (exp_assop ('=', symname,
|
||||
exp_nameop (NAME, ".")));
|
||||
}
|
||||
|
||||
/* Now stick the new statement list right after PLACE. */
|
||||
*add.tail = place->header.next;
|
||||
place->header.next = add.head;
|
||||
|
||||
/* Restore the global list pointer. */
|
||||
stat_ptr = old;
|
||||
|
||||
if (place != NULL)
|
||||
{
|
||||
asection *snew, **pps;
|
||||
|
||||
snew = os->bfd_section;
|
||||
if (place->section != NULL
|
||||
|| (place->os->bfd_section != NULL
|
||||
&& place->os->bfd_section != snew))
|
||||
{
|
||||
/* Shuffle the section to make the output file look neater.
|
||||
This is really only cosmetic. */
|
||||
if (place->section == NULL)
|
||||
{
|
||||
#if 0
|
||||
/* Finding the end of the list is a little tricky. We
|
||||
make a wild stab at it by comparing section flags. */
|
||||
flagword first_flags = place->os->bfd_section->flags;
|
||||
for (pps = &place->os->bfd_section->next;
|
||||
*pps != NULL && (*pps)->flags == first_flags;
|
||||
pps = &(*pps)->next)
|
||||
;
|
||||
place->section = pps;
|
||||
#else
|
||||
/* Put orphans after the first section on the list. */
|
||||
place->section = &place->os->bfd_section->next;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Unlink the section. */
|
||||
for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
|
||||
;
|
||||
*pps = snew->next;
|
||||
|
||||
/* Now tack it on to the "place->os" section list. */
|
||||
snew->next = *place->section;
|
||||
*place->section = snew;
|
||||
}
|
||||
place->section = &snew->next; /* Save the end of this list. */
|
||||
|
||||
if (add.head != NULL)
|
||||
{
|
||||
/* We try to put the output statements in some sort of
|
||||
reasonable order here, because they determine the final
|
||||
load addresses of the orphan sections. */
|
||||
if (place->stmt == NULL)
|
||||
{
|
||||
/* Put the new statement list right at the head. */
|
||||
*add.tail = place->os->header.next;
|
||||
place->os->header.next = add.head;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Put it after the last orphan statement we added. */
|
||||
*add.tail = *place->stmt;
|
||||
*place->stmt = add.head;
|
||||
}
|
||||
|
||||
/* Fix the global list pointer if we happened to tack our
|
||||
new list at the tail. */
|
||||
if (*old->tail == add.head)
|
||||
old->tail = add.tail;
|
||||
|
||||
/* Save the end of this list. */
|
||||
place->stmt = add.tail;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
gld${EMULATION_NAME}_place_section (s)
|
||||
lang_statement_union_type *s;
|
||||
{
|
||||
lang_output_section_statement_type *os;
|
||||
|
||||
if (s->header.type != lang_output_section_statement_enum)
|
||||
return;
|
||||
|
||||
os = &s->output_section_statement;
|
||||
|
||||
if (strcmp (os->name, hold_section->name) == 0
|
||||
&& os->bfd_section != NULL
|
||||
&& ((hold_section->flags & (SEC_LOAD | SEC_ALLOC))
|
||||
== (os->bfd_section->flags & (SEC_LOAD | SEC_ALLOC))))
|
||||
hold_use = os;
|
||||
|
||||
if (strcmp (os->name, ".text") == 0)
|
||||
hold_text = os;
|
||||
else if (strcmp (os->name, ".rodata") == 0)
|
||||
hold_rodata = os;
|
||||
else if (strcmp (os->name, ".data") == 0)
|
||||
hold_data = os;
|
||||
else if (strcmp (os->name, ".bss") == 0)
|
||||
hold_bss = os;
|
||||
else if (hold_rel == NULL
|
||||
&& os->bfd_section != NULL
|
||||
&& (os->bfd_section->flags & SEC_ALLOC) != 0
|
||||
&& strncmp (os->name, ".rel", 4) == 0)
|
||||
hold_rel = os;
|
||||
else if (strcmp (os->name, ".interp") == 0)
|
||||
hold_interp = os;
|
||||
}
|
||||
|
||||
static char *
|
||||
gld${EMULATION_NAME}_get_script(isfile)
|
||||
int *isfile;
|
||||
|
@ -58,7 +58,6 @@ static lang_output_section_statement_type *default_common_section;
|
||||
static boolean map_option_f;
|
||||
static bfd_vma print_dot;
|
||||
static lang_input_statement_type *first_file;
|
||||
static lang_statement_list_type lang_output_section_statement;
|
||||
static CONST char *current_target;
|
||||
static CONST char *output_target;
|
||||
static lang_statement_list_type statement_list;
|
||||
@ -166,6 +165,7 @@ static char * get_first_input_target PARAMS ((void));
|
||||
|
||||
/* EXPORTS */
|
||||
lang_output_section_statement_type *abs_output_section;
|
||||
lang_statement_list_type lang_output_section_statement;
|
||||
lang_statement_list_type *stat_ptr = &statement_list;
|
||||
lang_statement_list_type file_chain = { NULL, NULL };
|
||||
const char *entry_symbol = NULL;
|
||||
@ -3813,7 +3813,7 @@ topower (x)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
lang_output_section_statement_type *
|
||||
lang_enter_output_section_statement (output_section_statement_name,
|
||||
address_exp, sectype, block_value,
|
||||
align, subalign, ebase)
|
||||
@ -3861,6 +3861,7 @@ lang_enter_output_section_statement (output_section_statement_name,
|
||||
"section alignment", 0));
|
||||
|
||||
os->load_base = ebase;
|
||||
return os;
|
||||
}
|
||||
|
||||
|
||||
|
@ -371,6 +371,7 @@ struct lang_nocrossrefs
|
||||
extern struct lang_nocrossrefs *nocrossref_list;
|
||||
|
||||
extern lang_output_section_statement_type *abs_output_section;
|
||||
extern lang_statement_list_type lang_output_section_statement;
|
||||
extern boolean lang_has_input_file;
|
||||
extern etree_type *base;
|
||||
extern lang_statement_list_type *stat_ptr;
|
||||
@ -388,7 +389,7 @@ extern void lang_map PARAMS ((void));
|
||||
extern void lang_set_flags PARAMS ((lang_memory_region_type *, const char *,
|
||||
int));
|
||||
extern void lang_add_output PARAMS ((const char *, int from_script));
|
||||
extern void lang_enter_output_section_statement
|
||||
extern lang_output_section_statement_type *lang_enter_output_section_statement
|
||||
PARAMS ((const char *output_section_statement_name,
|
||||
etree_type * address_exp,
|
||||
enum section_type sectype,
|
||||
|
@ -479,6 +479,11 @@ yy_create_string_buffer (string, size)
|
||||
b->yy_n_chars = size+1;
|
||||
b->yy_buf_pos = &b->yy_ch_buf[1];
|
||||
|
||||
b->yy_is_our_buffer = 1;
|
||||
b->yy_is_interactive = 0;
|
||||
b->yy_at_bol = 1;
|
||||
b->yy_fill_buffer = 0;
|
||||
|
||||
/* flex 2.4.7 changed the interface. FIXME: We should not be using
|
||||
a flex internal interface in the first place! */
|
||||
#ifdef YY_BUFFER_NEW
|
||||
|
@ -234,7 +234,7 @@ SECTIONS
|
||||
${CONSTRUCTING+SORT(CONSTRUCTORS)}
|
||||
}
|
||||
.data1 ${RELOCATING-0} : { *(.data1) }
|
||||
.eh_frame : { *(.eh_frame) }
|
||||
.eh_frame : { KEEP (*(.eh_frame)) }
|
||||
.gcc_except_table : { *(.gcc_except_table) }
|
||||
${WRITABLE_RODATA+${RODATA}}
|
||||
${RELOCATING+${OTHER_READWRITE_SECTIONS}}
|
||||
@ -242,7 +242,7 @@ SECTIONS
|
||||
${RELOCATING+${DTOR}}
|
||||
${DATA_PLT+${PLT}}
|
||||
${RELOCATING+${OTHER_GOT_SYMBOLS}}
|
||||
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
|
||||
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
|
||||
${TEXT_DYNAMIC-${DYNAMIC}}
|
||||
/* We want the small data sections together, so single-instruction offsets
|
||||
can access them all, and initialized data all before uninitialized, so
|
||||
|
@ -1,3 +1,16 @@
|
||||
2000-10-17 Philip Blundell <pb@futuretv.com>
|
||||
|
||||
* cp-demangle.c, dyn-string.c, cplus-dem.c: Update from trunk
|
||||
version.
|
||||
* testsuite/demangle-expected, testsuite/regress-demangle:
|
||||
Likewise.
|
||||
|
||||
From 2000-06-04 Alex Samuel <samuel@codesourcery.com>
|
||||
* Makefile.in (CFILES): Add cp-demangle.c and dyn-string.c.
|
||||
(REQUIRED_OFILES): Add cp-demangle.o and dyn-string.o.
|
||||
(cp-demangle.o): New dependency.
|
||||
(dyn-string.o): Likewise.
|
||||
|
||||
Thu Mar 16 01:33:58 2000 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* Makefile.in (partition.o): Depend on config.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Makefile
|
||||
# Copyright (C) 1990, 91 - 99, 2000
|
||||
# Copyright (C) 1990, 91, 00 - 99, 2000
|
||||
# Free Software Foundation
|
||||
#
|
||||
# This file is part of the libiberty library.
|
||||
@ -124,7 +124,8 @@ HFILES = alloca-conf.h
|
||||
# (alphabetical), and add them to REQUIRED_OFILES or funcs in
|
||||
# configure.in.
|
||||
CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
|
||||
bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \
|
||||
bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c \
|
||||
cp-demangle.c dyn-string.c fdmatch.c \
|
||||
fnmatch.c getcwd.c getpwd.c getopt.c getopt1.c getpagesize.c \
|
||||
getruntime.c floatformat.c hashtab.c hex.c index.c insque.c memchr.c \
|
||||
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \
|
||||
@ -136,10 +137,10 @@ CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
|
||||
xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
|
||||
|
||||
# These are always included in the library.
|
||||
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \
|
||||
fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o \
|
||||
hex.o floatformat.o objalloc.o obstack.o partition.o pexecute.o spaces.o \
|
||||
splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
|
||||
REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o \
|
||||
dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o \
|
||||
hashtab.o hex.o floatformat.o objalloc.o obstack.o partition.o pexecute.o \
|
||||
spaces.o splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
|
||||
xmemdup.o xstrdup.o xstrerror.o
|
||||
|
||||
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
|
||||
@ -259,6 +260,8 @@ choose-temp.o: config.h
|
||||
clock.o: config.h
|
||||
concat.o: $(INCDIR)/libiberty.h
|
||||
cplus-dem.o: config.h $(INCDIR)/demangle.h
|
||||
cp-demangle.o: config.h $(INCDIR)/dyn-string.h $(INCDIR)/demangle.h
|
||||
dyn-string.o: config.h $(INCDIR)/dyn-string.h
|
||||
fdmatch.o: $(INCDIR)/libiberty.h
|
||||
fnmatch.o: config.h $(INCDIR)/fnmatch.h
|
||||
getcwd.o: config.h
|
||||
|
3409
contrib/binutils/libiberty/cp-demangle.c
Normal file
3409
contrib/binutils/libiberty/cp-demangle.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -252,6 +252,55 @@ typedef enum type_kind_t
|
||||
tk_real
|
||||
} type_kind_t;
|
||||
|
||||
struct demangler_engine libiberty_demanglers[] =
|
||||
{
|
||||
{
|
||||
AUTO_DEMANGLING_STYLE_STRING,
|
||||
auto_demangling,
|
||||
"Automatic selection based on executable"
|
||||
}
|
||||
,
|
||||
{
|
||||
GNU_DEMANGLING_STYLE_STRING,
|
||||
gnu_demangling,
|
||||
"GNU (g++) style demangling"
|
||||
}
|
||||
,
|
||||
{
|
||||
LUCID_DEMANGLING_STYLE_STRING,
|
||||
lucid_demangling,
|
||||
"Lucid (lcc) style demangling"
|
||||
}
|
||||
,
|
||||
{
|
||||
ARM_DEMANGLING_STYLE_STRING,
|
||||
arm_demangling,
|
||||
"ARM style demangling"
|
||||
}
|
||||
,
|
||||
{
|
||||
HP_DEMANGLING_STYLE_STRING,
|
||||
hp_demangling,
|
||||
"HP (aCC) style demangling"
|
||||
}
|
||||
,
|
||||
{
|
||||
EDG_DEMANGLING_STYLE_STRING,
|
||||
edg_demangling,
|
||||
"EDG style demangling"
|
||||
}
|
||||
,
|
||||
{
|
||||
GNU_NEW_ABI_DEMANGLING_STYLE_STRING,
|
||||
gnu_new_abi_demangling,
|
||||
"GNU (g++) new-ABI-style demangling"
|
||||
}
|
||||
,
|
||||
{
|
||||
NULL, unknown_demangling, NULL
|
||||
}
|
||||
};
|
||||
|
||||
#define STRING_EMPTY(str) ((str) -> b == (str) -> p)
|
||||
#define PREPEND_BLANK(str) {if (!STRING_EMPTY(str)) \
|
||||
string_prepend(str, " ");}
|
||||
@ -268,12 +317,21 @@ typedef enum type_kind_t
|
||||
|
||||
/* Prototypes for local functions */
|
||||
|
||||
static void
|
||||
delete_work_stuff PARAMS ((struct work_stuff *));
|
||||
|
||||
static void
|
||||
delete_non_B_K_work_stuff PARAMS ((struct work_stuff *));
|
||||
|
||||
static char *
|
||||
mop_up PARAMS ((struct work_stuff *, string *, int));
|
||||
|
||||
static void
|
||||
squangle_mop_up PARAMS ((struct work_stuff *));
|
||||
|
||||
static void
|
||||
work_stuff_copy_to_from PARAMS ((struct work_stuff *, struct work_stuff *));
|
||||
|
||||
#if 0
|
||||
static int
|
||||
demangle_method_args PARAMS ((struct work_stuff *, const char **, string *));
|
||||
@ -379,6 +437,10 @@ static void
|
||||
demangle_function_name PARAMS ((struct work_stuff *, const char **, string *,
|
||||
const char *));
|
||||
|
||||
static int
|
||||
iterate_demangle_function PARAMS ((struct work_stuff *,
|
||||
const char **, string *, const char *));
|
||||
|
||||
static void
|
||||
remember_type PARAMS ((struct work_stuff *, const char *, int));
|
||||
|
||||
@ -636,8 +698,8 @@ cplus_demangle_opname (opname, result, options)
|
||||
}
|
||||
}
|
||||
else if (opname[0] == '_' && opname[1] == '_'
|
||||
&& opname[2] >= 'a' && opname[2] <= 'z'
|
||||
&& opname[3] >= 'a' && opname[3] <= 'z')
|
||||
&& islower((unsigned char)opname[2])
|
||||
&& islower((unsigned char)opname[3]))
|
||||
{
|
||||
if (opname[4] == '\0')
|
||||
{
|
||||
@ -733,6 +795,7 @@ cplus_demangle_opname (opname, result, options)
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
/* Takes operator name as e.g. "++" and returns mangled
|
||||
operator name (e.g. "postincrement_expr"), or NULL if not found.
|
||||
|
||||
@ -758,6 +821,40 @@ cplus_mangle_opname (opname, options)
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* Add a routine to set the demangling style to be sure it is valid and
|
||||
allow for any demangler initialization that maybe necessary. */
|
||||
|
||||
enum demangling_styles
|
||||
cplus_demangle_set_style (style)
|
||||
enum demangling_styles style;
|
||||
{
|
||||
struct demangler_engine *demangler = libiberty_demanglers;
|
||||
|
||||
for (; demangler->demangling_style != unknown_demangling; ++demangler)
|
||||
if (style == demangler->demangling_style)
|
||||
{
|
||||
current_demangling_style = style;
|
||||
return current_demangling_style;
|
||||
}
|
||||
|
||||
return unknown_demangling;
|
||||
}
|
||||
|
||||
/* Do string name to style translation */
|
||||
|
||||
enum demangling_styles
|
||||
cplus_demangle_name_to_style (name)
|
||||
const char *name;
|
||||
{
|
||||
struct demangler_engine *demangler = libiberty_demanglers;
|
||||
|
||||
for (; demangler->demangling_style != unknown_demangling; ++demangler)
|
||||
if (strcmp (name, demangler->demangling_style_name) == 0)
|
||||
return demangler->demangling_style;
|
||||
|
||||
return unknown_demangling;
|
||||
}
|
||||
|
||||
/* char *cplus_demangle (const char *mangled, int options)
|
||||
|
||||
If MANGLED is a mangled function name produced by GNU C++, then
|
||||
@ -798,6 +895,10 @@ cplus_demangle (mangled, options)
|
||||
if ((work -> options & DMGL_STYLE_MASK) == 0)
|
||||
work -> options |= (int) current_demangling_style & DMGL_STYLE_MASK;
|
||||
|
||||
/* The new-ABI demangling is implemented elsewhere. */
|
||||
if (GNU_NEW_ABI_DEMANGLING)
|
||||
return cplus_demangle_new_abi (mangled);
|
||||
|
||||
ret = internal_cplus_demangle (work, mangled);
|
||||
squangle_mop_up (work);
|
||||
return (ret);
|
||||
@ -893,16 +994,85 @@ squangle_mop_up (work)
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear out any mangled storage */
|
||||
|
||||
static char *
|
||||
mop_up (work, declp, success)
|
||||
struct work_stuff *work;
|
||||
string *declp;
|
||||
int success;
|
||||
/* Copy the work state and storage. */
|
||||
|
||||
static void
|
||||
work_stuff_copy_to_from (to, from)
|
||||
struct work_stuff *to;
|
||||
struct work_stuff *from;
|
||||
{
|
||||
char *demangled = NULL;
|
||||
int i;
|
||||
|
||||
delete_work_stuff (to);
|
||||
|
||||
/* Shallow-copy scalars. */
|
||||
memcpy (to, from, sizeof (*to));
|
||||
|
||||
/* Deep-copy dynamic storage. */
|
||||
if (from->typevec_size)
|
||||
to->typevec
|
||||
= (char **) xmalloc (from->typevec_size * sizeof (to->typevec[0]));
|
||||
|
||||
for (i = 0; i < from->ntypes; i++)
|
||||
{
|
||||
int len = strlen (from->typevec[i]) + 1;
|
||||
|
||||
to->typevec[i] = xmalloc (len);
|
||||
memcpy (to->typevec[i], from->typevec[i], len);
|
||||
}
|
||||
|
||||
if (from->ksize)
|
||||
to->ktypevec
|
||||
= (char **) xmalloc (from->ksize * sizeof (to->ktypevec[0]));
|
||||
|
||||
for (i = 0; i < from->numk; i++)
|
||||
{
|
||||
int len = strlen (from->ktypevec[i]) + 1;
|
||||
|
||||
to->ktypevec[i] = xmalloc (len);
|
||||
memcpy (to->ktypevec[i], from->ktypevec[i], len);
|
||||
}
|
||||
|
||||
if (from->bsize)
|
||||
to->btypevec
|
||||
= (char **) xmalloc (from->bsize * sizeof (to->btypevec[0]));
|
||||
|
||||
for (i = 0; i < from->numb; i++)
|
||||
{
|
||||
int len = strlen (from->btypevec[i]) + 1;
|
||||
|
||||
to->btypevec[i] = xmalloc (len);
|
||||
memcpy (to->btypevec[i], from->btypevec[i], len);
|
||||
}
|
||||
|
||||
if (from->ntmpl_args)
|
||||
to->tmpl_argvec
|
||||
= xmalloc (from->ntmpl_args * sizeof (to->tmpl_argvec[0]));
|
||||
|
||||
for (i = 0; i < from->ntmpl_args; i++)
|
||||
{
|
||||
int len = strlen (from->tmpl_argvec[i]) + 1;
|
||||
|
||||
to->tmpl_argvec[i] = xmalloc (len);
|
||||
memcpy (to->tmpl_argvec[i], from->tmpl_argvec[i], len);
|
||||
}
|
||||
|
||||
if (from->previous_argument)
|
||||
{
|
||||
to->previous_argument = (string*) xmalloc (sizeof (string));
|
||||
string_init (to->previous_argument);
|
||||
string_appends (to->previous_argument, from->previous_argument);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Delete dynamic stuff in work_stuff that is not to be re-used. */
|
||||
|
||||
static void
|
||||
delete_non_B_K_work_stuff (work)
|
||||
struct work_stuff *work;
|
||||
{
|
||||
/* Discard the remembered types, if any. */
|
||||
|
||||
forget_types (work);
|
||||
@ -929,6 +1099,30 @@ mop_up (work, declp, success)
|
||||
free ((char*) work->previous_argument);
|
||||
work->previous_argument = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Delete all dynamic storage in work_stuff. */
|
||||
static void
|
||||
delete_work_stuff (work)
|
||||
struct work_stuff *work;
|
||||
{
|
||||
delete_non_B_K_work_stuff (work);
|
||||
squangle_mop_up (work);
|
||||
}
|
||||
|
||||
|
||||
/* Clear out any mangled storage */
|
||||
|
||||
static char *
|
||||
mop_up (work, declp, success)
|
||||
struct work_stuff *work;
|
||||
string *declp;
|
||||
int success;
|
||||
{
|
||||
char *demangled = NULL;
|
||||
|
||||
delete_non_B_K_work_stuff (work);
|
||||
|
||||
/* If demangling was successful, ensure that the demangled string is null
|
||||
terminated and return it. Otherwise, free the demangling decl. */
|
||||
@ -1154,7 +1348,7 @@ demangle_signature (work, mangled, declp)
|
||||
break;
|
||||
|
||||
case '_':
|
||||
if (GNU_DEMANGLING && expect_return_type)
|
||||
if ((AUTO_DEMANGLING || GNU_DEMANGLING) && expect_return_type)
|
||||
{
|
||||
/* Read the return type. */
|
||||
string return_type;
|
||||
@ -1188,7 +1382,7 @@ demangle_signature (work, mangled, declp)
|
||||
break;
|
||||
|
||||
case 'H':
|
||||
if (GNU_DEMANGLING)
|
||||
if (AUTO_DEMANGLING || GNU_DEMANGLING)
|
||||
{
|
||||
/* A G++ template function. Read the template arguments. */
|
||||
success = demangle_template (work, mangled, declp, 0, 0,
|
||||
@ -1433,6 +1627,11 @@ demangle_integral_value (work, mangled, s)
|
||||
{
|
||||
int value;
|
||||
|
||||
/* By default, we let the number decide whether we shall consume an
|
||||
underscore. */
|
||||
int consume_following_underscore = 0;
|
||||
int leave_following_underscore = 0;
|
||||
|
||||
success = 0;
|
||||
|
||||
/* Negative numbers are indicated with a leading `m'. */
|
||||
@ -1441,17 +1640,49 @@ demangle_integral_value (work, mangled, s)
|
||||
string_appendn (s, "-", 1);
|
||||
(*mangled)++;
|
||||
}
|
||||
else if (mangled[0][0] == '_' && mangled[0][1] == 'm')
|
||||
{
|
||||
/* Since consume_count_with_underscores does not handle the
|
||||
`m'-prefix we must do it here, using consume_count and
|
||||
adjusting underscores: we have to consume the underscore
|
||||
matching the prepended one. */
|
||||
consume_following_underscore = 1;
|
||||
string_appendn (s, "-", 1);
|
||||
(*mangled) += 2;
|
||||
}
|
||||
else if (**mangled == '_')
|
||||
{
|
||||
/* Do not consume a following underscore;
|
||||
consume_following_underscore will consume what should be
|
||||
consumed. */
|
||||
leave_following_underscore = 1;
|
||||
}
|
||||
|
||||
/* We must call consume_count if we expect to remove a trailing
|
||||
underscore, since consume_count_with_underscores expects
|
||||
the leading underscore (that we consumed) if it is to handle
|
||||
multi-digit numbers. */
|
||||
if (consume_following_underscore)
|
||||
value = consume_count (mangled);
|
||||
else
|
||||
value = consume_count_with_underscores (mangled);
|
||||
|
||||
/* Read the rest of the number. */
|
||||
value = consume_count_with_underscores (mangled);
|
||||
if (value != -1)
|
||||
{
|
||||
char buf[INTBUF_SIZE];
|
||||
sprintf (buf, "%d", value);
|
||||
string_append (s, buf);
|
||||
|
||||
/* If the next character is an underscore, skip it. */
|
||||
if (**mangled == '_')
|
||||
/* Numbers not otherwise delimited, might have an underscore
|
||||
appended as a delimeter, which we should skip.
|
||||
|
||||
??? This used to always remove a following underscore, which
|
||||
is wrong. If other (arbitrary) cases are followed by an
|
||||
underscore, we need to do something more radical. */
|
||||
|
||||
if ((value > 9 || consume_following_underscore)
|
||||
&& ! leave_following_underscore
|
||||
&& **mangled == '_')
|
||||
(*mangled)++;
|
||||
|
||||
/* All is well. */
|
||||
@ -1616,7 +1847,7 @@ demangle_template_value_parm (work, mangled, s, tk)
|
||||
template parameters (e.g. S) is placed in TRAWNAME if TRAWNAME is
|
||||
non-NULL. If IS_TYPE is nonzero, this template is a type template,
|
||||
not a function template. If both IS_TYPE and REMEMBER are nonzero,
|
||||
the tmeplate is remembered in the list of back-referenceable
|
||||
the template is remembered in the list of back-referenceable
|
||||
types. */
|
||||
|
||||
static int
|
||||
@ -2148,6 +2379,86 @@ demangle_class (work, mangled, declp)
|
||||
return (success);
|
||||
}
|
||||
|
||||
|
||||
/* Called when there's a "__" in the mangled name, with `scan' pointing to
|
||||
the rightmost guess.
|
||||
|
||||
Find the correct "__"-sequence where the function name ends and the
|
||||
signature starts, which is ambiguous with GNU mangling.
|
||||
Call demangle_signature here, so we can make sure we found the right
|
||||
one; *mangled will be consumed so caller will not make further calls to
|
||||
demangle_signature. */
|
||||
|
||||
static int
|
||||
iterate_demangle_function (work, mangled, declp, scan)
|
||||
struct work_stuff *work;
|
||||
const char **mangled;
|
||||
string *declp;
|
||||
const char *scan;
|
||||
{
|
||||
const char *mangle_init = *mangled;
|
||||
int success = 0;
|
||||
string decl_init;
|
||||
struct work_stuff work_init;
|
||||
|
||||
if (*(scan + 2) == '\0')
|
||||
return 0;
|
||||
|
||||
/* Do not iterate for some demangling modes, or if there's only one
|
||||
"__"-sequence. This is the normal case. */
|
||||
if (ARM_DEMANGLING || LUCID_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING
|
||||
|| mystrstr (scan + 2, "__") == NULL)
|
||||
{
|
||||
demangle_function_name (work, mangled, declp, scan);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Save state so we can restart if the guess at the correct "__" was
|
||||
wrong. */
|
||||
string_init (&decl_init);
|
||||
string_appends (&decl_init, declp);
|
||||
memset (&work_init, 0, sizeof work_init);
|
||||
work_stuff_copy_to_from (&work_init, work);
|
||||
|
||||
/* Iterate over occurrences of __, allowing names and types to have a
|
||||
"__" sequence in them. We must start with the first (not the last)
|
||||
occurrence, since "__" most often occur between independent mangled
|
||||
parts, hence starting at the last occurence inside a signature
|
||||
might get us a "successful" demangling of the signature. */
|
||||
|
||||
while (scan[2])
|
||||
{
|
||||
demangle_function_name (work, mangled, declp, scan);
|
||||
success = demangle_signature (work, mangled, declp);
|
||||
if (success)
|
||||
break;
|
||||
|
||||
/* Reset demangle state for the next round. */
|
||||
*mangled = mangle_init;
|
||||
string_clear (declp);
|
||||
string_appends (declp, &decl_init);
|
||||
work_stuff_copy_to_from (work, &work_init);
|
||||
|
||||
/* Leave this underscore-sequence. */
|
||||
scan += 2;
|
||||
|
||||
/* Scan for the next "__" sequence. */
|
||||
while (*scan && (scan[0] != '_' || scan[1] != '_'))
|
||||
scan++;
|
||||
|
||||
/* Move to last "__" in this sequence. */
|
||||
while (*scan && *scan == '_')
|
||||
scan++;
|
||||
scan -= 2;
|
||||
}
|
||||
|
||||
/* Delete saved state. */
|
||||
delete_work_stuff (&work_init);
|
||||
string_delete (&decl_init);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
LOCAL FUNCTION
|
||||
@ -2163,6 +2474,8 @@ SYNOPSIS
|
||||
DESCRIPTION
|
||||
|
||||
Consume and demangle the prefix of the mangled name.
|
||||
While processing the function name root, arrange to call
|
||||
demangle_signature if the root is ambiguous.
|
||||
|
||||
DECLP points to the string buffer into which demangled output is
|
||||
placed. On entry, the buffer is empty. On exit it contains
|
||||
@ -2336,29 +2649,16 @@ demangle_prefix (work, mangled, declp)
|
||||
success = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *tmp;
|
||||
|
||||
/* Look for the LAST occurrence of __, allowing names to
|
||||
have the '__' sequence embedded in them. */
|
||||
if (!(ARM_DEMANGLING || HP_DEMANGLING))
|
||||
{
|
||||
while ((tmp = mystrstr (scan + 2, "__")) != NULL)
|
||||
scan = tmp;
|
||||
}
|
||||
if (*(scan + 2) == '\0')
|
||||
success = 0;
|
||||
else
|
||||
demangle_function_name (work, mangled, declp, scan);
|
||||
}
|
||||
return iterate_demangle_function (work, mangled, declp, scan);
|
||||
}
|
||||
}
|
||||
else if (*(scan + 2) != '\0')
|
||||
{
|
||||
/* Mangled name does not start with "__" but does have one somewhere
|
||||
in there with non empty stuff after it. Looks like a global
|
||||
function name. */
|
||||
demangle_function_name (work, mangled, declp, scan);
|
||||
function name. Iterate over all "__":s until the right
|
||||
one is found. */
|
||||
return iterate_demangle_function (work, mangled, declp, scan);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2512,6 +2812,25 @@ gnu_special (work, mangled, declp)
|
||||
success = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (n > 10 && strncmp (*mangled, "_GLOBAL_", 8) == 0
|
||||
&& (*mangled)[9] == 'N'
|
||||
&& (*mangled)[8] == (*mangled)[10]
|
||||
&& strchr (cplus_markers, (*mangled)[8]))
|
||||
{
|
||||
/* A member of the anonymous namespace. There's information
|
||||
about what identifier or filename it was keyed to, but
|
||||
it's just there to make the mangled name unique; we just
|
||||
step over it. */
|
||||
string_append (declp, "{anonymous}");
|
||||
(*mangled) += n;
|
||||
|
||||
/* Now p points to the marker before the N, so we need to
|
||||
update it to the first marker after what we consumed. */
|
||||
p = strpbrk (*mangled, cplus_markers);
|
||||
break;
|
||||
}
|
||||
|
||||
string_appendn (declp, *mangled, n);
|
||||
(*mangled) += n;
|
||||
}
|
||||
@ -2573,7 +2892,7 @@ gnu_special (work, mangled, declp)
|
||||
success = demangle_template (work, mangled, declp, 0, 1, 1);
|
||||
break;
|
||||
default:
|
||||
success = demangle_fund_type (work, mangled, declp);
|
||||
success = do_type (work, mangled, declp);
|
||||
break;
|
||||
}
|
||||
if (success && **mangled != '\0')
|
||||
@ -3311,7 +3630,7 @@ demangle_fund_type (work, mangled, result)
|
||||
int done = 0;
|
||||
int success = 1;
|
||||
char buf[10];
|
||||
int dec = 0;
|
||||
unsigned int dec = 0;
|
||||
string btype;
|
||||
type_kind_t tk = tk_integral;
|
||||
|
||||
@ -3455,7 +3774,7 @@ demangle_fund_type (work, mangled, result)
|
||||
*mangled += min (strlen (*mangled), 2);
|
||||
}
|
||||
sscanf (buf, "%x", &dec);
|
||||
sprintf (buf, "int%i_t", dec);
|
||||
sprintf (buf, "int%u_t", dec);
|
||||
APPEND_BLANK (result);
|
||||
string_append (result, buf);
|
||||
break;
|
||||
@ -4188,8 +4507,8 @@ demangle_function_name (work, mangled, declp, scan)
|
||||
}
|
||||
}
|
||||
else if (declp->b[0] == '_' && declp->b[1] == '_'
|
||||
&& declp->b[2] >= 'a' && declp->b[2] <= 'z'
|
||||
&& declp->b[3] >= 'a' && declp->b[3] <= 'z')
|
||||
&& islower((unsigned char)declp->b[2])
|
||||
&& islower((unsigned char)declp->b[3]))
|
||||
{
|
||||
if (declp->b[4] == '\0')
|
||||
{
|
||||
@ -4402,6 +4721,7 @@ static int flags = DMGL_PARAMS | DMGL_ANSI;
|
||||
static void demangle_it PARAMS ((char *));
|
||||
static void usage PARAMS ((FILE *, int)) ATTRIBUTE_NORETURN;
|
||||
static void fatal PARAMS ((const char *)) ATTRIBUTE_NORETURN;
|
||||
static void print_demangler_list PARAMS ((FILE *));
|
||||
|
||||
static void
|
||||
demangle_it (mangled_name)
|
||||
@ -4421,16 +4741,43 @@ demangle_it (mangled_name)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_demangler_list (stream)
|
||||
FILE *stream;
|
||||
{
|
||||
struct demangler_engine *demangler;
|
||||
|
||||
fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
|
||||
|
||||
for (demangler = libiberty_demanglers + 1;
|
||||
demangler->demangling_style != unknown_demangling;
|
||||
++demangler)
|
||||
fprintf (stream, ",%s", demangler->demangling_style_name);
|
||||
|
||||
fprintf (stream, "}");
|
||||
}
|
||||
|
||||
static void
|
||||
usage (stream, status)
|
||||
FILE *stream;
|
||||
int status;
|
||||
{
|
||||
fprintf (stream, "\
|
||||
Usage: %s [-_] [-n] [-s {gnu,lucid,arm,hp,edg}] [--strip-underscores]\n\
|
||||
[--no-strip-underscores] [--format={gnu,lucid,arm,hp,edg}]\n\
|
||||
[--help] [--version] [arg...]\n",
|
||||
Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores] \n",
|
||||
program_name);
|
||||
|
||||
fprintf (stream, "\
|
||||
[-s ");
|
||||
print_demangler_list (stream);
|
||||
fprintf (stream, "]\n");
|
||||
|
||||
fprintf (stream, "\
|
||||
[--format ");
|
||||
print_demangler_list (stream);
|
||||
fprintf (stream, "]\n");
|
||||
|
||||
fprintf (stream, "\
|
||||
[--help] [--version] [arg...]\n");
|
||||
exit (status);
|
||||
}
|
||||
|
||||
@ -4468,6 +4815,9 @@ standard_symbol_characters PARAMS ((void));
|
||||
static const char *
|
||||
hp_symbol_characters PARAMS ((void));
|
||||
|
||||
static const char *
|
||||
gnu_new_abi_symbol_characters PARAMS ((void));
|
||||
|
||||
/* Return the string of non-alnum characters that may occur
|
||||
as a valid symbol component, in the standard assembler symbol
|
||||
syntax. */
|
||||
@ -4516,6 +4866,17 @@ hp_symbol_characters ()
|
||||
}
|
||||
|
||||
|
||||
/* Return the string of non-alnum characters that may occur
|
||||
as a valid symbol component in the GNU standard C++ ABI mangling
|
||||
scheme. */
|
||||
|
||||
static const char *
|
||||
gnu_new_abi_symbol_characters ()
|
||||
{
|
||||
return "_";
|
||||
}
|
||||
|
||||
|
||||
extern int main PARAMS ((int, char **));
|
||||
|
||||
int
|
||||
@ -4553,32 +4914,19 @@ main (argc, argv)
|
||||
flags |= DMGL_JAVA;
|
||||
break;
|
||||
case 's':
|
||||
if (strcmp (optarg, "gnu") == 0)
|
||||
{
|
||||
current_demangling_style = gnu_demangling;
|
||||
}
|
||||
else if (strcmp (optarg, "lucid") == 0)
|
||||
{
|
||||
current_demangling_style = lucid_demangling;
|
||||
}
|
||||
else if (strcmp (optarg, "arm") == 0)
|
||||
{
|
||||
current_demangling_style = arm_demangling;
|
||||
}
|
||||
else if (strcmp (optarg, "hp") == 0)
|
||||
{
|
||||
current_demangling_style = hp_demangling;
|
||||
}
|
||||
else if (strcmp (optarg, "edg") == 0)
|
||||
{
|
||||
current_demangling_style = edg_demangling;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf (stderr, "%s: unknown demangling style `%s'\n",
|
||||
program_name, optarg);
|
||||
return (1);
|
||||
}
|
||||
{
|
||||
enum demangling_styles style;
|
||||
|
||||
style = cplus_demangle_name_to_style (optarg);
|
||||
if (style == unknown_demangling)
|
||||
{
|
||||
fprintf (stderr, "%s: unknown demangling style `%s'\n",
|
||||
program_name, optarg);
|
||||
return (1);
|
||||
}
|
||||
else
|
||||
cplus_demangle_set_style (style);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -4603,6 +4951,9 @@ main (argc, argv)
|
||||
case hp_demangling:
|
||||
valid_symbols = hp_symbol_characters ();
|
||||
break;
|
||||
case gnu_new_abi_demangling:
|
||||
valid_symbols = gnu_new_abi_symbol_characters ();
|
||||
break;
|
||||
default:
|
||||
/* Folks should explicitly indicate the appropriate alphabet for
|
||||
each demangling. Providing a default would allow the
|
||||
@ -4652,6 +5003,7 @@ main (argc, argv)
|
||||
if (c == EOF)
|
||||
break;
|
||||
putchar (c);
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
|
409
contrib/binutils/libiberty/dyn-string.c
Normal file
409
contrib/binutils/libiberty/dyn-string.c
Normal file
@ -0,0 +1,409 @@
|
||||
/* An abstract string datatype.
|
||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
Contributed by Mark Mitchell (mark@markmitchell.com).
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC 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 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC 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 GNU CC; see the file COPYING. If not, write to
|
||||
the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#include "libiberty.h"
|
||||
#include "dyn-string.h"
|
||||
|
||||
/* If this file is being compiled for inclusion in the C++ runtime
|
||||
library, as part of the demangler implementation, we don't want to
|
||||
abort if an allocation fails. Instead, percolate an error code up
|
||||
through the call chain. */
|
||||
|
||||
#ifdef IN_LIBGCC2
|
||||
#define RETURN_ON_ALLOCATION_FAILURE
|
||||
#endif
|
||||
|
||||
/* Performs in-place initialization of a dyn_string struct. This
|
||||
function can be used with a dyn_string struct on the stack or
|
||||
embedded in another object. The contents of of the string itself
|
||||
are still dynamically allocated. The string initially is capable
|
||||
of holding at least SPACE characeters, including the terminating
|
||||
NUL. If SPACE is 0, it will silently be increated to 1.
|
||||
|
||||
If RETURN_ON_ALLOCATION_FAILURE is defined and memory allocation
|
||||
fails, returns 0. Otherwise returns 1. */
|
||||
|
||||
int
|
||||
dyn_string_init (ds_struct_ptr, space)
|
||||
struct dyn_string *ds_struct_ptr;
|
||||
int space;
|
||||
{
|
||||
/* We need at least one byte in which to store the terminating NUL. */
|
||||
if (space == 0)
|
||||
space = 1;
|
||||
|
||||
#ifdef RETURN_ON_ALLOCATION_FAILURE
|
||||
ds_struct_ptr->s = (char *) malloc (space);
|
||||
if (ds_struct_ptr->s == NULL)
|
||||
return 0;
|
||||
#else
|
||||
ds_struct_ptr->s = (char *) xmalloc (space);
|
||||
#endif
|
||||
ds_struct_ptr->allocated = space;
|
||||
ds_struct_ptr->length = 0;
|
||||
ds_struct_ptr->s[0] = '\0';
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Create a new dynamic string capable of holding at least SPACE
|
||||
characters, including the terminating NUL. If SPACE is 0, it will
|
||||
be silently increased to 1. If RETURN_ON_ALLOCATION_FAILURE is
|
||||
defined and memory allocation fails, returns NULL. Otherwise
|
||||
returns the newly allocated string. */
|
||||
|
||||
dyn_string_t
|
||||
dyn_string_new (space)
|
||||
int space;
|
||||
{
|
||||
dyn_string_t result;
|
||||
#ifdef RETURN_ON_ALLOCATION_FAILURE
|
||||
result = (dyn_string_t) malloc (sizeof (struct dyn_string));
|
||||
if (result == NULL)
|
||||
return NULL;
|
||||
if (!dyn_string_init (result, space))
|
||||
{
|
||||
free (result);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
result = (dyn_string_t) xmalloc (sizeof (struct dyn_string));
|
||||
dyn_string_init (result, space);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Free the memory used by DS. */
|
||||
|
||||
void
|
||||
dyn_string_delete (ds)
|
||||
dyn_string_t ds;
|
||||
{
|
||||
free (ds->s);
|
||||
free (ds);
|
||||
}
|
||||
|
||||
/* Returns the contents of DS in a buffer allocated with malloc. It
|
||||
is the caller's responsibility to deallocate the buffer using free.
|
||||
DS is then set to the empty string. Deletes DS itself. */
|
||||
|
||||
char*
|
||||
dyn_string_release (ds)
|
||||
dyn_string_t ds;
|
||||
{
|
||||
/* Store the old buffer. */
|
||||
char* result = ds->s;
|
||||
/* The buffer is no longer owned by DS. */
|
||||
ds->s = NULL;
|
||||
/* Delete DS. */
|
||||
free (ds);
|
||||
/* Return the old buffer. */
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Increase the capacity of DS so it can hold at least SPACE
|
||||
characters, plus the terminating NUL. This function will not (at
|
||||
present) reduce the capacity of DS. Returns DS on success.
|
||||
|
||||
If RETURN_ON_ALLOCATION_FAILURE is defined and a memory allocation
|
||||
operation fails, deletes DS and returns NULL. */
|
||||
|
||||
dyn_string_t
|
||||
dyn_string_resize (ds, space)
|
||||
dyn_string_t ds;
|
||||
int space;
|
||||
{
|
||||
int new_allocated = ds->allocated;
|
||||
|
||||
/* Increase SPACE to hold the NUL termination. */
|
||||
++space;
|
||||
|
||||
/* Increase allocation by factors of two. */
|
||||
while (space > new_allocated)
|
||||
new_allocated *= 2;
|
||||
|
||||
if (new_allocated != ds->allocated)
|
||||
{
|
||||
ds->allocated = new_allocated;
|
||||
/* We actually need more space. */
|
||||
#ifdef RETURN_ON_ALLOCATION_FAILURE
|
||||
ds->s = (char *) realloc (ds->s, ds->allocated);
|
||||
if (ds->s == NULL)
|
||||
{
|
||||
free (ds);
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
ds->s = (char *) xrealloc (ds->s, ds->allocated);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ds;
|
||||
}
|
||||
|
||||
/* Sets the contents of DS to the empty string. */
|
||||
|
||||
void
|
||||
dyn_string_clear (ds)
|
||||
dyn_string_t ds;
|
||||
{
|
||||
/* A dyn_string always has room for at least the NUL terminator. */
|
||||
ds->s[0] = '\0';
|
||||
ds->length = 0;
|
||||
}
|
||||
|
||||
/* Makes the contents of DEST the same as the contents of SRC. DEST
|
||||
and SRC must be distinct. Returns 1 on success. On failure, if
|
||||
RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_copy (dest, src)
|
||||
dyn_string_t dest;
|
||||
dyn_string_t src;
|
||||
{
|
||||
if (dest == src)
|
||||
abort ();
|
||||
|
||||
/* Make room in DEST. */
|
||||
if (dyn_string_resize (dest, src->length) == NULL)
|
||||
return 0;
|
||||
/* Copy DEST into SRC. */
|
||||
strcpy (dest->s, src->s);
|
||||
/* Update the size of DEST. */
|
||||
dest->length = src->length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Copies SRC, a NUL-terminated string, into DEST. Returns 1 on
|
||||
success. On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST
|
||||
and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_copy_cstr (dest, src)
|
||||
dyn_string_t dest;
|
||||
const char *src;
|
||||
{
|
||||
int length = strlen (src);
|
||||
/* Make room in DEST. */
|
||||
if (dyn_string_resize (dest, length) == NULL)
|
||||
return 0;
|
||||
/* Copy DEST into SRC. */
|
||||
strcpy (dest->s, src);
|
||||
/* Update the size of DEST. */
|
||||
dest->length = length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Inserts SRC at the beginning of DEST. DEST is expanded as
|
||||
necessary. SRC and DEST must be distinct. Returns 1 on success.
|
||||
On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and
|
||||
returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_prepend (dest, src)
|
||||
dyn_string_t dest;
|
||||
dyn_string_t src;
|
||||
{
|
||||
return dyn_string_insert (dest, 0, src);
|
||||
}
|
||||
|
||||
/* Inserts SRC, a NUL-terminated string, at the beginning of DEST.
|
||||
DEST is expanded as necessary. Returns 1 on success. On failure,
|
||||
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_prepend_cstr (dest, src)
|
||||
dyn_string_t dest;
|
||||
const char *src;
|
||||
{
|
||||
return dyn_string_insert_cstr (dest, 0, src);
|
||||
}
|
||||
|
||||
/* Inserts SRC into DEST starting at position POS. DEST is expanded
|
||||
as necessary. SRC and DEST must be distinct. Returns 1 on
|
||||
success. On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST
|
||||
and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_insert (dest, pos, src)
|
||||
dyn_string_t dest;
|
||||
int pos;
|
||||
dyn_string_t src;
|
||||
{
|
||||
int i;
|
||||
|
||||
if (src == dest)
|
||||
abort ();
|
||||
|
||||
if (dyn_string_resize (dest, dest->length + src->length) == NULL)
|
||||
return 0;
|
||||
/* Make room for the insertion. Be sure to copy the NUL. */
|
||||
for (i = dest->length; i >= pos; --i)
|
||||
dest->s[i + src->length] = dest->s[i];
|
||||
/* Splice in the new stuff. */
|
||||
strncpy (dest->s + pos, src->s, src->length);
|
||||
/* Compute the new length. */
|
||||
dest->length += src->length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Inserts SRC, a NUL-terminated string, into DEST starting at
|
||||
position POS. DEST is expanded as necessary. Returns 1 on
|
||||
success. On failure, RETURN_ON_ALLOCATION_FAILURE, deletes DEST
|
||||
and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_insert_cstr (dest, pos, src)
|
||||
dyn_string_t dest;
|
||||
int pos;
|
||||
const char *src;
|
||||
{
|
||||
int i;
|
||||
int length = strlen (src);
|
||||
|
||||
if (dyn_string_resize (dest, dest->length + length) == NULL)
|
||||
return 0;
|
||||
/* Make room for the insertion. Be sure to copy the NUL. */
|
||||
for (i = dest->length; i >= pos; --i)
|
||||
dest->s[i + length] = dest->s[i];
|
||||
/* Splice in the new stuff. */
|
||||
strncpy (dest->s + pos, src, length);
|
||||
/* Compute the new length. */
|
||||
dest->length += length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Append S to DS, resizing DS if necessary. Returns 1 on success.
|
||||
On failure, if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and
|
||||
returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_append (dest, s)
|
||||
dyn_string_t dest;
|
||||
dyn_string_t s;
|
||||
{
|
||||
if (dyn_string_resize (dest, dest->length + s->length) == 0)
|
||||
return 0;
|
||||
strcpy (dest->s + dest->length, s->s);
|
||||
dest->length += s->length;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Append the NUL-terminated string S to DS, resizing DS if necessary.
|
||||
Returns 1 on success. On failure, if RETURN_ON_ALLOCATION_FAILURE,
|
||||
deletes DEST and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_append_cstr (dest, s)
|
||||
dyn_string_t dest;
|
||||
const char *s;
|
||||
{
|
||||
int len = strlen (s);
|
||||
|
||||
/* The new length is the old length plus the size of our string, plus
|
||||
one for the null at the end. */
|
||||
if (dyn_string_resize (dest, dest->length + len) == NULL)
|
||||
return 0;
|
||||
strcpy (dest->s + dest->length, s);
|
||||
dest->length += len;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Appends C to the end of DEST. Returns 1 on success. On failiure,
|
||||
if RETURN_ON_ALLOCATION_FAILURE, deletes DEST and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_append_char (dest, c)
|
||||
dyn_string_t dest;
|
||||
int c;
|
||||
{
|
||||
/* Make room for the extra character. */
|
||||
if (dyn_string_resize (dest, dest->length + 1) == NULL)
|
||||
return 0;
|
||||
/* Append the character; it will overwrite the old NUL. */
|
||||
dest->s[dest->length] = c;
|
||||
/* Add a new NUL at the end. */
|
||||
dest->s[dest->length + 1] = '\0';
|
||||
/* Update the length. */
|
||||
++(dest->length);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Sets the contents of DEST to the substring of SRC starting at START
|
||||
and ending before END. START must be less than or equal to END,
|
||||
and both must be between zero and the length of SRC, inclusive.
|
||||
Returns 1 on success. On failure, if RETURN_ON_ALLOCATION_FAILURE,
|
||||
deletes DEST and returns 0. */
|
||||
|
||||
int
|
||||
dyn_string_substring (dest, src, start, end)
|
||||
dyn_string_t dest;
|
||||
dyn_string_t src;
|
||||
int start;
|
||||
int end;
|
||||
{
|
||||
int i;
|
||||
int length = end - start;
|
||||
|
||||
if (start > end || start > src->length || end > src->length)
|
||||
abort ();
|
||||
|
||||
/* Make room for the substring. */
|
||||
if (dyn_string_resize (dest, length) == NULL)
|
||||
return 0;
|
||||
/* Copy the characters in the substring, */
|
||||
for (i = length; --i >= 0; )
|
||||
dest->s[i] = src->s[start + i];
|
||||
/* NUL-terimate the result. */
|
||||
dest->s[length] = '\0';
|
||||
/* Record the length of the substring. */
|
||||
dest->length = length;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Returns non-zero if DS1 and DS2 have the same contents. */
|
||||
|
||||
int
|
||||
dyn_string_eq (ds1, ds2)
|
||||
dyn_string_t ds1;
|
||||
dyn_string_t ds2;
|
||||
{
|
||||
/* If DS1 and DS2 have different lengths, they must not be the same. */
|
||||
if (ds1->length != ds2->length)
|
||||
return 0;
|
||||
else
|
||||
return !strcmp (ds1->s, ds2->s);
|
||||
}
|
Loading…
Reference in New Issue
Block a user