GNAT cross-compiler: my various questions

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
iansjack
Member
Member
Posts: 4703
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: GNAT cross-compiler: what target triplet to use?

Post by iansjack »

I think you can find a sensible maximum that is rather less than that. You’re not going to have as many memory regions with as there are bytes of memory. But what does it matter? You’re never going to actually reach that limit; in reality you are just saying “this array is of unknown size”. If you are assigning an address to the record, it’s never going to use more memory - just the bytes you have already read into RAM at that address.
Ethin
Member
Member
Posts: 625
Joined: Sun Jun 23, 2019 5:36 pm
Location: North Dakota, United States

Re: GNAT cross-compiler: what target triplet to use?

Post by Ethin »

So I've ported the Limine spec structs and stuff to Ada and I want to use it. Actually writing the kernel-to-bootloader structs is trivial, but how do I actually read back what the bootloader gives me? In other words: I parse the stivale structure and have the address of the first tag. But how do I actually parse that structure? I suppose I could just declare a tag structure, set its address to the address of the first tag, and then start reading that data, but do I need unchecked conversion to read the (entire) structure, including the tag? If so, that's going to get incredibly irritating, given that I'll need to instantiate Unchecked_Conversion for *every* Stivale2 structure combination. I feel like I'm overthinking the problem, though.
Post Reply