====== AIX ====== ===== Environment ===== :!: Pfad, in dem während der Ausführung eines Programms dynamische Libraries gesucht werden lautet unter AIX: LIBPATH (Bei anderen UNIX-Derivaten heißt es **LD_LIBRARY_PATH**.) ===== Commands ===== AIX 6.1 Commands: [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds.navigation/alphabeticallistofcommands.htm]]\\ Hier eine kleine Auswahl: * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/ar.htm|ar]] - Maintains the indexed libraries used by the linkage editor. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/awk.htm|awk]] - Finds lines in files that match a pattern and performs specified actions on those lines. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/cat.htm|cat]] - Concatenates or displays files. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/chmod.htm|chmod]] - Changes file modes. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/chown.htm|chown]] - Changes the owner or group associated with a file. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/compress.htm|compress]] - Compresses data. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/cp.htm|cp]] - Copies files. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds1/cpp.htm|cpp]] - Performs file inclusion and macro substitution on C language source files. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds2/diff.htm|diff]] - Compares text files. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds2/dump.htm|dump]] - Dumps selected parts of an object file. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds2/find.htm|find]] - Finds files with a matching expression. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds2/grep.htm|grep]] - Searches for a pattern in a file. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/jobs.htm|jobs]] - Displays status of jobs in the current session. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/kill.htm|kill]] - Sends a signal to running processes. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/ld.htm|ld]] - Links object files. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/ldd.htm|ldd]] - Lists dynamic dependencies. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/mail.htm|mail, Mail, or mailx]] - Sends and receives mail. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/make.htm|make]] - Maintains, updates, and regenerates groups of programs. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/man.htm|man]] - Displays manual entries online. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds3/mv.htm|mv]] - Moves files. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/nm.htm|nm]] - Displays information about symbols in object files, executable files, and object-file libraries. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds4/ps.htm|ps]] - Shows status of processes. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds5/sed.htm|sed]] - A stream editor. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds5/tar.htm|tar]] - Manipulates archives. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds5/time.htm|time]] - Prints the time of the execution of a command. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds5/uname.htm|uname]] - Displays the name of the current operating system. * [[https://www.ibm.com/support/knowledgecenter/ssw_aix_61/com.ibm.aix.cmds5/uncompress.htm|uncompress]] - Restores compressed files. ===== Development ===== Using the GNU C/C++ compiler on AIX: [[http://www.ibm.com/developerworks/aix/library/au-gnu.html]] AIX® Linking and Loading Mechanisms: [[http://download.boulder.ibm.com/ibmdl/pub/software/dw/aix/es-aix_ll.pdf]] oder [[http://public.dhe.ibm.com/software/dw/aix/es-aix_ll.pdf]] ==== Kompilieren ==== FIXME ==== Linken ==== :!: Damit folgende link-Parameter seitens GCC an den Linker weitergegeben werden, werden sie mit dem vorangestellten Schalter "**-Wl**" versehen. Zum Beispiel, aus dem "-bexpall" wird "-Wl,-bexpall". ^Parameter ^Bedeutung ^ |-bexpall |Der Linker exportiert automatisch einige Symbole, mit **-bexpall** werden mehr Symbole exportiert. Die Symbole mit führendem Unterstrich werden nicht automatisch exportiert. | |-bexpfull |Ab AIX 5.2 steht die link-Option **-bexpfull** zur Verfügung, mit der alle Symbole werden exportiert, auch die mit führendem Unterstrich (wie z.B. "C++ mangled names"). | |-brtl |Mit diesem Schalter schaut der AIX-Linker nach Libraries mit beiden Endungen nach, ".a" and ".so", wie z.B. "libfoo**.a**" and "libfoo**.so**". Ohne "-brtl" sucht der AIX-Linker nur nach "libfoo.a". | |-G |Um das AIX RunTime-Linking zu nutzen, sollte man das SharedObject mit dem GCC-Schalter "-shared -Wl,-G" erstellen und das Executables mit solchen Libraris mit der "-Wl,-brtl" Option für den Linker. | |-b64 |Veranlasst den Linker, das 64-Bit Ergebnis zu erstellen. Für GCC lautet die Option "-Wl,-b64". | |-binitfini |Sorgt für Aufruf von **Constructoren** und **Destructoren** in der SO-Library.\\ Wenn der Constructor z.B. "lib_initialize" heißt und der Destructor "lib_finalize", dann lautet der komplette Parameter für GCC "-Wl,-binitfini:lib_initialize:lib_finalize".\\ Dadurch wird bei dlopen() die lib_initialize() und bei dlclose() die lib_finalize() aufgerufen. | |-bloadmap:FileName|Listet alle beim Linken ausgeführten Schritte auf, inklusive gelinkten ObjectFiles und Libraries, und schreibt das Ergebnis in ein MapFile namens "FileName".\\ Falls Referenzen nicht aufgelöst werden konnten, landen entsprechende Hinweise auch dort.\\ Mit der GCC-Opton z.B. "-Wl,-bloadmap:$(TargetFile).map.txt" landet die Ausgabe neben dem gerade erzeugten "TargetFile". | ===== Allgemein ===== IBM Knowledge Center: [[http://www.ibm.com/support/knowledgecenter/ssw_aix_53/com.ibm.aix.53eos/aix53_eos.htm|AIX 5.3]] [[http://www.ibm.com/support/knowledgecenter/de/ssw_aix_61/com.ibm.aix.base/kc_welcome_61.htm|AIX 6.1]] [[http://www.ibm.com/support/knowledgecenter/de/ssw_aix_71/com.ibm.aix.base/kc_welcome_71.htm|AIX 7.1]] [[http://www.ibm.com/support/knowledgecenter/de/ssw_aix_72/com.ibm.aix.base/welcome_72.htm|AIX 7.2]] ---- Stand: 05.10.2016 EOF