Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,062 of 4,255    |
|    Alexei A. Frounze to James Harris    |
|    Re: Format for the OS image    |
|    07 Feb 22 17:50:03    |
      From: alexfrunews@gmail.com              On Monday, February 7, 2022 at 5:05:44 AM UTC-8, James Harris wrote:       > On 09/01/2022 11:41, Rod Pemberton wrote:       ...       > > From this, my guess is that it seems like your compiler is producing       > > position-dependent code, but you're wanting position-independent code?       > > ... If so, that's a problem.       > Yes. As I saw it, my choices were:       >       > 1. Change my compiler to produce position-independent code.       > 2. Work out a way to relocate a PE file 'in place'.       > 3. Work out a way to do the same with an Elf file.       >       > After spending quite a while looking at option 2 I became less and less       > certain it would do what I wanted. For example, PE expects sections to       > be loaded with different separation than they have in the file and I       > needed a loaded image to run 'in place', i.e. without altering such       > separations.              Um, you essentially wanted a PE file to look like a flat one with just       PE headers prepended? It's kinda defeating the purpose of the format.       However, it's not impossible. It's just a matter of padding your sections       to whole 4KB pages. And for that you may need to adjust the linker       script.       But the format is simple enough to just properly support its basic       code and data sections, even relocations.              Alex              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca