How do you refer to the end address of your EXE, in MASM and GAS?
Is there a variable for the address? I cant find it in the MASM manual.
End of binary (MASM and GAS)
Re: End of binary (MASM and GAS)
Put a label at the end of the file, here's your variable.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: End of binary (MASM and GAS)
Oops, I meant NASM, not MASM.
Re: End of binary (MASM and GAS)
Should I specify a section?m12 wrote:Put a label at the end of the file, here's your variable.
Re: End of binary (MASM and GAS)
Sure, whatever section appears at the end of the binary.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: End of binary (MASM and GAS)
Or you could do it in your linker.
Re: End of binary (MASM and GAS)
Nessphoro wrote:Or you could do it in your linker.
Why would he be using a linker when nasm can do it for him?mgoppold wrote:Oops, I meant NASM
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.
Re: End of binary (MASM and GAS)
Because linker is better.
Plus he might want to split his code into multiple files later.
Plus he might want to split his code into multiple files later.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: End of binary (MASM and GAS)
Executable files don't have addresses; only processes do. Also, note that sections needn't be loaded contiguously. The best approach is to query the loader or OS for this information, if they can provide it. After all, the loader is generally a component of a trusted system, whereas 3rd party executables are not, meaning you can achieve secure modularity.mgoppold wrote:How do you refer to the end address of your EXE, in MASM and GAS?
Because sections might not be loaded in the order in which they appear in the code.m12 wrote:Why would he be using a linker when nasm can do it for him?
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]