extending external syntax in FPC compiler: useBASE lazarus / 32-Linux ---------------------------------------------------------------------- robert rozee · 2023-07-29 04:09 hi,     this thread is an offshoot of the GLIBC 2.34 thread, intended as a place to gather information on how to make a small extension to the FPC compiler (yes i know, Free Pascal Compiler Compiler, brought to you by the Department of Redundancy Department). the nature of the extension is inspired by a comment made my marcov, to whom full credit is due. i want to add an additional (optional) parameter to external that provides for controlling how symbol versioning is handled. the new syntax for external will be, more-or-less: [...] external name 'symbol' useBASE; the word useBASE will trigger the symbol name to be processed through a function to append versioning to the symbol, with said function initially just a placeholder, thus: function BaseName(LibraryName, SymbolName:string):string; begin //writeln(LibraryName:16, SymbolName:16);   result:=SymbolName end; ideally LibraryName will be a fully qualified path and filename to the shared library where the symbol resides, while SymbolName will just be the exact contents of the string specified to external after name. is there anyone who can help in implementing this first stage, preferably someone familiar with the compiler source and the working of the section that builds the linker script? i am, myself, very much not a compiler expert! cheers, rob   :-)