[uClibc] Observation: uclibc snapshot won't build againstgcc-3.4.4for ppc
Mark S. Mathews
mark at linux-wlan.com
Sun Jun 19 13:23:47 UTC 2005
Thanks alot for this. I can't get into the office until this evening.
I'll try it out then and let you know.
On Sun, 19 Jun 2005, Joakim Tjernlund wrote:
>>> Hi Folks,
>>> Building for ppc.
>>> Using buildroot-snapshot, apps built w/ gcc-3.4.4 (including ldd) won't
>>> build against uclibc due to a reference in libgcc to __libc_stack_end. I
>>> found the code that references it in the config/rs6000 stuff.
>>> I'm not quite sure what would happen if I removed it.
>> Is it only powerpc that needs this symbol?
>> It appears that MIPS needs it too for NPTL and I guess that most/all archs will need
>> I think that __libc_stack_end needs to be impl. in uclibc, the NPTL
>> branch already have it.
> Does this help? Not tested.
> Index: libc/misc/internals/__uClibc_main.c
> --- libc/misc/internals/__uClibc_main.c (revision 10413)
> +++ libc/misc/internals/__uClibc_main.c (working copy)
> @@ -32,6 +32,7 @@
> * Prototypes.
> +extern void *__libc_stack_end;
> extern void weak_function _stdio_init(void);
> extern int *weak_const_function __errno_location(void);
> extern int *weak_const_function __h_errno_location(void);
> @@ -172,7 +173,7 @@
> unsigned long *aux_dat;
> Elf32_auxv_t auxvt[AT_EGID + 1];
> + __libc_stack_end = stack_end;
> /* We need to initialize uClibc. If we are dynamically linked this
> * may have already been completed by the shared lib loader. We call
> * __uClibc_init() regardless, to be sure the right thing happens. */
> Index: ldso/ldso/dl-startup.c
> --- ldso/ldso/dl-startup.c (revision 10505)
> +++ ldso/ldso/dl-startup.c (working copy)
> @@ -97,9 +97,10 @@
> /* Static declarations */
> int (*_dl_elf_main) (int, char **, char **);
> +static void* __rtld_stack_end;
> +strong_alias(__rtld_stack_end, __libc_stack_end);
> /* When we enter this piece of code, the program stack looks like this:
> argc argument counter (integer)
> argv program name (pointer)
> @@ -306,6 +307,8 @@
> free to start using global variables, since these things have all been
> fixed up by now. Still no function calls outside of this library ,
> since the dynamic resolver is not yet ready. */
> + __rtld_stack_end = (void *)args;
> _dl_get_ready_to_run(tpnt, load_addr, auxvt, envp, argv);
Mark S. Mathews
AbsoluteValue Systems Web: http://www.linux-wlan.com
721-D North Drive e-mail: mark at linux-wlan.com
Melbourne, FL 32934 Phone: 321.259.0737
USA Fax: 321.259.0286
More information about the uClibc