[PATCH] D21607: [ELF] - Proccess 'extern' keyword in version scripts.
Ed Maste via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 10:36:52 PDT 2016
On 22 June 2016 at 09:27, George Rimar <grimar at accesssoftek.com> wrote:
> grimar created this revision.
> grimar added reviewers: rafael, ruiu.
> grimar added subscribers: llvm-commits, grimar.
> Herald added a subscriber: emaste.
>
> During investigation about FreeBsd scripts I found that few of them uses
> 'extern' keyword. This patch just reads all globals inside as regular ones.
>
> Note: I downloaded FreeBsd sources and tried to link with every *.map file in batch mode,
> some of them are not script files, so I had to skip them manually.
> Seems that this one in combination with D21556 allows to parse all available
> FreeBsd version scripts.
I spoke too soon in my earlier reply to this thread. We do have
version scripts in FreeBSD for Tier-1 architectures that use extern
C++ in the version definitions: libcxxrt is intended to be a libsupc++
drop-in replacement and has quite a few typeinfo, vtable and other C++
symbols in the Version.map.
As an aside it looks like the error handling reports the wrong line
for "extern." This snipped from the Version.map:
43 __gxx_personality_v0;
44
45 extern "C++" {
46 # Type info classes and their destructors
47 "__cxxabiv1::__array_type_info";
produced this error:
line 43: extern keyword is not supported
__gxx_personality_v0;
^
As it turns out FreeBSD's GNU ld 2.17.50 isn't able to demangle a
number of symbols and so there are a set of explicit mangled symbols
in the Version.map:
115 # C++11 typeinfo not understood by our linker
116 # std::nullptr_t
117 _ZTIDn;_ZTIPDn;_ZTIPKDn;
118 # char16_t
119 _ZTIDi;_ZTIPDi;_ZTIPKDi;
120 # char32_t
121 _ZTIDs;_ZTIPDs;_ZTIPKDs;
122 # IEEE 754r decimal floating point
123 _ZTIDd;_ZTIPDd;_ZTIPKDd;
124 _ZTIDe;_ZTIPDe;_ZTIPKDe;
125 _ZTIDf;_ZTIPDf;_ZTIPKDf;
126 # IEEE 754r half-precision floating point
127 _ZTIDh;_ZTIPDh;_ZTIPKDh;
More information about the llvm-commits
mailing list