# Glibc-&eglibc-version; 64-Bit

## Installation of EGLIBC

    LINKER=$(readelf -l /tools/bin/bash | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
    sed -i "s|libs -o|libs -L/usr/lib64 -Wl,-dynamic-linker=${LINKER} -o|" \
      scripts/test-installation.pl
    unset LINKER

Tell EGLIBC to install its 64-bit libraries into `/lib64`:

    echo "slibdir=/lib64" >> configparms

    CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \
        ../eglibc-&eglibc-version;/configure --prefix=/usr \
        --disable-profile --enable-kernel=2.6.32 \
        --libexecdir=/usr/lib64/glibc --libdir=/usr/lib64

## The meaning of the new configure option:

`--libexecdir=/usr/lib64/glibc`

- This changes the location of the `pt_chown` program from its default of `/usr/libexec` to `/usr/lib64/glibc`.

## Configuring The Dynamic Loader

By default, the dynamic loader (`/lib/ld-linux.so.2` for 32bit executables and `/lib64/ld-linux.so.2` for 64bit executables) searches through `/lib`, `/lib64`, `/usr/lib`, and `/usr/lib64` for dynamic libraries that are needed by programs as they are run. However, if there are libraries in directories other than these, they need to be added to the `/etc/ld.so.conf` file in order for the dynamic loader to find them. Some directories that are commonly known to contain additional libraries are `/usr/local/lib`, `/usr/local/lib64`, `/opt/lib`, and `/opt/lib64`, so add those directories to the dynamic loader's search path.

Create a new file `/etc/ld.so.conf` by running the following:

    cat > /etc/ld.so.conf << "EOF"
    # Begin /etc/ld.so.conf

    /usr/local/lib
    /usr/local/lib64
    /opt/lib
    /opt/lib64

    # End /etc/ld.so.conf
    EOF