Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Static linking (try it at home!) [was: kernel update snafu]



On Fri, Jun 20, 2014 at 2:46 PM, Stephen J. Turnbull <stephen@example.com> wrote:
> Raymond Wan writes:
>
>  > > AFAIR, you cannot statically link glibc. So you'll need 32-bit glibc.
>  > > Basically if you can run other 32-bit software you should be fine.
>  >
>  > Ah...I guess I never ran a 32-bit program on this system before.  And
>  > I didn't know that you cannot statistically link to glibc.  I fed it
>  > to "ldd" and it didn't report that.
>
> I don't think that's strictly true.  Remember, a static library is
> *not* a monolithic object file, but rather a bundle of objects each of
> which will be added to the resulting binary "as needed" (ie, if an
> entry point is referenced by a module already linked in the program).
> So if all you want to do is use printf, you *can* statically link.
...


Thanks for this!  Was wondering about it...especially as I was reading
this discussion.  But never thought of (i.e., was too lazy) to take it
one step further and actually give it a try...

Definitely good to know; thanks!

Ray


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links