Go to file
Tomáš Chvátal 524c95c3c1 Accepting request 198870 from Kernel:kdump
- makedumpfile-powerpc.patch: fix builf on powerpc
- makedumpfile.spec: enable powerpc32

OBS-URL: https://build.opensuse.org/request/show/198870
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/makedumpfile?expand=0&rev=47
2013-09-13 12:46:15 +00:00
.gitattributes OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/makedumpfile?expand=0&rev=1 2007-02-05 14:40:30 +00:00
.gitignore OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/makedumpfile?expand=0&rev=1 2007-02-05 14:40:30 +00:00
makedumpfile-1.5.4.tar.bz2 - upgrade to makedumpfile-1.5.4 2013-09-09 22:05:02 +00:00
makedumpfile-coptflags.diff Accepting request 125358 from home:ptesarik:branches:Kernel:kdump 2012-06-18 17:10:04 +00:00
makedumpfile-powerpc.patch Accepting request 198829 from home:ptesarik:branches:Kernel:kdump 2013-09-13 08:08:25 +00:00
makedumpfile.changes - makedumpfile-powerpc.patch: fix builf on powerpc 2013-09-13 09:19:38 +00:00
makedumpfile.spec Accepting request 198505 from home:k0da:ppc 2013-09-13 07:50:16 +00:00
README.static - README.static: Explain why static linking of some libraries is 2011-11-09 17:36:07 +00:00

Q: Why is makedumpfile linked statically?

A: To save space.

Loner answer follows.

The secondary kernel runs in a very constrained environment. It cannot use
the whole RAM of the machine, simply because this is the data that should
be saved. Instead, it uses a special portion of RAM that is reserved for
that purpose in the primary kernel. Since this is memory that cannot be
used by the primary kernel (it is basically dead unless there is a kernel
crash, which should be a rare event), it is desirable to keep the size of
the reserved memory as small as possible.

One thing that takes up RAM in the secondary kernel is the root file
system. Now, the makedumpfile binary is also run from this filesystem.
Consequently, initrd must also include all the dynamic libraries that
this binary links against. This can increase the size of the initrd
considerably.

However, we don't need most of that space, because makedumpfile uses only
a fraction of all the code present in the dynamic libraries. In fact, when
makedumpfile is the only user of those libraries in the secondary kernel
environment, the other usual term for these libraries, "shared libraries",
no longer matches reality. It is not shared with anything else in the
system. On the other hand, some libraries are also used by other binaries
in the initrd, so it makes sense to link to them dynamically.

The following libraries are shared with other tools:

  libdl
  libz

The following libraries are only used by makedumpfile, and thus should be
linked statically:

  libdw
  libebl
  libelf
  libbz2
  liblzma

Static versions of some of the above libraries may not be available in the
distro, so a build-time check is performed, and they fall back to linking
dynamically if necessary.