[uClibc 0000538]: crt1.S under armnommu / uCLinux, startup code

bugs at busybox.net bugs at busybox.net
Thu Nov 10 19:54:23 UTC 2005


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=538 
====================================================================== 
Reported By:                dg6nee
Assigned To:                uClibc
====================================================================== 
Project:                    uClibc
Issue ID:                   538
Category:                   Architecture Specific
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             11-10-2005 10:49 PST
Last Modified:              11-10-2005 11:54 PST
====================================================================== 
Summary:                    crt1.S under armnommu / uCLinux, startup code
Description: 
The current startup code for armnommu is broken and cannot be used with
ucLinux, the parameters are passed in a different way. Additionally there
is no support for constructors/destructors. This blocks developing
embedded applications, at least for armnommu under uCLinux

The attached patch fixed this for me and also adds support for
constructors/destructors.
====================================================================== 

---------------------------------------------------------------------- 
 vapier - 11-10-05 11:04  
---------------------------------------------------------------------- 
the _init/_fini code should be in crti.S, not crt1.S

also, your changes affect not just uClinux, but normal MMU arm systems too
...
would your changes break arm MMU ? 

---------------------------------------------------------------------- 
 dg6nee - 11-10-05 11:36  
---------------------------------------------------------------------- 
ok, there is a libc/sysdeps/linux/arm/crti.S, but I don't have any idea
what this code should do and how it could ever have worked!? Maybe you
want to replace it with my code...

The situation with the init code is similar. I have checked the following
three places:

1. uclinux kernel, 2.4.31-uc0, armnommu
   uclinux/include/asm-armnommu/proc-armv/processor.h,
   macro "start_thread"
   R0 = argc
   R1 = argv
   R2 = envp
   R10 = data segment base

2. uclinux kernel, 2.4.31-uc0, arm
   uclinux/include/asm-armnommu/proc-armv/processor.h,
   R0 = argc
   R1 = argv
   R2 = envp

3. standard linux kernel, 2.6.13, arm
   include/asm/arm/processor.h
   R0 = argc
   R1 = argv
   R2 = envp

Therefore I guess that my attempt can't be too wrong. I rather guess that
nobody else has really used the previous version... 

---------------------------------------------------------------------- 
 vapier - 11-10-05 11:54  
---------------------------------------------------------------------- 
the crt code isnt responsible for looping over the
constructors/deconstructors

as for testing, arm/mmu is heavily tested while we rarely get feedback
about arm/nommu/uclinux 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-10-05 10:49  dg6nee         New Issue                                    
11-10-05 10:49  dg6nee         Status                   new => assigned     
11-10-05 10:49  dg6nee         Assigned To               => uClibc          
11-10-05 10:50  dg6nee         File Added: uclibc-0.9.28_crt1.S.diff            
       
11-10-05 11:04  vapier         Note Added: 0000677                          
11-10-05 11:36  dg6nee         Note Added: 0000678                          
11-10-05 11:36  dg6nee         Issue Monitored: dg6nee                      
11-10-05 11:54  vapier         Note Added: 0000679                          
======================================================================




More information about the uClibc-cvs mailing list