From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: is there a version of unix written in Ada Date: Thu, 1 Oct 2020 16:54:09 -0500 Organization: JSA Research & Innovation Message-ID: References: <00cd3aaa-d518-43a2-b321-58d6fae70aebo@googlegroups.com><57eb7a65-51ea-4624-b9dc-9c4dda0fee59n@googlegroups.com> <5f70fd3b$0$13541$426a74cc@news.free.fr> <87wo0d3iac.fsf@nightsong.com> <87sgb02l7b.fsf@nightsong.com> <875z7vyy1u.fsf@nightsong.com> <87wo0bkns3.fsf@nightsong.com> <87sgayl6o0.fsf@nightsong.com> <87o8lml1md.fsf@nightsong.com> Injection-Date: Thu, 1 Oct 2020 21:54:10 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="9362"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:60372 List-Id: "Paul Rubin" wrote in message news:87o8lml1md.fsf@nightsong.com... ... >> Are you going to recompile and re-link everything in >> absolute addresses every time anything changes and then reboot? > > Position independent code is a thing. Sure, but it's impractical on the Intel architectures as the machines are too register-poor to use them unnecessarily. Besides, it doesn't seem necessary; the loader can translate addresses when an executable is installed. (That's commonly done in .EXE files.) Most data is indirectly accessed anyway (stack or heap based), so the actual address it lives at isn't relevant (and the rest can be translated when loading). Dmitry said: > You either have abstraction, like flat contiguous address space, however > implemented, or you do not. Flat address spaces are greatly overrated. It's much better to organize programs as a series of separate segments anyway. No one should be reading code or executing data anyway, so why should they share an address space?? The problem with 1980's segments was that they were too small, requiring lots of juggling of segments, but that's not a problem on more modern architectures. To me, a "flat address space" is precisely destroying abstraction. Code /= Data and they should not be treated the same. (Many of the problems with malware occur precisely because it is easy to execute data.). Randy.