[edk2-devel] [PATCH 1/3] BaseTools/Conf/tools_def: Fix linking using CLANGDWARF_IA32

Rebecca Cran rebecca at bsdio.com
Thu Mar 23 14:43:21 UTC 2023


The linker problems I was seeing were unrelated to those Patrick's patch 
fixed.

I just applied Patrick's changes on top of my CLANGDWARF patches and 
OvmfPkgIa32.dsc builds fine.


-- 

Rebecca Cran


On 3/17/23 2:35 PM, Rebecca Cran wrote:
> Building with "build -p OvmfPkg/OvmfPkgX64.dsc -a X64 -t CLANGDWARF -b 
> RELEASE" on FreeBSD causes the following errors:
>
>
> ld.lld: error: relocation R_X86_64_64 cannot be used against local 
> symbol; recompile with -fPIC
> >>> defined in 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/SecPeiCpuExceptionHandlerLib.lib(ExceptionHandlerAsm.obj)
> >>> referenced by 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/X64/ExceptionHandlerAsm.iii
> >>>               ExceptionHandlerAsm.obj:(.text+0x5) in archive 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/SecPeiCpuExceptionHandlerLib.lib
>
> ld.lld: error: relocation R_X86_64_64 cannot be used against local 
> symbol; recompile with -fPIC
> >>> defined in 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/SecPeiCpuExceptionHandlerLib.lib(ExceptionHandlerAsm.obj)
> >>> referenced by 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/X64/ExceptionHandlerAsm.iii
> >>>               ExceptionHandlerAsm.obj:(.text+0x14) in archive 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/SecPeiCpuExceptionHandlerLib.lib
>
> ld.lld: error: relocation R_X86_64_64 cannot be used against local 
> symbol; recompile with -fPIC
> >>> defined in 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/SecPeiCpuExceptionHandlerLib.lib(ExceptionHandlerAsm.obj)
> >>> referenced by 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/X64/ExceptionHandlerAsm.iii
> >>>               ExceptionHandlerAsm.obj:(.text+0x23) in archive 
> /home/bcran/src/uefi/edk2/Build/OvmfX64/RELEASE_CLANGDWARF/X64/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuExceptionHandlerLib/OUTPUT/SecPeiCpuExceptionHandlerLib.lib
>
>
> Thinking about it, it might actually be a problem with the FreeBSD 
> system toolchain. On Linux, I get a different set of errors about 
> redefining uint64_t etc.
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101693): https://edk2.groups.io/g/devel/message/101693
Mute This Topic: https://groups.io/mt/97673648/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list