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,064 of 4,255    |
|    James Harris to Alexei A. Frounze    |
|    Re: Format for the OS image    |
|    10 Feb 22 13:17:57    |
      From: james.harris.1@gmail.com              On 08/02/2022 02:10, Alexei A. Frounze wrote:       > On Monday, February 7, 2022 at 5:44:40 AM UTC-8, James Harris wrote:              ...              >> As I looked in to it I was becoming increasingly uncertain that PE could       >> be made to do what I wanted. For example, for my environment the linker       >> expects sections to be loaded into memory at 4k alignment but they have       >> smaller alignment in the file.       >       > There are two alignment fields in the PE header: section alignment       > and file alignment. If you set both to 4KB (there should be an option       > or a way to do it via the linker script), you'll probably just get       > what you need.              Good point. It turns out that ld even includes switches for       --file-alignment and --section-alignment.              >       >> I needed the executable to run from       >> wherever the file happened to be loaded. It /may/ have been relocatable       >> as it stood but I couldn't be sure and thought maybe I was trying to get       >> the format to do something it was not designed for.       >       > My guess is you wanted it look like a flat binary, which is missing the point       > of the format and the format isn't terribly complex for what you really       > need at this point.              It may have been possible to get PE to do what I wanted but there were       certainly incompatibilities between my mental model and what PE was       designed for.              By contrast there were some things about it that were better than what I       had in mind. For example, its dividing patch lists up into the pages for       which they list the fixups. (Though I am not sure what is supposed to       happen when the bytes to be fixed up cross a page boundary.)                            --       James Harris              --- 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