>On 2001-04-17 07:13:09, cRG <
[email protected]> wrote:
>Hi,
>
>Ive got a question about libraries. How calling them should looks like? call address?It's not the best idea, because I want to have a kind of protection, something that would filter function callings. Like the normal user can't for example call a function that would send a RAW PACKET.
I use call gates. Check 'em up in the Intel docs. They're quite good for this purpose
>BTW: Does anyone have informations about memory organisation in popular OSes? - I mean types of memory protection, paging mecganisms.
Unfortunately, no. Their almost always segmented and paged, I believe.
I don't think any modern OS uses linear memory... or full 4GB segments... but I do
>Another question is how to use gcc to compile .bin file with "org at some address" without using a standard libc, to use mine lib?
>Anyone has information about building functions if we don't know how much arguments we have?
That's handled by the linker, compile as usual:
gcc -c file.c
then link like so:
ldd -oformat binary file.o -o file.bin
I'm not sure about the org... I always had an asm
stub, so I used nasm's -org for that. I'm sure
ldd has a -org option too.
Jeff
>