Continue to Site

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.

How does a C library is made ?

Status
Not open for further replies.

shiva

Junior Member level 3
Junior Member level 3
Joined
Oct 18, 2005
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,537
about making library

hello
i want to know how C library is made.what are the basic properties of a library.
i want to make my own library of my c code the how to do that.

i want it,s deassembly should not be available to the user.

pls guide me this regard.

thanks
 

Re: about making library

shiva said:
hello
i want to know how C library is made.what are the basic properties of a library.
i want to make my own library of my c code the how to do that.

That's all explained in your linker guide. It's a bit different on each compiler (linker).

shiva said:
i want it,s deassembly should not be available to the user.

That's the wrong way. You can't protect your libraries. Disassembly is ever possibly.

Gomez
 

Re: about making library

shiva said:
...i want to know how C library is made...

The procedure depends on your compiler, what compiler you are using?
 

Re: about making library

Gomez said:
shiva said:
hello
i want to know how C library is made.what are the basic properties of a library.
i want to make my own library of my c code the how to do that.

That's all explained in your linker guide. It's a bit different on each compiler (linker).

shiva said:
i want it,s deassembly should not be available to the user.

That's the wrong way. You can't protect your libraries. Disassembly is ever possibly.

Gomez



hi
thanks
but if want my library to protect then how i can do that
one more thing
i m using µVision 3 IDE from keil softwares
linker also genarets .COD files how to prevent linker to do taht.
i have made my library and including in my Project workspace as .lib files.
the final code is generate by linker that shows it all.
but it not shows the function taken from the default library of keil.


i want to make my library and if given to anybody my code shoul be not know to them.
pls do reply
thanks

shiva
 

Re: about making library

Archive of the object files generated by the compiler using you code files is your library so your code will not be known,
Disassemble is always possible

Disassemble gives you code in assembly code which wont make sense to most so what are you worried of

Devendra

Added after 38 seconds:

Archive of the object files generated by the compiler using you code files is your library so your code will not be known,
Disassemble is always possible

Disassemble gives you code in assembly code which wont make sense to most so what are you worried of

Devendra
 

Re: about making library

shiva said:
hello
i want to know how C library is made.what are the basic properties of a library.
i want to make my own library of my c code the how to do that.
i want it,s deassembly should not be available to the user...

There exist nothing like C library in fact (corresponding to your idea). Your question implies that you want to store your C source code somewhere. Realize that C code = C source code! I think the term 'C library' is a bit confusing thing because there is nothing like C code in such a library. Actually, when you compile a C code module, compiler compiles it to a relocatable assembly code module first (mostly). Then this code is assembled to a machine code module and stored usually in an object file as an object module. In the end, when building the final executable (machine) code, a linker (linking program) must link particular object modules (that the project in question consists of) together and locate them into available memory space (i.e. to determine their address ranges, recalculate jump and call addresses, etc.).
Finally, back to the topic - a (code) library file is nothing else than a 'container' file for useful object modules (to be easily reused) and it is one of the input files for the linker. It has practically "nothing in common" with the original C source code (=text) in the sense that there exists nothing like decompiler. It means there is no 'machine' way to get the C source code back from the object format!
Note: object modules can be simply extracted from a library (utilities like LIB51, LIBX51, when MCS-8051 is concerned) and no force can prevent from disassembling them if someone wants to. The result of disassembling is, however, only an assembly source code, of course!
It's a different issue if you want to protect your executable codes...

Best Regards
Eric
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top