LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2009, 10:20 AM   #1
krisonearth
LQ Newbie
 
Registered: Aug 2009
Posts: 16

Rep: Reputation: 0
in linux where are the files required by an elf kept?


suppose for a game like chess, the code containing the logic of chess must be one separate program(elf) and the images of chessboard and the pieces must have been kept in separate directory which are used by elf at runtime.

with respect to linux am i correct?

if yes then tell me what other types of files are not supposed to be kept in elf(i.e keep them in other dir and use them at runtime) and where do they keep it in hard disk(i.e how do i locate them manually)?

if not completely then tell me how do programmers, who write very large linux applications, create the executables and the files required by it ?

do they keep all the files required by it in elf itself, that would be a waste of memory! wont it?
 
Old 08-26-2009, 10:32 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Most applications use dynamic libraries that are loaded at runtime and make the executable lighter. You can determine which shared objects are required by an ELF using the command ldd. In order to discover which other files are provided and required by an application, you can get an idea looking at the files installed by the relevant binary package (and eventually its dependencies). On a RPM-based system this can be accomplished by the rpm -ql command. If you don't know the name of the package that provides a particular executable you can always try:
Code:
rpm -qf `which name-of-executable`
or eventually
Code:
yum whatprovides */name-of-executable
 
Old 08-28-2009, 09:04 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
The command : rpm -ql chess
displays the files for the installed package.

And : lesspipe.sh chess-1.0-24.fc11.i586.rpm
will show the files in a non installed package.

Some small games can have all graphics, etc.
included in the executable.

If you want to know how : google .. how to build a game ..
or something like that.
http://www.google.com/linux?hl=en&q=...me&btnG=Search
http://www.google.com/linux
.....
 
Old 08-31-2009, 12:05 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
You might find this useful http://en.wikipedia.org/wiki/Filesys...archy_Standard
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Linux ELF Format and win32 ELF Format cmemo Linux - Software 1 05-11-2007 03:31 PM
ELF Files tim_l Linux - Software 0 10-21-2003 09:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration