Skip to content

Commit 6bf81ff

Browse files
committed
Disable stdcall fixup warnings (x86 only)
This warning is new in Binutils 2.42, and it regards fixing a long-time, x86 bfd bug. Previously the fixup did not occur and bfd would fail to locate decorated symbols. In the case of an entry point, bfd silently linked the wrong address! It remains silent if the entry point is not found, but the fixup makes it more likely to find the symbol. The old, buggy behavior was an accident. It differs from MSVC and nobody wants it. Theoretically some program might depend on the old behavior, hence the warning, but it's incredibly unlikely, so silence the warning.
1 parent 11c8495 commit 6bf81ff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ ARG ARCH=x86_64-w64-mingw32
6767
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 \
70+
&& sed -ri 's/(int pe_enable_stdcall_fixup = )/\1!!/' ld/emultempl/pe*.em \
7071
&& cat $PREFIX/src/binutils-*.patch | patch -p1
7172
WORKDIR /x-binutils
7273
RUN /binutils-$BINUTILS_VERSION/configure \

0 commit comments

Comments
 (0)