Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Austin Foxley wrote: On 04/14/2010 10:01 AM, Timo Teräs wrote: Add attribute_hidden to all symbols having libc forwarder. This prevents recursive self calls which would happen if libc is before libpthread in linking order: the forwarder functions would call itself via the function table, since

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Austin Foxley wrote: On 04/14/2010 10:01 AM, Timo Teräs wrote: Add attribute_hidden to all symbols having libc forwarder. This prevents recursive self calls which would happen if libc is before libpthread in linking order: the forwarder functions would call itself via the function

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Joakim Tjernlund wrote: Austin Foxley wrote: On 04/14/2010 10:01 AM, Timo Teräs wrote: Hum. Actually looks like this is not right either. It appears that there's several different ways how the pthreads mutexes are called from libc. Previously uclibc had these: 1. internal libc locking:

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 10:00:59: Joakim Tjernlund wrote: Austin Foxley wrote: On 04/14/2010 10:01 AM, Timo Teräs wrote: Hum. Actually looks like this is not right either. It appears that there's several different ways how the pthreads mutexes are called from

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Joakim Tjernlund wrote: Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 10:00:59: Joakim Tjernlund wrote: Austin Foxley wrote: On 04/14/2010 10:01 AM, Timo Teräs wrote: Hum. Actually looks like this is not right either. It appears that there's several different ways how the pthreads

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 10:22:54: Joakim Tjernlund wrote: Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 10:00:59: Joakim Tjernlund wrote: Austin Foxley wrote: On 04/14/2010 10:01 AM, Timo Teräs wrote: Hum. Actually looks like this is not right either.

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now. http://www.ohse.de/uwe/articles/gcc-attributes.html#func-visibility But this is PROTECTED and you might need to impl. STB_PROTECTED in ldso That should be

[PATCH 2/7] sysconf: implement _SC_NPROCESSORS_CONF, _SC_NPROCESSORS_ONLN

2010-04-16 Thread Bernhard Reutner-Fischer
perusing the config parser Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- include/sys/sysinfo.h |6 ++-- libc/unistd/sysconf.c | 85 +-- test/unistd/tst-getconf.sh |2 + 3 files changed, 78 insertions(+), 15

[PATCH 0/7][CFT] Add and use generic (config-)file parser

2010-04-16 Thread Bernhard Reutner-Fischer
Hi, This series would add a generic config-parser (initially based off the config-parser that we have in busybox). This parser is used to handle files like: /etc/hosts /etc/networks /etc/protocols /etc/services I think i've broken locking though, so it would be great if somebody who uses threads

[PATCH 7/7] resolver: switch to config parser

2010-04-16 Thread Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- libc/inet/resolv.c | 255 1 files changed, 119 insertions(+), 136 deletions(-) diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 84289a6..92eefef 100644 ---

[PATCH 5/7] getproto: switch to config parser

2010-04-16 Thread Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- libc/inet/getproto.c | 349 -- 1 files changed, 137 insertions(+), 212 deletions(-) diff --git a/libc/inet/getproto.c b/libc/inet/getproto.c index bf7c093..bcf507b 100644 ---

[PATCH 4/7] usershell: switch to config parser

2010-04-16 Thread Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- libc/unistd/usershell.c | 172 +++--- 1 files changed, 56 insertions(+), 116 deletions(-) diff --git a/libc/unistd/usershell.c b/libc/unistd/usershell.c index 10c5bf1..2a6b665 100644 ---

[PATCH 3/7] switch getservice to config parser

2010-04-16 Thread Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- libc/inet/getservice.c | 351 +++- 1 files changed, 139 insertions(+), 212 deletions(-) diff --git a/libc/inet/getservice.c b/libc/inet/getservice.c index 6d80a1b..03f5c29 100644 ---

[PATCH 1/7] add config parser

2010-04-16 Thread Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- Makefile.in|1 + include/internal/parse_config.h| 50 +++ libc/misc/internals/Makefile.in|8 +- libc/misc/internals/parse_config.c | 268 4 files

[PATCH 6/7] getnet: switch to config parser

2010-04-16 Thread Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer rep.dot@gmail.com --- include/netdb.h| 11 +-- libc/inet/Makefile.in |2 +- libc/inet/getnet.c | 217 libc/inet/getnetbyad.c | 37 libc/inet/getnetbynm.c | 45 --

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now. http://www.ohse.de/uwe/articles/gcc-attributes.html#func-visibility But this is PROTECTED and you might need to impl. STB_PROTECTED in ldso That

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Timo Teräs wrote: Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now. http://www.ohse.de/uwe/articles/gcc-attributes.html#func-visibility But this is PROTECTED and you might need to impl.

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 11:39:00: Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now. http://www.ohse.de/uwe/articles/gcc-attributes.html#func-visibility But this

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 11:45:54: Timo Teräs wrote: Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now.

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Joakim Tjernlund wrote: Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 11:39:00: Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now.

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Timo Teräs
Timo Teräs wrote: Joakim Tjernlund wrote: Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 11:39:00: Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm doing a patch on this right now.

Re: nptl: mark symbols with libc forwarder hidden

2010-04-16 Thread Joakim Tjernlund
Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 13:04:57: Timo Teräs wrote: Joakim Tjernlund wrote: Timo Teräs timo.te...@gmail.com wrote on 2010/04/16 11:39:00: Joakim Tjernlund wrote: Yes. Exactly that. It's __attribute__(( visibility(protected) )). Or .protected for asm. I'm

Re: various nptl patches

2010-04-16 Thread Austin Foxley
On 04/16/2010 07:37 AM, Timo Teräs wrote: Ok, second try on getting the libc - libpthread interactions right. This includes the Joakim's patch for protected symbols, with a little fix from me. I thought the hidden symbol thing would work, because I thought when you turned on stdio-futexes,

Re: various nptl patches

2010-04-16 Thread Timo Teräs
Austin Foxley wrote: On 04/16/2010 07:37 AM, Timo Teräs wrote: Ok, second try on getting the libc - libpthread interactions right. This includes the Joakim's patch for protected symbols, with a little fix from me. I thought the hidden symbol thing would work, because I thought when you