* building libc @ 2007-12-10 14:41 Per Jessen 2007-12-12 20:15 ` Per Jessen 0 siblings, 1 reply; 4+ messages in thread From: Per Jessen @ 2007-12-10 14:41 UTC (permalink / raw) To: linux-c-programming All, I'm trying to build a shared libary with a modified getaddrinfo() from glibc. getaddrinfo() sorts the results from DNS according to RFC3484, but this screws up round-robin load-balancing. Ian Jackson put a fix into ubuntus glibc 2.6.1, and this is what I'm trying to use. So, I've got glibc-2.6.1 from ubuntu all built, and I'm now trying to build my own mygetaddrinfo.so containing just the patched getaddrinfo(). Has anyone attempted something similar, and if so, do you have any hints for me? I can build mygetaddrinfo.so, but when I try to use it (with LD_PRELOAD), it keeps reporting unresolved symbols such as __inet_aton. cheers Per Jessen, Zurich ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building libc 2007-12-10 14:41 building libc Per Jessen @ 2007-12-12 20:15 ` Per Jessen [not found] ` <84bd26ef0712121743p77080df0t48a2e68443611337@mail.gmail.com> 0 siblings, 1 reply; 4+ messages in thread From: Per Jessen @ 2007-12-12 20:15 UTC (permalink / raw) To: linux-c-programming Per Jessen wrote: > All, > > I'm trying to build a shared libary with a modified getaddrinfo() from > glibc. getaddrinfo() sorts the results from DNS according to RFC3484, > but this screws up round-robin load-balancing. > > Ian Jackson put a fix into ubuntus glibc 2.6.1, and this is what I'm > trying to use. > > So, I've got glibc-2.6.1 from ubuntu all built, and I'm now trying to > build my own mygetaddrinfo.so containing just the patched getaddrinfo(). > Has anyone attempted something similar, and if so, do you have any hints > for me? Alright, I realize this was perhaps a little unclear. What I'm trying to achieve is actually quite simple: - to replace the normal getaddrinfo() routine from the default glibc libary with my own version. My "own" version just happens to be 2000 lines of getaddrinfo from the ubuntu glibc which was patched to fix the RFC3484 problem. I'm just not very keen on working my way through the 2000 lines and fixing things such that it will compile outside of the complete glibc tree. Per Jessen, Zurich ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <84bd26ef0712121743p77080df0t48a2e68443611337@mail.gmail.com>]
* Re: building libc [not found] ` <84bd26ef0712121743p77080df0t48a2e68443611337@mail.gmail.com> @ 2007-12-13 1:44 ` Darío Mariani 2007-12-13 7:31 ` Per Jessen 1 sibling, 0 replies; 4+ messages in thread From: Darío Mariani @ 2007-12-13 1:44 UTC (permalink / raw) To: Per Jessen; +Cc: linux-c-programming On Dec 12, 2007 10:43 PM, Darío Mariani <mariani.dario@gmail.com> wrote: > > On Dec 12, 2007 5:15 PM, Per Jessen <per@computer.org> wrote: > > > > Per Jessen wrote: > > > All, > > > > > > I'm trying to build a shared libary with a modified getaddrinfo() from > > > glibc. getaddrinfo() sorts the results from DNS according to RFC3484, > > > but this screws up round-robin load-balancing. > > > > > > Ian Jackson put a fix into ubuntus glibc 2.6.1, and this is what I'm > > > trying to use. > > > > > > So, I've got glibc-2.6.1 from ubuntu all built, and I'm now trying to > > > build my own mygetaddrinfo.so containing just the patched getaddrinfo(). > > > Has anyone attempted something similar, and if so, do you have any hints > > > for me? > > > > Alright, I realize this was perhaps a little unclear. What I'm trying > > to achieve is actually quite simple: > > > > - to replace the normal getaddrinfo() routine from the default glibc > > libary with my own version. > > > > My "own" version just happens to be 2000 lines of getaddrinfo from the > > ubuntu glibc which was patched to fix the RFC3484 problem. I'm just not > > very keen on working my way through the 2000 lines and fixing things > > such that it will compile outside of the complete glibc tree. > > > > > > Per Jessen, Zurich > > > > > > There is a method to replace glibc functions, don't remember how exactly but take a look at Transconnect (http://transconnect.sourceforge.net/ ) and this link: http://www.itworld.com/AppDev/1006/UIR000929interposers/pfindex.html. > > There is a method to replace glibc functions, don't remember how exactly but take a look at Transconnect (http://transconnect.sourceforge.net/ ) and this link: http://www.itworld.com/AppDev/1006/UIR000929interposers/pfindex.html. - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: building libc [not found] ` <84bd26ef0712121743p77080df0t48a2e68443611337@mail.gmail.com> 2007-12-13 1:44 ` Darío Mariani @ 2007-12-13 7:31 ` Per Jessen 1 sibling, 0 replies; 4+ messages in thread From: Per Jessen @ 2007-12-13 7:31 UTC (permalink / raw) To: Darío Mariani; +Cc: linux-c-programming Darío Mariani wrote: > http://www.itworld.com/AppDev/1006/UIR000929interposers/pfindex.html. > Yeah, this is exactly what I intend to try. My problem is in getaddrinfo() which has been misbehaving (for quite some time). The glibc code was fixed by Ian Jackson in glibc 2.6.1 for ubuntu, so I figured I'd just borrow that and stick the getaddrinfo() object-code into a shared library which I'd preload with LD_PRELOAD. Sounds simple, doesn't it? Well, building the glibc code was no big deal, but as for "just borrow that", it's not easy. If I build getaddrinfo.c outside the glibc build structure, it throws about a million errors. Option #1 is to attempt to fix that, but with getaddrinfo.c being about 2000 lines, I'm a little hesitant about that approach. Option #2 (I think) is to use the object-code from the built glibc, but when I try to use the shared library (containing just getaddrinfo.o), it complains about unresolved symbols - e.g. __inet_ntoa. /Per Jessen - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-12-13 7:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-10 14:41 building libc Per Jessen
2007-12-12 20:15 ` Per Jessen
[not found] ` <84bd26ef0712121743p77080df0t48a2e68443611337@mail.gmail.com>
2007-12-13 1:44 ` Darío Mariani
2007-12-13 7:31 ` Per Jessen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).