LinuxQuestions.org
Visit Jeremy's Blog.
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 06-24-2008, 05:01 PM   #1
gopherq
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Rep: Reputation: 0
Adding object files to shared objects


Hi,

This question is related to linux programming in general.
Does any one know of a way to add .o files to shared objects (.so)?
I know I can add object files to static libraries (.a) by doing
"ar r libx.a xx.o" but is there a similar option for shared objects too?

Thanks
 
Old 06-25-2008, 04:17 AM   #2
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by gopherq View Post
Hi,

This question is related to linux programming in general.
Does any one know of a way to add .o files to shared objects (.so)?
I know I can add object files to static libraries (.a) by doing
"ar r libx.a xx.o" but is there a similar option for shared objects too?

Thanks
As long as I know, there is now way to do it.
You need get shared library .o files, add yours .o and re-build shared library.

But why you want to do such thing ? You can just create new shared library from your object(s)

Valery
 
Old 06-25-2008, 01:42 PM   #3
gopherq
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Original Poster
Rep: Reputation: 0
My project requires that I generate new functions on the fly (using a code generator script) that is specific to the particular application.
And I just did not want to keep all the object files around all the time, just so that I can add another function to my library. Not that it would be hard, but it just makes things messy.

Thanks
 
Old 06-25-2008, 02:21 PM   #4
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by gopherq View Post
My project requires that I generate new functions on the fly (using a code generator script) that is specific to the particular application.
Thanks
Do you generate code when your application running on beforehand ?
And why you can't build new shared library just from newly generated code ?

Valery
 
  


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
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
distributing shared object files to client linux emprise Programming 1 02-06-2008 08:52 AM
How to see of which objects files is particular shared library made of? halturata Programming 4 04-12-2006 02:35 AM
any links on linking, loading shared libraries, shared objects. etc? ananthbv Programming 0 02-03-2005 08:47 AM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM

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

All times are GMT -5. The time now is 08:11 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