This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
[PATCH 07/21] ia64: merge sysdeps/ia64/elf/ into sysdeps/ia64/
Moved the files, and then pasted the configure.in contents into the
parent file.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-17 Mike Frysinger <vapier@gentoo.org>
* sysdeps/ia64/elf/configure.in: Merge contents to ...
* sysdeps/ia64/configure.in: ... here.
* sysdeps/ia64/elf/configure: Delete.
* sysdeps/ia64/configure: Regenerate.
* sysdeps/ia64/elf/entry.h: Move to ...
* sysdeps/ia64/entry.h: ... here.
* sysdeps/ia64/elf/start.S: Move to ...
* sysdeps/ia64/start.S: ... here.
---
sysdeps/ia64/configure | 146 +++++++++++++++++++++++++++++++++++++----
sysdeps/ia64/configure.in | 32 +++++++++
sysdeps/ia64/elf/configure | 126 -----------------------------------
sysdeps/ia64/elf/configure.in | 34 ----------
sysdeps/ia64/elf/entry.h | 10 ---
sysdeps/ia64/elf/start.S | 119 ---------------------------------
sysdeps/ia64/entry.h | 10 +++
sysdeps/ia64/start.S | 119 +++++++++++++++++++++++++++++++++
8 files changed, 295 insertions(+), 301 deletions(-)
delete mode 100644 sysdeps/ia64/elf/configure
delete mode 100644 sysdeps/ia64/elf/configure.in
delete mode 100644 sysdeps/ia64/elf/entry.h
delete mode 100644 sysdeps/ia64/elf/start.S
create mode 100644 sysdeps/ia64/entry.h
create mode 100644 sysdeps/ia64/start.S
diff --git a/sysdeps/ia64/configure b/sysdeps/ia64/configure
index 67a4b7e..a3a1137 100644
--- a/sysdeps/ia64/configure
+++ b/sysdeps/ia64/configure
@@ -1,9 +1,91 @@
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/ia64.
-{ $as_echo "$as_me:$LINENO: checking if -g produces usable source locations for assembler-with-cpp" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then
+if ${libc_cv_cpp_asm_debuginfo+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.S <<EOF
@@ -24,19 +106,19 @@ foo:
nop.b 0;;
EOF
if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } && {
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; } && {
ac_pattern='conftest\.S'
{ ac_try='readelf --debug-dump=line conftest.o |
grep $ac_pattern 1>&5'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }
}; then
libc_cv_cpp_asm_debuginfo=yes
else
@@ -44,11 +126,51 @@ else
fi
rm -f conftest*
fi
-{ $as_echo "$as_me:$LINENO: result: $libc_cv_cpp_asm_debuginfo" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
if test $libc_cv_cpp_asm_debuginfo = yes; then
- cat >>confdefs.h <<\_ACEOF
-#define HAVE_CPP_ASM_DEBUGINFO 1
-_ACEOF
+ $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
fi
+
+# Check for support of thread-local storage handling in assembler and
+# linker.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia64 TLS support" >&5
+$as_echo_n "checking for ia64 TLS support... " >&6; }
+if ${libc_cv_ia64_tls+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat > conftest.s <<\EOF
+ .section ".tdata","awT",@progbits
+foo: data8 25
+ .text
+ addl r16 = @ltoff(@dtpmod(foo#)), gp
+ addl r17 = @ltoff(@dtprel(foo#)), gp
+ addl r18 = @ltoff(@tprel(foo#)), gp
+ addl r19 = @dtprel(foo#), gp
+ adds r21 = @dtprel(foo#), r13
+ movl r23 = @dtprel(foo#)
+ addl r20 = @tprel(foo#), gp
+ adds r22 = @tprel(foo#), r13
+ movl r24 = @tprel(foo#)
+EOF
+if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_ia64_tls=yes
+else
+ libc_cv_ia64_tls=no
+fi
+rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ia64_tls" >&5
+$as_echo "$libc_cv_ia64_tls" >&6; }
+if test $libc_cv_ia64_tls = no; then
+ as_fn_error $? "the assembler must support TLS" "$LINENO" 5
+fi
+
+$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
+
diff --git a/sysdeps/ia64/configure.in b/sysdeps/ia64/configure.in
index 887b4cb..5f1b112 100644
--- a/sysdeps/ia64/configure.in
+++ b/sysdeps/ia64/configure.in
@@ -33,3 +33,35 @@ rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
if test $libc_cv_cpp_asm_debuginfo = yes; then
AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
fi
+
+# Check for support of thread-local storage handling in assembler and
+# linker.
+AC_CACHE_CHECK(for ia64 TLS support, libc_cv_ia64_tls, [dnl
+cat > conftest.s <<\EOF
+ .section ".tdata","awT",@progbits
+foo: data8 25
+ .text
+ addl r16 = @ltoff(@dtpmod(foo#)), gp
+ addl r17 = @ltoff(@dtprel(foo#)), gp
+ addl r18 = @ltoff(@tprel(foo#)), gp
+ addl r19 = @dtprel(foo#), gp
+ adds r21 = @dtprel(foo#), r13
+ movl r23 = @dtprel(foo#)
+ addl r20 = @tprel(foo#), gp
+ adds r22 = @tprel(foo#), r13
+ movl r24 = @tprel(foo#)
+EOF
+dnl
+if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_ia64_tls=yes
+else
+ libc_cv_ia64_tls=no
+fi
+rm -f conftest*])
+if test $libc_cv_ia64_tls = no; then
+ AC_MSG_ERROR([the assembler must support TLS])
+fi
+
+dnl It is always possible to access static and hidden symbols in an
+dnl position independent way.
+AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/ia64/elf/configure b/sysdeps/ia64/elf/configure
deleted file mode 100644
index aa30dd0..0000000
--- a/sysdeps/ia64/elf/configure
+++ /dev/null
@@ -1,126 +0,0 @@
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-if expr a : '\(a\)' >/dev/null 2>&1 &&
- test "X`expr 00001 : '.*\(...\)'`" = X001; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{
- s//\1/
- q
- }
- /^X\/\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\/\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
-
-
- as_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
- sed -n '
- p
- /[$]LINENO/=
- ' <$as_myself |
- sed '
- s/[$]LINENO.*/&-/
- t lineno
- b
- :lineno
- N
- :loop
- s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
- t loop
- s/-\n.*//
- ' >$as_me.lineno &&
- chmod +x "$as_me.lineno" ||
- { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensitive to this).
- . "./$as_me.lineno"
- # Exit status is that of the last command.
- exit
-}
-
-# This file is generated from configure.in by Autoconf. DO NOT EDIT!
- # Local configure fragment for sysdeps/ia64/elf.
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia64 TLS support" >&5
-$as_echo_n "checking for ia64 TLS support... " >&6; }
-if ${libc_cv_ia64_tls+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.s <<\EOF
- .section ".tdata","awT",@progbits
-foo: data8 25
- .text
- addl r16 = @ltoff(@dtpmod(foo#)), gp
- addl r17 = @ltoff(@dtprel(foo#)), gp
- addl r18 = @ltoff(@tprel(foo#)), gp
- addl r19 = @dtprel(foo#), gp
- adds r21 = @dtprel(foo#), r13
- movl r23 = @dtprel(foo#)
- addl r20 = @tprel(foo#), gp
- adds r22 = @tprel(foo#), r13
- movl r24 = @tprel(foo#)
-EOF
-if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- libc_cv_ia64_tls=yes
-else
- libc_cv_ia64_tls=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ia64_tls" >&5
-$as_echo "$libc_cv_ia64_tls" >&6; }
-if test $libc_cv_ia64_tls = no; then
- as_fn_error $? "the assembler must support TLS" "$LINENO" 5
-fi
-
-$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
-
diff --git a/sysdeps/ia64/elf/configure.in b/sysdeps/ia64/elf/configure.in
deleted file mode 100644
index 396b9c4..0000000
--- a/sysdeps/ia64/elf/configure.in
+++ /dev/null
@@ -1,34 +0,0 @@
-GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/ia64/elf.
-
-# Check for support of thread-local storage handling in assembler and
-# linker.
-AC_CACHE_CHECK(for ia64 TLS support, libc_cv_ia64_tls, [dnl
-cat > conftest.s <<\EOF
- .section ".tdata","awT",@progbits
-foo: data8 25
- .text
- addl r16 = @ltoff(@dtpmod(foo#)), gp
- addl r17 = @ltoff(@dtprel(foo#)), gp
- addl r18 = @ltoff(@tprel(foo#)), gp
- addl r19 = @dtprel(foo#), gp
- adds r21 = @dtprel(foo#), r13
- movl r23 = @dtprel(foo#)
- addl r20 = @tprel(foo#), gp
- adds r22 = @tprel(foo#), r13
- movl r24 = @tprel(foo#)
-EOF
-dnl
-if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
- libc_cv_ia64_tls=yes
-else
- libc_cv_ia64_tls=no
-fi
-rm -f conftest*])
-if test $libc_cv_ia64_tls = no; then
- AC_MSG_ERROR([the assembler must support TLS])
-fi
-
-dnl It is always possible to access static and hidden symbols in an
-dnl position independent way.
-AC_DEFINE(PI_STATIC_AND_HIDDEN)
diff --git a/sysdeps/ia64/elf/entry.h b/sysdeps/ia64/elf/entry.h
deleted file mode 100644
index b93e1b6..0000000
--- a/sysdeps/ia64/elf/entry.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __ASSEMBLY__
-extern void _start (void);
-#endif
-
-/* The function's entry point is stored in the first word of the
- function descriptor (plabel) of _start(). */
-#define ENTRY_POINT (((long int *) _start)[0])
-
-/* We have to provide a special declaration. */
-#define ENTRY_POINT_DECL(class) class void _start (void);
diff --git a/sysdeps/ia64/elf/start.S b/sysdeps/ia64/elf/start.S
deleted file mode 100644
index badfea0..0000000
--- a/sysdeps/ia64/elf/start.S
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- In addition to the permissions in the GNU Lesser General Public
- License, the Free Software Foundation gives you unlimited
- permission to link the compiled version of this file with other
- programs, and to distribute those programs without any restriction
- coming from the use of this file. (The GNU Lesser General Public
- License restrictions do apply in other respects; for example, they
- cover modification of the file, and distribution when not linked
- into another program.)
-
- Note that people who make modified versions of this file are not
- obligated to grant this special exception for their modified
- versions; it is their choice whether to do so. The GNU Lesser
- General Public License gives permission to release a modified
- version without this exception; this exception also makes it
- possible to release a modified version which carries forward this
- exception.
-
- The GNU C Library 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-
-#include <asm/unistd.h>
-#include <asm/fpu.h>
-
-/*
- * Arguments for __libc_start_main:
- * out0: main
- * out1: argc
- * out2: argv
- * out3: init
- * out4: fini
- * out5: rtld_fini
- * out6: stack_end
- */
-
- .align 32
- .global _start
-
- .proc _start
- .type _start,@function
-_start:
- .prologue
- .save rp, r0
- .body
- .prologue
- { .mlx
- alloc r2 = ar.pfs,0,0,7,0
- movl r3 = FPSR_DEFAULT
- }
- { .mlx
- adds out2 = 16, sp /* get address of argc value */
- movl gp = @gprel(0f)
- ;;
- }
-0: { .mmi
- ld8 out1 = [out2], 8 /* load argc and move out2 to become argv */
- mov.m r10 = ar.bsp /* fetch rbs base address */
- mov r9 = ip
- ;;
- }
- { .mii
- mov ar.fpsr = r3
- sub gp = r9, gp /* back-compute gp value */
- adds out6 = 16, sp /* highest non-environment stack address */
- ;;
- }
- {
- addl r11 = @ltoff(__libc_ia64_register_backing_store_base), gp
- addl out0 = @ltoff(@fptr(main)), gp
- addl out3 = @ltoff(@fptr(__libc_csu_init)), gp
- ;;
- }
- { .mmi
- ld8 r3 = [r11] /* pointer to __libc_ia64_register_backing_store_base */
- ld8 out0 = [out0] /* pointer to `main' function descriptor */
- addl out4 = @ltoff(@fptr(__libc_csu_fini)), gp
- ;;
- }
- { .mmi
- ld8 out3 = [out3] /* pointer to `init' function descriptor */
- ld8 out4 = [out4] /* pointer to `fini' function descriptor */
- nop 0
- }
- .body
- { .mib
- st8 [r3] = r10
- mov out5 = ret0 /* dynamic linker destructor */
- br.call.sptk.few rp = __libc_start_main
- }
- { .mib
- break 0 /* break miserably if we ever return */
- }
- .endp _start
-
-/* Define a symbol for the first piece of initialized data. */
- .data
- .globl __data_start
-__data_start:
- .long 0
- .weak data_start
- data_start = __data_start
-
- .common __libc_ia64_register_backing_store_base, 8, 8
diff --git a/sysdeps/ia64/entry.h b/sysdeps/ia64/entry.h
new file mode 100644
index 0000000..b93e1b6
--- /dev/null
+++ b/sysdeps/ia64/entry.h
@@ -0,0 +1,10 @@
+#ifndef __ASSEMBLY__
+extern void _start (void);
+#endif
+
+/* The function's entry point is stored in the first word of the
+ function descriptor (plabel) of _start(). */
+#define ENTRY_POINT (((long int *) _start)[0])
+
+/* We have to provide a special declaration. */
+#define ENTRY_POINT_DECL(class) class void _start (void);
diff --git a/sysdeps/ia64/start.S b/sysdeps/ia64/start.S
new file mode 100644
index 0000000..badfea0
--- /dev/null
+++ b/sysdeps/ia64/start.S
@@ -0,0 +1,119 @@
+/* Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Jes Sorensen, <Jes.Sorensen@cern.ch>, April 1999.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ In addition to the permissions in the GNU Lesser General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file with other
+ programs, and to distribute those programs without any restriction
+ coming from the use of this file. (The GNU Lesser General Public
+ License restrictions do apply in other respects; for example, they
+ cover modification of the file, and distribution when not linked
+ into another program.)
+
+ Note that people who make modified versions of this file are not
+ obligated to grant this special exception for their modified
+ versions; it is their choice whether to do so. The GNU Lesser
+ General Public License gives permission to release a modified
+ version without this exception; this exception also makes it
+ possible to release a modified version which carries forward this
+ exception.
+
+ The GNU C Library 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#include <asm/unistd.h>
+#include <asm/fpu.h>
+
+/*
+ * Arguments for __libc_start_main:
+ * out0: main
+ * out1: argc
+ * out2: argv
+ * out3: init
+ * out4: fini
+ * out5: rtld_fini
+ * out6: stack_end
+ */
+
+ .align 32
+ .global _start
+
+ .proc _start
+ .type _start,@function
+_start:
+ .prologue
+ .save rp, r0
+ .body
+ .prologue
+ { .mlx
+ alloc r2 = ar.pfs,0,0,7,0
+ movl r3 = FPSR_DEFAULT
+ }
+ { .mlx
+ adds out2 = 16, sp /* get address of argc value */
+ movl gp = @gprel(0f)
+ ;;
+ }
+0: { .mmi
+ ld8 out1 = [out2], 8 /* load argc and move out2 to become argv */
+ mov.m r10 = ar.bsp /* fetch rbs base address */
+ mov r9 = ip
+ ;;
+ }
+ { .mii
+ mov ar.fpsr = r3
+ sub gp = r9, gp /* back-compute gp value */
+ adds out6 = 16, sp /* highest non-environment stack address */
+ ;;
+ }
+ {
+ addl r11 = @ltoff(__libc_ia64_register_backing_store_base), gp
+ addl out0 = @ltoff(@fptr(main)), gp
+ addl out3 = @ltoff(@fptr(__libc_csu_init)), gp
+ ;;
+ }
+ { .mmi
+ ld8 r3 = [r11] /* pointer to __libc_ia64_register_backing_store_base */
+ ld8 out0 = [out0] /* pointer to `main' function descriptor */
+ addl out4 = @ltoff(@fptr(__libc_csu_fini)), gp
+ ;;
+ }
+ { .mmi
+ ld8 out3 = [out3] /* pointer to `init' function descriptor */
+ ld8 out4 = [out4] /* pointer to `fini' function descriptor */
+ nop 0
+ }
+ .body
+ { .mib
+ st8 [r3] = r10
+ mov out5 = ret0 /* dynamic linker destructor */
+ br.call.sptk.few rp = __libc_start_main
+ }
+ { .mib
+ break 0 /* break miserably if we ever return */
+ }
+ .endp _start
+
+/* Define a symbol for the first piece of initialized data. */
+ .data
+ .globl __data_start
+__data_start:
+ .long 0
+ .weak data_start
+ data_start = __data_start
+
+ .common __libc_ia64_register_backing_store_base, 8, 8
--
1.7.8.5