Error message on boot:
fsck.ext3: error while loading shared libraries: libcom_err.so.2 Cannot open shared object file: No such file or directory

It will ask for root password for maintainance. After you have entered the password you will be given a prompt with (none) as the hostname.

Enter the following command:
fsck -C -a -T /
mount / -o rw,remount
revdep-rebuild --soname 'libcom_err.so.2'

If that does not work try: emerge e2fsprogs

If you get an error something like this:
  packagename: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
and revdep-rebuild tool does not fix it.
Just remerge expat:
  # emerge --unmerge expat
  # emerge -Dav expat