Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"multiple .eh_frame sections not supported for .eh_frame_hdr" assertion failure attempting to link FreeBSD/mips64 libc #28021

Closed
emaste opened this issue May 4, 2016 · 4 comments
Labels
bugzilla Issues migrated from bugzilla lld worksforme Resolved as "works for me"

Comments

@emaste
Copy link
Member

emaste commented May 4, 2016

Bugzilla Link 27647
Resolution WORKSFORME
Resolved on Jun 23, 2016 17:47
Version unspecified
OS FreeBSD
Blocks #23588
CC @compnerd,@atanasyan

Extended Description

With the change in http://reviews.llvm.org/D19928, linking FreeBSD/mips64 libc fails with:

Assertion failed: ((!this->Sec || this->Sec == Sec) && "multiple .eh_frame sections not supported for .eh_frame_hdr"), function assignEhFrame, file ../tools/lld/ELF/OutputSections.cpp, line 850.

(lldb) bt

  • thread #​1: tid = 0, 0x00000008058a6aaa libc.so.7`__sys_thr_kill + 10 at thr_kill.S:3, name = 'lld', stop reason = signal SIGABRT
    • frame #​0: 0x00000008058a6aaa libc.so.7__sys_thr_kill + 10 at thr_kill.S:3 frame #​1: 0x00000008058a6a96 libc.so.7__raise(s=) + 38 at raise.c:51
      frame #​2: 0x00000008058a6a66 libc.so.7abort + 150 at abort.c:77 frame #​3: 0x000000080590d3c1 libc.so.7__assert(func=, file=, line=, failedexpr=) + 81 at assert.c:54
      frame #​4: 0x000000000060390c lldlld::elf::EhFrameHeader<llvm::object::ELFType<(this=0x00007fffffff5a58, Sec=0x0000000808890c00)0, true> >::assignEhFrame(lld::elf::EHOutputSection<llvm::object::ELFType<(llvm::support::endianness)0, true> >*) + 92 at OutputSections.h:849 frame #&#8203;5: 0x000000000063831c lldEHOutputSection(this=0x0000000808890c00, Name=StringRef at 0x00007fffffff3be8, Type=1, Flags=2) + 492 at OutputSections.cpp:1022
      frame #​6: 0x0000000000638363 lldEHOutputSection(this=0x0000000808890c00, Name=StringRef at 0x00007fffffff3cc8, Type=1, Flags=2) + 51 at OutputSections.h:1023 frame #&#8203;7: 0x0000000000743792 lld(anonymous namespace)::OutputSectionFactory<llvm::object::ELFType<(this=0x00007fffffff4188, C=0x0000000808974000, OutsecName=StringRef at 0x00007fffffff3dc0)0, true> >::create(lld::elf::InputSectionBase<llvm::object::ELFType<(llvm::support::endianness)0, true> >*, llvm::StringRef) + 514 at Writer.cpp:1201
      frame #​8: 0x000000000073a92f lld(anonymous namespace)::Writer<llvm::object::ELFType<(this=0x00007fffffff5268)0, true> >::createSections() + 2287 at Writer.cpp:1342 frame #&#8203;9: 0x00000000007391d6 lld(anonymous namespace)::Writer<llvm::object::ELFType<(this=0x00007fffffff5268)0, true> >::run() + 70 at Writer.cpp:219
      frame #​10: 0x00000000007ab015 lldvoid lld::elf::writeResult<llvm::object::ELFType<(Symtab=0x00007fffffff6708)0, true> >(lld::elf::SymbolTable<llvm::object::ELFType<(llvm::support::endianness)0, true> >*) + 6293 at Writer.cpp:211 frame #&#8203;11: 0x0000000000548d8b lldvoid lld::elf::LinkerDriver::link<llvm::object::ELFType<(this=0x00007fffffff7138, Args=0x00007fffffff6c38)0, true> >(llvm::opt::InputArgList&) + 2411 at Driver.cpp:501
      frame #​12: 0x000000000053b613 lldlld::elf::LinkerDriver::main(this=0x00007fffffff7138, ArgsArr=ArrayRef<const char *> at 0x00007fffffff6e70) + 1683 at Driver.cpp:279 frame #&#8203;13: 0x000000000053af16 lldlld::elf::link(Args=ArrayRef<const char *> at 0x00007fffffff73a0, Error=0x00000000046a7278) + 182 at Driver.cpp:48
      frame #​14: 0x0000000000448827 lldmain(Argc=1257, Argv=0x00007fffffff74e8) + 231 at lld.cpp:107 frame #&#8203;15: 0x000000000044865f lld_start(ap=, cleanup=) + 367 at crt1.c:78

(I don't expect lld to produce a working FreeBSD/mips64 build yet, of course, but will keep track of the individual issues I find while investigating.)

@emaste
Copy link
Member Author

emaste commented May 4, 2016

Reproduction .cpio file available at https://people.freebsd.org/~emaste/lld/mips-libc.cpio

@atanasyan
Copy link
Collaborator

Is this bug still reproducible?

@emaste
Copy link
Member Author

emaste commented Jun 23, 2016

Is this bug still reproducible?

Will re-test again soon.

@emaste
Copy link
Member Author

emaste commented Jun 24, 2016

No longer reproducible: lld now links FreeBSD's libc.so. No comment on whether it works, and the build fails later on for other reasons.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
@Quuxplusone Quuxplusone added the worksforme Resolved as "works for me" label Jan 20, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lld worksforme Resolved as "works for me"
Projects
None yet
Development

No branches or pull requests

3 participants