[sclug] Staticly link smbclient

J.Mann jon at spinis-associates.co.uk
Wed May 7 11:47:36 UTC 2008

On Wed, May 07, 2008 at 11:45:48AM +0200, pieter claassen wrote:
> Actually, what is pie

Position independent executable:


> My only question is: why?

The "-pie" option, according to "man ld":

  Create a position independent executable. This is currently only
  supported on ELF platforms. Position independent executables are
  similar to shared libraries in that they are relocated by the dynamic
  linker to the virtual address the OS chooses for them (which can vary
  between invocations). Like normal dynamically linked executables they
  can be executed and symbols defined in the executable cannot be
  overridden by shared libraries.

It doesn't explicitly state that "-pie" and "-static" are incompatable,
but that would appear to be the case.

> How did you know

Mostly intuition, having spent far too much time battling compilers and

> Is this something they teach you at Uni?

No, definitely not :-)

Jon Mann.

More information about the Sclug mailing list