LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 11: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, 11:32 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
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, 10:04 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,126

Rep: Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491Reputation: 3491
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, 01:05 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,569

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04:31 PM
ELF Files tim_l Linux - Software 0 10-21-2003 10:35 AM

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

All times are GMT -5. The time now is 10:49 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration