[Bug ld/30655] New: patch introducing remap-inputs causes build failure in edk2

2023-07-19 Thread dannf at dannf dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30655

Bug ID: 30655
   Summary: patch introducing remap-inputs causes build failure in
edk2
   Product: binutils
   Version: unspecified
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: ld
  Assignee: unassigned at sourceware dot org
  Reporter: dannf at dannf dot org
  Target Milestone: ---

Copying from: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041495

edk2 has begun to FTBFS w/ recent buildutils. Log follow below. I bisected the
failure to
upstream commit fb221fba1a5 ("Add --remap-inputs option to the BFD linker").
After reverting that commit, this failure goes away.

dannf@xps13:/tmp/edk2-2023.05$ "gcc" -o
/tmp/edk2-2023.05/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei/DEBUG/StatusCodeHandlerPei.dll
-nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
-Wl,--entry,_ModuleEntryPoint -u _ModuleEntryPoint
-Wl,-Map,/tmp/edk2-2023.05/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei/DEBUG/StatusCodeHandlerPei.map,--whole-archive
-Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie -flto -Os
-Wl,--start-group,@/tmp/edk2-2023.05/Build/OvmfX64/RELEASE_GCC5/X64/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei/OUTPUT/static_library_files.lst,--end-group
-g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror
-Wno-array-bounds -include AutoGen.h -fno-common -ffunction-sections
-fdata-sections -fno-stack-protector
-DSTRING_ARRAY_NAME=StatusCodeHandlerPeiStrings -m64 -march=x86-64
-fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))"
-maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie
-fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer -flto
-DUSING_LTO -Wno-unused-but-set-variable -Wno-unused-const-variable
-DMDEPKG_NDEBUG -mno-mmx -mno-sse -D DISABLE_NEW_DEPRECATED_INTERFACES -D
TDX_GUEST_SUPPORTED -D ENABLE_MD5_DEPRECATED_INTERFACES
-Wl,--defsym=PECOFF_HEADER_SIZE=0x228
-Wl,--script=/tmp/edk2-2023.05/BaseTools/Scripts/GccBase.lds -Wno-error
/usr/bin/ld: warning: IoFifoSev.obj: missing .note.GNU-stack section implies
executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future
version of the linker
/usr/bin/ld: warning: cannot find entry symbol _ModuleEntryPoint; defaulting to
0240
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutils for Debian) 2.40.90.20230714 assertion fail
../../bfd/elflink.c:10611
/usr/bin/ld: BFD (GNU Binutil

[Bug ld/30655] [2.41 Regression] patch introducing remap-inputs causes build failure in edk2

2023-07-19 Thread dannf at dannf dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30655

--- Comment #1 from dann frazier  ---
fwiw, this seems to resolve the issue for me. It isn't clear from the context
why this new feature introduced a return here.

diff --git a/ld/ldlang.c b/ld/ldlang.c
index 4b86c164843..d5a94d47e4b 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -1137,8 +1137,6 @@ new_afile (const char *name,
   lang_has_input_file = true;

   name = ldfile_possibly_remap_input (name);
-  if (name == NULL)
-return NULL;

   p = new_stat (lang_input_statement, stat_ptr);
   memset (&p->the_bfd, 0,

-- 
You are receiving this mail because:
You are on the CC list for the bug.


[Bug ld/30655] [2.41 Regression] patch introducing remap-inputs causes build failure in edk2

2023-07-20 Thread dannf at dannf dot org
https://sourceware.org/bugzilla/show_bug.cgi?id=30655

--- Comment #3 from dann frazier  ---
Confirmed - latest upstream is OK.

-- 
You are receiving this mail because:
You are on the CC list for the bug.