Skip to content

Commit c9c9c07

Browse files
committed
binutils (as): Enable -mbig-obj by default
This format was introduced in VS 2005, and Binutils began supporting it for x86-64 in 2013 and i386 in 2020. The format is now 20 years old and well-established. An increasing amount of software is hitting the old, meager COFF limitations. Rather than enable bigobj case-by-case, simply switch to the new format by default. This reduces compatibility with old linkers, but compatibility between COFF toolchains has always been iffy. Even ignoring bigobj, Binutils and MSVC link.exe already have limited object file compatibility for various reasons. A significant potential problem with changing the default is that the Binutils developers didn't have the foresight to also add -mno-big-obj at the same time, and so any change to the default at the very least results in a flag day. This change does not introduce -mno-big-obj, so it is not possible to produce objects in the old format.
1 parent ae1c0b6 commit c9c9c07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ WORKDIR /binutils-$BINUTILS_VERSION
6868
COPY src/binutils-*.patch $PREFIX/src/
6969
RUN sed -ri 's/(static bool insert_timestamp = )/\1!/' ld/emultempl/pe*.em \
7070
&& sed -ri 's/(int pe_enable_stdcall_fixup = )/\1!!/' ld/emultempl/pe*.em \
71+
&& sed -ri 's/(static int use_big_obj = )/\1!/' gas/config/tc-i386.c \
7172
&& cat $PREFIX/src/binutils-*.patch | patch -p1
7273
WORKDIR /x-binutils
7374
RUN /binutils-$BINUTILS_VERSION/configure \

0 commit comments

Comments
 (0)