Skip to content

i686-unknown-uefi rust-lld error: symbols.o is not compatible with SEH #96498

Closed
@nicholasbishop

Description

@nicholasbishop

Code

I tried this code: https://github.com/nicholasbishop/uefi-ia32-bug-repro

Build with cargo +nightly build --target i686-unknown-uefi

With recent nighties it fails to link:

error: linking with `rust-lld` failed: exit status: 1
  |
  = note: "rust-lld" "-flavor" "link" "/NOLOGO" "/entry:efi_main" "/subsystem:efi_application" "/tmp/rustcY04Gup/symbols.o" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/uefi_app-0f328129b38d8e14.35bawstz5fweo2rn.rcgu.o" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/uefi_app-0f328129b38d8e14.majda6vvzvbpb73.rcgu.o" "/LIBPATH:/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps" "/LIBPATH:/var/home/nbishop/src/uefi-ia32-bug/target/debug/deps" "/LIBPATH:/var/home/nbishop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/i686-unknown-uefi/lib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libuefi_services-ecb3e66dfef8e74e.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libuefi-2ba71252a179d4d1.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/liblog-38e253a051128d63.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libcfg_if-1cc9e79ab59a6754.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libbitflags-0b2f413d2b5a35a5.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libucs2-2bf73974fb6e0166.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libbit_field-064b526bc1b3300f.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/liballoc-c018fd088d90b478.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/librustc_std_workspace_core-ee7dd7b0b8b2aaf1.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libcore-05848db6c9136666.rlib" "/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/libcompiler_builtins-399258b4cdd5a940.rlib" "/NXCOMPAT" "/LIBPATH:/var/home/nbishop/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/i686-unknown-uefi/lib" "/OUT:/var/home/nbishop/src/uefi-ia32-bug/target/i686-unknown-uefi/debug/deps/uefi_app-0f328129b38d8e14.efi" "/OPT:REF,NOICF" "/DEBUG" "/NODEFAULTLIB"
  = note: rust-lld: error: /safeseh: /tmp/rustcY04Gup/symbols.o is not compatible with SEH
          rust-lld: warning: section name .debug_frame is longer than 8 characters and will use a non-standard string table

This issue does not occur with x86_64-unknown-uefi or aarch64-unknown-uefi.

Bisect

searched nightlies: from nightly-2022-04-24 to nightly-2022-04-28
regressed nightly: nightly-2022-04-26
searched commit range: 18f314e...055bf4c
regressed commit: 18b53ce

bisected with cargo-bisect-rustc v0.6.3

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --with-src -- build --target i686-unknown-uefi 

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.P-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions