Entry Point with LD linker.

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.
Post Reply
Krys

Entry Point with LD linker.

Post by Krys »

Hello,
I'm french so my english is not very good. Well, i would like to know the method to define the entry point with the LD linker.
Do you have some examples about it ?
I saw there was an option in the LD option. This option is "-e".
Someone did use it in the past ?
I try but i not yet find the solution :'(.
Can you help me concerning this point ?
Thank you.

Krys
IRBMe

Re:Entry Point with LD linker.

Post by IRBMe »

At the top (before SECTIONS), add something like:

ENTRY (MyEntryPoint)

Make sure the MyEntryPoint symbol is an exported symbol. If writing the entry point in assembly and assembling with nasm, that would mean adding [global MyEntryPoint] to the assembly code.
Post Reply