[PATCH] D36573: [ELF] - Treat .gnu.linkonce sections as COMDAT
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 16:06:27 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/InputFiles.cpp:496-502
// The linkonce feature is a sort of proto-comdat. Some glibc i386 object
// files contain definitions of symbol "__x86.get_pc_thunk.bx" in linkonce
- // sections. Drop those sections to avoid duplicate symbol errors.
+ // sections. Section usually named as '.gnu.linkonce.TYPE.NAME', where NAME
+ // is a symbol name this section contains and also a name of comdat group.
+ // Usually NAME does not contain dots ('.'), but case above is special.
+ // Since this is temporary hack, we handle only ".gnu.linkonce.t.*" sections
+ // as minimal case for simplicity.
----------------
".gnu.linkonce.t" is not the only ".gnu.linkonce" section. There are other sections such as ".gnu.linkonce.r". Why can you ignore them but only handle ".gnu.linkonce.t"? It seems something is missing.
https://reviews.llvm.org/D36573
More information about the llvm-commits
mailing list