Re: dynamic ELF -> static executable?



molnard@xxxxxxxxxxxxxxxxx writes:

> Is there a way to combinbe a dynamic ELF executable with the shared
> libraries it refers to into a static

Yes (but it's a hack, and the resulting executable is huge):
http://groups.google.com/group/gnu.gcc.help/browse_frm/thread/7dd333be29171843

The last message in the thread refers to reducebind.c http link
which has "gone cold". Searching google for reducebind.c however
gives more locations, this one is currently alive:
http://bismark.extracon.it/linux/teso/filemirror/reducebind.c

> (and hence more portable) version of the executable?

The notion that static executables are more portable is a wrong
(or at least miguided) one. You may wish to read this thread on
the subject:
http://groups.google.com/group/comp.os.linux.development.apps/browse_frm/thread/3cb7d8fbf9d82d7b

> The linux loader does something quite similar but I

The linux loader does nothing of the sort.

Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.



Relevant Pages

  • Re: static linking broken
    ... There are no UNIX systems I know of, ... > build the executables under each version, ... not empty, please provide convincing details. ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)
  • Re: dlsym to lookup symbol in calling executable
    ... C++ executables. ... the main exe with a linker version script. ... In order to understand recursion you must first understand recursion. ...
    (comp.os.linux.development.apps)
  • Re: Unresolved symbol in /usr/lib/libCsup_v2.2 on HP 11.11 box -- Need Help
    ... "Paul Pluzhnikov" ... > In order to understand recursion you must first understand recursion. ... any shared libraries or executables can't contain "Unresolved ...
    (comp.sys.hp.hpux)
  • Re: symbol resolution issues
    ... This would happen on ELF platforms only if Func() is "exported" ... Symbols are usually exported from executables ... If you are not on ELF, pray tell *what* OS you are using. ... In order to understand recursion you must first understand recursion. ...
    (comp.unix.programmer)
  • Re: cannot link -static with threads
    ... many people mistakenly believe that static executables are "more ... Glibc compilation results in some 200+ DSOs, ... In order to understand recursion you must first understand recursion. ...
    (comp.programming.threads)