Hi all,

There is a test for prebuild Rust library link with UEFI C code in GCC build as 
below. But I will encounter some build problems.
Case 1: prebuild Rust library with aarch64-unknown-uefi target command, it will 
encounter "error adding symbols: file format not recognized".
Case 2: I tried another similar target aarch64-unknown-none which also supports 
no-std lib, it will successfully link in GCC build. However, when I use 
alloc::vec::Vec and alloc::string::String lib in Rust library, the build will 
encounters build error that WriteSections64(): AARCH64 relative relocations 
require identical ELF and PE/COFF section offsets. But they won't happen in 
Window build environment.

Does anyone have any experience about this problem?

Build Target on Arm VirtQemu Platform

  *   ArmVirtPkg/ArmVirtQemu.dsc
Prebuild library in Rust

  *   cargo build --release --target aarch64-unknown-uefi
  *   cargo build --release --target aarch64-unknown-none
EKD2 build environment in Ubuntu

  *   gcc-aarch64-linux-gnu



Thanks and regards,
Jared Pan



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108833): https://edk2.groups.io/g/devel/message/108833
Mute This Topic: https://groups.io/mt/101456575/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to