[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Symbols and C++ inline constructor

On Fri, Jan 06, 2012 at 12:14:11AM +0000, Roger Leigh wrote:
> On Thu, Jan 05, 2012 at 11:46:26PM +0100, Thomas Weber wrote:
> > Hi, 
> > I have a question about an inline constructor and debian/symbols. 
> > The code looks like this:
> > 
> > class X {
> > 
> > 	public: 
> > 		X() { some code };
> > }
> > 
> > According to http://gcc.gnu.org/onlinedocs/gcc/Inline.html, this means
> > that the constructor is inlined.
> Good question.  

Thanks :)

> IIRC inline is only a hint--it's not guaranteed to
> be inlined if the compiler thinks it's more efficient not to.  

That is exactly my problem. A newer compiler version might change the
decision of the former version due to better optimization; but then I
see no way to guarantee stable symbols in the library. 

> From the symbols POV, what really matters is the content of the ELF
> symbol table.  If it's present then include it, otherwise don't.

It's present on some architectures, but not on others. I would like to
keep the symbols files for the different architectures as much as
possible in sync, that's why I'm asking.


Reply to: