How can I make a linker.ld script insert symbols into asm?

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
j4cobgarby
Member
Member
Posts: 64
Joined: Fri Jan 26, 2018 11:43 am

How can I make a linker.ld script insert symbols into asm?

Post by j4cobgarby »

I read something on the wiki saying that it's a good idea to make my linker script "insert symbols indicating the start and end addresses of specific sections", which I'd then be able to reference from assembly code. How is this done? I did look at linker script documentation, but I found it hard to find anything.
User avatar
iansjack
Member
Member
Posts: 4704
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: How can I make a linker.ld script insert symbols into as

Post by iansjack »

The linker will define symbols, not insert them. You can then use those symbols in your program.

http://www.scoberlin.de/content/media/h ... html#SEC14
Post Reply