]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
bfd: Add i386_pe_big_vec vector to win64 targets
authorJeffrey Knockel <jeff@jeffreyknockel.com>
Mon, 8 Sep 2025 09:10:25 +0000 (11:10 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 8 Sep 2025 09:10:25 +0000 (11:10 +0200)
commit5e3d14a179e42802cf81f0a405fd511f560c6dfe
treea2da4ac67e21ee309f989997fd822d12f7ae676c
parent96b9a160734f34d6644cae7c2dec02a98e07f66e
bfd: Add i386_pe_big_vec vector to win64 targets

251dae91074170036c1a76c5e5df1f45197d7feb added i386_pe_big_vec to win32
targets but did not add it to win64 ones.

Adding i386_pe_big_vec vector to win64 targets fixes an issue where a
64-bit assembler on windows would fail to create bigobj files when
operating with 32-bit word size.  E.g., before this change, with a
64-bit toolchain:

$ echo 'int main(void) { return 100; }' \
| gcc -m32 -Wa,-mbig-obj -x c -c -o main.o -
$ objdump.exe -f main.o
main.o:     file format pe-i386
architecture: i386, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x00000000

But after this change, the output file format is correctly bigobj:

$ echo 'int main(void) { return 100; }' \
| gcc -m32 -Wa,-mbig-obj -x c -c -o main.o -
$ objdump.exe -f main.o
main.o:     file format pe-bigobj-i386
architecture: i386, flags 0x0000003d:
HAS_RELOC, HAS_LINENO, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x00000000

Although the above multilib compilation issue was the motivation for
this patch, this change has other positive consequences, such as
allowing the 64-bit windows build of objdump to disassemble
pe-bigobj-i386 format object files, etc.

Signed-off-by: Jeffrey Knockel <jeff@jeffreyknockel.com>
bfd/config.bfd