aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chapter01/changelog.xml5
-rw-r--r--chapter05/binutils-pass1.xml19
-rw-r--r--chapter06/binutils-pass2.xml3
-rw-r--r--chapter08/binutils.xml14
4 files changed, 29 insertions, 12 deletions
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 756e9d5fc..de94d85d9 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -44,6 +44,11 @@
<para>2023-12-31</para>
<itemizedlist>
<listitem>
+ <para>[xry111] - Add --enable-default-hash-style=gnu configuring
+ binutils. Fixes
+ <ulink url='&lfs-ticket-root;5401'>#5401</ulink>.</para>
+ </listitem>
+ <listitem>
<para>[xry111] - Fix CVE-2023-7008 for systemd-255. Fixes
<ulink url='&lfs-ticket-root;5405'>#5405</ulink>.</para>
</listitem>
diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml
index 65e8dd2ae..c3bf1f117 100644
--- a/chapter05/binutils-pass1.xml
+++ b/chapter05/binutils-pass1.xml
@@ -75,7 +75,8 @@ cd build</userinput></screen>
--target=$LFS_TGT \
--disable-nls \
--enable-gprofng=no \
- --disable-werror</userinput></screen>
+ --disable-werror \
+ --enable-default-hash-style=gnu</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
@@ -132,6 +133,22 @@ cd build</userinput></screen>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>--enable-default-hash-style=gnu</parameter></term>
+ <listitem>
+ <para>By default, the linker would generate both the GNU-style
+ hash table and the classic ELF hash table for shared libraries and
+ dynamically linked executables. The hash tables are only intended
+ for a dynamic linker to perform symbol lookup. On LFS the dynamic
+ linker (provided by the Glibc package) will always use the
+ GNU-style hash table which is faster to query. So the classic
+ ELF hash table is completely useless. This makes the the linker
+ only generate the GNU-style hash table by default, so we can avoid
+ wasting time to generate the classic ELF hash table when we build
+ the packages, or wasting disk space to store it.</para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
<para>Continue with compiling the package:</para>
diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml
index 983aaee2f..15582f937 100644
--- a/chapter06/binutils-pass2.xml
+++ b/chapter06/binutils-pass2.xml
@@ -72,7 +72,8 @@ cd build</userinput></screen>
--enable-shared \
--enable-gprofng=no \
--disable-werror \
- --enable-64-bit-bfd</userinput></screen>
+ --enable-64-bit-bfd \
+ --enable-default-hash-style=gnu</userinput></screen>
<variablelist>
<title>The meaning of the new configure options:</title>
diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml
index 1fd436bd1..9e93e55f0 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -57,9 +57,11 @@ cd build</userinput></screen>
--enable-shared \
--disable-werror \
--enable-64-bit-bfd \
- --with-system-zlib</userinput></screen>
+ --with-system-zlib \
+ --enable-default-hash-style=gnu</userinput></screen>
+
<variablelist>
- <title>The meaning of the configure parameters:</title>
+ <title>The meaning of the new configure parameters:</title>
<varlistentry>
<term><parameter>--enable-gold</parameter></term>
@@ -85,14 +87,6 @@ cd build</userinput></screen>
</varlistentry>
<varlistentry>
- <term><parameter>--enable-64-bit-bfd</parameter></term>
- <listitem>
- <para>Enables 64-bit support (on hosts with narrower word sizes).
- May not be needed on 64-bit systems, but does no harm.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
<term><parameter>--with-system-zlib</parameter></term>
<listitem>
<para>Use the installed zlib library instead of building the