[PATCH] D19656: [ELF] - keep alive all non-text sections referenced by .eh_frame

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 13:18:25 PDT 2016


compnerd requested changes to this revision.
compnerd added a reviewer: compnerd.
compnerd added a comment.
This revision now requires changes to proceed.

This introduces a new crash on x86_64.  Ive not had a chance to reduce this to a test case that is easy to work with, but the following seems to demonstrate the issue:

$ cat /tmp/reduced.cc
 struct S { static inline long m() { return 0; } };

#if defined(TU_A)
 void f(void) { S::m(); }
 #elif defined(TU_B)
 void g(void) { S::m(); }
 #endif

$ clang++ -target x86_64-unknown-linux-gnu -DTU_A -c /tmp/reduced.cc -o /tmp/reduced-0.o
 $ clang++ -target x86_64-unknown-linux-gnu -DTU_B -c /tmp/reduced.cc -o /tmp/reduced-1.o
 $ lld -flavor gnu --eh-frame-hdr -m elf_x86_64 -shared -o /tmp/reduced.so --gc-sections /tmp/reduced-0.o /tmp/reduced-1.o


http://reviews.llvm.org/D19656





More information about the llvm-commits mailing list