<html><head></head><body><div>Hi David,</div><div><br></div><div>On Wed, 2022-01-26 at 10:48 +1100, David Bannon wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>A special case is where the binary is only statically linked because its a small, single function thing that does not need to be linked externally. There are a handful of such binaries in FPC. In their case, they need the src patched to add eg {$linklib c}, that forces an otherwise unnecessary link to the C libs and therefore dynamic linking, then just add the -Cg -k-pie -k-znow</div><div><br></div><div>Or, somewhat messier, I found you can explicitly name the loader on the linker line</div><div><br></div><div>fpc -Cg -k-pie -k-znow -k"--dynamic-linker /lib64/ld-linux-x86-64.so.2" test.pas</div></blockquote><div>Thank you for this explanation.</div><div>I'm not fan of forcing linking with libc. This is against the FPC ideal of producing pure pascal code.</div><div>I don't know if forcing the dynamic linker is a good way to go. I'll check upstream (and probably the web saerch engines first).</div><pre style="caret-color: rgb(46, 52, 54); color: rgb(46, 52, 54); font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">-- <br></pre><pre style="caret-color: rgb(46, 52, 54); color: rgb(46, 52, 54); font-variant-caps: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4); -webkit-text-stroke-width: 0px; text-decoration: none;">Cheers,
Abou Al Montacir</pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></body></html>