How to create a symbol to mark, end of program - using ld

Programming, for all ages and all languages.
Post Reply
User avatar
osdevkid
Member
Member
Posts: 72
Joined: Sun Nov 21, 2010 11:15 am
Location: India, Chennai

How to create a symbol to mark, end of program - using ld

Post by osdevkid »

Dear All,

How to create a symbol to mark the end of our executable program - using "ld" linker?

It is not clear ?,

OK, I have compiled and linked my program and its size is "100" bytes. I have loaded my program at address "0".

Now, I want to create a symbol with a name "end", it should point the end point of my executable code "end = 100"

I can hard code it inside my program, but I want to generate this value at linking time. How to do it?
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: How to create a symbol to mark, end of program - using l

Post by Tosi »

end = .
Post Reply