Messages in this thread | | | Date | Thu, 29 Jul 1999 10:55:00 +0100 | From | Jörg Pleumann <> | Subject | Re: Q: Thread local storage, thread IDs |
| |
Hello Chris,
cd_smith@ou.edu wrote:
> You mean you can't use libc? Are you sure that it's easier to reimplement > all the stuff from libc rather than just fix your link problem? But if > you do want to reimplement libc, then yes, the best way is probably to > grab libc and steal the code wholesale. (Assuming, of course, that the > result will be GPLed.) Reimplementing everything will almost assuredly > give you a less reliable product with more bugs.
You're right, of course, but the compiler I'm trying to port is already being used by a number of people for several years. It's *very* stable and it produces *very* reliable code. I'd say it could compete with the original Delphi compiler. This is exactly why I want to use this Pascal compiler in Linux, and not FPC. The compiler also comes with a large number of libraries, and basically all that needs to be done is change low-level OS calls like 'open file' or 'get memory'. Until now there has been no need to reimplement any stuff from libc except for the wrappers around the INT 0x80 system calls. Unfortunately, with thread and exception handling it seems to be a bit more complicated. :-)
> > I could change this, of course, but I don't want to make more changes to > > the original RTL than absolutely necessary. > > Part of porting is changing pieces of code that make non-portable > assumptions. Sorry, but it goes with the territory.
Again you're right. But I don't develop the compiler, I only change the system libraries and linker stuff for Linux (hoping that the real compiler developers will recompile the thing for Linux, once everything works). Also, the compiler itself is still under development, and I want to keep my changes to the original RTL files minimal, so they don't conflict with other changes. Also, it will be difficult to tell the compiler developers to get away from exception handling based on the FS selector - this is how it is done in OS/2 and Windows, it's *very* fast, and these are still the two major target platforms of the compiler.
BTW: In your first mail you told be to put the required stack-specific information on top of the stack. This would also be an acceptable solution for my problem, but does it really work in i386-Linux? The segment limits are all set to 0xFFFFFFFF, so is the limit of the stack segment (I tried LSL). Is there a way to access the stack-top that I don't see?
-- Bye, E-Mail ......... mailto:joerg.pleumann@trantor.de Jörg Homepage ... http://www.trantor.de/joerg.pleumann
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |