Bona Fide OS Developer
View unanswered posts | View active topics It is currently Thu Mar 28, 2024 9:27 am



Post new topic Reply to topic  [ 5 posts ] 
 Linker scripts 
Author Message

Joined: Tue Apr 20, 2010 9:08 am
Posts: 20
Post Linker scripts
What exactly are linker scripts?

I wasn't able to find a good explanation by searching.


Thu May 06, 2010 11:16 am
Profile
Site Admin

Joined: Sat Jul 25, 2009 7:44 am
Posts: 274
Location: United Kingdom
Post Re: Linker scripts
A linker script basically tells the linker what objects to link and how.
Allowing you to specify link addresses, executable format and which segments to put in the executable and their order.

_________________
Thank you for reading,

Kieran C G Foot


Thu May 06, 2010 2:20 pm
Profile WWW

Joined: Tue Apr 20, 2010 9:08 am
Posts: 20
Post Re: Linker scripts
Is using a linker script necessary?

How to write one? Any good tutorials?


Thu May 06, 2010 3:49 pm
Profile
Site Admin

Joined: Sat Jul 25, 2009 7:44 am
Posts: 274
Location: United Kingdom
Post Re: Linker scripts
http://sources.redhat.com/binutils/docs-2.10/ld_3.html#SEC33

That link may provide a better understanding.

To answer your first question, no they are not allways needed, but they do provide a great amount of control over your final executable.

_________________
Thank you for reading,

Kieran C G Foot


Fri May 07, 2010 6:27 am
Profile WWW

Joined: Mon Sep 20, 2010 1:07 am
Posts: 2
Post Re: Linker scripts
The main purpose of the linker script is to describe how the sections in the input files should be mapped into the output file, and to control the memory layout of the output file. Most linker scripts do nothing more than this. However, when necessary, the linker script can also direct the linker to perform many other operations, using the commands described below.

______________________________________________________

Want to get-on Google's first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups seo pecialist


Mon Sep 20, 2010 1:16 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.