Re: libraryopt

2007-09-26 Thread emBuild Software Design
On Tuesday 25 September 2007 11:52:00 pm Christian MICHON wrote:
> I found back the script: it's still in the uClibc tarball.
>
> Have a look at libstrip:
>
> uClibc-0.9.29\extra\libstrip\



Thanks very much.
The libstrip script is certainly a lot smaller than libraryopt.
The use by libstrip of a generated linker script with "EXTERN" statements is a 
good solution, much better than what libraryopt does.
This is a step forward.

I worry about the following:

-- The invocation of gcc is missing most of the arguments that are used when 
originally building libuClibc-0.9.28.so (presumeably 0.9.29 is similar), as 
determined by turning on verbosity in the build for my particular target 
(mips).
I would guess that libstrip has not been kept up to date or was never correct.
I of course would really like a solution that would "just work" when upgrading 
to a new version of uClibc and that would "just work" for any target, perhaps 
by using the same configuration information that is used for the original 
build of the libraries?

-- The script is for libuClibc-0.9.5.so . Apart from the version problem, the 
script doesn't do anything for the other libraries.

-- The libstrip script doesn't pull in any non-referenced yet "required" 
objects... from my experience so far, at least __uClibc_main.oS is required 
but doesn't contain any symbols referenced from executables...  and possibly 
other objects are needed... in fact, this is one of my biggest questions 
(alternately a list of "required" symbols could do the job).



Here is the invocation of gcc from libstrip:
`gcc -s -nostdlib -Wl,-warn-common -shared \\
-o libuClibc-0.9.5.so \\
-Wl,-soname,libc.so.0 -Wl,--script=ldscript \\
$topdir/libc/libc.a \\
$topdir/libc/tmp/libgcc-need.a`

And here is what i've found that i need for my target and libuClibc-0.9.8, to 
regenerate the library exactly as it was originally made (to produce an 
optimized version of the library of course requires changes):
soname=libc.so.0
striparg=-s
$archdir/bin/$archprefix'ld'\
-EB \
-shared \
--warn-common   \
--warn-once \
-z combreloc\
-z relro\
-z now  \
-init __uClibc_init \
-soname $soname \
$striparg   \
-L $archdir/lib \
-o $dest.ref\
--whole-archive \
libc_so.a  \
--no-whole-archive  \
interp.os  \
ld-uClibc.so.0 \
uclibc_nonshared.a \
libgcc.a

Any further insight into these issues would be appreciated, and of course an 
entire fix would be nice... i'd like to help but can't really spare the time 
to come sufficiently up to speed with the uClibc way of doing things to 
propose such a fix.

Thanks again

-Ted Merrill
emBuild Software Design


___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc


Re: [PATCH] Fix resolve when identical IPv4 and IPv6 hosts are defined in /etc/hosts

2007-09-26 Thread Hans-Christian Egtvedt
On Tue, 2007-09-18 at 10:44 +0200, Hans-Christian Egtvedt wrote:
> This patch will fix a problem when the same host is defined with both IPv4 and
> IPv6 entries in /etc/hosts. Previous only the first of these host would work,
> as uClibc would read the /etc/hosts file from top to bottom, failing if the
> first hit did not match the IP type.
> 
> Now uClibc will continue reading, even if the first correct entry name, but 
> wrong IP
> type fails. Thus, allowing a second correct entry name with correct IP type
> will result in a name resolve.

Bump

Are there any comments to this patch?

> Signed-off-by: Hans-Christian Egtvedt <[EMAIL PROTECTED]>
> ---
>  libc/inet/resolv.c |6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
> index f4e6cac..9cdc3fe 100644
> --- a/libc/inet/resolv.c
> +++ b/libc/inet/resolv.c
> @@ -1643,7 +1643,7 @@ int attribute_hidden __read_etc_hosts_r(FILE * fp, 
> const char * name, int type,
>   *result=result_buf;
>   ret=NETDB_SUCCESS;
>  #ifdef __UCLIBC_HAS_IPV6__
> -} else if (type == AF_INET6 && inet_pton(AF_INET6, alias[0], in6) > 
> 0) {
> + } else if (type == AF_INET6 && inet_pton(AF_INET6, alias[0], 
> in6) > 0) {
>   DPRINTF("Found INET6\n");
>   addr_list6[0] = in6;
>   addr_list6[1] = 0;
> @@ -1658,8 +1658,8 @@ int attribute_hidden __read_etc_hosts_r(FILE * fp, 
> const char * name, int type,
>   } else {
>   DPRINTF("Error\n");
>   ret=TRY_AGAIN;
> - break; /* bad ip address */
> -}
> + continue; /* bad ip address, keep searching */
> + }
>  
>   if (action!=GETHOSTENT) {
>   fclose(fp);
-- 
With kind regards,
Hans-Christian Egtvedt, Applications Engineer

___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc


Re: [PATCH] _dl_find_hash: skip lookup if the DSO hasn't an hash table

2007-09-26 Thread Carmelo AMOROSO
Carmelo AMOROSO wrote:
[snip]
> How create and empty hash table [GNU/sysv], I don't know... but if this 
> could happen, then the check is correct.
>   
[snip]
I have asked the libc-alpha ML about this question,
see reply from Jakub Jelinek ( 
http://sources.redhat.com/ml/libc-alpha/2007-09/msg00073.html)

This should confirm the validity for this check, even if a DSO without 
exported symbols,
sounds pointless to me... but this prevent the linker to "segfault".

Regards,
Carmelo
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc


Re: libraryopt

2007-09-26 Thread Christian MICHON
I found back the script: it's still in the uClibc tarball.

Have a look at libstrip:

uClibc-0.9.29\extra\libstrip\

-- 
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc