Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ARM library and function names are visible!

Status
Not open for further replies.

ebuddy

Full Member level 3
Joined
May 15, 2007
Messages
179
Helped
35
Reputation
70
Reaction score
34
Trophy points
1,308
Activity points
2,389
Hi,

I coded an algorithm function (in C code) in RVDS 4.0 environment for a customer. The targeted device is ARM926EJ-S. I compiled it into a library and give the ".a" file and ".h" files to the customer. My customer can call the function in their main program.

The thing is my customer can see what is in my ".a" file. I mean they can see all the function names in my algorithm! Every function I used in the algorithm is listed under ".axf" file. I just don't like it. The library I delivered to the customer should be binary code and not readable.

Any one has experience on this?

Thanks.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
The purpose of the header file is to declare all the functions names of the library so they can be used in the code so how do you expect the names to be hidden?

Alex
 

ebuddy

Full Member level 3
Joined
May 15, 2007
Messages
179
Helped
35
Reputation
70
Reaction score
34
Trophy points
1,308
Activity points
2,389
Thanks Alex. Your posted helped me to realize the problem I have, but I have not got the answer by myself. Hope you can help. Let me first clarify my problem:

I have my code structured in such a way:

in library source abc.c file:
---------------------------------
void s1 (...) { ... }
void s2 (...) { ... }
void s3 (...) { ... }
void abc (... ) {
s1 (...);
s2 (...);
s3 (...);
}
---------------------------------

in header abc.h file
---------------------------------
void abc (... ) ;
---------------------------------

I compiled abc.c to abc.a file, and give it, together with abc.h, to the customer.

The customer can see that I have function abc,s1,s2,s3 in my library, which is not good. All I want customer to see is function abc. I don't want them to know that I implemented my abc function using s1,s2,s3. S1,s2,s3 are only used in abc function. I need to make them "private" to abc function.

Any suggestion how I can do it? Thanks.
 

ebuddy

Full Member level 3
Joined
May 15, 2007
Messages
179
Helped
35
Reputation
70
Reaction score
34
Trophy points
1,308
Activity points
2,389
Thanks Alex. You got the solution for me.

What should I do if I want to keep the variables defined in abc.c local to abc.c file? Can I do it the same way as I do to functions? for example,

in library source abc.c file:
---------------------------------
static unsigned char k1[] = {0,1,2};

static void s1 (...) { ... }
static void s2 (...) { ... }
static void s3 (...) { ... }

void abc (... ) {
s1 (...);
s2 (...);
s3 (...);
}
------------------------------------

Is this is the correct way to keep k1 visible only to abc.c file? Thanks.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,032
Trophy points
1,393
Location
Greece
Activity points
64,375
  • Like
Reactions: ebuddy

    ebuddy

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top