Is there any way to import external labels without directly including their corresponding files?
I have written a program that loads a file into the memory, and then jump to a certain address, which needs an external label to locate it.
Something about NASM.
-
- Member
- Posts: 34
- Joined: Sat May 04, 2024 7:48 am
- Libera.chat IRC: wishedtobe
-
- Member
- Posts: 813
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: Something about NASM.
Are you using a linker like LD to link? Or are you using NASM to generate a binary file with no link step?
-
- Member
- Posts: 34
- Joined: Sat May 04, 2024 7:48 am
- Libera.chat IRC: wishedtobe
Re: Something about NASM.
No.MichaelPetch wrote: ↑Wed Jan 29, 2025 10:13 am Are you using a linker like LD to link? Or are you using NASM to generate a binary file with no link step?
Re: Something about NASM.
The bin format doesn't support external symbols.
But, presumably, you are defining the second file to load at a particular location. Why can't you just use EQU to define that location? More details about exactly what you are trying to achieve would help.
But, presumably, you are defining the second file to load at a particular location. Why can't you just use EQU to define that location? More details about exactly what you are trying to achieve would help.
-
- Member
- Posts: 34
- Joined: Sat May 04, 2024 7:48 am
- Libera.chat IRC: wishedtobe
Re: Something about NASM.
If I don't have a simpler way, I can only adopt the one you mentioned.