[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/28597] New: SEGV. x86_64 EFI app
From: |
christian.melki at t2data dot com |
Subject: |
[Bug ld/28597] New: SEGV. x86_64 EFI app |
Date: |
Wed, 17 Nov 2021 14:16:56 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28597
Bug ID: 28597
Summary: SEGV. x86_64 EFI app
Product: binutils
Version: 2.37
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: christian.melki at t2data dot com
Target Milestone: ---
Summary:
--------
Linking a 64-bit EFI app (U-Boot) results in a SEGV.
Overview:
---------
Trying to build an custodian u-boot tree.
https://source.denx.de/u-boot/custodians/u-boot-dm/-/tree/efi-working
Commit fa89e29c4392dd526274f073067cd3268f22552a works around --whole-archive
just to continue the process, but with a bad link result.
Steps to reproduce:
-------------------
Build tree.
Back out --whole-archive workaround.
Actual results:
---------------
Program received signal SIGSEGV, Segmentation fault.
0x00005555555d1a8f in elf_x86_64_finish_dynamic_sections
(output_bfd=0x5555557fefa0, info=0x5555557fa140 <link_info>) at
/src/binutils/bfd/elf64-x86-64.c:4676
4676 ->this_hdr.sh_entsize = htab->plt.plt_entry_size;
(gdb) bt
#0 0x00005555555d1a8f in elf_x86_64_finish_dynamic_sections
(output_bfd=0x5555557fefa0, info=0x5555557fa140 <link_info>) at
/src/binutils/bfd/elf64-x86-64.c:4676
#1 0x00005555556093ec in bfd_elf_final_link (abfd=<optimized out>,
info=<optimized out>) at /src/binutils/bfd/elflink.c:13116
#2 0x00005555555a4dd6 in ldwrite () at /src/binutils/ld/ldwrite.c:545
#3 0x000055555558c8f0 in main (argc=<optimized out>, argv=<optimized
out>) at /src/binutils/ld/ldmain.c:513
(gdb) p (struct bfd_elf_section_data
*)(htab->elf.splt->output_section)->used_by_bfd
$3 = (struct bfd_elf_section_data *) 0x0
This happens with earlier toolchains and ld.bfd versions too.
Expected results:
-----------------
Could be misuse, but ld shouldn't SEGV?
Additional information:
-----------------------
Found elf_i386_fake_section handling the COFF reloc object but no
similar function for x86_64. Am I missing something here?
I tried adding a fake section handling for x86_64, but that didn't help.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/28597] New: SEGV. x86_64 EFI app,
christian.melki at t2data dot com <=
- [Bug ld/28597] SEGV. x86_64 EFI app, hjl.tools at gmail dot com, 2021/11/18
- [Bug ld/28597] SEGV. x86_64 EFI app, hjl.tools at gmail dot com, 2021/11/18
- [Bug ld/28597] SEGV. x86_64 EFI app, hjl.tools at gmail dot com, 2021/11/18
- [Bug ld/28597] SEGV. x86_64 EFI app, cvs-commit at gcc dot gnu.org, 2021/11/18
- [Bug ld/28597] SEGV. x86_64 EFI app, hjl.tools at gmail dot com, 2021/11/18
- [Bug ld/28597] SEGV. x86_64 EFI app, christian.melki at t2data dot com, 2021/11/19