Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Luca Barbato <lu_zero@g.o>
Subject: Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Date: Sat, 31 May 2008 12:35:28 +0200
Peter Volkov wrote:
> В Птн, 30/05/2008 в 20:28 -0700, Brian Harring пишет:
>> Either way, basically it's coming down to if gentoo wants to follow 
>> the definition of 'academic' right, or 'pragmatic' right. Exempting 
>> ciaran, vote seems to be pragmatic.
> 
> Well, although I've asked about problems with having --as-needed by
> default, I'd better go with academic. C++ is quite common language to
> ignore its design problems and in the end it's not hard to define
> LDFLAGS in make.conf.
> 

To clarify:

- static initializers (as in __attribute__((constructor), so no, it 
isn't a C++ only feature) have nothing wrong with --as-needed.

- ugly code that refers to undefined symbols that are resolved to ones 
from the main binary and written in the constructor is broken already in 
  systems not allowing undefined refs.

- you don't have guarantees about the order in witch the .init sections 
are parsed and constructor function are called, they can be called in 
parallel and you have no means to have a predictable behavior, all you 
know is that everything will be called right before main() or as the 
first thing in dlopen().

- doing such stuff is uncommon since it isn't the simplest thing to do, 
doesn't work in every place, you have to be particular perverse and 
convoluted even to think about this.

- making such thing go away is good for security, maintainability and 
sanity.

lu

-- 

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

-- 
gentoo-dev@g.o mailing list


Replies:
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Alec Warner
References:
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Ciaran McCreesh
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Brian Harring
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Ciaran McCreesh
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Nirbheek Chauhan
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Ciaran McCreesh
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Nirbheek Chauhan
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Ciaran McCreesh
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Nirbheek Chauhan
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Ciaran McCreesh
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Nirbheek Chauhan
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Brian Harring
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
-- Peter Volkov
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Next by thread:
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Previous by date:
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)
Next by date:
Re: RFC: --as-needed to default LDFLAGS (Was: RFC: Should preserve-libs be enabled by default?)


Updated Jun 17, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.