LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2004, 03:51 PM   #1
relzok
LQ Newbie
 
Registered: Mar 2004
Distribution: RedHat 9
Posts: 1

Rep: Reputation: 0
Hide local functions within a library generated by 'ar'


First, I'm a newbie....so I hope this isn't too dumb of a question!
I've got about 20 C files that I've compiled in the following way:

gcc -c file1.c
gcc -c file2.c .....

One of these C files holds the 'glue' or top level function calls that the outside world (library users) need to know about. The rest are used internally and I want to hide them from the user of the library.

For example, after I build my library using 'ar' to link all the object files together, I can dump the contents of the library using 'nm'. Here it lists all the function calls within the library. I only want the top level functions to be visible.

Is this possible? I tried 'strip' but then when I try to use the library, I get a segmentation fault.

Thanks for your help!
 
  


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
qmail: how to hide Local IP address inaki Linux - Security 3 08-03-2005 09:42 AM
Extracting Functions from a Shared Library TGWDNGHN Linux - Newbie 9 06-25-2005 01:48 PM
djgpp c++ cross compiler cannot read library functions written in C back2morrie Linux - General 0 05-31-2005 02:43 AM
volume management library functions on Linux vtluu Red Hat 0 04-09-2004 02:05 AM
Redhat 9: Where find errors generated from rc.local ? speedgelb Linux - General 4 01-30-2004 07:49 PM


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