[uClibc]uclibc/powerpc status ?

Erik Andersen andersen at codepoet.org
Wed Apr 3 13:13:19 UTC 2002


On Wed Apr 03, 2002 at 11:27:01AM +0000, John Traill wrote:
> When I compile "out of the box" the resultant init section of crtn.S 
> contains a single blr instruction sending the ppc into oblivion. Defining 

Grr.  I think the compiler is trying to be sneaky on us
and is optimizing away everything.  For powerpc it should
really look something like:
   lwz     r0,20(r1)
   mtlr    r0
   addi    r1,r1,16
   blr

Could you try adding this in and let me know if that fixes things
for you?

--- initfini.c  21 Mar 2002 17:21:42 -0000      1.2
+++ initfini.c  3 Apr 2002 13:10:25 -0000
@@ -84,6 +84,14 @@ _init (void)
      module which has a constructor; but then user code's constructors
      would come first, and not be profiled.  */
   call_gmon_start ();
+#else
+  {
+         /* Let GCC know that _fini is not a leaf function by having a dummy
+          * function call here.  We arrange for this call to be omitted from
+          * either crt file.  */
+         extern void i_am_not_a_leaf (void);
+         i_am_not_a_leaf ();
+  }
 #endif

> starts but with errors. I still have to give the absolute path names to all 
> shell commands - If not I get a Permission denied error.
> <snip>
> # ls
> ls: Permission denied
> # /bin/ls /

Interesting indeed...  No clue on that one.  Care to run an ltrace
on the shell to watch what it is doing?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--



More information about the uClibc mailing list