Thread: [Solved] GCC version 4.6.4 and C++11
View Single Post
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 10-28-2018 , 14:48   Re: GCC version 4.6.4 and C++11
Reply With Quote #4

Thanks for your help, now I see how it works.
I checked the extensions this way:
Quote:
> nm /home/d/SDK/sourcemod/build/extensions/Extension/Extension/extension.ext.2.css/extension.ext.2.css.so
And found out that there are std::string and unordered_* container symbols from 18-21 versions.
I made these changes:
Quote:
std::unordered_set -> std::tr1::unordered_set
std::unordered_map -> std::tr1::unordered_map
std::unordered_multimap -> std::tr1::unordered_multimap
cxx.cxxflags += '-D_GLIBCXX_USE_CXX11_ABI=0'
And it pushed the required version from 21-18 to 14.

Here are some symbols from 18+ versions, that I had to get rid of:
Quote:
_ZSt24__throw_out_of_range_fmtPKcz@@GLIBCXX_3 .4.20 // std::vector::at()
_ZNKSt7__cxx1112basic_stringIcSt11char_traits IcESaIcEE5c_strEv@@GLIBCXX_3.4.21 // std::string
_ZNKSt8__detail20_Prime_rehash_policy14_M_nee d_rehashEjjj@@GLIBCXX_3.4.18 // unordered containers
It wasn't clear at first where these symbols came from, as there were no direct use of "throw_out_of_range" or "Prime_rehash_policy" in my code. The idea is to open the compiled extension in IDA and check the symboils in it via "text search". Then it gets clear in which subroutione and where exactelly the symbols are used. F5 shows pseudocode, which helps to analyze how the source code comes to these symbols.

Last edited by kadet.89; 10-30-2018 at 05:55.
kadet.89 is offline
Send a message via Skype™ to kadet.89