Difference between revisions of "Netware"

From Lazarus wiki
 
(3 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
== Target Netware ==
 
== Target Netware ==
 +
 +
As of fpc 2.5.1 (Mar 27, 2011), the internal linker will be used to generate netware loadable modules. Currently only the clib target is implemented. This means binutils for netware are no longer required. Due to the fact that fpc currently only supports reading coff objects in the internal linker, the object format for netware has been changed to coff. Because nlmconv for binutils only supports coff, linking with binutils does no longer work. I plan to switch back to elf as soon as internal support for elf is available in fpc.
  
 
This target is based on the classic netware c-library (clib.nlm). The nlm should work on netware versions from 4.00 on. It will not work on 3.x (mainly because the rtl auto loads nlms from the modular clib, i.e. threads.nlm). You are free to change that in the runtime library.
 
This target is based on the classic netware c-library (clib.nlm). The nlm should work on netware versions from 4.00 on. It will not work on 3.x (mainly because the rtl auto loads nlms from the modular clib, i.e. threads.nlm). You are free to change that in the runtime library.
Line 37: Line 39:
 
{$Description TEXT}
 
{$Description TEXT}
 
Sets the NLM Description displayed while loading the NLM
 
Sets the NLM Description displayed while loading the NLM
 +
 +
{$Copyright TEXT}
 +
Sets the NLM copyright displayed while loading the NLM
  
 
{$Version x,y,z}
 
{$Version x,y,z}
Line 76: Line 81:
 
  end.
 
  end.
  
 +
 +
== Importing functions ==
 +
 +
Importing functions are be supported with or without auto loading required nlms:
 +
 +
FUNCTION rmdir (path : PCHAR) : LONGINT; CDECL; EXTERNAL 'nlmlib.nlm' NAME 'rmdir';
 +
 +
This will import "rmdir" from nlmlib.nlm and adds nlmlib.nlm to the list of autoloaded nlm's. If the name of the external library will begin with !, the autoload will not be added to the generated nlm as in the following example:
 +
 +
FUNCTION rmdir (path : PCHAR) : LONGINT; CDECL; EXTERNAL '!nlmlib.nlm' NAME 'rmdir';
 +
 +
The internal linker do not need .imp files. (Except for nwpre.pp that will be automatically included)
 +
 +
== Exporting functions ==
 +
 +
Exports are handled like in win32:
 +
<nowiki>procedure bla; CDECL; EXPORT;
 +
begin
 +
end;
 +
 
 +
exports bla name 'bla';</nowiki>
  
 
== Linker Specials ==
 
== Linker Specials ==
  
The netware linker (nlmconv from binutils) requires import file (.imp) with imported symbols. The runtime library contains most of the needed import files. These files are installed in the rtl unit dir and searched via the library search path.
+
The internal linker supports options via the -k command line options. Multiple options can be separated by ; or can be saved to a separate file.
 +
 
 +
fpc -Tnetware -k"CUSTOM custfile.dat;OS_DOMAIN;REENTRANT"
 +
fpc -Tnetware -k"@linkeroptionsfile.txt"
 +
 
 +
The second sample reads options from an external file. The following options are supported:
 +
 
 +
'''AUTOUNLOAD'''
 +
The nlm will be unloaded if none of the exported symbols are in use.
 +
 
 +
'''COPYRIGHT'''
 +
Specifies the copyright string that will be shown when the nlm is loaded. The text must be enclosed in double quotation marks ("). This is the same that can be specified with {$Copyright TEXT}. The linker option will override the text specified by $Copyright.
 +
The option is only useful within a linker options file, example:
 +
COPYRIGHT "(c) 2011 the free pascal team"
 +
 
 +
'''CUSTOM'''
 +
Specifies a custom data file that will be included in the nlm image.
 +
 
 +
'''DATE'''
 +
Secifies the nlm date that will be displayed while the nlm is loaded. The default is the system date. Month, day and year have to be separated by at least one space.
 +
example:
 +
DATE 27 3 2011
 +
 
 +
'''DEBUG'''
 +
Will be ignored
 +
 
 +
'''DESCRIPTION'''
 +
Specifies the copyright string (up to 127 chars) that will be shown when the nlm is loaded. The text must be enclosed in double quotation marks ("). This is the same that can be specified with {$Description TEXT}. The linker option will override the text specified by $Description.
 +
The option is only useful within a linker options file, example:
 +
DESCRIPTION "test nlm for free pascal"
 +
 
 +
'''FLAG'''
 +
Sets or clears the flag in the nlm header. ON or OFF and the decimal value has to be specified.
 +
examples
 +
FLAG ON 1
 +
FLAG OFF 2
 +
 
 +
'''HELP'''
 +
Specifies the path to the help file that contains the default help screens for the NLM. The helpfile will be included in the nlm file.
 +
 
 +
'''MESSAGES'''
 +
Specifies the path to the message file that contains the default messages for the NLM. The file will be included in the nlm file.
 +
 
 +
'''MULTIPLE'''
 +
Sets a flag in the NLM header indicating that this NLM can be loaded more than once times.
 +
 
 +
'''OS_DOMAIN'''
 +
Sets a flag in the NLM header indicating that this NLM must be loaded in the memory space of the operating system. This prevent the NLM from being loaded into a protected address space.
 +
 
 +
'''PSEUDOPREEMPTION'''
 +
Sets a flag in the NLM header indicating that the NetWare operating system can force the NLM to relinquish control if it does not do so on its own often enough.
 +
 
 +
'''REENTRANT'''
 +
Sets a flag in the NLM header indicating that this NLM is reentrant. If an NLM is reentrant, when it is loaded by the LOAD command more than once, the NLM is not loaded again, but the NLM can now be executed concurrently by multiple threads. In this case, only one copy of the NLM is in memory.
 +
 
 +
'''SCREENNAME'''
 +
Specifies the name of the first screen (max 71 chars) of an NLM, which is created when the NLM is loaded and to which stdin, stdout, and stderr are wired. This is the same that can be specified with {$Screenname TEXT}. The linker option will override the name specified by $Screenname.
 +
 
 +
'''STACK''' or '''STACKSIZE'''
 +
Specifies the stacksize in bytes.
 +
 
 +
'''SYNCHRONIZE'''
 +
Sets a flag in the NLM header indicating that when this NLM is loaded, the load process goes to sleep until the NLM calls SynchronizeStart. This prevents other console commands (particularly LOAD) from being processed while the NLM is loading.
 +
 
 +
'''THREADNAME'''
 +
Specifies a prefix for NetWare to use to name the threads of the NLM. For example, if the prefix was FPC, then threads created in the NLM would be named “FPC1,” “FPC2,” and so on. Thread names can be displayed in the internal debugger with the .P command. The prefix should be 12 chars or less.
 +
 
 +
'''TYPE'''
 +
Specifies the numerical type of the nlm. The types are defined as follows:
 +
0 Generic module (default and the most common one)
 +
1 LAN driver
 +
2 Disk driver
 +
3 Name space module
 +
4 NLM utility application
 +
5 Mirror server link module
 +
6 OS module
 +
7 Paged high OS module
 +
8 Host adapter module
 +
9 Custom device module
 +
10 File system module
 +
11 Real mode module
 +
12 Ghost module
 +
13 Normal SMP module
 +
14 NIOS module
 +
15 CIOS CAD module
 +
16 CIOS CLS module
 +
20..32 NICI modules
 +
 
 +
'''VERSION'''
 +
Specifies the version displayed while loading the nlm. This overrides the version specified by {$version}. The version consist of 3 numerical valued separated by at least one space. (major minor and revision) Major can be any positive number (31 bits), Minmor has to be in the range of 0 to 99 and revision in the range from 0 to 26.
 +
example
 +
version 12 2 1
 +
 
 +
'''XDCDATA'''
 +
Specifies a path to a file containing Remote Procedure Call (RPC) descriptions for functions in the NLM. XDC data can be used to create an MT-safe NLM, funnel functions to processor 0, declare an NLM as MT unsafe, and mark an NLM as preemptible. The data will be generated by novells mpkxdc tool.
 +
 
  
 +
--[[User:Armin|Armin]] 18:30, 27 Mar 2011 (CET)
  
--[[User:Armin|Armin]] 00:15, 13 Jan 2005 (CET)
+
[[Category: Operating Systems and Platforms]]
<div style="overflow:auto; height: 1px; ">
 
'''- [http://mature-videos.servik.com mature videos]'''
 
'''- [http://mature-nipples.servik.com mature nipples]'''
 
'''- [http://mature-pussies.servik.com mature pussies]'''
 
'''- [http://adult-galleries-mature-women.servik.com adult galleries mature women]'''
 
'''- [http://mature-teachers-nude.servik.com mature teachers nude]'''
 
'''- [http://mature-cumshots.servik.com mature cumshots]'''
 
'''- [http://mature-sex-videos.servik.com mature sex videos]'''
 
'''- [http://mature-sex-pics.servik.com mature sex pics]'''
 
'''- [http://mature-sexy-women.servik.com mature sexy women]'''
 
'''- [http://mature-hairy-pussy.servik.com mature hairy pussy]'''
 
'''- [http://vintage-mature-sex.servik.com vintage mature sex]'''
 
'''- [http://mature-video.servik.com mature video]'''
 
'''- [http://mature-porn-women.servik.com mature porn women]'''
 
'''- [http://mature-cunts.servik.com mature cunts]'''
 
'''- [http://mature-adult.servik.com mature adult]'''
 
'''- [http://facial-cum-mature-women.servik.com facial cum mature women]'''
 
'''- [http://mature-anal-sex.servik.com mature anal sex]'''
 
'''- [http://mature-porno.servik.com mature porno]'''
 
'''- [http://mature-latina-girls.servik.com mature latina girls]'''
 
'''- [http://mature-cum-shots.servik.com mature cum shots]'''
 
'''- [http://naked-mature-daddies.servik.com naked mature daddies]'''
 
'''- [http://sexool-mature.servik.com sexool mature]'''
 
'''- [http://mature-lesbian-porn.servik.com mature lesbian porn]'''
 
'''- [http://mature-mom-sex.servik.com mature mom sex]'''
 
'''- [http://mature-thumbnails.servik.com mature thumbnails]'''
 
'''- [http://sexy-mature-woman.servik.com sexy mature woman]'''
 
'''- [http://mature-escort.servik.com mature escort]'''
 
'''- [http://mature-games.servik.com mature games]'''
 
'''- [http://older-mature-tits.servik.com older mature tits]'''
 
'''- [http://busty-blonde-mature.servik.com busty blonde mature]'''
 
'''- [http://mature-sex-stories.servik.com mature sex stories]'''
 
'''- [http://mature-group-sex.servik.com mature group sex]'''
 
'''- [http://moms-mature-naked.servik.com moms mature naked]'''
 
'''- [http://naked-mature-men.servik.com naked mature men]'''
 
'''- [http://naked-mature-moms.servik.com naked mature moms]'''
 
'''- [http://mature-porn-stars.servik.com mature porn stars]'''
 
'''- [http://mature-naughty-moms.servik.com mature naughty moms]'''
 
'''- [http://mature-moms-nude.servik.com mature moms nude]'''
 
'''- [http://mature-cum-woman.servik.com mature cum woman]'''
 
'''- [http://mature-women-anal.servik.com mature women anal]'''
 
'''- [http://mature-orgies.servik.com mature orgies]'''
 
'''- [http://mature-amateurs-over.servik.com mature amateurs over]'''
 
'''- [http://mature-woman-sex.servik.com mature woman sex]'''
 
'''- [http://plump-mature-women.servik.com plump mature women]'''
 
'''- [http://mature-nude-woman.servik.com mature nude woman]'''
 
'''- [http://mature-sex-movies.servik.com mature sex movies]'''
 
'''- [http://mature-pussy.servik.com mature pussy]'''
 
'''- [http://mature-sluts.servik.com mature sluts]'''
 
'''- [http://mature-tits.servik.com mature tits]'''
 
'''- [http://nude-matur-women.servik.com nude mature women]'''
 
'''- [http://mature-fuck.servik.com mature fuck]'''
 
'''- [http://free-mature-porn.servik.com free mature porn]'''
 
'''- [http://mature-woman.servik.com mature woman]'''
 
'''- [http://mature-boobs.servik.com mature boobs]'''
 
'''- [http://mature-thumbs.servik.com mature thumbs]'''
 
'''- [http://naked-and-mature-women.servik.com naked and mature women]'''
 
'''- [http://mature-nudes.servik.com mature nudes]'''
 
'''- [http://busty-and-mature.servik.com busty and mature]'''
 
'''- [http://mature-nude.servik.com mature nude]'''
 
'''- [http://mature-lesbian-sex.servik.com mature lesbian sex]'''
 
'''- [http://mature-women-sex.servik.com mature women sex]'''
 
'''- [http://mature-big-tits.servik.com mature big tits]'''
 
'''- [http://free-mature-sex.servik.com free mature sex]'''
 
'''- [http://hardcore-mature.servik.com hardcore mature]'''
 
'''- [http://mature-amateur.servik.com mature amateur]'''
 
'''- [http://mature-sex-with-women.servik.com mature sex with women]'''
 
'''- [http://mature-blowjobs.servik.com mature blowjobs]'''
 
'''- [http://mature-slut.servik.com mature slut]'''
 
'''- [http://mature-escorts.servik.com mature escorts]'''
 
'''- [http://mature-cunt.servik.com mature cunt]'''
 
'''- [http://mature-hardcore.servik.com mature hardcore]'''
 
'''- [http://nude-mature.servik.com nude mature]'''
 
'''- [http://hardcore-fucking.servik.com hardcore fucking]'''
 
'''- [http://hardcore-hentai.servik.com hardcore hentai]'''
 
'''- [http://free-hardcore.servik.com free hardcore]'''
 
'''- [http://hardcore-anal.servik.com hardcore anal]'''
 
'''- [http://free-hardcore-sex.servik.com free hardcore sex]'''
 
'''- [http://hardcore-fuck.servik.com hardcore fuck]'''
 
'''- [http://gay-hardcore.servik.com gay hardcore]'''
 
'''- [http://hardcore-anal-sex.servik.com hardcore anal sex]'''
 
'''- [http://hardcore-pussy.servik.com hardcore pussy]'''
 
'''- [http://anime-hardcore.servik.com anime hardcore]'''
 
'''- [http://hardcore-sex-galleries.servik.com hardcore sex galleries]'''
 
'''- [http://hardcore-sluts.servik.com hardcore sluts]'''
 
'''- [http://hardcore-anime.servik.com hardcore anime]'''
 
'''- [http://hardcore-teen-sex.servik.com hardcore teen sex]'''
 
'''- [http://lesbian-hardcore.servik.com lesbian hardcore]'''
 
'''- [http://hardcore-teen.servik.com hardcore teen]'''
 
'''- [http://free-hardcore-movies.servik.com free hardcore movies]'''
 
'''- [http://hardcore-toons.servik.com hardcore toons]'''
 
'''- [http://hentai-hardcore.servik.com hentai hardcore]'''
 
'''- [http://hardcore-digimon.servik.com hardcore digimon]'''
 
'''- [http://hardcore-cartoons.servik.com hardcore cartoons]'''
 
'''- [http://hardcore-porno.servik.com hardcore porno]'''
 
'''- [http://hardcore-sex-videos.servik.com hardcore sex videos]'''
 
'''- [http://latina-hardcore-sex.servik.com latina hardcore sex]'''
 
'''- [http://free-hardcore-sex-videos.servik.com free hardcore sex videos]'''
 
'''- [http://anal-hardcore.servik.com anal hardcore]'''
 
'''- [http://indian-hardcore.servik.com indian hardcore]'''
 
'''- [http://black-hardcore.servik.com black hardcore]'''
 
'''- [http://hardcore-anal-fucking.servik.com hardcore anal fucking]'''
 
'''- [http://hardcore-milf.servik.com hardcore milf]'''
 
'''- [http://free-hardcore-pics.servik.com free hardcore pics]'''
 
'''- [http://pussy-shaving-video-shaved-pussy.servik.com pussy shaving video shaved pussy]'''
 
'''- [http://video-surveillance.servik.com video surveillance]'''
 
'''- [http://adult-video-games.servik.com adult video games]'''
 
'''- [http://car-crash-videos.servik.com car crash videos]'''
 
'''- [http://video-editing.servik.com video editing]'''
 
'''- [http://fucking-videos.servik.com fucking videos]'''
 
'''- [http://video-cards.servik.com video cards]'''
 
'''- [http://blowjob-video.servik.com blowjob video]'''
 
'''- [http://shemale-videos.servik.com shemale videos]'''
 
'''- [http://nude-video.servik.com nude video]'''
 
'''- [http://car-video.servik.com car video]'''
 
'''- [http://free-gay-porn-videos.servik.com free gay porn videos]'''
 
'''- [http://hentai-video.servik.com hentai video]'''
 
'''- [http://video-game-vixens.servik.com video game vixens]'''
 
'''- [http://sexy-video.servik.com sexy video]'''
 
'''- [http://video-sex.servik.com video sex]'''
 
'''- [http://video-cameras.servik.com video cameras]'''
 
'''- [http://digital-video.servik.com digital video]'''
 
'''- [http://amateur-sex-videos.servik.com amateur sex videos]'''
 
'''- [http://video-production-services.servik.com video production services]'''
 
'''- [http://gay-sex-videos.servik.com gay sex videos]'''
 
'''- [http://home-sex-videos.servik.com home sex videos]'''
 
'''- [http://free-lesbian-video.servik.com free lesbian video]'''
 
'''- [http://video-duplication.servik.com video duplication]'''
 
'''- [http://adult-video-clips.servik.com adult video clips]'''
 
'''- [http://gay-video.servik.com gay video]'''
 
'''- [http://skateboarding-videos.servik.com skateboarding videos]'''
 
'''- [http://video-capture.servik.com video capture]'''
 
'''- [http://video-game-sex.servik.com video game sex]'''
 
'''- [http://bondage-videos.servik.com bondage videos]'''
 
'''- [http://animal-sex-videos.servik.com animal sex videos]'''
 
'''- [http://free-teen-porn-videos.servik.com free teen porn videos]'''
 
'''- [http://lez-love-video.servik.com lez love video]'''
 
'''- [http://anal-sex-videos.servik.com anal sex videos]'''
 
'''- [http://teen-sex-video.servik.com teen sex video]'''
 
'''- [http://jordan-sex-video.servik.com jordan sex video]'''
 
'''- [http://amateur-porn-video.servik.com amateur porn video]'''
 
'''- [http://sex-videos-free.servik.com sex videos free]'''
 
'''- [http://free-amateur-sex-videos.servik.com free amateur sex videos]'''
 
'''- [http://lesbian-porn-videos.servik.com lesbian porn videos]'''
 
'''- [http://eve-sex-video.servik.com eve sex video]'''
 
'''- [http://lesbian-sex-video.servik.com lesbian sex video]'''
 
'''- [http://black-sex-videos.servik.com black sex videos]'''
 
'''- [http://amateur-adult-video.servik.com amateur adult video]'''
 
'''- [http://horse-sex-videos.servik.com horse sex videos]'''
 
'''- [http://paris-sex-video.servik.com paris sex video]'''
 
'''- [http://asian-sex-videos.servik.com asian sex videos]'''
 
'''- [http://teen-porn-videos.servik.com teen porn videos]'''
 
'''- [http://hot-sex-videos.servik.com hot sex videos]'''
 
'''- [http://free-porn-video-downloads.servik.com free porn video downloads]'''
 
'''- [http://gay-porn-videos.servik.com gay porn videos]'''
 
'''- [http://free-video-sex.servik.com free video sex]'''
 
'''- [http://sex-video-free.servik.com sex video free]'''
 
'''- [http://sex-video-trailers.servik.com sex video trailers]'''
 
'''- [http://adult-video-store.servik.com adult video store]'''
 
'''- [http://fred-durst-sex-video.servik.com fred durst sex video]'''
 
'''- [http://sexy-music-videos.servik.com sexy music videos]'''
 
'''- [http://free-sex-video-samples.servik.com free sex video samples]'''
 
'''- [http://rough-brutal-sex-videos.servik.com rough brutal sex videos]'''
 
'''- [http://teen-lesbian-videos.servik.com teen lesbian videos]'''
 
'''- [http://porn-videos-free.servik.com porn videos free]'''
 
'''- [http://gay-bestiality-videos.servik.com gay bestiality videos]'''
 
'''- [http://anal-sex-video.servik.com anal sex video]'''
 
'''- [http://free-sex-video-downloads.servik.com free sex video downloads]'''
 
'''- [http://oral-sex-video.servik.com oral sex video]'''
 
'''- [http://free-lesbian-sex-video.servik.com free lesbian sex video]'''
 
'''- [http://adult-sex-videos.servik.com adult sex videos]'''
 
'''- [http://adult-video-chat.servik.com adult video chat]'''
 
'''- [http://anime-porn-videos.servik.com anime porn videos]'''
 
'''- [http://hardcore-sex-video.servik.com hardcore sex video]'''
 
'''- [http://video-sex-chat.servik.com video sex chat]'''
 
'''- [http://free-teen-sex-video.servik.com free teen sex video]'''
 
'''- [http://free-hardcore-fucking-videos.servik.com free hardcore fucking videos]'''
 
'''- [http://michelle-vieth-sex-video.servik.com michelle vieth sex video]'''
 
'''- [http://underwater-sex-video.servik.com underwater sex video]'''
 
'''- [http://amateur-home-sex-video.servik.com amateur home sex video]'''
 
'''- [http://dog-sex-videos.servik.com dog sex videos]'''
 
'''- [http://fisting-video.servik.com fisting video]'''
 
'''- [http://video-production.servik.com video production]'''
 
'''- [http://blow-job-videos.servik.com blow job videos]'''
 
'''- [http://video-conferencing.servik.com video conferencing]'''
 
'''- [http://video-game-girls-hentai.servik.com video game girls hentai]'''
 
'''- [http://nude-videos.servik.com nude videos]'''
 
'''- [http://video-strip-poker.servik.com video strip poker]'''
 
'''- [http://skateboard-video.servik.com skateboard video]'''
 
'''- [http://video-poker.servik.com video poker]'''
 
'''- [http://free-xxx-video.servik.com free xxx video]'''
 
'''- [http://xxx-videos.servik.com xxx videos]'''
 
'''- [http://amateur-video.servik.com amateur video]'''
 
'''- [http://free-porno-videos.servik.com free porno videos]'''
 
'''- [http://free-video-porn.servik.com free video porn]'''
 
'''- [http://spanking-videos.servik.com spanking videos]'''
 
'''- [http://porn-video-clips.servik.com porn video clips]'''
 
'''- [http://free-adult-video.servik.com free adult video]'''
 
'''- [http://free-adult-video-clips.servik.com free adult video clips]'''
 
'''- [http://sexy-videos.servik.com sexy videos]'''
 
'''- [http://free-nude-videos.servik.com free nude videos]'''
 
'''- [http://gay-videos.servik.com gay videos]'''
 
'''- [http://rape-video.servik.com rape video]'''
 
'''- [http://music-video.servik.com music video]'''
 
'''- [http://female-ejaculation-video.servik.com female ejaculation video]'''
 
'''- [http://streaming-video.servik.com streaming video]'''
 
'''- [http://upskirt-video.servik.com upskirt video]'''
 
'''- [http://free-adult-videos.servik.com free adult videos]'''
 
'''- [http://free-fucking-videos.servik.com free fucking videos]'''
 
'''- [http://blockbuster-video.servik.com blockbuster video]'''
 
'''- [http://free-xxx-videos.servik.com free xxx videos]'''
 
'''- [http://adult-video.servik.com adult video]'''
 
'''- [http://adult-videos.servik.com adult videos]'''
 
'''- [http://videos.servik.com videos]'''
 
'''- [http://video-games.servik.com video games]'''
 
'''- [http://free-porn-videos1.servik.com free porn videos]'''
 
'''- [http://hardcore-blowjob.servik.com hardcore blowjob]'''
 
'''- [http://hardcore-movies.servik.com hardcore movies]'''
 
'''- [http://free-hardcore-porn-pics.servik.com free hardcore porn pics]'''
 
'''- [http://sex-hardcore.servik.com sex hardcore]'''
 
'''- [http://hardcore-galleries.servik.com hardcore galleries]'''
 
'''- [http://sex-hardcore-pornography.servik.com sex hardcore pornography]'''
 
'''- [http://hardcore-disney-porn.servik.com hardcore disney porn]'''
 
'''- [http://hardcore-pics.servik.com hardcore pics]'''
 
'''- [http://raven-riley-hardcore.servik.com raven riley hardcore]'''
 
'''- [http://xxx-hardcore-porn.servik.com xxx hardcore porn]'''
 
'''- [http://hardcore-pornography.servik.com hardcore pornography]'''
 
'''- [http://hardcore-disney-toons.servik.com hardcore disney toons]'''
 
'''- [http://interracial-hardcore.servik.com interracial hardcore]'''
 
'''- [http://hardcore-sex-stories.servik.com hardcore sex stories]'''
 
'''- [http://jenna-hardcore.servik.com jenna hardcore]'''
 
'''- [http://hardcore-cumshots.servik.com hardcore cumshots]'''
 
'''- [http://hardcore-porn-videos.servik.com hardcore porn videos]'''
 
'''- [http://hardcore-interracial.servik.com hardcore interracial]'''
 
'''- [http://shemale-hardcore.servik.com shemale hardcore]'''
 
</div>
 

Latest revision as of 20:57, 6 April 2013

The compiler supports two different tragets for netware. Both targets are using the same compiler and binutils but different runtime libraries.


Target Netware

As of fpc 2.5.1 (Mar 27, 2011), the internal linker will be used to generate netware loadable modules. Currently only the clib target is implemented. This means binutils for netware are no longer required. Due to the fact that fpc currently only supports reading coff objects in the internal linker, the object format for netware has been changed to coff. Because nlmconv for binutils only supports coff, linking with binutils does no longer work. I plan to switch back to elf as soon as internal support for elf is available in fpc.

This target is based on the classic netware c-library (clib.nlm). The nlm should work on netware versions from 4.00 on. It will not work on 3.x (mainly because the rtl auto loads nlms from the modular clib, i.e. threads.nlm). You are free to change that in the runtime library. The resulting nlm is a uni-processor nlm (no xdc-data support). There are some netware specific support modules included in the rtl:

aio Serial port support, aio.h in ndk

nwnit Definitions from the following ndk-files: nwaccntg.h, nwafp.h, nwbindry.h, nwdatamg.h, nwdir.h, nwenvrn.h, nwenvrn1.h, nwextatt.h, nwmsg.h, nwnit.h, nwqueue.h, nwserial.h, nwservst.h, nwsync.h, nwtts.h

nwprot netware server protocol library (streams and tli)

nwserv Contains definitions from the follwing header files: string.h dirent.h errno.h fcntl.h limits.h locale.h nwaudnlm.h nwbitops.h nwcntask.h nwconio.h nwconn.h nwdebug.h nwdfs.h nwdos.h nwerrno.h nwfattr.h nwfileio.h nwfileng.h nwfinfo.h nwfshook.h nwipx.h nwlib.h nwlocale.h nwmalloc.h nwncpx.h nwnspace.h nwproc.h nwsemaph.h nwserv.h nwsignal.h nwstring.h nwtoolib.h stdio.h stdlib.h unistd.h time.h utime.h nwthread.h nwmediam.h ioctl.h sys/socket.h sys/time.h sys/filio.h syys/ioctl.h sys/stat.h sys/time.h sys/timeval.h sys/uio.h sys/utsname.h

nwsnut Netware utility text interface (same as in ndk)

winsock Netware winsock2 interface

Target Netwlibc

This target is based on the modern netware libc (libc.nlm). The nlm should work on netware versions from 5.10 on (current service packs and libc fixes may be needed). Older versions of netware are not supported because no libc is available on these versions. Threads within the generated nlm can run on any cpu by default (xdc-data is generated by the compiler). There are some netware specific support modules included in the rtl:

libc Interface to netware libc

winsock Netware winsock2 interface

nwsnut Netware utility text interface (same as in ndk)


Compiler Switches for Netware

{$Description TEXT} Sets the NLM Description displayed while loading the NLM

{$Copyright TEXT} Sets the NLM copyright displayed while loading the NLM

{$Version x,y,z} Sets the nlm version to x.y.z, x,y, and z has to be numeric, z=1 will be interpreted as rev a, z=1 as rev b ...

{$Screenname} Sets the clib screenname, the following special Screennames will be supported by netware:

default no own screen, stdout and errout are active on console for Netware < 6.0, Logger Screen on newer Versions

none No screen and no stdout/errout at all. You should not use this mode with FreePascal because in case a runtime error will be generated, FreePascal prints the error to stdout and that will fail and generate another runtime error (and so on ...) This will result in a nice abend (even when loaded protected)

{$Threadname} Sets the thread name. Make sure the names are not to long for netware because this will prevent your nlm from loading.

{$Memory Stacksize} {$Memory Stacksize,Heapsize} Specifies the stacksize, the heapsize will be ignored.


Defines for Netware

The compiler defines the symbol NETWARE for both targets, netware and netwlibc. For netware the additional symbol NETWARE_CLIB is defined, for netwlibc, NETWLIBC and NETWARE_LIBC are defined.

begin
 {$if defined(netware)}
 writeln ('Running on netware');
   {$if defined(netware_libc)}
    writeln ('on libc target');
   {$endif}
   {$if defined(netware_clib)}
    writeln ('on clib target');
   {$endif}
 {$endif}
end.


Importing functions

Importing functions are be supported with or without auto loading required nlms:

FUNCTION rmdir (path : PCHAR) : LONGINT; CDECL; EXTERNAL 'nlmlib.nlm' NAME 'rmdir';

This will import "rmdir" from nlmlib.nlm and adds nlmlib.nlm to the list of autoloaded nlm's. If the name of the external library will begin with !, the autoload will not be added to the generated nlm as in the following example:

FUNCTION rmdir (path : PCHAR) : LONGINT; CDECL; EXTERNAL '!nlmlib.nlm' NAME 'rmdir';

The internal linker do not need .imp files. (Except for nwpre.pp that will be automatically included)

Exporting functions

Exports are handled like in win32: procedure bla; CDECL; EXPORT; begin end; exports bla name 'bla';

Linker Specials

The internal linker supports options via the -k command line options. Multiple options can be separated by ; or can be saved to a separate file.

fpc -Tnetware -k"CUSTOM custfile.dat;OS_DOMAIN;REENTRANT" fpc -Tnetware -k"@linkeroptionsfile.txt"

The second sample reads options from an external file. The following options are supported:

AUTOUNLOAD The nlm will be unloaded if none of the exported symbols are in use.

COPYRIGHT Specifies the copyright string that will be shown when the nlm is loaded. The text must be enclosed in double quotation marks ("). This is the same that can be specified with {$Copyright TEXT}. The linker option will override the text specified by $Copyright. The option is only useful within a linker options file, example: COPYRIGHT "(c) 2011 the free pascal team"

CUSTOM Specifies a custom data file that will be included in the nlm image.

DATE Secifies the nlm date that will be displayed while the nlm is loaded. The default is the system date. Month, day and year have to be separated by at least one space. example: DATE 27 3 2011

DEBUG Will be ignored

DESCRIPTION Specifies the copyright string (up to 127 chars) that will be shown when the nlm is loaded. The text must be enclosed in double quotation marks ("). This is the same that can be specified with {$Description TEXT}. The linker option will override the text specified by $Description. The option is only useful within a linker options file, example: DESCRIPTION "test nlm for free pascal"

FLAG Sets or clears the flag in the nlm header. ON or OFF and the decimal value has to be specified. examples FLAG ON 1 FLAG OFF 2

HELP Specifies the path to the help file that contains the default help screens for the NLM. The helpfile will be included in the nlm file.

MESSAGES Specifies the path to the message file that contains the default messages for the NLM. The file will be included in the nlm file.

MULTIPLE Sets a flag in the NLM header indicating that this NLM can be loaded more than once times.

OS_DOMAIN Sets a flag in the NLM header indicating that this NLM must be loaded in the memory space of the operating system. This prevent the NLM from being loaded into a protected address space.

PSEUDOPREEMPTION Sets a flag in the NLM header indicating that the NetWare operating system can force the NLM to relinquish control if it does not do so on its own often enough.

REENTRANT Sets a flag in the NLM header indicating that this NLM is reentrant. If an NLM is reentrant, when it is loaded by the LOAD command more than once, the NLM is not loaded again, but the NLM can now be executed concurrently by multiple threads. In this case, only one copy of the NLM is in memory.

SCREENNAME Specifies the name of the first screen (max 71 chars) of an NLM, which is created when the NLM is loaded and to which stdin, stdout, and stderr are wired. This is the same that can be specified with {$Screenname TEXT}. The linker option will override the name specified by $Screenname.

STACK or STACKSIZE Specifies the stacksize in bytes.

SYNCHRONIZE Sets a flag in the NLM header indicating that when this NLM is loaded, the load process goes to sleep until the NLM calls SynchronizeStart. This prevents other console commands (particularly LOAD) from being processed while the NLM is loading.

THREADNAME Specifies a prefix for NetWare to use to name the threads of the NLM. For example, if the prefix was FPC, then threads created in the NLM would be named “FPC1,” “FPC2,” and so on. Thread names can be displayed in the internal debugger with the .P command. The prefix should be 12 chars or less.

TYPE Specifies the numerical type of the nlm. The types are defined as follows: 0 Generic module (default and the most common one) 1 LAN driver 2 Disk driver 3 Name space module 4 NLM utility application 5 Mirror server link module 6 OS module 7 Paged high OS module 8 Host adapter module 9 Custom device module 10 File system module 11 Real mode module 12 Ghost module 13 Normal SMP module 14 NIOS module 15 CIOS CAD module 16 CIOS CLS module 20..32 NICI modules

VERSION Specifies the version displayed while loading the nlm. This overrides the version specified by {$version}. The version consist of 3 numerical valued separated by at least one space. (major minor and revision) Major can be any positive number (31 bits), Minmor has to be in the range of 0 to 99 and revision in the range from 0 to 26. example version 12 2 1

XDCDATA Specifies a path to a file containing Remote Procedure Call (RPC) descriptions for functions in the NLM. XDC data can be used to create an MT-safe NLM, funnel functions to processor 0, declare an NLM as MT unsafe, and mark an NLM as preemptible. The data will be generated by novells mpkxdc tool.


--Armin 18:30, 27 Mar 2011 (CET)