From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20436 invoked by alias); 21 Jan 2005 06:35:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20399 invoked by uid 48); 21 Jan 2005 06:35:47 -0000 Date: Fri, 21 Jan 2005 06:35:00 -0000 Message-ID: <20050121063547.20398.qmail@sourceware.org> From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050119002432.19520.hjl@lucon.org> References: <20050119002432.19520.hjl@lucon.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/19520] protected function pointer doesn't work right X-Bugzilla-Reason: CC X-SW-Source: 2005-01/txt/msg02969.txt.bz2 List-Id: ------- Additional Comments From ian at airs dot com 2005-01-21 06:35 ------- I think this bug report is reporting an actual bug. At least when using ELF, when the compiler takes the address of a protected function, it has to act as though it is taking the address of an ordinary function, and rely on the dynamic linker to do the right thing. If the compiler takes the address of a protected function without using the PLT, then as HJ says function symbols can not compare equal, even though they should. This is not something the linker can fix up. The dynamic linker, however, when setting up the PLT, should observe that the symbol is protected, and call the local symbol even if the executable overrides it. In other words, we should only treat protected function symbols as special when we call them. Otherwise they should be treated as ordinary symbols. This only applies to ELF. I don't know what should be done for other object file formats, if there are any others which support protected symbols. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19520